12 files · documented & downloadable

The bundled datasets

Wherever a tutorial can run on a fixed file, it runs on data you can hold: small CSVs bundled with the site so the code works offline, in the browser runner, and on your machine. The tutorials that pull live from an API say so on the page. This page documents every bundled file - what it is, where it came from, and which tutorials read it. Row counts and column names on this page are read from the actual files at build time, not typed in.

2023 MLB final standings

Real 2023 MLB regular-season standings - one row per team with wins, losses, runs scored and runs allowed. The site's beginner dataset: small enough to read whole, real enough to argue about.

Source: MLB Stats API (statsapi.mlb.com), pulled by build/make_samples.py and bundled June 2026.

30 rows · columns: Team, Abbr, League, Division, G, W, L, WinPct, RS, RA · +1 more

Used by: Pandas for Sports Data: The 12 Operations You'll Use Constantly, Your First Sports Data Visualization with matplotlib, Group, Pivot, and Reshape: Aggregating Sports Data Like a Pro, Publication-Ready Charts: matplotlib Styling and Annotations, Small Multiples: Compare Every Team at Once with Subplots, Pythagorean Wins: Expected Standings from Run Differential and 17 more.

Download sample_standings.csv

Deliberately messy team stats

The real 2023 standings again, with the problems scrubbed datasets hide put back in: padded and upper-cased team names, win percentage as a text column with a percent sign, header fields with stray spaces, one blank runs-allowed cell and one duplicated row. The numbers are real; the damage is deliberate, and labeled, for the cleaning tutorial.

Source: The same real MLB Stats API standings, deliberately roughed up by build/make_samples.py; the damage is synthetic by design.

31 rows · columns: team, league, win_pct, runs_scored, runs_allowed, games

Used by: Cleaning Messy Sports Data: Real-World Fixes for Real-World Files.

Download messy_team_stats.csv

NBA team ratings, 2023-24

One row per NBA team: offensive rating, defensive rating and net rating for the 2023-24 season - the vocabulary table behind the ratings and efficiency tutorials.

Source: Basketball-Reference (leagues/NBA_2024_ratings.html), read with pandas by build/make_nba_samples.py and bundled June 2026. The ratings tutorials ship a working stats.nba.com script via nba_api, but stats.nba.com blocks the build host, so this bundled fallback is what the published figures were computed from.

30 rows · columns: Team, W, L, W/L%, ORtg, DRtg, NRtg

Used by: Pull Your First NBA Data with nba_api, Build a Team Net-Rating Dashboard Table, The Efficiency Landscape: Plotting Offensive vs. Defensive Rating, Filtering and Querying a DataFrame, A Correlation Heatmap: Which Team Stats Move Together, Grouped Bar Charts: Compare Two Metrics Side by Side and 8 more.

Download nba_ratings.csv

NBA 2023-24 game-by-game results

Every 2023-24 NBA game with teams and scores: 1,231 rows = the 1,230-game regular season plus the In-Season Tournament final (Dec 9, 2023, Pacers at Lakers), which official standings exclude - the standings tutorial teaches how to catch and handle that extra row. Powers the home-advantage capstone and several statistics and machine-learning tutorials.

Source: Basketball-Reference monthly schedule pages (leagues/NBA_2024_games-*.html), read with pandas by build/make_nba_samples.py and bundled June 2026.

1,231 rows · columns: date, away_team, away_pts, home_team, home_pts

Used by: Same Question, Five Sports: Quantifying Home Advantage Across Leagues, Build a Standings Table from a Season of Game Results, Crosstabs: Build a Contingency Table to Test Home Advantage, Bootstrap a Confidence Interval: Is Home-Court Advantage Real or Luck?, Build an Elo Rating System from Scratch, Is the Difference Real? A Permutation Test and 14 more.

Download nba_home_results.csv

NBA league-wide shot sample

A large sample of shot locations from across the league, used for the hexbin density heatmap tutorial.

Source: The public NBA_Shots_04_25 shot-log dataset (github.com/DomSamangy/NBA_Shots_04_25), 2023-24 season; a 25,000-row random sample taken with random_state=42 by build/make_nba_samples.py.

25,000 rows · columns: PLAYER_NAME, TEAM_NAME, LOC_X, LOC_Y, SHOT_MADE, SHOT_TYPE, BASIC_ZONE, ZONE_NAME, SHOT_DISTANCE

Used by: NBA Shooting by Zone: Build a Shot-Zone Efficiency Table, Draw a League-Wide NBA Shot Heatmap, Make a Shot-Density Heatmap with hexbin, Measuring Inequality: Lorenz Curves and the Gini Coefficient, The Chi-Square Test from Scratch: Is an NBA Floor Left-Right Symmetric?, Simpson's Paradox: When Every Split Disagrees With the Total and 1 more.

Download nba_league_shots.csv

NBA three-point trend, 2004-24

League-average three-point attempt share and accuracy by season across two decades - the dataset behind both three-point-era tutorials.

Source: Derived, not fetched: build/make_nba_samples.py aggregates the public NBA_Shots_04_25 shot logs (github.com/DomSamangy/NBA_Shots_04_25) season by season, so every rate here is counted from the shots themselves.

21 rows · columns: season, FGA, FG3A, FG3A_rate, FG_pct, FG3_pct

Used by: The Rise of the Three-Pointer: Two Decades of NBA Shot Selection, Does Shooting More Threes Actually Win Games? Two Decades of Evidence.

Download nba_three_point_trend.csv

2026 World Cup results, complete

Every match of the 2026 World Cup - all 104, group stage through the final - with stage, teams, and score. The tournament is complete, so this is the full record, not a snapshot.

Source: ESPN public scoreboard data, retrieved July 2026.

104 rows · columns: date, stage, home, away, home_goals, away_goals

Used by: Group vs Knockout Scoring at the 2026 World Cup, with groupby, Predict a Scoreline with Poisson: the World Cup Final as a Grid.

Download wc2026_results.csv

2022 World Cup shots with StatsBomb xG

One row per shot for all 64 matches of the 2022 World Cup - 1,494 shots with pitch coordinates, outcome, body part, play pattern, and StatsBomb's own xG per shot. Includes the 41 penalty-shootout kicks (period 5), which the calibration tutorial teaches you to catch; own goals are nobody's shot and are absent by nature.

Source: StatsBomb open data (CC BY 4.0) - data provided by StatsBomb (github.com/statsbomb/open-data); attribution required. Bundled September 2026.

1,494 rows · columns: match_id, stage, team, player, minute, period, x, y, end_x, end_y · +8 more

Used by: Is xG Calibrated? Checking a Published Model Against 1,494 Real Shots.

Download wc2022_shots.csv

NHL team shooting and save totals, two seasons

One row per NHL team per season for the two most recent completed seasons - 32 teams x 2 - with games played, points, goals for and against, and shots for and against. Everything PDO needs, and the reason the league average is exactly 100: goals for equal goals against league-wide, and so do shots. The offline fallback for the PDO tutorial, and one of the CSVs pre-loaded in the browser runner.

Source: NHL public API (api-web.nhle.com), retrieved August 2026.

64 rows · columns: team, season, gp, points, gf, ga, shots_for, shots_against

Used by: Team Luck with PDO: the Number That Flags Hot Streaks.

Download nhl_team_pdo_two_seasons.csv

Premier League 2025-26, complete results

All 380 matches of the 2025-26 Premier League season - date, home and away sides, the score, venue and attendance (recorded as 0 for six fixtures the source did not report). The season is finished, so this is the full record rather than a snapshot. It is the offline fallback for the ESPN scoreboard tutorial and is pre-loaded in the browser runner.

Source: ESPN public scoreboard API, retrieved August 2026.

380 rows · columns: date, home, away, home_goals, away_goals, venue, attendance

Used by: Pull Live Soccer Results from ESPN's Public Scoreboard API.

Download epl_results_2025_26.csv

NFL games with closing lines, 1999-2026

One row per NFL game from the 1999 season through the 2026 schedule - 7,548 rows with teams, scores, the home-minus-away result, venue, the closing point spread (positive means the home team was favored), the total, and the moneylines where the source has them. The 272 games of 2026 are present with blank scores so the spread tutorial can teach the played-games filter and then price the opening week.

Source: nflverse games table (github.com/nflverse/nfldata), trimmed to these columns by build/make_nfl_lines_csv.py from a June 2026 snapshot; attribution to nflverse required.

7,548 rows · columns: game_id, season, game_type, week, gameday, away_team, home_team, away_score, home_score, result · +6 more

Used by: Point Spread to Win Probability: Calibrate the Line on 7,261 NFL Games.

Download nfl_games_lines.csv

Teaching with these? Everything here is free to use in a classroom; every file names its source, and the one whose formatting was damaged on purpose says so on its face. If you build something with them, tell me about it.