Back to Templates

NBA player career comparisons

View App View Code on GitHub
shiny create -m express \
  -g https://github.com/posit-dev/py-shiny-templates/tree/main/nba-dashboard
shiny create -m core \
  -g https://github.com/posit-dev/py-shiny-templates/tree/main/nba-dashboard

Search for NBA players and compare their career statistics. The app uses the nba_api package to fetch player statistics and the plotly package to create interactive plots. Note that in addition to searching for players by name, you can also click on the rug plot to select players. This provides a useful way to query player(s) based on a specific statistic, then compare their overall career statistics.

Packages:

  • pandas
  • numpy
  • nba_api
  • plotly
  • shinywidgets
  • scipy