Skip to content

About

Explore the peaks and valleys of NBA game leads. This 3D data visualization shows every moment a team was leading 🟦 or trailing 🟥 during an entire season

Resources

Stars

4 stars

Watchers

1 watching

Forks

Latest commit

 

History

400 Commits

Folders and files

Repository files navigation

Hoop Hills

Explore the peaks and valleys of NBA game leads: this 3D data visualization shows every moment a team was leading 🟦 or trailing 🟥 during an entire season.

Scraper

I recommend using asdf to manage Python versions (I’m currently using 3.13). Run python -m pip install -r requirements.txt to install dependencies.

Run python scraper/get-games.py to (respectfully) scrape play-by-play data from basketball-reference.com.

Tweak the options object in the get-games.py file to get a specific season, like options['year'] = [2025].

If there are games already scraped, the scraper will skip those and append only missing ones to each team’s .csv file.

Edit get-highlights.py to specify a season (like '2026') and run python scraper/get-highlights.py to get YouTube video ids from the official NBA channel. This only works when it is ran from a region where NBA highlight videos are available, like Brazil. A VPN can be used to mimic that.

Two run both scrapers (game data and video highlights), run python scraper/get-games.py && python scraper/get-highlights.py.

About

Explore the peaks and valleys of NBA game leads. This 3D data visualization shows every moment a team was leading 🟦 or trailing 🟥 during an entire season

Resources

Stars

4 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages