processed_growth¶
SQL type: SimpleAggregateFunction(anyLast, Nullable(String)) — JSON
Table: keywords.keywords_data_local
Last validated: 2026-05-21
What it is¶
Growth metrics + classification for a keyword. JSON containing year-over-year and rolling-window growth rates, a trend-strength score, a seasonality flag, and a categorical growth_class tag (one of exploding / growing / stable / declining / crashing / gated).
How it's computed¶
Computed by build_growth_json() (function defined around processing.py:L459) over the combined_volume_data_sorted series — i.e. the blended trend that becomes processed_volume_trend.
The hybrid growth system has three tiers (memory: archived hybrid_growth.md covers the full logic, decision nodes will land in Phase 3):
- Tier 1 (< 6 months of history) — month-over-month
- Tier 2 (6–23 months) — rolling-window comparisons
- Tier 3 (24+ months) — year-over-year with seasonality detection
Seasonality detection routes a keyword's growth calculation differently — seasonal keywords compare same-month YoY rather than rolling-window. Detected via lag-12 ACF (processing.py:KB-ANCHOR:seasonal-route-acf).
Gate¶
processing.py:KB-ANCHOR:growth-metrics-display-gate: growth metrics are computed only when processed_keyword_volume > 200 (the strict gate — no JS branch, unlike the trend display gate). Sub-200 keywords get an empty/null growth JSON so downstream consumers (extract_gt_year_keywords, pe_update, bot_scan, demo growth API) ignore them.
This intentionally matches prod's display threshold to avoid showing growth tags on keywords whose volume isn't displayed.
Schema (representative)¶
{
"yoy_3m": 45.2,
"yoy_6m": 32.1,
"yoy_12m": 18.7,
"growth_3m": 12.3,
"growth_6m": 8.4,
"trend_strength": 0.65,
"is_seasonal": false,
"growth_class": "growing"
}
The exact keys evolve — build_growth_json is the authoritative shape definition.
Edge cases¶
- Sub-200 keywords → empty JSON or
null. Downstream code must handle this — recent versions of the consumers do. - Bot-corrected keywords — growth is computed over the repaired trend, not the raw bot-inflated one. A keyword whose spikes were corrected will show calmer growth than its raw GSC would imply.
- Trend-type routing — keywords whose trend-type-classifier outputs
lumpy/isolated_event/deadskip the forecast but still get growth metrics over the observed portion.
Downstream¶
- The product surfaces the
growth_classtag and the YoY percentages as the "Growth" panel. pe_update.pyreadsgrowth_3mfor the growth-weighted ranking score:score = volume × (1 + clip(growth_3m, -50, 200) / 100)(processing.py:KB-ANCHOR:pe-growth-weighted-score).- Global aggregation produces
processed_growth_globalover the country-summed trend.
See also¶
processed_volume_trend— input series this growth is computed over- pe-update — biggest internal consumer (growth-weighted ranking)
- Archive:
_archive/hybrid_growth.md,_archive/hybrid_growth_timeframes.md— original tier-system writeup; Phase 3 will decompose these into decision nodes - Decisions (Phase 3) —
growth-metrics-display-gate,seasonal-route-acf, the tier-routing anchors (TBD in Phase 3)