Skip to content

Add a 200m/400m lane draw converter - #68

Draft
jchen1 wants to merge 2 commits into
masterfrom
jchen1/lane-converter-v2
Draft

Add a 200m/400m lane draw converter#68
jchen1 wants to merge 2 commits into
masterfrom
jchen1/lane-converter-v2

Conversation

@jchen1

@jchen1 jchen1 commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Summary

Extends the lane-draw converter from a single hardcoded 200m-men constant to all four sprint cohorts, using new fixed-effects estimates from Diamond League (2015–2025) and NCAA FlashResults (2016–2026) data.

  • New page /projects/track/lane-draw/: event (200m/400m) and sex selects; conversion shows an uncertainty range derived from the pooled 95% CI (hidden when current lane == target lane).
  • lib/track/laneDraw.ts: pooled inverse-variance constants per event×sex — 200m men −0.0232, 200m women −0.0125, 400m men −0.0240, 400m women −0.0356 s/lane — with all eight source estimates (elite + collegiate, athlete+race FE) documented alongside.
  • Old slug /projects/track/200m-lane-draw/ becomes a param-preserving client redirect (static export → client-side), hidden from the utilities index and search index via a new hidden page export.
  • Unlike the sibling calculators, the new page adopts incoming URL params on cold load (router.isReady gate) before writing defaults back to the URL, so Share links restore state.

Testing

  • npm run build passes (202 pages); tsc --noEmit, eslint, prettier clean.
  • Headless-browser checks against the production build (npm start): conversion arithmetic hand-verified for all four cohorts, URL params round-trip, old-slug redirect carries params and converts identically, utilities/search indices list the new page once and the old slug not at all, sibling calculators unaffected.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
website Ready Ready Preview Aug 12, 2026 5:00pm

Request Review

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown

Bundle Size

Route Size (gzipped)
/ 34.31KB (+1B)
/404 32.98KB (+0B)
/[page] 34.28KB (-1B)
/_app 42.76KB (+0B)
/_error 33.16KB (+0B)
/about 35.22KB (-1B)
/archive 33.61KB (+0B)
/impact 35.23KB (+0B)
/jota 35.22KB (+0B)
/jota/privacy 35.23KB (+0B)
/meet-reports 33.64KB (+0B)
/meet-reports/[slug] 36.11KB (+0B)
/metrics 38.09KB (+1B)
/posts/[slug] 36.1KB (+0B)
/projects 35.21KB (+0B)
/projects/track 33.46KB (+1B)
/projects/track/100m-predictor 38.06KB (+0B)
/projects/track/200m-lane-draw 33.66KB (-2.02KB)
/projects/track/lane-draw 36.34KB (added)
/projects/track/points-calculator 43.28KB (+1B)
/projects/track/wind-correction 35.91KB (+1B)
/tag/[tag] 34.62KB (+0B)
/twentysix 35.27KB (-1B)

jchen1 and others added 2 commits August 12, 2026 10:59
Replaces the 200m-only converter with one that covers both sprints in
lanes for both sexes. Each event and sex gets its own lane slope, pooled
by inverse-variance weighting from a Diamond League estimate (2015-2025)
and an NCAA estimate (2016-2026), and the pooled confidence interval
drives an uncertainty range under the converted time.

The old slug redirects to the new one with its query params intact, and
stays out of the utilities index via a `hidden` export that
getAllPages() filters on.

Unlike its siblings, the page waits for router.isReady before writing
the URL so that a shared link's params survive a cold load.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replaces this page's own router.isReady adoption gate with the hook the
other calculators use, so all five restore state from a shared link the
same way. Enum-ish params are validated before they reach state: event
and sex against their unions, lanes against the selectable lanes.

Co-Authored-By: Claude Fable 5 <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