jldbc / pybaseball

Pull current and historical baseball statistics using Python (Statcast, Baseball Reference, FanGraphs)
MIT License
1.18k stars 323 forks source link

Add Negro Leagues To `FangraphsLeague` #334

Closed nwinston closed 1 year ago

nwinston commented 1 year ago

Now that Fangraphs supports negro leagues, we should be able to pull that data through pybaseball. New values need to be added to the FangraphsLeague enum otherwise an exception is thrown.

BrayanMnz commented 1 year ago

Looks good to me. @tjburch

tjburch commented 1 year ago

thanks @nwinston, this will be really good to add.

Do you think you could add comments to all the docs where this might be used? E.g. in team_batting.md could change

`league: String. Either "all", "nl", or "al" for determining whether you want data from one league or both. Defaults to "all", for returning data on all teams. `

to

`league: String. Either "all" for all data, "nl" for the National League, "al" for the American League, or "mnl" for the Negro Leagues. Defaults to "all", for returning data on all teams. `

nwinston commented 1 year ago

Done! @tjburch

tjburch commented 1 year ago

Thanks. LGTM! Thanks a ton. Will give a day for anyone else to make comments and merge after. ( @schorrm )

schorrm commented 1 year ago

Looks amazing! (thanks for tagging me @tjburch) One question though: is there a reason why the param can only be 'mnl'?

nwinston commented 1 year ago

Updated the docs in fangraphs.md that says to look at FangraphsLeague for the full set. I'll include that note in the rest of them as well.

schorrm commented 1 year ago

Anyway, more than LGTM, @tjburch merge whenever you want

tjburch commented 1 year ago

In. Thanks again @nwinston 👍👍

nwinston commented 1 year ago

No problem!