Chart specifications for ACF (Autocorrelation Function) plots.
Provides:
Both chart types show autocorrelation coefficients for all lags, with severity-based coloring and threshold visualization.
Chart specifications for ACF (Autocorrelation Function) plots. Provides: - Vega-Lite point charts for graphical viewers (:portal, :kindly) - ASCII bar chart rendering for text viewers (:print, :pprint) Both chart types show autocorrelation coefficients for all lags, with severity-based coloring and threshold visualization.
(acf->chart-data acf-data)Transform ACF analysis data to chart data format.
Takes autocorrelation analysis result for a metric path. Returns vector of maps: [{:lag k :acf rₖ :severity "none"} ...]
Parameters: acf-data - autocorrelation analysis result with :acf map and :effective-sample-size
Transform ACF analysis data to chart data format.
Takes autocorrelation analysis result for a metric path.
Returns vector of maps: [{:lag k :acf rₖ :severity "none"} ...]
Parameters:
acf-data - autocorrelation analysis result with :acf map and
:effective-sample-size(acf-plot-vega-spec acf-data chart-options)Build complete Vega-Lite spec for ACF plot.
Takes autocorrelation analysis data for a single metric and chart options.
Parameters: acf-data - autocorrelation analysis result with :acf, :effective-sample-size, etc. chart-options - map with :width, :height, :title, :min-severity (optional) :min-severity - if provided, returns nil unless at least one lag has severity at or above this level (:none, :minor, :moderate, :severe)
Returns Vega-Lite spec map, or nil if suppressed by min-severity threshold.
Build complete Vega-Lite spec for ACF plot.
Takes autocorrelation analysis data for a single metric and chart options.
Parameters:
acf-data - autocorrelation analysis result with :acf,
:effective-sample-size, etc.
chart-options - map with :width, :height, :title, :min-severity (optional)
:min-severity - if provided, returns nil unless at least one lag has
severity at or above this level
(:none, :minor, :moderate, :severe)
Returns Vega-Lite spec map, or nil if suppressed by min-severity threshold.(acf-point-layer chart-data)Create point layer for ACF values.
Returns Vega-Lite layer spec with points colored by severity.
Create point layer for ACF values. Returns Vega-Lite layer spec with points colored by severity.
(has-severity-at-or-above? lag-severities min-severity)Check if any lag has severity at or above the given threshold.
Parameters: lag-severities - map of lag -> severity keyword min-severity - minimum severity to check for (:none, :minor, :moderate, :severe)
Returns true if any lag meets or exceeds the threshold.
Check if any lag has severity at or above the given threshold.
Parameters:
lag-severities - map of lag -> severity keyword
min-severity - minimum severity to check for
(:none, :minor, :moderate, :severe)
Returns true if any lag meets or exceeds the threshold.Blue tones for lag-1 threshold lines.
Blue tones for lag-1 threshold lines.
Gray tones for other-lag threshold lines.
Gray tones for other-lag threshold lines.
(period-annotation-layer acf-data chart-data)Create text annotation layer for detected period.
Returns Vega-Lite layer spec with text mark at the period lag, or nil if no period.
Create text annotation layer for detected period. Returns Vega-Lite layer spec with text mark at the period lag, or nil if no period.
(render-ascii-acf-plot {:keys [acf effective-sample-size lag-severities
thresholds]}
metric-label
opts)Render ASCII ACF plot for a single metric as a string.
Shows autocorrelation coefficients as bidirectional ASCII bar charts. Returns nil if no lags meet the min-severity threshold.
Parameters: acf-data - map with :acf, :effective-sample-size, :lag-severities, :thresholds metric-label - string label for the metric opts - options map: :min-severity - minimum severity to display (default :moderate) :bar-width - half-width of bar in characters (default 15) :header-fn - fn [metric-label n] -> header string :indent - string prefix for continuation lines
Render ASCII ACF plot for a single metric as a string.
Shows autocorrelation coefficients as bidirectional ASCII bar charts.
Returns nil if no lags meet the min-severity threshold.
Parameters:
acf-data - map with :acf, :effective-sample-size,
:lag-severities, :thresholds
metric-label - string label for the metric
opts - options map:
:min-severity - minimum severity to display (default :moderate)
:bar-width - half-width of bar in characters (default 15)
:header-fn - fn [metric-label n] -> header string
:indent - string prefix for continuation linesVega-Lite color scale for severity.
Vega-Lite color scale for severity.
Color palette for ACF bar severity levels.
Color palette for ACF bar severity levels.
Canonical ordering of severity levels for consistent legend display.
Canonical ordering of severity levels for consistent legend display.
Numeric ranking for severity comparison. Higher = more severe.
Numeric ranking for severity comparison. Higher = more severe.
(threshold-rule-layers chart-data thresholds)Create horizontal rule layers for crossed threshold lines.
Shows lag-1 thresholds in blue tones and other-lag thresholds in gray tones. Only shows thresholds that are actually crossed by at least one data point.
Parameters: chart-data - vector of {:lag :acf :severity} maps thresholds - map with :lag-1 and :other threshold maps (from analysis)
Returns vector of Vega-Lite layer specs.
Create horizontal rule layers for crossed threshold lines.
Shows lag-1 thresholds in blue tones and other-lag thresholds in gray tones.
Only shows thresholds that are actually crossed by at least one data point.
Parameters:
chart-data - vector of {:lag :acf :severity} maps
thresholds - map with :lag-1 and :other threshold maps (from analysis)
Returns vector of Vega-Lite layer specs.(zero-line-layer)Create horizontal rule at y=0 for reference.
Create horizontal rule at y=0 for reference.
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 |