nfelodcm 0.1.15__tar.gz → 0.1.17__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.
Files changed (54) hide show
  1. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/PKG-INFO +2 -2
  2. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/__init__.py +1 -0
  3. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Maps/coaches.json +2 -2
  4. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Maps/filmmargins.json +2 -2
  5. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Maps/games.json +2 -2
  6. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Maps/hfa.json +2 -2
  7. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Maps/logos.json +1 -1
  8. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Maps/market_data.json +2 -2
  9. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Maps/participants.json +1 -1
  10. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Maps/pbp.json +2 -2
  11. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Maps/player_stats.json +2 -2
  12. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Maps/players.json +2 -2
  13. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Maps/qbelo.json +2 -2
  14. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Maps/qbr.json +2 -2
  15. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Maps/rosters.json +2 -2
  16. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Maps/srs_ratings.json +2 -2
  17. nfelodcm-0.1.17/nfelodcm/Maps/stadiums.json +57 -0
  18. nfelodcm-0.1.17/nfelodcm/Maps/team_stadiums.json +75 -0
  19. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Maps/wepa.json +2 -2
  20. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Maps/wt_ratings.json +1 -1
  21. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Utilities/__init__.py +2 -1
  22. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Utilities/global_variables.json +4 -4
  23. nfelodcm-0.1.17/nfelodcm/Utilities/load_maps.py +30 -0
  24. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/nfelodcm.py +48 -7
  25. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm.egg-info/PKG-INFO +2 -2
  26. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm.egg-info/SOURCES.txt +6 -0
  27. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/pyproject.toml +1 -1
  28. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/README.md +0 -0
  29. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Engine/Assignments/__init__.py +0 -0
  30. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Engine/Assignments/assignment.py +0 -0
  31. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Engine/Assignments/assignments/__init__.py +0 -0
  32. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Engine/Assignments/assignments/desc_based_plays.py +0 -0
  33. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Engine/Assignments/assignments/fastr_team_repl.py +0 -0
  34. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Engine/Assignments/assignments/format_player_file.py +0 -0
  35. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Engine/Assignments/assignments/format_qb_file.py +0 -0
  36. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Engine/Assignments/assignments/penalty_formatting.py +0 -0
  37. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Engine/Assignments/assignments/score_clean.py +0 -0
  38. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Engine/Assignments/assignments/temp_players_handle.py +0 -0
  39. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Engine/DCMTable.py +0 -0
  40. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Engine/Primatives/DataPull.py +0 -0
  41. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Engine/Primatives/Freshness.py +0 -0
  42. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Engine/Primatives/LocalIO.py +0 -0
  43. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Engine/Primatives/TableMap.py +0 -0
  44. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Engine/Primatives/__init__.py +0 -0
  45. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Engine/__init__.py +0 -0
  46. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Utilities/checks.py +0 -0
  47. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Utilities/extract_map.py +0 -0
  48. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Utilities/retrieve_season_state.py +0 -0
  49. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/Utilities/set_season_state.py +0 -0
  50. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm/tests.py +0 -0
  51. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm.egg-info/dependency_links.txt +0 -0
  52. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm.egg-info/requires.txt +0 -0
  53. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/nfelodcm.egg-info/top_level.txt +0 -0
  54. {nfelodcm-0.1.15 → nfelodcm-0.1.17}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: nfelodcm
3
- Version: 0.1.15
3
+ Version: 0.1.17
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>
@@ -2,4 +2,5 @@ from .nfelodcm.nfelodcm import get_df
2
2
  from .nfelodcm.nfelodcm import load
3
3
  from .nfelodcm.nfelodcm import get_map
4
4
  from .nfelodcm.nfelodcm import get_season_state
5
+ from .nfelodcm.nfelodcm import list_tables
5
6
  from .nfelodcm.tests import test_all_maps
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "coaches",
3
3
  "description": "Aggregated head coaching stats",
4
- "last_local_update": "2025-01-03T21:20:36.722940",
4
+ "last_local_update": "2025-02-16T22:16:47.243318",
5
5
  "download_url": "https://raw.githubusercontent.com/greerreNFL/coaches/main/coaches.csv",
6
6
  "compression": null,
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/greerreNFL/coaches/commits?path=coaches.csv",
11
11
  "gh_release_tag": null,
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2025-01-03T21:20:36.372038+00:00"
13
+ "last_freshness_check": "2025-02-21T21:39:22.319928+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "filmmargins",
3
3
  "description": "Margins derived from PFF grades",
4
- "last_local_update": "2025-01-03T21:11:46.318977",
4
+ "last_local_update": "2025-02-16T22:09:34.314279",
5
5
  "download_url": "https://raw.githubusercontent.com/greerreNFL/filmmargin/main/film_margins.csv",
6
6
  "compression": null,
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/greerreNFL/filmmargin/commits?path=film_margins.csv",
11
11
  "gh_release_tag": null,
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2025-01-03T21:11:45.817545+00:00"
13
+ "last_freshness_check": "2025-02-21T21:36:03.768144+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "games",
3
3
  "description": "nflgamedata games",
4
- "last_local_update": "2025-01-03T21:11:45.093457",
4
+ "last_local_update": "2025-02-21T21:36:03.065281",
5
5
  "download_url": "https://raw.githubusercontent.com/nflverse/nfldata/master/data/games.csv",
6
6
  "compression": null,
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/nflverse/nfldata/commits",
11
11
  "gh_release_tag": null,
12
12
  "sla_seconds": 500,
13
- "last_freshness_check": "2025-01-03T21:11:44.737175+00:00"
13
+ "last_freshness_check": "2025-02-21T21:36:02.703634+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hfa",
3
3
  "description": "Estimated home field advantage by game",
4
- "last_local_update": "2024-08-18T17:52:01.463397",
4
+ "last_local_update": "2025-02-16T22:16:49.613399",
5
5
  "download_url": "https://raw.githubusercontent.com/greerreNFL/nfelohfa/main/estimated_hfa.csv",
6
6
  "compression": null,
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/greerreNFL/nfelohfa/commits?path=estimated_hfa.csv",
11
11
  "gh_release_tag": null,
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2025-01-03T21:20:37.429366+00:00"
13
+ "last_freshness_check": "2025-02-21T21:39:23.356469+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/nflverse/nflverse-pbp/commits?path=teams_colors_logos.csv",
11
11
  "gh_release_tag": null,
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2025-01-03T21:11:45.440672+00:00"
13
+ "last_freshness_check": "2025-02-21T21:36:03.408993+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "market_data",
3
3
  "description": "Spread and totals from various sources",
4
- "last_local_update": "2025-01-03T21:14:28.063928",
4
+ "last_local_update": "2025-02-16T22:16:01.705405",
5
5
  "download_url": "https://raw.githubusercontent.com/greerreNFL/nfelomarket_data/main/Data/lines.csv",
6
6
  "compression": null,
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/greerreNFL/nfelomarket_data/commits?path=Data/lines.csv",
11
11
  "gh_release_tag": null,
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2025-01-03T21:14:27.518091+00:00"
13
+ "last_freshness_check": "2025-02-21T21:38:51.171757+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/nflverse/nflverse-data/releases/tags",
11
11
  "gh_release_tag": "pbp_participation",
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2025-01-03T21:14:52.651093+00:00"
13
+ "last_freshness_check": "2025-02-21T21:39:16.862932+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": "season",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pbp",
3
3
  "description": "nflfastR play-by-play",
4
- "last_local_update": "2025-01-03T21:14:00.916900",
4
+ "last_local_update": "2025-02-21T21:38:27.195184",
5
5
  "download_url": "https://github.com/nflverse/nflverse-data/releases/download/pbp/play_by_play_{0}.csv.gz",
6
6
  "compression": "gzip",
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/nflverse/nflverse-data/releases/tags",
11
11
  "gh_release_tag": "pbp",
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2025-01-03T21:11:46.598985+00:00"
13
+ "last_freshness_check": "2025-02-21T21:36:04.530641+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": "season",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "player_stats",
3
3
  "description": "nflfastR player stats",
4
- "last_local_update": "2025-01-03T21:14:22.678300",
4
+ "last_local_update": "2025-02-21T21:38:49.166637",
5
5
  "download_url": "https://github.com/nflverse/nflverse-data/releases/download/player_stats/player_stats.csv.gz",
6
6
  "compression": "gzip",
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/nflverse/nflverse-data/releases/tags",
11
11
  "gh_release_tag": "player_stats",
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2025-01-03T21:14:20.298026+00:00"
13
+ "last_freshness_check": "2025-02-21T21:38:46.487303+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "players",
3
3
  "description": "nflfastR player meta data",
4
- "last_local_update": "2025-01-03T21:20:35.956066",
4
+ "last_local_update": "2025-02-21T21:39:21.921364",
5
5
  "download_url": "https://github.com/nflverse/nflverse-data/releases/download/players/players.csv",
6
6
  "compression": null,
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/nflverse/nflverse-data/releases/tags",
11
11
  "gh_release_tag": "players",
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2025-01-03T21:17:33.598945+00:00"
13
+ "last_freshness_check": "2025-02-21T21:39:19.591525+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "qbelo",
3
3
  "description": "538/nfelo QB Elo model",
4
- "last_local_update": "2025-01-03T21:14:25.907519",
4
+ "last_local_update": "2025-02-16T22:15:59.132733",
5
5
  "download_url": "https://raw.githubusercontent.com/greerreNFL/nfeloqb/main/qb_elos.csv",
6
6
  "compression": null,
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/greerreNFL/nfeloqb/commits?path=qb_elos.csv",
11
11
  "gh_release_tag": null,
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2025-01-03T21:14:24.875668+00:00"
13
+ "last_freshness_check": "2025-02-21T21:38:50.243046+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "qbr",
3
3
  "description": "nflverse QBR",
4
- "last_local_update": "2025-01-03T21:11:44.391936",
4
+ "last_local_update": "2025-02-21T21:36:02.384414",
5
5
  "download_url": "https://github.com/nflverse/nflverse-data/releases/download/espn_data/qbr_season_level.csv",
6
6
  "compression": null,
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/nflverse/nflverse-data/releases/tags",
11
11
  "gh_release_tag": "espn_data",
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2025-01-03T21:11:43.562715+00:00"
13
+ "last_freshness_check": "2025-02-21T21:36:01.524111+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rosters",
3
3
  "description": "nflfastR rosters",
4
- "last_local_update": "2025-01-03T21:14:52.196321",
4
+ "last_local_update": "2025-02-21T21:39:16.469032",
5
5
  "download_url": "https://github.com/nflverse/nflverse-data/releases/download/rosters/roster_{0}.csv",
6
6
  "compression": null,
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/nflverse/nflverse-data/releases/tags",
11
11
  "gh_release_tag": "rosters",
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2025-01-03T21:14:28.606036+00:00"
13
+ "last_freshness_check": "2025-02-21T21:38:51.725835+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": "season",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "srs",
3
3
  "description": "A Simple Ranking System implimentation for the NFL",
4
- "last_local_update": "2025-01-03T21:14:27.189586",
4
+ "last_local_update": "2025-02-16T22:16:00.275784",
5
5
  "download_url": "https://raw.githubusercontent.com/greerreNFL/nfelosrs/main/srs_ratings.csv",
6
6
  "compression": null,
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/greerreNFL/nfelosrs/commits?path=srs_ratings.csv",
11
11
  "gh_release_tag": null,
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2025-01-03T21:14:26.515769+00:00"
13
+ "last_freshness_check": "2025-02-21T21:38:50.757092+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "stadiums",
3
+ "description": "Metadata for NFL stadiums, attached to their PFR ID",
4
+ "last_local_update": "2025-02-16T22:16:47.921622",
5
+ "download_url": "https://raw.githubusercontent.com/greerreNFL/Stadiums/refs/heads/main/data/stadiums.csv",
6
+ "compression": null,
7
+ "engine": "c",
8
+ "freshness": {
9
+ "type": "gh_commit",
10
+ "gh_api_endpoint": "https://api.github.com/repos/greerreNFL/Stadiums/commits?path=data/stadiums.csv",
11
+ "gh_release_tag": null,
12
+ "sla_seconds": 900,
13
+ "last_freshness_check": "2025-02-21T21:39:22.631794+00:00"
14
+ },
15
+ "iter": {
16
+ "type": null,
17
+ "start": null
18
+ },
19
+ "assignments": [],
20
+ "map": {
21
+ "stadium_id": "object",
22
+ "stadium_name": "object",
23
+ "lat": "float32",
24
+ "lon": "float32",
25
+ "altitude": "float32",
26
+ "heading": "float32",
27
+ "first_game_date": "object",
28
+ "last_game_date": "object",
29
+ "surface_type": "object",
30
+ "roof_type": "object",
31
+ "address": "object",
32
+ "city": "object",
33
+ "state": "object",
34
+ "zipcode": "object",
35
+ "country": "object",
36
+ "tz": "object",
37
+ "tz_offset": "float32",
38
+ "wikipedia_url": "object",
39
+ "img_sat_url": "object",
40
+ "img_logo_url": "object",
41
+ "img_shot_url": "object",
42
+ "website": "object",
43
+ "nicknames": "object",
44
+ "owner": "object",
45
+ "operator": "object",
46
+ "capacity": "float32",
47
+ "broke_ground": "float32",
48
+ "opened": "float32",
49
+ "closed": "float32",
50
+ "demolished": "float32",
51
+ "construction_cost": "float32",
52
+ "construction_cost_2023": "float32",
53
+ "renovation_years": "object",
54
+ "expansion_years": "object",
55
+ "architects": "object"
56
+ }
57
+ }
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "team_stadiums",
3
+ "description": "Metadata and analytics for NFL teams and their stadiums",
4
+ "last_local_update": "2025-02-21T21:36:04.215102",
5
+ "download_url": "https://raw.githubusercontent.com/greerreNFL/Stadiums/refs/heads/main/data/team_stadiums.csv",
6
+ "compression": null,
7
+ "engine": "c",
8
+ "freshness": {
9
+ "type": "gh_commit",
10
+ "gh_api_endpoint": "https://api.github.com/repos/greerreNFL/Stadiums/commits?path=data/team_stadiums.csv",
11
+ "gh_release_tag": null,
12
+ "sla_seconds": 900,
13
+ "last_freshness_check": "2025-02-21T21:36:04.105770+00:00"
14
+ },
15
+ "iter": {
16
+ "type": null,
17
+ "start": null
18
+ },
19
+ "assignments": [],
20
+ "map": {
21
+ "team": "object",
22
+ "team_fastr": "object",
23
+ "stadium": "object",
24
+ "is_current": "bool",
25
+ "stadium_name": "object",
26
+ "lat": "float32",
27
+ "lon": "float32",
28
+ "altitude": "float32",
29
+ "heading": "int32",
30
+ "first_game_date": "object",
31
+ "last_game_date": "object",
32
+ "surface_type": "object",
33
+ "roof_type": "object",
34
+ "address": "object",
35
+ "city": "object",
36
+ "state": "object",
37
+ "zipcode": "object",
38
+ "country": "object",
39
+ "tz": "object",
40
+ "tz_offset": "int32",
41
+ "wikipedia_url": "object",
42
+ "img_sat_url": "object",
43
+ "img_logo_url": "object",
44
+ "img_shot_url": "object",
45
+ "website": "object",
46
+ "nicknames": "object",
47
+ "owner": "object",
48
+ "operator": "object",
49
+ "capacity": "float32",
50
+ "broke_ground": "float32",
51
+ "opened": "int32",
52
+ "closed": "float32",
53
+ "demolished": "float32",
54
+ "construction_cost": "float32",
55
+ "construction_cost_2023": "float32",
56
+ "renovation_years": "object",
57
+ "expansion_years": "object",
58
+ "architects": "object",
59
+ "wins_l16": "float32",
60
+ "losses_l16": "float32",
61
+ "ties_l16": "float32",
62
+ "mov_l16": "float32",
63
+ "hfa_l16": "float32",
64
+ "wins_l80": "float32",
65
+ "losses_l80": "float32",
66
+ "ties_l80": "float32",
67
+ "mov_l80": "float32",
68
+ "hfa_l80": "float32",
69
+ "wins_all_time": "float32",
70
+ "losses_all_time": "float32",
71
+ "ties_all_time": "float32",
72
+ "mov_all_time": "float32",
73
+ "hfa_all_time": "float32"
74
+ }
75
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wepa",
3
3
  "description": "nfelo Weighted Expected Points Model",
4
- "last_local_update": "2025-01-03T21:14:24.493060",
4
+ "last_local_update": "2025-02-16T22:15:56.751414",
5
5
  "download_url": "https://raw.githubusercontent.com/greerreNFL/wepa/main/data/wepa_by_game_pit.csv",
6
6
  "compression": null,
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/greerreNFL/wepa/commits?path=data/wepa_by_game_pit.csv",
11
11
  "gh_release_tag": null,
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2025-01-03T21:14:23.444597+00:00"
13
+ "last_freshness_check": "2025-02-21T21:38:49.780975+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/greerreNFL/nfelosrs/commits?path=wt_ratings.csv",
11
11
  "gh_release_tag": null,
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2025-01-03T21:20:37.040642+00:00"
13
+ "last_freshness_check": "2025-02-21T21:39:22.981868+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -4,4 +4,5 @@ from .set_season_state import set_season_state
4
4
  from .checks import check_struc
5
5
  from .checks import check_map_type
6
6
  from .checks import check_data
7
- from .checks import check_data_folder
7
+ from .checks import check_data_folder
8
+ from .load_maps import load_maps
@@ -2,15 +2,15 @@
2
2
  "season_states": {
3
3
  "last_full_week": {
4
4
  "season": 2024,
5
- "week": 17
5
+ "week": 22
6
6
  },
7
7
  "last_partial_week": {
8
8
  "season": 2024,
9
- "week": 17
9
+ "week": 22
10
10
  },
11
11
  "next_week": {
12
- "season": 2024,
13
- "week": 18
12
+ "season": NaN,
13
+ "week": NaN
14
14
  }
15
15
  }
16
16
  }
@@ -0,0 +1,30 @@
1
+ ## built-in ##
2
+ import pathlib
3
+ import json
4
+ from typing import Dict
5
+
6
+ def load_maps() -> Dict[str, Dict]:
7
+ '''
8
+ Loads all maps from the Maps folder
9
+
10
+ Parameters:
11
+ * None
12
+
13
+ Returns:
14
+ * Dict[str, Dict] - a dictionary of table names and their corresponding maps
15
+ '''
16
+ ## container for maps ##
17
+ maps = {}
18
+ ## get maps ##
19
+ maps_dir = pathlib.Path(__file__).parent.parent.resolve() / 'Maps'
20
+ existing_maps = list(maps_dir.glob('*.json'))
21
+ ## check that maps were found ##
22
+ if len(existing_maps) > 0:
23
+ for map_path in existing_maps:
24
+ ## parse the name ##
25
+ table = map_path.stem
26
+ ## load the map ##
27
+ with open(map_path, 'r') as map_json:
28
+ maps[table] = json.load(map_json)
29
+ ## return ##
30
+ return maps
@@ -1,8 +1,12 @@
1
- import pandas as pd
2
- import numpy
1
+ ## built-in ##
3
2
  import pathlib
4
3
  import json
4
+ from typing import List, Dict
5
+ ## external ##
6
+ import pandas as pd
7
+ import numpy
5
8
 
9
+ ## local ##
6
10
  from .Engine import DCMTable
7
11
  import nfelodcm.nfelodcm.Utilities as utils
8
12
 
@@ -14,19 +18,39 @@ utils.set_season_state()
14
18
  utils.check_data()
15
19
 
16
20
  ## wrappers and classes to interact with the package ##
17
- def get_df(table):
21
+ def get_df(table: str) -> pd.DataFrame:
18
22
  """
19
- gets a single table
23
+ Load a single dataframe
24
+
25
+ Parameters:
26
+ * table: str - the name of the table to load
27
+
28
+ Returns:
29
+ * pd.DataFrame - the dataframe loaded from the table
20
30
  """
21
31
  engine = DCMTable(table)
22
32
  return engine.localIO.df
23
33
 
24
- def load(tables):
34
+ def load(tables: List[str]) -> Dict[str, pd.DataFrame]:
25
35
  """
26
36
  loads an array of tables and returns a dictionary
37
+
38
+ Parameters:
39
+ * tables: List[str] - a list of table names to load
40
+
41
+ Returns:
42
+ * Dict[str, pd.DataFrame] - a dictionary of table names and their corresponding dataframes
27
43
  """
28
44
  ## init db structure ##
29
45
  db = {}
46
+ ## check that all passed tables have maps ##
47
+ map_data = utils.load_maps()
48
+ maps = list(map_data.keys()) if len(map_data) > 0 else []
49
+ missing_maps = [t for t in tables if t not in maps]
50
+ if len(missing_maps) > 0:
51
+ raise Exception('MAP ERROR: The following tables do not have maps: {0}'.format(
52
+ '\n '.join(missing_maps)
53
+ ))
30
54
  ## add tables ##
31
55
  for table in tables:
32
56
  db[table] = get_df(table)
@@ -49,7 +73,7 @@ def get_map(url):
49
73
  col, dtype
50
74
  ))
51
75
 
52
- def get_season_state(state_type='last_full_week'):
76
+ def get_season_state(state_type='last_full_week') -> tuple:
53
77
  '''
54
78
  Returns the season and week of the specified state type:
55
79
  'last_full_week' (default): the last week in which no games are still unplayed
@@ -67,4 +91,21 @@ def get_season_state(state_type='last_full_week'):
67
91
  state_type, '\n '.join(list(global_variables['season_states'].keys()))
68
92
  ))
69
93
  ## if state valid, return ##
70
- return global_variables['season_states'][state_type]['season'], global_variables['season_states'][state_type]['week']
94
+ return global_variables['season_states'][state_type]['season'], global_variables['season_states'][state_type]['week']
95
+
96
+ def list_tables() -> None:
97
+ '''
98
+ Lists all tables available to the package
99
+
100
+ Parameters:
101
+ * None
102
+
103
+ Returns:
104
+ * None (prints list of tables)
105
+ '''
106
+ ## get maps ##
107
+ maps = utils.load_maps()
108
+ ## print ##
109
+ print('Available tables:')
110
+ for table, table_map in maps.items():
111
+ print(' {0} - {1}'.format(table, table_map['description']))
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: nfelodcm
3
- Version: 0.1.15
3
+ Version: 0.1.17
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>
@@ -35,12 +35,15 @@ pyproject.toml
35
35
  ./nfelodcm/Maps/qbr.json
36
36
  ./nfelodcm/Maps/rosters.json
37
37
  ./nfelodcm/Maps/srs_ratings.json
38
+ ./nfelodcm/Maps/stadiums.json
39
+ ./nfelodcm/Maps/team_stadiums.json
38
40
  ./nfelodcm/Maps/wepa.json
39
41
  ./nfelodcm/Maps/wt_ratings.json
40
42
  ./nfelodcm/Utilities/__init__.py
41
43
  ./nfelodcm/Utilities/checks.py
42
44
  ./nfelodcm/Utilities/extract_map.py
43
45
  ./nfelodcm/Utilities/global_variables.json
46
+ ./nfelodcm/Utilities/load_maps.py
44
47
  ./nfelodcm/Utilities/retrieve_season_state.py
45
48
  ./nfelodcm/Utilities/set_season_state.py
46
49
  nfelodcm/nfelodcm.py
@@ -81,11 +84,14 @@ nfelodcm/Maps/qbelo.json
81
84
  nfelodcm/Maps/qbr.json
82
85
  nfelodcm/Maps/rosters.json
83
86
  nfelodcm/Maps/srs_ratings.json
87
+ nfelodcm/Maps/stadiums.json
88
+ nfelodcm/Maps/team_stadiums.json
84
89
  nfelodcm/Maps/wepa.json
85
90
  nfelodcm/Maps/wt_ratings.json
86
91
  nfelodcm/Utilities/__init__.py
87
92
  nfelodcm/Utilities/checks.py
88
93
  nfelodcm/Utilities/extract_map.py
89
94
  nfelodcm/Utilities/global_variables.json
95
+ nfelodcm/Utilities/load_maps.py
90
96
  nfelodcm/Utilities/retrieve_season_state.py
91
97
  nfelodcm/Utilities/set_season_state.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "nfelodcm"
7
- version = "0.1.15"
7
+ version = "0.1.17"
8
8
  readme = "README.md"
9
9
  requires-python = ">=3.11"
10
10
  license = {text = "MIT"}
File without changes
File without changes
File without changes