Skip to content

feat: ICP geography classification for the company page - #2

Open
sashaorlyk-cell wants to merge 4 commits into
mainfrom
feat/geography-icp
Open

feat: ICP geography classification for the company page#2
sashaorlyk-cell wants to merge 4 commits into
mainfrom
feat/geography-icp

Conversation

@sashaorlyk-cell

Copy link
Copy Markdown
Collaborator

Adds a geography → ICP classifier and surfaces it in Grafana next to the page dashboard.

  • geo_classify.py — maps LinkedIn locations to buckets: US (ICP), Ukraine (team), India/China (off-ICP), Other.
  • parse-page-xls.py — emits a geography block into monthly.json.
  • build-page-dashboard.mjs — new ICP geography row: US-share stat tiles + ICP-bucket bar gauges.
  • Dashboard already pushed live to Grafana (version 2).

First real signal: 25.6% of visitors are US (ICP), India is the largest off-ICP block (560 / 9.3%). This is the 12-month aggregate; per-post geography is the next step.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1704cd6e-5bce-49ea-9c64-41b92ea724eb


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

- geo_classify.py: pure classifier mapping LinkedIn location strings to ICP
  buckets — US (ICP target), Ukraine (team/internal), India+China (off-ICP),
  Other (off-target). US convention: metros with no country suffix are US.
- parse-page-xls.py: emit a `geography` block (visitors + followers buckets,
  ICP % and country breakdown) into monthly.json, from the Location sheets.
- build-page-dashboard.mjs: add an "ICP geography" row — US-ICP share stat
  tiles (red<30 / orange / green>=50) + ICP-bucket bar gauges for visitors and
  followers.
- linkedin-page.json + monthly.json regenerated with the geography data.

First real read on S&F's page: only 25.6% of visitors are US (ICP); India is
the largest off-ICP block (560, 9.3%). Aggregate over 12 months; per-post is
the next step.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
sashaorlyk-cell and others added 3 commits August 20, 2026 21:36
- geo-monthly.py: build a per-MONTH geography trend from one Visitors XLS
  export per calendar month (LinkedIn demographics have no date column, so a
  monthly trend needs one export per month).
- dashboards/li-stats/page/geo-monthly.json: 6 real monthly points (Mar-Aug
  2026) — US-ICP share and India/China share per month.
- build-page-dashboard.mjs: two new monthly charts in the ICP-geography row —
  "US · ICP share of visitors by month" and stacked "Visitor geography by
  month" — rendered like the page-views trend.
- linkedin-page.json regenerated (pushed live to Grafana).

The trend is actionable: Mar 11% US / 17% India (worst), Jun 53% US (best),
Jul regressed to 19% US.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Monthly charts held static inline data with the month as a LABEL, not a date,
so Grafana's time picker could not filter them. Fix: a $month Custom variable
plus a Selected-month row whose stat tiles filter via a backend-parser inline
target with filterExpression month == ${month} (parser simple ignores it).
Verified live: 2026-03 = 11.3% US; 2026-06 = 53.3% US.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The ICP-geography headline used the full 365-day export (12 months) while the
rest of the dashboard is 6 months. Now the visitor aggregate is the sum of the
6 monthly exports (Location is additive views): US-ICP share 29.4% over Mar-Aug
2026 (was 25.6% over 12mo). Followers stay the current-base snapshot (a stock,
not a 6-month flow) and are relabelled '(base)'.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant