Live data from Hacker News

How to create NBA shot charts in Python

savvastjortjoglou.com

11–20 of 29 posts

Re: How to create NBA shot charts in Python

#12
post #7

I wonder how does NBA generates these data (X, Y position and shot attempts), if it's manually input from video or something smarter

It's automatically extracted from video, using six cameras and a commercial system called SportVU: http://stats.nba.com/tracking/

There is a nice TED talk also on the topic: http://www.ted.com/talks/rajiv_maheswaran_the_math_behind_ba...

Re: How to create NBA shot charts in Python

#13
post #5

We include shot charts on Basketball-Reference.com and allow for side-by-side comparisons as well. http://www.basketball-reference.com/players/h/hardeja01/shoo... http://www.basketball-reference.com/play-index/plus/shooting...

Do you work with the Sport-Reference.com sites?

if so, would you mind if I asked you a somewhat technical question?

Is there some sort of advanced query function?

-------------------------------

Here's kind of what I'd like to be able to do

http://fivethirtyeight.com/features/no-team-can-beat-the-dra...

the first chart in there sort of fits a line from draft position to career AV (7 paragraphs in)

I'm curious if you can hold for certain factors and move that line around

specifically I'm curious if the line changes if you adjust for winning percentage of the player's college team

ie if you did a curve players from schools w/ winning percentages >.750, .750 - .500, .500 - .250, .250 - 0, would that produce 4 noticeably different curves?

------------------------------------

it appears that all the data necessary to do that is contained between NFL-reference and CFB-reference

the way I would think to do that is to scrape the data off the site and put it into an excel sheet to work with

is that the best way to do that?

or is there a function within the site that I can work with such that I don't have to scrape the data?

-------------------------

thanks, sorry if this sort of question was outside the bounds of this message board

Re: How to create NBA shot charts in Python

#17
post #10
post #5

We include shot charts on Basketball-Reference.com and allow for side-by-side comparisons as well. http://www.basketball-reference.com/players/h/hardeja01/shoo... http://www.basketball-reference.com/play-index/plus/shooting...

Always wanted to redesign Basketball Reference. Nothing fancy (I can appreciate that the data is king), just clean it up a bit.

we are in the process of doing a slight graphical upgrade to the sites in the near future to clean them up and make them more mobile friendly. stay tuned!

Re: How to create NBA shot charts in Python

#18
post #5

We include shot charts on Basketball-Reference.com and allow for side-by-side comparisons as well. http://www.basketball-reference.com/players/h/hardeja01/shoo... http://www.basketball-reference.com/play-index/plus/shooting...

Do you work with the Sport-Reference.com sites? if so, would you mind if I asked you a somewhat technical question? Is there some sort of advanced query function? ------------------------------- Here's kind of what I'd like to be able to do http://fivethirtyeight.com/features/no-team-can-beat-the-dra... the first chart in there sort of fits a line from draft position to career AV (7 paragraphs in) I'm curious if you…

you can download CSVs from the draft finder on pro-football-reference.com. that includes career AV.

http://www.pro-football-reference.com/play-index/draft-finde...

Re: How to create NBA shot charts in Python

#19
post #2

Statmuse.com has a really nice implementation of this in their natural-language sport statistics engine. You can see an image here http://i.imgur.com/ukganMx.png ...or if you're in the beta, here: https://www.statmuse.com/nba/search?q=michael%20jordan%20sho...

just, awesome.

Re: How to create NBA shot charts in Python

#20
post #18

Earlier quoted context omitted.

Do you work with the Sport-Reference.com sites? if so, would you mind if I asked you a somewhat technical question? Is there some sort of advanced query function? ------------------------------- Here's kind of what I'd like to be able to do http://fivethirtyeight.com/features/no-team-can-beat-the-dra... the first chart in there sort of fits a line from draft position to career AV (7 paragraphs in) I'm curious if you…

you can download CSVs from the draft finder on pro-football-reference.com. that includes career AV. http://www.pro-football-reference.com/play-index/draft-finde...

thanks
Post reply on HN