8 files · documented & downloadable

The bundled datasets

Every tutorial 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. This page documents each one - 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 public standings data, 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

A constructed teaching dataset with the problems scrubbed datasets hide: mixed types, missing values, inconsistent team names, duplicates. The one dataset here that is NOT real sports data - built, and labeled, for the cleaning tutorial.

Source: Constructed for teaching; clearly 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: stats.nba.com via the nba_api package, retrieved June 2026.

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 7 more.

Download nba_ratings.csv

NBA 2023-24 game-by-game results

Every 2023-24 NBA regular-season game with teams and scores. Powers the home-advantage capstone and several statistics and machine-learning tutorials.

Source: stats.nba.com via nba_api, retrieved 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 9 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: NBA shot log, public dataset.

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?.

Download nba_league_shots.csv

Teaching with these? Everything here is free to use in a classroom; the one synthetic file says so on its face, and the real ones name their sources. If you build something with them, tell me about it.