Liking cljdoc? Tell your friends :D

scicloj.plotje.impl.resolve


annotation-marksclj

Mark types that render as annotations (rules, bands) rather than data layers.

Mark types that render as annotations (rules, bands) rather than data layers.
sourceraw docstring

column-ref?clj

(column-ref? v)

True if v is a column reference (keyword or string). Both keyword and string column names are valid references.

True if v is a column reference (keyword or string).
Both keyword and string column names are valid references.
sourceraw docstring

column-typeclj

(column-type ds col)

Classify a dataset column as :categorical, :numerical, or :temporal. The column name must literally match a column in the dataset.

Classify a dataset column as `:categorical`, `:numerical`, or `:temporal`.
The column name must literally match a column in the dataset.
sourceraw docstring

composite-draft?clj

(composite-draft? x)

True if x is a composite draft (a tree of sub-drafts with chrome-spec).

True if x is a composite draft (a tree of sub-drafts with chrome-spec).
sourceraw docstring

composite-plan?clj

(composite-plan? x)

True if x is a composite plan (a tree of sub-plots with chrome).

True if x is a composite plan (a tree of sub-plots with chrome).
sourceraw docstring

crossclj

(cross xs ys)

Cartesian product of two sequences.

Cartesian product of two sequences.
sourceraw docstring

draft?clj

(draft? x)

True if x is a draft (leaf or composite).

True if x is a draft (leaf or composite).
sourceraw docstring

infer-column-typesclj

(infer-column-types ds v)

Detect x and y column types (:categorical, :numerical, :temporal). Temporal columns are converted to epoch-ms numbers; their original extents (as LocalDateTime) are preserved for wadogo :datetime ticks. Returns a map with keys :ds, :x-type, :y-type, :x-temporal?, :y-temporal?, :x-temporal-extent, :y-temporal-extent, :x-resolved, :y-resolved.

Detect x and y column types (`:categorical`, `:numerical`, `:temporal`).
Temporal columns are converted to epoch-ms numbers; their original
extents (as `LocalDateTime`) are preserved for wadogo `:datetime` ticks.
Returns a map with keys `:ds`, `:x-type`, `:y-type`, `:x-temporal?`,
`:y-temporal?`, `:x-temporal-extent`, `:y-temporal-extent`,
`:x-resolved`, `:y-resolved`.
sourceraw docstring

infer-groupingclj

(infer-grouping v color-type color-col)

Build the grouping vector from explicit :group and categorical color column. Explicit groups are passed through; categorical color columns are appended. Returns a vector of column references (keywords or strings).

Build the grouping vector from explicit :group and categorical color column.
Explicit groups are passed through; categorical color columns are appended.
Returns a vector of column references (keywords or strings).
sourceraw docstring

infer-layer-typeclj

(infer-layer-type v x-type y-type x-temporal? y-temporal?)

Choose mark and stat from column types when the user hasn't specified them. Rules:

  • x only, categorical → :rect + :count (bar chart)
  • x only, non-categorical → :bar + :bin (histogram)
  • temporal x + numerical y → :line + :identity (time-series line)
  • categorical x + numerical y → :boxplot + :boxplot (vertical)
  • numerical x + categorical y → :boxplot + :boxplot (horizontal)
  • otherwise → :point + :identity (scatter) x-type/y-type come from infer-column-types, which reports temporal columns as :numerical (they're stored as epoch-ms); x-temporal?/y-temporal? flag the original temporal classification. When the user provides an explicit mark, stat defaults to :identity unless they also provided an explicit stat.
Choose mark and stat from column types when the user hasn't specified them.
Rules:
  - x only, categorical       → :rect    + :count    (bar chart)
  - x only, non-categorical   → :bar     + :bin      (histogram)
  - temporal x + numerical y  → :line    + :identity (time-series line)
  - categorical x + numerical y → :boxplot + :boxplot (vertical)
  - numerical x + categorical y → :boxplot + :boxplot (horizontal)
  - otherwise                 → :point   + :identity (scatter)
`x-type`/`y-type` come from `infer-column-types`, which reports
temporal columns as `:numerical` (they're stored as epoch-ms);
`x-temporal?`/`y-temporal?` flag the original temporal classification.
When the user provides an explicit mark, stat defaults to :identity
unless they also provided an explicit stat.
sourceraw docstring

layer-type?clj

(layer-type? x)

True if x is a layer-type (mark + stat + position bundle).

True if x is a layer-type (mark + stat + position bundle).
sourceraw docstring

leaf-draft?clj

(leaf-draft? x)

True if x is a leaf draft (a vector of draft layers + pose-level opts).

True if x is a leaf draft (a vector of draft layers + pose-level opts).
sourceraw docstring

leaf-plan?clj

(leaf-plan? x)

True if x is a leaf plan (single-pose resolved geometry).

True if x is a leaf plan (single-pose resolved geometry).
sourceraw docstring

plan-layer?clj

(plan-layer? x)

True if x is a plan-layer (resolved geometry for one mark).

True if x is a plan-layer (resolved geometry for one mark).
sourceraw docstring

plan?clj

(plan? x)

True if x is a plan (leaf or composite).

True if x is a plan (leaf or composite).
sourceraw docstring

resolve-aestheticsclj

(resolve-aesthetics ds v)

Classify each aesthetic channel (:color, :size, :alpha, :text) as either a column reference or a fixed literal value. For :color, a string value is checked against dataset column names (both string and keyword) — if it matches, it's treated as a column ref; otherwise it's a literal color string. Returns a map with keys :color, :color-is-col?, :color-type, :fixed-color, :size, :size-is-col?, :fixed-size, :alpha, :alpha-is-col?, :fixed-alpha, :text-col.

Classify each aesthetic channel (:color, :size, :alpha, :text) as either
a column reference or a fixed literal value.
For :color, a string value is checked against dataset column names
(both string and keyword) — if it matches, it's treated as a column ref;
otherwise it's a literal color string.
Returns a map with keys :color, :color-is-col?, :color-type, :fixed-color,
:size, :size-is-col?, :fixed-size, :alpha, :alpha-is-col?, :fixed-alpha,
:text-col.
sourceraw docstring

resolve-col-nameclj

(resolve-col-name _ds ref)

Look up a column name in a dataset. Returns the name unchanged whether or not the dataset contains it; the existence check is informational. Matching is strict: :x does not match a column literally named "x". The reference and the dataset column name must be identical (same type, same characters).

Look up a column name in a dataset. Returns the name unchanged
whether or not the dataset contains it; the existence check is
informational. Matching is strict: `:x` does not match a column
literally named `"x"`. The reference and the dataset column name
must be identical (same type, same characters).
sourceraw docstring

resolve-draft-layerclj

(resolve-draft-layer v)

Resolve a single draft layer: infer column types, aesthetics, grouping, and layer type. Delegates to infer-column-types, resolve-aesthetics, infer-grouping, and infer-layer-type — each named for the inference step it performs. Also normalizes user-facing shorthand options:

  • :bandwidth:cfg {:<stat>-bandwidth ...} (routed per stat)
  • :tile with :fill → stat :identity
Resolve a single draft layer: infer column types, aesthetics, grouping, and layer type.
Delegates to `infer-column-types`, `resolve-aesthetics`, `infer-grouping`,
and `infer-layer-type` — each named for the inference step it performs.
Also normalizes user-facing shorthand options:
  - `:bandwidth` → `:cfg {:<stat>-bandwidth ...}` (routed per stat)
  - `:tile` with `:fill` → stat `:identity`
sourceraw docstring

temporal->epoch-msclj

(temporal->epoch-ms v)

Convert a temporal value to epoch-milliseconds (double). Accepts LocalDate, LocalDateTime, Instant, and java.util.Date. Returns ##NaN for nil input.

Convert a temporal value to epoch-milliseconds (double).
Accepts LocalDate, LocalDateTime, Instant, and java.util.Date.
Returns ##NaN for nil input.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close