Update app.py
Browse files
app.py
CHANGED
|
@@ -496,13 +496,13 @@ def server(input, output, session):
|
|
| 496 |
year_input = int(input.year_input())
|
| 497 |
sport_id = int(input.level_input())
|
| 498 |
# player_input = int(input.pitcher_id())
|
| 499 |
-
start_date =
|
| 500 |
-
end_date =
|
| 501 |
game_type = [input.type_input()]
|
| 502 |
# Get game data
|
| 503 |
|
| 504 |
|
| 505 |
-
game_list = scrape.get_schedule(year_input=[year_input], sport_id=[sport_id], game_type=game_type).filter((pl.col('date')>=start_date)&(pl.col('date')<=end_date))['game_id']
|
| 506 |
data_list = scrape.get_data(game_list_input=game_list[:])
|
| 507 |
df_pitcher_info = scrape.get_data_df(data_list=data_list).filter((pl.col("start_speed") >= 50)).sort('pitcher_name')
|
| 508 |
pitcher_dict = dict(zip(df_pitcher_info['pitcher_id'], df_pitcher_info['pitcher_name']))
|
|
|
|
| 496 |
year_input = int(input.year_input())
|
| 497 |
sport_id = int(input.level_input())
|
| 498 |
# player_input = int(input.pitcher_id())
|
| 499 |
+
start_date = str(input.date_id()[0])
|
| 500 |
+
end_date = str(input.date_id()[1])
|
| 501 |
game_type = [input.type_input()]
|
| 502 |
# Get game data
|
| 503 |
|
| 504 |
|
| 505 |
+
game_list = scrape.get_schedule(year_input=[year_input], sport_id=[sport_id], game_type=game_type).filter((pl.col('date').cast(pl.Utf8)>=start_date)&(pl.col('date').cast(pl.Utf8)<=end_date))['game_id']
|
| 506 |
data_list = scrape.get_data(game_list_input=game_list[:])
|
| 507 |
df_pitcher_info = scrape.get_data_df(data_list=data_list).filter((pl.col("start_speed") >= 50)).sort('pitcher_name')
|
| 508 |
pitcher_dict = dict(zip(df_pitcher_info['pitcher_id'], df_pitcher_info['pitcher_name']))
|