nfelodcm 0.1.8__tar.gz → 0.1.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/PKG-INFO +1 -1
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Engine/Assignments/assignment.py +6 -1
- nfelodcm-0.1.9/nfelodcm/Engine/Assignments/assignments/score_clean.py +47 -0
- nfelodcm-0.1.9/nfelodcm/Maps/coaches.json +59 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Maps/games.json +1 -1
- nfelodcm-0.1.9/nfelodcm/Maps/hfa.json +39 -0
- nfelodcm-0.1.9/nfelodcm/Maps/srs_ratings.json +37 -0
- nfelodcm-0.1.9/nfelodcm/Maps/wt_ratings.json +34 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm.egg-info/PKG-INFO +1 -1
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm.egg-info/SOURCES.txt +5 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/pyproject.toml +1 -1
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/README.md +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/__init__.py +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Engine/Assignments/__init__.py +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Engine/Assignments/assignments/__init__.py +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Engine/Assignments/assignments/desc_based_plays.py +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Engine/Assignments/assignments/fastr_team_repl.py +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Engine/Assignments/assignments/penalty_formatting.py +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Engine/DCMTable.py +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Engine/Primatives/DataPull.py +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Engine/Primatives/Freshness.py +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Engine/Primatives/LocalIO.py +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Engine/Primatives/TableMap.py +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Engine/Primatives/__init__.py +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Engine/__init__.py +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Maps/filmmargins.json +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Maps/logos.json +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Maps/market_data.json +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Maps/participants.json +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Maps/pbp.json +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Maps/player_stats.json +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Maps/players.json +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Maps/qbelo.json +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Maps/qbr.json +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Maps/rosters.json +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Maps/wepa.json +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Utilities/__init__.py +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Utilities/checks.py +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Utilities/extract_map.py +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Utilities/global_variables.json +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Utilities/retrieve_season_state.py +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Utilities/set_season_state.py +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/nfelodcm.py +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/tests.py +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm.egg-info/dependency_links.txt +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm.egg-info/requires.txt +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm.egg-info/top_level.txt +0 -0
- {nfelodcm-0.1.8 → nfelodcm-0.1.9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nfelodcm
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.9
|
4
4
|
Summary: Python package for loading and caching CSVs hosted on github into pandas dataframes
|
5
5
|
Author-email: Robert Greer <nfl@robbygreer.com>
|
6
6
|
Maintainer-email: Robert Greer <nfl@robbygreer.com>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
from .assignments import (
|
2
|
-
fastr_team_id_repl, penalty_formatting, desc_based_plays
|
2
|
+
fastr_team_id_repl, penalty_formatting, desc_based_plays,
|
3
|
+
score_clean
|
3
4
|
)
|
4
5
|
|
5
6
|
## a dictionary that holds assignments and the columns they add ##
|
@@ -19,6 +20,10 @@ assignments = {
|
|
19
20
|
('rush_attempt_all', 'float32'),
|
20
21
|
('play_call', 'str'),
|
21
22
|
]
|
23
|
+
},
|
24
|
+
'score_clean' : {
|
25
|
+
'func' : score_clean,
|
26
|
+
'new_columns' : []
|
22
27
|
}
|
23
28
|
}
|
24
29
|
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import pandas as pd
|
2
|
+
import numpy
|
3
|
+
|
4
|
+
manual_clean_dict = {
|
5
|
+
"2009_17_IND_BUF": {
|
6
|
+
"home_score": 30,
|
7
|
+
"away_score": 7
|
8
|
+
},
|
9
|
+
"2013_07_CIN_DET": {
|
10
|
+
"home_score": 24,
|
11
|
+
"away_score": 27
|
12
|
+
},
|
13
|
+
"2015_06_ARI_PIT": {
|
14
|
+
"home_score": 25,
|
15
|
+
"away_score": 13
|
16
|
+
},
|
17
|
+
"2015_09_PHI_DAL": {
|
18
|
+
"home_score": 27,
|
19
|
+
"away_score": 33
|
20
|
+
},
|
21
|
+
"2015_15_KC_BAL": {
|
22
|
+
"home_score": 14,
|
23
|
+
"away_score": 34
|
24
|
+
},
|
25
|
+
"2016_01_MIN_TEN": {
|
26
|
+
"home_score": 16,
|
27
|
+
"away_score": 25
|
28
|
+
},
|
29
|
+
"2016_05_NE_CLE": {
|
30
|
+
"home_score": 13,
|
31
|
+
"away_score": 33
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
def score_clean(df):
|
36
|
+
'''
|
37
|
+
Manually clean scores that are incorrect in the
|
38
|
+
game file
|
39
|
+
'''
|
40
|
+
## create a home and away map ##
|
41
|
+
home_map = {k:manual_clean_dict[k]['home_score'] for k in manual_clean_dict.keys()}
|
42
|
+
away_map = {k:manual_clean_dict[k]['away_score'] for k in manual_clean_dict.keys()}
|
43
|
+
## apply ##
|
44
|
+
df['home_score'] = df['game_id'].map(home_map).combine_first(df['home_score'])
|
45
|
+
df['away_score'] = df['game_id'].map(away_map).combine_first(df['away_score'])
|
46
|
+
## return
|
47
|
+
return df
|
@@ -0,0 +1,59 @@
|
|
1
|
+
{
|
2
|
+
"name": "coaches",
|
3
|
+
"description": "Aggregated head coaching stats",
|
4
|
+
"last_local_update": "2024-07-07T23:13:39.454179",
|
5
|
+
"download_url": "https://raw.githubusercontent.com/greerreNFL/coaches/main/coaches.csv",
|
6
|
+
"compression": null,
|
7
|
+
"engine": "c",
|
8
|
+
"freshness": {
|
9
|
+
"type": "gh_commit",
|
10
|
+
"gh_api_endpoint": "https://api.github.com/repos/greerreNFL/coaches/commits?path=coaches.csv",
|
11
|
+
"gh_release_tag": null,
|
12
|
+
"sla_seconds": 900,
|
13
|
+
"last_freshness_check": "2024-07-10T17:16:06.701316+00:00"
|
14
|
+
},
|
15
|
+
"iter": {
|
16
|
+
"type": null,
|
17
|
+
"start": null
|
18
|
+
},
|
19
|
+
"assignments": [],
|
20
|
+
"map": {
|
21
|
+
"coach": "object",
|
22
|
+
"seasons": "int32",
|
23
|
+
"is_active": "int32",
|
24
|
+
"games": "float32",
|
25
|
+
"wins": "float32",
|
26
|
+
"losses": "float32",
|
27
|
+
"ties": "int32",
|
28
|
+
"playoff_births": "float32",
|
29
|
+
"games_playoff": "float32",
|
30
|
+
"wins_playoff": "float32",
|
31
|
+
"losses_playoff": "float32",
|
32
|
+
"ties_playoff": "float32",
|
33
|
+
"games_superbowl": "float32",
|
34
|
+
"wins_superbowl": "float32",
|
35
|
+
"ats_pct": "float32",
|
36
|
+
"ats_return": "float32",
|
37
|
+
"ats_risked": "float32",
|
38
|
+
"avg_pf": "float32",
|
39
|
+
"avg_pa": "float32",
|
40
|
+
"avg_margin": "float32",
|
41
|
+
"avg_spread": "float32",
|
42
|
+
"ats_pct_home": "float32",
|
43
|
+
"ats_pct_away": "float32",
|
44
|
+
"ats_pct_playoff": "float32",
|
45
|
+
"ats_pct_favorite": "float32",
|
46
|
+
"ats_pct_underdog": "float32",
|
47
|
+
"ats_pct_div": "float32",
|
48
|
+
"ats_pct_non_div": "float32",
|
49
|
+
"ats_pct_bye": "float32",
|
50
|
+
"ats_pct_dome": "float32",
|
51
|
+
"ats_roi": "float32",
|
52
|
+
"win_pct": "float32",
|
53
|
+
"win_pct_playoff": "float32",
|
54
|
+
"teams": "object",
|
55
|
+
"pfr_coach_image_url": "object",
|
56
|
+
"pfr_coach_tree_hired_by": "object",
|
57
|
+
"pfr_coach_tree_hired": "object"
|
58
|
+
}
|
59
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
{
|
2
|
+
"name": "hfa",
|
3
|
+
"description": "Estimated home field advantage by game",
|
4
|
+
"last_local_update": null,
|
5
|
+
"download_url": "https://raw.githubusercontent.com/greerreNFL/nfelohfa/main/estimated_hfa.csv",
|
6
|
+
"compression": null,
|
7
|
+
"engine": "c",
|
8
|
+
"freshness": {
|
9
|
+
"type": "gh_commit",
|
10
|
+
"gh_api_endpoint": "https://api.github.com/repos/greerreNFL/nfelohfa/commits?path=estimated_hfa.csv",
|
11
|
+
"gh_release_tag": null,
|
12
|
+
"sla_seconds": 900,
|
13
|
+
"last_freshness_check": "2024-07-10T17:16:06.701316+00:00"
|
14
|
+
},
|
15
|
+
"iter": {
|
16
|
+
"type": null,
|
17
|
+
"start": null
|
18
|
+
},
|
19
|
+
"assignments": [],
|
20
|
+
"map": {
|
21
|
+
"game_id": "object",
|
22
|
+
"season": "int32",
|
23
|
+
"week": "int32",
|
24
|
+
"home_team": "object",
|
25
|
+
"away_team": "object",
|
26
|
+
"home_bye": "int32",
|
27
|
+
"away_bye": "int32",
|
28
|
+
"home_time_advantage": "float32",
|
29
|
+
"dif_surface": "int32",
|
30
|
+
"div_game": "int32",
|
31
|
+
"hfa_base": "float32",
|
32
|
+
"home_bye_adj": "float32",
|
33
|
+
"away_bye_adj": "float32",
|
34
|
+
"home_time_advantage_adj": "float32",
|
35
|
+
"dif_surface_adj": "float32",
|
36
|
+
"div_game_adj": "float32",
|
37
|
+
"hfa_adj": "float32"
|
38
|
+
}
|
39
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
{
|
2
|
+
"name": "srs",
|
3
|
+
"description": "A Simple Ranking System implimentation for the NFL",
|
4
|
+
"last_local_update": "2024-07-07T23:13:39.454179",
|
5
|
+
"download_url": "https://raw.githubusercontent.com/greerreNFL/nfelosrs/main/srs_ratings.csv",
|
6
|
+
"compression": null,
|
7
|
+
"engine": "c",
|
8
|
+
"freshness": {
|
9
|
+
"type": "gh_commit",
|
10
|
+
"gh_api_endpoint": "https://api.github.com/repos/greerreNFL/nfelosrs/commits?path=srs_ratings.csv",
|
11
|
+
"gh_release_tag": null,
|
12
|
+
"sla_seconds": 900,
|
13
|
+
"last_freshness_check": "2024-07-10T17:16:06.701316+00:00"
|
14
|
+
},
|
15
|
+
"iter": {
|
16
|
+
"type": null,
|
17
|
+
"start": null
|
18
|
+
},
|
19
|
+
"assignments": [],
|
20
|
+
"map": {
|
21
|
+
"season": "int32",
|
22
|
+
"week": "int32",
|
23
|
+
"team": "object",
|
24
|
+
"avg_mov": "float32",
|
25
|
+
"avg_mov_of_opponents": "float32",
|
26
|
+
"srs_rating": "float32",
|
27
|
+
"srs_rating_normalized": "float32",
|
28
|
+
"bayesian_rating": "float32",
|
29
|
+
"bayesian_stdev": "float32",
|
30
|
+
"pre_season_wt_rating": "float32",
|
31
|
+
"qb_adjustment": "float32",
|
32
|
+
"srs_rating_w_qb_adj": "float32",
|
33
|
+
"srs_rating_normalized_w_qb_adj": "float32",
|
34
|
+
"bayesian_rating_w_qb_adj": "float32",
|
35
|
+
"pre_season_wt_rating_w_qb_adj": "float32"
|
36
|
+
}
|
37
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
{
|
2
|
+
"name": "wt_ratings",
|
3
|
+
"description": "Win Totals and ratings derived from win totals (WT Ratings)",
|
4
|
+
"last_local_update": "2024-07-07T23:13:39.454179",
|
5
|
+
"download_url": "https://raw.githubusercontent.com/greerreNFL/nfelosrs/main/wt_ratings.csv",
|
6
|
+
"compression": null,
|
7
|
+
"engine": "c",
|
8
|
+
"freshness": {
|
9
|
+
"type": "gh_commit",
|
10
|
+
"gh_api_endpoint": "https://api.github.com/repos/greerreNFL/nfelosrs/commits?path=wt_ratings.csv",
|
11
|
+
"gh_release_tag": null,
|
12
|
+
"sla_seconds": 900,
|
13
|
+
"last_freshness_check": "2024-07-10T17:16:06.701316+00:00"
|
14
|
+
},
|
15
|
+
"iter": {
|
16
|
+
"type": null,
|
17
|
+
"start": null
|
18
|
+
},
|
19
|
+
"assignments": [],
|
20
|
+
"map": {
|
21
|
+
"team": "object",
|
22
|
+
"season": "int32",
|
23
|
+
"wt_rating": "float32",
|
24
|
+
"wt_rating_elo": "float32",
|
25
|
+
"sos": "float32",
|
26
|
+
"line": "float32",
|
27
|
+
"over_odds": "int32",
|
28
|
+
"under_odds": "int32",
|
29
|
+
"hold": "float32",
|
30
|
+
"over_probability": "float32",
|
31
|
+
"under_probability": "float32",
|
32
|
+
"line_adj": "float32"
|
33
|
+
}
|
34
|
+
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nfelodcm
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.9
|
4
4
|
Summary: Python package for loading and caching CSVs hosted on github into pandas dataframes
|
5
5
|
Author-email: Robert Greer <nfl@robbygreer.com>
|
6
6
|
Maintainer-email: Robert Greer <nfl@robbygreer.com>
|
@@ -11,13 +11,16 @@ pyproject.toml
|
|
11
11
|
./nfelodcm/Engine/Assignments/assignments/desc_based_plays.py
|
12
12
|
./nfelodcm/Engine/Assignments/assignments/fastr_team_repl.py
|
13
13
|
./nfelodcm/Engine/Assignments/assignments/penalty_formatting.py
|
14
|
+
./nfelodcm/Engine/Assignments/assignments/score_clean.py
|
14
15
|
./nfelodcm/Engine/Primatives/DataPull.py
|
15
16
|
./nfelodcm/Engine/Primatives/Freshness.py
|
16
17
|
./nfelodcm/Engine/Primatives/LocalIO.py
|
17
18
|
./nfelodcm/Engine/Primatives/TableMap.py
|
18
19
|
./nfelodcm/Engine/Primatives/__init__.py
|
20
|
+
./nfelodcm/Maps/coaches.json
|
19
21
|
./nfelodcm/Maps/filmmargins.json
|
20
22
|
./nfelodcm/Maps/games.json
|
23
|
+
./nfelodcm/Maps/hfa.json
|
21
24
|
./nfelodcm/Maps/logos.json
|
22
25
|
./nfelodcm/Maps/market_data.json
|
23
26
|
./nfelodcm/Maps/participants.json
|
@@ -27,7 +30,9 @@ pyproject.toml
|
|
27
30
|
./nfelodcm/Maps/qbelo.json
|
28
31
|
./nfelodcm/Maps/qbr.json
|
29
32
|
./nfelodcm/Maps/rosters.json
|
33
|
+
./nfelodcm/Maps/srs_ratings.json
|
30
34
|
./nfelodcm/Maps/wepa.json
|
35
|
+
./nfelodcm/Maps/wt_ratings.json
|
31
36
|
./nfelodcm/Utilities/__init__.py
|
32
37
|
./nfelodcm/Utilities/checks.py
|
33
38
|
./nfelodcm/Utilities/extract_map.py
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Engine/Assignments/assignments/desc_based_plays.py
RENAMED
File without changes
|
{nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Engine/Assignments/assignments/fastr_team_repl.py
RENAMED
File without changes
|
{nfelodcm-0.1.8 → nfelodcm-0.1.9}/nfelodcm/Engine/Assignments/assignments/penalty_formatting.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|