NBAAnalytic

Tutorials

Hands-on guides for pulling, cleaning, and visualizing basketball data yourself, from your first nba_api call to a finished shot chart.

Three pieces, meant to be run in this order. Start with the ranking of free data sources: what each source will and will not give you, which requests our own scripts could not get answered, and how closely the two big free sources agree (99.9% of 165,885 player stat totals over 22 seasons). Then the nba_api tutorial: install the package, ask the league's stats endpoints one question under an honest User-Agent, cache the answer, then pull one player's 1,321 shots and turn them into a zone table and a shot chart. Finish with the net-rating power ranking, built in a spreadsheet with no code. Each piece names the endpoint, file or formula it uses and shows its output, so you can check your result against the page before moving on. The Four Factors spreadsheet build now sits inside the Four Factors explainer, next to the weights it measures.