roclark / sportsipy

A free sports API written for python
MIT License
475 stars 189 forks source link

Add NFL scoring information to Boxscore #759

Open 1jonahg1 opened 1 year ago

1jonahg1 commented 1 year ago

I'm in the process of adding an option to NFL Boxscore to get all the scoring possession details from the game, as shown on the Sports Reference website, and would like to get input on the feature before I create a pull request. Following is the general documentation for the feature:

Returns a "list" containing a list for each quarter's scores. Each score is represented by a "dictionary" that holds the following keys:

For example:

        [
            [<1st-quarter-scores>], [<2nd-quarter-scores>], 
            [<3rd-quarter-scores>], [<4th-quarter-scores>],
            [<overtime-scores>] 
        ]

Example for <1st-quarter-scores>:

            [
                {
                    'time': '7:51',
                    'team': 'Giants', 
                    'details': 'Lawrence Cager 9 yard pass from Daniel Jones Graham Gano kick)',
                    'current_score': {'away': '0', 'home': '7'}
                }
            ]
bveber commented 1 year ago

This is a cool idea. One consideration you might want to make, is dumping the dictionary into a stringified JSON and including it as a field in the output dataframe.

That said, this repo appears to be abandoned by the admin. I have a fork that I'm using for my own purposes and I'm in the process of updating the codebase to accomodate several changes that have been made to the website that have broken some features. If you implement this change you might be better off forking it yourself. But I'm interested in seeing your changes when you make them and I'd be happy to collaborate.