Add a DISTRIBUTION panel: where a card stands among all of GitHub#37
Add a DISTRIBUTION panel: where a card stands among all of GitHub#37ykdojo wants to merge 7 commits into
Conversation
A small histogram under the scouting metrics showing the rating distribution of 18,107 uniformly random GitHub accounts (scored with this repo's own engine), with the card's overall marked and two percentile baselines: all of GitHub, and accounts active in the past year. Data is fully anonymized (per-rating counts only).
|
Hello @ykdojo, Before I merge this, the commits are authored under 14807308+ykdojo@users.noreply.github.com, which resolves to a different account (alisonschwartzlulu), not yours. Is that an alt from your agent tooling? Happy to merge, but I'd rather the attribution point at you. |
Yes, happy with you squashing and cleaning it up later, thanks! |
131def6 to
e378297
Compare
|
should be fixed now |
|
@ykdojo thank you, will review it in dev |
|
Really like this one - the panel fits the report's style and the baked-data approach means zero runtime cost, which is exactly what I want. One thing before I can merge: can you attach the sampling/scoring script you used to generate |
Move the baked histogram out of TypeScript constants into lib/distribution-data.json; lib/distribution-data.ts becomes a thin typed re-export so component imports are unchanged. The data itself is untouched (same n=18,107 sample from 2026-07-04). Add distribution-runner.ts, which regenerates the JSON from scratch: uniform random id sampling, the same GraphQL signals the server fetches, scoring via the repo's own signalsFromPayload + buildCard, aggregated in memory so only anonymous per-rating counts ever touch disk. A --check mode scores named logins for comparison against the live site. Add a vitest suite locking the histogram invariants the panel relies on.
--sample now defaults to 20,000 attempted accounts, matching the original run (18,107 scored). Periodic flushes mark the output complete: false; a plain rerun that finds an interrupted file stops with instructions instead of silently discarding it, --resume reloads the aggregate and continues toward the target (keeping the original sample date), and --fresh discards it explicitly. Resuming is deliberately not automatic so a rerun after a scoring change cannot mix old and new scores. Errors now exit with a clean one-line message instead of a stack trace. The committed snapshot gains the matching metadata (attempted: 20000, complete: true); counts are byte-identical.
The invariants it locked are only violated by a buggy runner or a hand-edited JSON; small-sample runs and --check already cover the former at regeneration time. Keeps the PR to the script and the data.
Make the distribution data scriptable: JSON data + end-to-end runner
|
done 9247025 |
This PR adds a small DISTRIBUTION section under the scouting metrics that
shows where a card stands, in the report's existing visual language:
It is a histogram of the overall ratings of 18,107 uniformly random GitHub
accounts, scored with this repo's own engine. Hovering the caption explains
the numbers, using the existing
Tipcomponent:The change:
DistributionPanel.tsx(SVG, no new dependencies, reuses theSectionstyling and the now-exportedTip),lib/distribution-data.ts(anonymous per-rating counts for two populations: all accounts, and those
with at least one contribution in the past year), and a small mount in
ResultView.tsx. Four files, ~116 lines.Methodology: GitHub account ids are sequential and dense, so ids drawn
uniformly at random from [1, 300M] (a ceiling just above the current max id)
give an unbiased sample of all accounts; organizations filtered out. Scoring uses the
real
buildCard. 20,000 logins attemptedon 2026-07-03/04; 18,107 scorable (the rest are suspended or spam accounts).