Data Pipeline - Gidntsquia/deadlock-street-brawl-helper GitHub Wiki
Everything the app reads is a file under public/data/, committed to the repo, so a fresh clone works
offline with no fetch. scripts/fetch-data.mjs is what produces those files.
npm run fetch-data runs it with --brawl, which refreshes the Street Brawl snapshot only. That is about
1400 requests and takes a while: item-stats, pair stats and 37 enemy-filtered calls for each of the 38
heroes.
| file | source |
|---|---|
items.json |
assets…/v2/items/by-type/upgrade (all 251 upgrade items; shopable / disabled flags kept, 173 draftable) |
heroes.json |
assets…/v2/heroes, filtered to player_selectable && !disabled && !in_development (38 heroes) |
abilities.json |
assets…/v2/items/by-type/ability for those heroes |
img/{items,heroes,abilities}/ |
webp images, so the app makes no network requests at runtime |
brawl-config.json |
assets…/v2/generic-data → street_brawl: souls per round, the 50 s buy phase, one re-roll per round, and per round the normal and rare tier of each set plus the weight tables for how many of the nine cards are rare-bumped or enhanced |
analytics/brawl/<hero_id>.json |
/v1/analytics/item-stats and item-permutation-stats (pairs, top 600) with game_mode=street_brawl, plus vs: item-stats with enemy_hero_ids=<id> for every other hero, which is the counter term |
analytics/brawl/tier-list.json |
/v1/analytics/hero-stats for hero win and pick totals, plus item totals summed over the per-hero files (see Tier List) |
manifest.json |
timestamps, the window, and counts |
Street Brawl uses the matches since the City Never Sleeps update (2026-09-29), recorded in manifest.json (since, window_days).
npm run fetch-data -- --since YYYY-MM-DD sets the start date; a refresh takes a fresh window. The fetch stops before writing if
heroes 78, 84, 85 or 88 are filtered out.
Street Brawl pins both ends of the window. The tier list divides item matches from the per-hero files by hero counts from a live hero-stats call, so those two have to cover exactly the same matches. With the upper end left open, a tier-list rebuild days later would count hero-games the item files never saw and understate every usage figure.
There is one all-rank population: the API answers 400 ("Cannot filter by average badge") for a rank filter in this mode.
Match metadata records what was picked and in which round, never the three cards that were offered. That is why the card scores come from item win rates and usage rather than from observed draft choices.
The limit is 200 requests per minute; the script sleeps 350 ms between calls and honours retry-after on a
429 up to 45 s, then skips that row.
--brawl-tierlist rebuilds analytics/brawl/tier-list.json alone, one request plus a sum over the files
already on disk. --analytics-only, --validation-only and --select-only are inherited from
deadlock-optimal-build-finder, which this
repo was split out of, and are not used here.