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

v2.0 Release #18

Draft
wants to merge 43 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
ec02237
Add swagger_api.py for using an api to pull rankings.
cooperjaXC Feb 15, 2021
848ee8e
Rename the swagger API py file to more accurately be the cfbd_api.py.
cooperjaXC Aug 11, 2023
7a09140
Rename the swagger API py file to more accurately be the cfbd_api.py,…
cooperjaXC Aug 11, 2023
8d4b7b9
Add the windows_python_venv repo as a submodule to create venvs for t…
cooperjaXC Aug 11, 2023
50c590c
Add requirements.in with packages needed for this repository.
cooperjaXC Aug 11, 2023
9cc98bd
Add a requirements.in file to replace the old requirements.txt for us…
cooperjaXC Aug 21, 2023
805aff4
Remove py_venv as a submodule, but keep the contents of the directory…
cooperjaXC Aug 21, 2023
231859e
Update repo's .gitignore to remove local Windows directory links.
cooperjaXC Aug 21, 2023
62cada8
Adjust requests version in requirements.in re. PR #6.
cooperjaXC Aug 21, 2023
ed69dcb
Update py_venv .bat files to use more dynamic variables.
cooperjaXC Aug 28, 2023
7e461c4
Use variables to set roots of paths in set_python_path.b
cooperjaXC Aug 28, 2023
652c5bc
Add script to process rankings based on the ESPN API. Pivot on #7 fro…
cooperjaXC Sep 8, 2023
7420a88
Add function that generates an ESPN API URL based on week and year us…
cooperjaXC Sep 8, 2023
ea6ab6a
Reconfigure how the URL generator generates the current rankings URL …
cooperjaXC Sep 9, 2023
ffdc51d
Add the current week and year as the default variables for the ESPN A…
cooperjaXC Sep 9, 2023
dc18011
Use the AP Top 25 unique ESPN code (1) to ID the correct ranking to p…
cooperjaXC Sep 9, 2023
c67d5dc
Set up infrastructure to pull and process AP ESPN API response JSON.
cooperjaXC Sep 10, 2023
fd54bd0
Separate out the Top 25, Others Receiving Votes, and Teams parsing in…
cooperjaXC Sep 10, 2023
f8f40b2
Add a shortcut function for parsing API responses in JSON format.
cooperjaXC Sep 26, 2023
bd28f02
Implement the json response shortcut function where functionality cur…
cooperjaXC Sep 26, 2023
140a425
Get working top 25 data collection for teams' API dict.s, including t…
cooperjaXC Nov 28, 2023
d3b7c34
Add ability to parse Others Receiving Votes from ESPN API.
cooperjaXC Nov 28, 2023
07b5616
Add ability to handle ties in XC way in ESPN API workflow.
cooperjaXC Nov 28, 2023
db6e910
Fix bug with processing top 25 scores where there is a T25 tie.
cooperjaXC Nov 28, 2023
4ad276c
Type returns of funcions. Remove relative import from ESPN API script.
cooperjaXC Nov 28, 2023
dd260a0
Set up initial conference point calculation infratstructure using ESP…
cooperjaXC Nov 28, 2023
c91835a
Calculate conference scores for either 4or 5 team races in ESPN API s…
cooperjaXC Nov 28, 2023
4407e2a
Sort the order of the XC scoring from ESPN API.
cooperjaXC Nov 28, 2023
ea3193b
Set up framework for a full run ESPN API function.
cooperjaXC Nov 29, 2023
8de2808
Fix bug in accessing conference URLs.
cooperjaXC Feb 19, 2024
ae48443
Add conference tiebreaker method to ESPN API scoring. TODO: Account f…
cooperjaXC Feb 19, 2024
ef3703c
Fix bug in team_tiebreaker() function with multiple ties within the s…
cooperjaXC Feb 19, 2024
e93383e
Document full_run() ESPN API function and return all valuable data in…
cooperjaXC Feb 19, 2024
71039b9
Clean directory to reflect new ESPN API method, moving away from Beau…
cooperjaXC Feb 19, 2024
889063d
Update ESPN API documentation and requirements.
cooperjaXC Feb 19, 2024
6e09e0c
Add ESPN API-based method to replace BeautifulSoup. Works to fix Issu…
cooperjaXC Feb 19, 2024
4632eb4
Initialize process for storing the results of AP XC races within this…
cooperjaXC Feb 28, 2024
f714966
Add mechanism to store summary datasets bringing all data from within…
cooperjaXC Mar 14, 2024
b4d2d28
Add function to store all data from 2014 to present.
cooperjaXC Mar 15, 2024
1731ede
Improve the handling of default date runs.
cooperjaXC Mar 15, 2024
bf7c782
Fix bugs with execution of 'current' weeks for old and present season…
cooperjaXC Mar 15, 2024
e6b7740
Add generated results for every week from 2014-2023 using store_data …
cooperjaXC Mar 15, 2024
8b1737a
Inherit storage mechanism for recording ESPN API-fed XC rankings into…
cooperjaXC Mar 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
*.idea
*.idea/
*.pyc
*.lnk
2019w2_number25tieissue_pythonoutput.txt
pulledcodefromEspnAp.docx
pulledcodefromEspnAp2.docx
scratchfiles/
scratchfiles/
venv/
AP_XC _Shortcut.lnk
Shortcut_RandomTournaments.lnk
539 changes: 0 additions & 539 deletions PollGrabber.py

This file was deleted.

62 changes: 7 additions & 55 deletions ToDo.txt
Original file line number Diff line number Diff line change
@@ -1,70 +1,19 @@
URGENT
------
* Make an entry argument of 'current' work regardless of year.

* Fix pandas copying warning in Top25ToTable.py
* C:/Users/acc-s/Documents/Python/AP_XC/Top25ToTable.py:66: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
powerfive_tocopy[cll] = powerfive_tocopy[cll].apply(lambda x: '{0:0>4}'.format(x))

* Move bottom opperations of Top25InPython.py into functions
* Maybe change .py name to better reflect everything.
* Reorganize where and when everything is called?

* Make sure Miami is picked up by ACC, T A&M by SEC
* Multiple forms of Texas A&M. Make sure all are picked up.
* Top25InPython.py line 47
* Miami Ohio listed as "Miami (OH)" while Miami FL is defaulted at "Miami"
* https://www.espn.com/college-football/rankings/_/poll/1/week/1/year/2003/seasontype/3
* Running Top25InPython.py with only top25dict for 2003 poll above shows both Miami FL as "Miami" default and "Miami (OH)" are picked up by their respective conferences.
* IE Miami problem is fixed already :)
* T A&M:
* Can you have multiple versions of the team in the vars .py and it still work ok?

* Add README.md. Make Git Hub Repo more professional for others to use.
* Sub directories for personal files like .docx full of scratch code.

* Black all the code to standardize formatting.
* Generally clean the code

* [completed 27 Oct 2019] Only years 2014 and on have 'others receiving votes' (ORV) data.
* Write exception in mergedict that won't error out but will notify user of this fact.
* This would only use rankings 1-25 for the scoring.

* Fix the default URL that's generated to be http://www.espn.com/college-football/rankings/_/poll/1/
* Isn't this done? (-10 Nov 2019)

* Try adding all vote totals and aggregate by conference
* IE this would be a ratio rather than an ordinal-interval measurement. Definately prizes top teams.

* Output the results of the ESPN API Grabber somewhere.

LONG TERM
---------
* Try using different source for AP Rankings instead of relying on ESPN's 3rd party.
* Why?
* Might offer more code stability than ESPN
* Wouldn't have the before 2014 ORV problem maybe.
* Potential Sources:
* Actual AP Poll website?
* *** Can you get historical data doing this? *** Million dollar Q.
* Simple, current poll: https://www.apnews.com/APTop25CollegeFootballPoll
* Detailed poll:
* May not exist any more. A podcast suggested Reddit. Would be a bear to beautiful soup though...
* See point below about using pandas to get top 25; makes this easier.
* Other source?
* Clean scratchfiles directory

* Try using pandas to grab the top 25
* https://medium.com/@ageitgey/quick-tip-the-easiest-way-to-grab-data-out-of-a-web-page-in-python-7153cecfca58
>>> tables = pd.read_html("<url>")
>>> print(tables[0])
* Method worked well in init trial
* dependent on python 3

* Move project to python 3

* Continue to include the AAC?
* Use future conference rankings to project ahead


POSSIBLE
Expand All @@ -73,7 +22,10 @@ POSSIBLE
* Or simple creation of csv of rankings to put into git repo where you could source the rankings locally.
* Then add week-by-week somehow.

* Statistical tests on significances of findings?
* Statistical tests on significances of findings?

* Try adding all vote totals and aggregate by conference
* IE this would be a ratio rather than an ordinal-interval measurement. Definately prizes top teams.


COMPLETE
Expand Down
114 changes: 0 additions & 114 deletions Top25InPython.py

This file was deleted.

89 changes: 0 additions & 89 deletions Top25ToTable.py

This file was deleted.

18 changes: 18 additions & 0 deletions data/2014/4_team/2014_4_team_summary_statistics.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
AP_XC_4_Team_Race,ACC,SEC,Pac-12,Big 12,Big Ten,FBS Indep.,American,CUSA,Mountain West,Sun Belt,MVFC,MAC
Preseason,69.0,29.0,36.0,62.0,49.0,,,,,,,
Week 2,70.5,22.0,41.0,60.0,52.0,,,,,,,
Week 3,62.0,21.0,38.0,59.0,79.0,,,,,,,
Week 4,76.5,22.0,45.0,56.0,77.0,,,,,,,
Week 5,88.0,24.0,44.0,60.0,71.0,,,,,,,
Week 6,95.0,25.0,40.0,55.0,66.0,,,,,,,
Week 7,78.0,16.0,60.0,41.0,78.0,,,,,,,
Week 8,87.0,17.0,62.0,41.0,69.5,,,,,,,
Week 9,80.0,13.0,54.0,50.0,65.0,,,,,,,
Week 10,78.0,15.0,52.0,52.0,66.0,,,,,,,
Week 11,72.0,20.0,54.0,41.0,60.0,,,,,,,
Week 12,63.0,24.0,41.0,50.0,53.0,,,,,,,
Week 13,70.0,23.0,42.0,46.0,52.0,,,,,,,
Week 14,64.0,29.0,37.0,42.0,53.0,,,,,,,
Week 15,54.0,38.0,44.0,36.0,49.0,,,,,,,
Week 16,50.0,31.0,44.0,48.0,54.0,,,,,,,
Final,52.5,38.0,43.0,63.5,47.5,,,,115.0,,,
12 changes: 12 additions & 0 deletions data/2014/4_team/2014_week_1.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"('ACC', 69)","('SEC', 29)","('Pac-12', 36)","('Big 12', 62)","('Big Ten', 49)","('FBS Indep.', 'DNS')","('American', 'DNS')","('CUSA', 'DNS')","('Mountain West', 'DNS')","('Sun Belt', 'DNS')"
"('FSU', 1)","('Alabama', 2)","('Oregon', 3)","('Oklahoma', 4)","('OSU', 5)","('Notre Dame', 17)","('UCF', 26)","('Marshall', 32)","('Boise State', 41.5)","('Louisiana', 49.0)"
"('Clemson', 16)","('Auburn', 6)","('UCLA', 7)","('Baylor', 10)","('Michigan State', 8)","('BYU', 43.5)","('Cincinnati', 40)",,"('Nevada', 49.0)",
"('UNC', 23)","('South Carolina', 9)","('Stanford', 11)","('Kansas State', 20)","('Wisconsin', 14)","('Navy', 46.5)",,,"('Utah State', 49.0)",
"('Duke', 29)","('Georgia', 12)","('USC', 15)","('Texas', 28)","('Nebraska', 22)",,,,,
"('Louisville', 31)","('LSU', 13)","('Arizona State', 19)","('Oklahoma State', 33)","('Iowa', 30)",,,,,
"('VT', 34)","('Ole Miss', 18)","('Washington', 25)","('TCU', 35)","('Michigan', 37.5)",,,,,
"('Miami', 39)","('Texas A&M', 21)","('Oregon State', 41.5)","('Texas Tech', 37.5)","('Northwestern', 43.5)",,,,,
,"('Missouri', 24)",,,"('Penn State', 45)",,,,,
,"('Florida', 27)",,,,,,,,
,"('Miss St', 36)",,,,,,,,
,"('Vanderbilt', 46.5)",,,,,,,,
8 changes: 8 additions & 0 deletions data/2014/4_team/2014_week_10.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"('SEC', 15)","('ACC', 78)","('Pac-12', 52)","('FBS Indep.', 'DNS')","('Big Ten', 66)","('Big 12', 52)","('American', 'DNS')","('CUSA', 'DNS')","('Mountain West', 'DNS')","('MVFC', 'DNS')"
"('Miss St', 1)","('FSU', 2)","('Oregon', 5)","('Notre Dame', 6)","('Michigan State', 8)","('TCU', 10)","('ECU', 21)","('Marshall', 23)","('Colorado State', 26)","('North Dakota St', 32)"
"('Alabama', 3)","('Clemson', 22)","('Arizona', 14)",,"('OSU', 13)","('Kansas State', 11)",,,,
"('Auburn', 4)","('Duke', 24)","('Arizona State', 15)",,"('Nebraska', 17)","('Baylor', 12)",,,,
"('Ole Miss', 7)","('Louisville', 30)","('Utah', 18)",,"('Wisconsin', 28)","('Oklahoma', 19)",,,,
"('Georgia', 9)",,"('UCLA', 25)",,,"('West Virginia', 20)",,,,
"('LSU', 16)",,"('USC', 27)",,,"('Oklahoma State', 33)",,,,
"('Missouri', 31)",,"('Stanford', 29)",,,,,,,
10 changes: 10 additions & 0 deletions data/2014/4_team/2014_week_11.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"('SEC', 20)","('ACC', 72)","('Pac-12', 54)","('Big 12', 41)","('Big Ten', 60)","('FBS Indep.', 'DNS')","('CUSA', 'DNS')","('Mountain West', 'DNS')","('MVFC', 'DNS')"
"('Miss St', 1)","('FSU', 2)","('Oregon', 5)","('TCU', 6)","('Michigan State', 7)","('Notre Dame', 8)","('Marshall', 23)","('Colorado State', 26)","('North Dakota St', 31.5)"
"('Auburn', 3)","('Clemson', 19)","('Arizona State', 11)","('Kansas State', 9)","('OSU', 13)",,,,
"('Alabama', 4)","('Duke', 22)","('UCLA', 18)","('Baylor', 10)","('Nebraska', 15)",,,,
"('Ole Miss', 12)","('Georgia Tech', 29)","('Utah', 20)","('Oklahoma', 16)","('Wisconsin', 25)",,,,
"('LSU', 14)","('Louisville', 30)","('Arizona', 21)","('West Virginia', 24)",,,,,
"('Georgia', 17)",,"('USC', 27)",,,,,,
"('Missouri', 28)",,"('Stanford', 31.5)",,,,,,
"('Texas A&M', 33.5)",,,,,,,,
"('Florida', 33.5)",,,,,,,,
9 changes: 9 additions & 0 deletions data/2014/4_team/2014_week_12.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"('SEC', 24)","('ACC', 63)","('Pac-12', 41)","('Big 12', 50)","('Big Ten', 53)","('FBS Indep.', 'DNS')","('CUSA', 'DNS')","('Mountain West', 'DNS')","('Sun Belt', 'DNS')"
"('Miss St', 1)","('FSU', 2)","('Oregon', 3)","('TCU', 5)","('OSU', 8)","('Notre Dame', 15)","('Marshall', 21)","('Colorado State', 23)","('Ga Southern', 35.0)"
"('Alabama', 4)","('Clemson', 18)","('Arizona State', 7)","('Baylor', 6)","('Nebraska', 11)",,,"('Boise State', 35.0)",
"('Auburn', 9)","('Duke', 19)","('UCLA', 14)","('Kansas State', 13)","('Michigan State', 12)",,,,
"('Ole Miss', 10)","('Georgia Tech', 24)","('Arizona', 17)","('Oklahoma', 26)","('Wisconsin', 22)",,,,
"('Georgia', 16)","('Louisville', 31)","('Utah', 25)","('West Virginia', 32)","('Minnesota', 30)",,,,
"('LSU', 20)","('Miami', 35.0)","('USC', 29)",,,,,,
"('Texas A&M', 27)",,"('Stanford', 33)",,,,,,
"('Missouri', 28)",,,,,,,,
10 changes: 10 additions & 0 deletions data/2014/4_team/2014_week_13.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"('ACC', 70)","('SEC', 23)","('Pac-12', 42)","('Big 12', 46)","('Big Ten', 52)","('CUSA', 'DNS')","('Mountain West', 'DNS')","('FBS Indep.', 'DNS')"
"('FSU', 1)","('Alabama', 2)","('Oregon', 3)","('TCU', 5)","('OSU', 7)","('Marshall', 18)","('Colorado State', 22)","('Notre Dame', 26)"
"('Georgia Tech', 17)","('Miss St', 4)","('UCLA', 11)","('Baylor', 6)","('Michigan State', 10)",,"('Boise State', 28.5)",
"('Duke', 25)","('Ole Miss', 8)","('Arizona State', 13)","('Kansas State', 12)","('Wisconsin', 14)",,,
"('Clemson', 27)","('Georgia', 9)","('Arizona', 15)","('Oklahoma', 23)","('Nebraska', 21)",,,
"('Louisville', 28.5)","('Auburn', 16)","('Utah', 20)","('West Virginia', 32)","('Minnesota', 31)",,,
"('Miami', 33.5)","('Missouri', 19)","('USC', 24)",,,,,
,"('LSU', 30)",,,,,,
,"('Texas A&M', 33.5)",,,,,,
,"('Arkansas', 35)",,,,,,
10 changes: 10 additions & 0 deletions data/2014/4_team/2014_week_14.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"('ACC', 64)","('SEC', 29)","('Pac-12', 37)","('Big 12', 42)","('Big Ten', 53)","('CUSA', 'DNS')","('Mountain West', 'DNS')","('American', 'DNS')"
"('FSU', 1)","('Alabama', 2)","('Oregon', 3)","('Baylor', 5)","('OSU', 7)","('Marshall', 19)","('Colorado State', 21)","('Memphis', 32)"
"('Georgia Tech', 16)","('Miss St', 4)","('UCLA', 9)","('TCU', 6)","('Michigan State', 10)",,"('Boise State', 25)","('UCF', 35)"
"('Clemson', 23)","('Georgia', 8)","('Arizona', 12)","('Kansas State', 11)","('Wisconsin', 14)",,,
"('Louisville', 24)","('Auburn', 15)","('Arizona State', 13)","('Oklahoma', 20)","('Minnesota', 22)",,,
"('Duke', 30)","('Missouri', 17)","('Utah', 28.5)","('West Virginia', 33.5)","('Nebraska', 28.5)",,,
,"('Ole Miss', 18)","('USC', 31)",,,,,
,"('Arkansas', 26)",,,,,,
,"('LSU', 27)",,,,,,
,"('Texas A&M', 33.5)",,,,,,
8 changes: 8 additions & 0 deletions data/2014/4_team/2014_week_15.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"('SEC', 38)","('ACC', 54)","('Pac-12', 44)","('Big 12', 36)","('Big Ten', 49)","('Mountain West', 'DNS')","('CUSA', 'DNS')","('American', 'DNS')","('MAC', 'DNS')"
"('Alabama', 1)","('FSU', 2)","('Oregon', 3)","('TCU', 4)","('OSU', 6)","('Boise State', 22)","('Marshall', 28.5)","('Memphis', 30)","('N Illinois', 35.5)"
"('Miss St', 10)","('Georgia Tech', 12)","('Arizona', 8)","('Baylor', 5)","('Michigan State', 7)","('Colorado State', 31)",,"('UCF', 35.5)",
"('Ole Miss', 13)","('Clemson', 19)","('UCLA', 16)","('Kansas State', 9)","('Wisconsin', 11)","('Air Force', 32)",,"('Cincinnati', 37)",
"('Missouri', 14)","('Louisville', 21)","('Arizona State', 17)","('Oklahoma', 18)","('Nebraska', 25)",,,,
"('Georgia', 15)","('Duke', 28.5)","('Utah', 24)","('West Virginia', 33.5)","('Minnesota', 27)",,,,
"('Auburn', 20)",,"('USC', 26)",,,,,,
"('LSU', 23)",,"('Stanford', 33.5)",,,,,,
Loading