Developer Handoff

PES — Player Evaluation Suite · Developer Handoff

Everything you need to replicate these tools from your own (similarly-shaped, differently-named) data: how the system is built, a complete field-by-field data dictionary for every app, and a live "Source mode" overlay that shows where each on-screen number comes from.

Architecture in one paragraph

PES is 100% static — HTML + JavaScript, no backend and no database. Each app is a single HTML file that loads one or more *_data.js files (a COLS array naming every column + a ROWS array of value arrays) and computes everything client-side in the browser. The five apps are stitched together by a tiny hub (pes.html) that iframes each one under a path prefix and bridges player selection between them. Hosting is therefore just a CDN + auth problem — the live site runs on Cloudflare Pages behind Cloudflare Access.

The data pipeline (and its two provenance layers)

Excel workbook
scores, evals, PVM, WAR, percentiles computed here
gen/export .ps1
renames columns → emits *_data.js
*_data.js
COLS + ROWS arrays
profile .html
reads by key, renders, derives display calcs

Replicating PES means understanding two mappings, and the dictionary documents both:

Because your data is the same shape with different names, the fastest path is: open the Field Dictionary, and for each field map your column name to the Source header / key. Once the COLS array matches, the entire render layer works unchanged.

What's in this package

Field Dictionary

Every column in every app: its key, where it comes from upstream, its type, how it's computed, and where it appears in the UI. Search and filter freely.

Source Overlay — "Source mode"

The clearest way to convey what each number means: a toggle baked into the live app. Turn it on and every instrumented value gets a dotted underline — hover it to see the field key, upstream source (sheet · header), type, and how it's computed, pulled straight from the dictionary.

Open the NFL Source-mode overlay ↗
Pick any player in the left list, then click 🔍 Source in the top-left. This is built as a copy-paste template on one app (NFL); the same ~30-line pattern (a SV(key, html) wrapper + a tooltip reading NFL_PROV) drops into the other apps. See "Replicate guide" for the snippet.

How it works (so you can extend it)

Replicate guide

A practical order of operations to stand up an equivalent app from your own data.

  1. Map your columns to the dictionary. For your target app, open the Field Dictionary and, for each field, find the matching Source header / key. Produce your own name → key crosswalk. This is the whole job — the names differ, the concepts don't.
  2. Emit the data file. Generate a *_data.js with a COLS array of those exact keys (order doesn't matter — code resolves by name) and a ROWS array of value arrays. Match the encodings noted per app (e.g. scores/percent as 0–1, HT as ft*100+in, blanks as ""). Mirror the gen_*.ps1 pattern.
  3. Confirm calc ownership. Fields marked upstream (computed in workbook) must already be computed in your source — the UI only displays them. Fields marked client are derived in-browser (see each app's Client calcs) and you get them for free once inputs exist.
  4. Reuse the render layer. Point the app HTML at your data file. Because it reads by key, it renders unchanged once COLS matches. Keep the eval-ladder order identical (below) so colors/tiers line up.
  5. Verify with Source mode. Add the SV() wrapper + tooltip (snippet below) to spot-check that each on-screen number traces back to the field you intended.

Eval ladder (keep this order)

Source-mode snippet (drop into any app)



    

Per-app entry points