Oregon HS Tennis Power Rankings
A statewide sports-rating engine, playoff simulator, and live tournament toolkit, built as one self-contained system.
The analytics platform for Oregon high school tennis: four years of statewide results, four original rating models, a playoff simulator, and a suite of live tournament tools, all generated from raw match data and served as a single static site.
It’s also the data layer behind a real institutional change — the analysis that supported Oregon’s adoption of a dual team tennis championship. The format is now on the calendar: power-ranking-seeded brackets debuting in spring 2027, with 12 teams at 6A and 8 at 5A and 4A-1A, per gender, higher seed hosting through to a final at the state championship site. Underneath the format change is a small, fully transparent system built to make the argument possible.
The long game
The tools are the visible half. The other half was governance — a multi-year effort to change how a state runs a sport, where the work is persuading an institution as much as shipping code.
- 2019
- The gap surfaces. Oregon’s high school tennis program has no team championship.
- 2020 — 2021
- The case goes public in writing: split the seasons, raise the match limit, add a power-ranking-seeded team tournament.
- early 2020s
- The argument meets reality. Concerns about scheduling, travel, and roster viability get worked through with the OSAA. Hard data becomes necessary.
- 2026
- The OSAA State Championship Committee recommends the format. The OSAA adopts it for the next four-year block.
- 2027
- The first dual team championships are played.
Six years from “someone should fix this” to a line on the state calendar. The software is what made the late innings winnable: once the questions turned concrete — who qualifies, how do you seed it, what does it cost in travel — the answers were already computed and public.
The problem it models
A tennis dual meet is eight concurrent matches — matches within matches. Four singles, four doubles; win five flights and you win the meet. That structure breaks ordinary ranking. A 5–3 win at the bottom of the lineup looks identical to a 5–3 win at the top, win-loss records skip over who you played, and lineups can be “stacked” to game any naive metric.
Central data was sparse, and existing ratings handled none of this. The system had to invent the measurement, then build everything on top of it: ingestion, rating models, simulation, and the public tools. Real-world mess gets absorbed along the way — forfeits, ties, six-flight meets, classification changes, dirty source data.
The models
APR — Adjusted Power Rating
RPI-style strength of schedule, aligned with what the OSAA already uses: your wins matter, your opponents’ more, theirs too. “How good are you, given who you played?”
FWS — Flight-Weighted Score
Scores all eight flights on a weighted curve (1st singles / doubles = 1.00 down to 4th doubles = 0.10, max 3.95). The top of the lineup drives the number, and depth counts — a 7–1 sweep outscores a 5–3 win with the same top flights, which makes stacking pointless. Normalized for flights actually contested, so a six-flight meet still produces a clean number.
FWS+
FWS made legible, indexed like baseball’s ERA+. 100 is exactly average for the classification; 115 is 15% above. It recalibrates as the season fills in, so a team’s standing reads in real time and across history.
Power Index
The blend: (APR × 0.50) + (FWS × 0.50). Opponent quality and flight dominance in one number.
TOSS
A later model folding in game-share margin. A/B-tested against the Power Index with results reported.
H2H engine
When teams are close, head-to-head breaks the tie — only when it avoids a rock-paper-scissors loop (A beats B beats C beats A). Split series defer to the metrics. The edge cases are the whole job.
On the site
The site grew from an All-State archive into a public suite of tools.
- Rankings dashboard. Every team rated by all four models, filterable by year, classification, and league.
- Playoff simulator. What-if brackets, with a regional mode that optimizes travel against competitive integrity.
- Comparison view. Head-to-head and model-vs-model, plus rating-vs-actual results — how well dual-meet strength predicts the individual tournament.
- Methodology. The Power Index explained in plain language, so the rankings are auditable.
- Weekly in-season rankings. Snapshots, week by week, live.
- All-State archive. Teams from 2022–2025 in one place.
- Bracket tools. A permutation explorer and a fair-bracket generator that stress-test how different seedings actually play out.
- SD1 draw suite. A live seeding board, draw tool, and printable / live brackets built to run an actual special-district tournament in the room, on the day, with cloud-saved state.
- 2027 format tools. A mixed-doubles standby-list tool and the dual team finals format, matching the adopted bracket structure and seeding.
- Changelog and after-action reports. What changed, what was tested, what was learned.
Stack & method
- Generation
- A single Python program computes every model and emits one self-contained
index.htmlwith the data embedded. - Geocoding
- Nominatim / OpenStreetMap, geocoded once and cached so fresh clones skip the network. Powers the simulator’s travel optimization.
- Frontend
- Vanilla JS + Bootstrap + DataTables over embedded JSON. React / TypeScript / Vite in the original prototype.
- Live tooling
- Netlify Functions (v2) + Netlify Blobs for the cloud-saved SD1 draw.
- Hosting
- Netlify. Static, zero-infrastructure, offline-capable.
- Data
- ~1,200 team-seasons, every flight, 2021 — present, straight from the OSAA source API.
Design decisions
The boring choices are deliberate. Static HTML with embedded JSON serves the audience — coaches and athletic directors — who need something fast, free, and saveable. A dataset this size belongs in the page. The model exposes raw, intuitive scores (0–3.95 FWS, ERA+-style FWS+) up front and keeps the normalized math underneath.
The interesting choices are everywhere else: a rating design that makes stacking pointless, tiebreaker logic that refuses circular results, travel optimization that protects top seeds while cutting miles for the rest, and a methodology published in full so the numbers carry their own evidence.
The throughline: a clear, fully transparent model — built end to end, from raw API to live tournament board — credible enough, and patient enough, to move an institution. The code was the easy part. Sticking with it for six years until the institution said yes was the project.