Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NFL teams proper abbreviations are not all properly working to pull data #765

Open
mauldin123 opened this issue Dec 1, 2022 · 2 comments

Comments

@mauldin123
Copy link

Describe the bug
I was trying to get the full city and names of the AFC West NFL teams. I used .name using the proper teams abbreviations such as 'KAN'. For KAN it successfully returned Kansas City Chiefs, and for DEN it successfully returned Denver Broncos.

That being said, when I used 'LAC' and 'LVR' for the Chargers and Raiders, I was presented with the same essential error for each - KeyError: 'LAC' for the chargers and KeyError: 'LVR' for the Raiders

To Reproduce
`from sportsipy.nfl.teams import Team

teamName1 = Team('KAN')
print(teamName1.name)

teamName2 = Team('DEN')
print(teamName2.name)

teamName3 = Team('LVR')
print(teamName3.name)

teamName4 = Team('LAC')
print(teamName4.name)`

Expected behavior
For LAC I was expecting Los Angeles Chargers to be returned.
For LVR I was expecting Las Vegas Raiders to be returned.

Screenshots and Links
Link showing all the abbreviations uses by sports-reference. https://www.pro-football-reference.com/?__hstc=213859787.2ee56ab6f3498e72bacdf9b5c2a54b3f.1669855801055.1669862008924.1669864536323.3&__hssc=213859787.2.1669864536323&__hsfp=3007689586

Image showing AFC West proper abbreviations
Screenshot 2022-11-30 215208

Desktop:

  • OS: Windows 10
  • Sportsipy Version: 0.6.0

Additional context
I also noticed that the Los Angeles Rams and the Houston Texans common place abbreviations were not working either. It seems to be that the abbreviation needed is not the one listed on their website or any other website for that matter. That being said I know JAX works and returns Jacksonville Jaguars.

@seanofthedead86
Copy link

Off the top of my head the Chargers abbreviation is SDG and he Raiders is RAI.

@SKCwillie
Copy link

SKCwillie commented Dec 20, 2022

from sportsipy.nflteams import Teams

teams = Teams()
fro team in teams:
    print(team.abbreviation, team.name)

This should give you a list of valid abbreviations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants