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

Team names are incorrect when grabbing kenpom rankings #65

Closed
jgpayne opened this issue Oct 26, 2023 · 7 comments
Closed

Team names are incorrect when grabbing kenpom rankings #65

jgpayne opened this issue Oct 26, 2023 · 7 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@jgpayne
Copy link

jgpayne commented Oct 26, 2023

when using kenpompy.misc.get_pomeroy_ratings names get cut off. For example there are three Cal St. when one should be Cal St. Fullerton, Cal St. Northridge etc.

@j-andrews7
Copy link
Owner

All those juco California teams are the same. Thanks for the report. Regex woes strike again. We'll try to fix this for our start of season release.

@j-andrews7
Copy link
Owner

j-andrews7 commented Oct 26, 2023

See #9 and #41 for previous issues with this. #42 was our last fix for this, I believe.

@jgpayne
Copy link
Author

jgpayne commented Oct 26, 2023

No worries! There is a workaround using get valid team names, but just wanted to bring it to your attention!

@esqew esqew added bug Something isn't working good first issue Good for newcomers labels Oct 26, 2023
@esqew
Copy link
Collaborator

esqew commented Oct 27, 2023

I believe #42 did fix this since I can't repro this when using the latest commit:

from kenpompy.utils import login
browser = login('[redacted]', '[redacted]')

from kenpompy.misc import get_pomeroy_ratings
df = get_pomeroy_ratings(browser=browser)
df[df['Team'].str.startswith('Cal')]['Team']

Result:

145             California
173      Cal St. Fullerton
180            Cal Baptist
277    Cal St. Bakersfield
321     Cal St. Northridge
340               Cal Poly
Name: Team, dtype: object

If you're still using the version that's on PyPi (released 12-2022), that doesn't yet have this patch (01-2023). If this is something that you need fixed ASAP, you should install the latest from the master branch:

pip install git+git://github.com/j-andrews7/kenpompy@master

This may require you to uninstall the library entirely before reinstalling it from master as the version number hasn't yet been bumped in preparation for the next release.

@esqew esqew closed this as not planned Won't fix, can't repro, duplicate, stale Oct 27, 2023
@pstonebu
Copy link

Not specific to the California teams, but the team name grabbing is still not working exactly right. For example, both "South Carolina" and "South Carolina State" become "South Carolina." Can use conf to differentiate, but it's still a bit confusing. Alabama A&M gets stored as "Alabama A," Arkansas Pine Bluff is "Arkansas Pine," etc.

@j-andrews7
Copy link
Owner

j-andrews7 commented Nov 13, 2023 via email

@pstonebu
Copy link

Thought I had updated kenpompy from git but evidently not. An uninstall and reinstall from git fixed it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants