sportsipy icon indicating copy to clipboard operation
sportsipy copied to clipboard

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

Open mauldin123 opened this issue 2 years ago • 2 comments

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.

mauldin123 avatar Dec 01 '22 04:12 mauldin123

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

seanofthedead86 avatar Dec 16 '22 19:12 seanofthedead86

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.

SKCwillie avatar Dec 20 '22 16:12 SKCwillie