Mark types that render as annotations (rules, bands) rather than data layers.
Mark types that render as annotations (rules, bands) rather than data layers.
(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.
(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.
(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).
(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).
(cross xs ys)Cartesian product of two sequences.
Cartesian product of two sequences.
(draft? x)True if x is a draft (leaf or composite).
True if x is a draft (leaf or composite).
(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`.
(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).
(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-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.
(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).
(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).
(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).
(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).
(plan? x)True if x is a plan (leaf or composite).
True if x is a plan (leaf or composite).
(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.
(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).
(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 :identityResolve 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`(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.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |