Spaces:
Running
Running
Jon Solow
commited on
Commit
Β·
b14851b
1
Parent(s):
8569c62
Replace raw naming
Browse files- src/dbt_data_client.py +6 -6
- src/dbt_yfdash/models/nflverse/{raw_depth_charts.sql β depth_charts.sql} +0 -0
- src/dbt_yfdash/models/nflverse/{raw_ftn_charting.sql β ftn_charting.sql} +0 -0
- src/dbt_yfdash/models/nflverse/{raw_ngs_passing.sql β ngs_passing.sql} +0 -0
- src/dbt_yfdash/models/nflverse/{raw_ngs_receiving.sql β ngs_receiving.sql} +0 -0
- src/dbt_yfdash/models/nflverse/{raw_ngs_rushing.sql β ngs_rushing.sql} +0 -0
- src/dbt_yfdash/models/nflverse/{raw_play_by_play.sql β play_by_play.sql} +0 -0
- src/dbt_yfdash/models/nflverse/{raw_player_stats.sql β player_stats.sql} +0 -0
- src/dbt_yfdash/models/nflverse/{raw_players.sql β players.sql} +0 -0
- src/dbt_yfdash/models/nflverse/schema.yml +9 -9
- src/dbt_yfdash/models/nflverse/{raw_snap_counts.sql β snap_counts.sql} +0 -0
src/dbt_data_client.py
CHANGED
|
@@ -45,31 +45,31 @@ def get_current_tables() -> list[str]:
|
|
| 45 |
|
| 46 |
|
| 47 |
def get_snap_counts() -> pd.DataFrame:
|
| 48 |
-
df = execute_db_command_df("SELECT * from
|
| 49 |
df["fantasy_position"] = df["position"].isin(FANTASY_POSITIONS)
|
| 50 |
return df
|
| 51 |
|
| 52 |
|
| 53 |
def get_play_by_play() -> pd.DataFrame:
|
| 54 |
-
df = execute_db_command_df("SELECT * from
|
| 55 |
return df
|
| 56 |
|
| 57 |
|
| 58 |
def get_player_stats() -> pd.DataFrame:
|
| 59 |
-
df = execute_db_command_df("SELECT * from
|
| 60 |
return df
|
| 61 |
|
| 62 |
|
| 63 |
def get_ftn_charting() -> pd.DataFrame:
|
| 64 |
-
df = execute_db_command_df("SELECT * from
|
| 65 |
return df
|
| 66 |
|
| 67 |
|
| 68 |
def get_depth_charts() -> pd.DataFrame:
|
| 69 |
-
df = execute_db_command_df("SELECT * from
|
| 70 |
return df
|
| 71 |
|
| 72 |
|
| 73 |
def get_nextgen_stats(stat_category: str) -> pd.DataFrame:
|
| 74 |
-
df = execute_db_command_df(f"SELECT * from
|
| 75 |
return df
|
|
|
|
| 45 |
|
| 46 |
|
| 47 |
def get_snap_counts() -> pd.DataFrame:
|
| 48 |
+
df = execute_db_command_df("SELECT * from snap_counts")
|
| 49 |
df["fantasy_position"] = df["position"].isin(FANTASY_POSITIONS)
|
| 50 |
return df
|
| 51 |
|
| 52 |
|
| 53 |
def get_play_by_play() -> pd.DataFrame:
|
| 54 |
+
df = execute_db_command_df("SELECT * from play_by_play")
|
| 55 |
return df
|
| 56 |
|
| 57 |
|
| 58 |
def get_player_stats() -> pd.DataFrame:
|
| 59 |
+
df = execute_db_command_df("SELECT * from player_stats")
|
| 60 |
return df
|
| 61 |
|
| 62 |
|
| 63 |
def get_ftn_charting() -> pd.DataFrame:
|
| 64 |
+
df = execute_db_command_df("SELECT * from ftn_charting")
|
| 65 |
return df
|
| 66 |
|
| 67 |
|
| 68 |
def get_depth_charts() -> pd.DataFrame:
|
| 69 |
+
df = execute_db_command_df("SELECT * from depth_charts")
|
| 70 |
return df
|
| 71 |
|
| 72 |
|
| 73 |
def get_nextgen_stats(stat_category: str) -> pd.DataFrame:
|
| 74 |
+
df = execute_db_command_df(f"SELECT * from ngs_{stat_category}")
|
| 75 |
return df
|
src/dbt_yfdash/models/nflverse/{raw_depth_charts.sql β depth_charts.sql}
RENAMED
|
File without changes
|
src/dbt_yfdash/models/nflverse/{raw_ftn_charting.sql β ftn_charting.sql}
RENAMED
|
File without changes
|
src/dbt_yfdash/models/nflverse/{raw_ngs_passing.sql β ngs_passing.sql}
RENAMED
|
File without changes
|
src/dbt_yfdash/models/nflverse/{raw_ngs_receiving.sql β ngs_receiving.sql}
RENAMED
|
File without changes
|
src/dbt_yfdash/models/nflverse/{raw_ngs_rushing.sql β ngs_rushing.sql}
RENAMED
|
File without changes
|
src/dbt_yfdash/models/nflverse/{raw_play_by_play.sql β play_by_play.sql}
RENAMED
|
File without changes
|
src/dbt_yfdash/models/nflverse/{raw_player_stats.sql β player_stats.sql}
RENAMED
|
File without changes
|
src/dbt_yfdash/models/nflverse/{raw_players.sql β players.sql}
RENAMED
|
File without changes
|
src/dbt_yfdash/models/nflverse/schema.yml
CHANGED
|
@@ -1,30 +1,30 @@
|
|
| 1 |
version: 2
|
| 2 |
|
| 3 |
models:
|
| 4 |
-
- name:
|
| 5 |
description: "depth_charts"
|
| 6 |
|
| 7 |
-
- name:
|
| 8 |
description: "ftn_charting"
|
| 9 |
|
| 10 |
-
- name:
|
| 11 |
description: "ngs_passing"
|
| 12 |
|
| 13 |
-
- name:
|
| 14 |
description: "ngs_receiving"
|
| 15 |
|
| 16 |
-
- name:
|
| 17 |
description: "ngs_rushing"
|
| 18 |
|
| 19 |
-
- name:
|
| 20 |
description: "play_by_play"
|
| 21 |
|
| 22 |
-
- name:
|
| 23 |
description: "player_stats"
|
| 24 |
|
| 25 |
-
- name:
|
| 26 |
description: "players"
|
| 27 |
|
| 28 |
-
- name:
|
| 29 |
description: "snap_counts"
|
| 30 |
|
|
|
|
| 1 |
version: 2
|
| 2 |
|
| 3 |
models:
|
| 4 |
+
- name: depth_charts
|
| 5 |
description: "depth_charts"
|
| 6 |
|
| 7 |
+
- name: ftn_charting
|
| 8 |
description: "ftn_charting"
|
| 9 |
|
| 10 |
+
- name: ngs_passing
|
| 11 |
description: "ngs_passing"
|
| 12 |
|
| 13 |
+
- name: ngs_receiving
|
| 14 |
description: "ngs_receiving"
|
| 15 |
|
| 16 |
+
- name: ngs_rushing
|
| 17 |
description: "ngs_rushing"
|
| 18 |
|
| 19 |
+
- name: play_by_play
|
| 20 |
description: "play_by_play"
|
| 21 |
|
| 22 |
+
- name: player_stats
|
| 23 |
description: "player_stats"
|
| 24 |
|
| 25 |
+
- name: players
|
| 26 |
description: "players"
|
| 27 |
|
| 28 |
+
- name: snap_counts
|
| 29 |
description: "snap_counts"
|
| 30 |
|
src/dbt_yfdash/models/nflverse/{raw_snap_counts.sql β snap_counts.sql}
RENAMED
|
File without changes
|