Update app.py
Browse files
app.py
CHANGED
|
@@ -60,17 +60,54 @@ app_ui = ui.page_fluid(
|
|
| 60 |
),
|
| 61 |
ui.navset_tab(
|
| 62 |
ui.nav("All Pitches",
|
| 63 |
-
ui.download_button("download_all", "Download Data", class_="btn-sm mb-3"),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
output_tabulator("table_all")
|
| 65 |
),
|
| 66 |
ui.nav("Daily Pitches",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
output_tabulator("table_daily")
|
| 68 |
),
|
| 69 |
ui.nav("tjStuff+",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
output_tabulator("table_tjstuff")
|
| 71 |
),
|
| 72 |
ui.nav("tjStuff+ Summary",
|
| 73 |
-
ui.download_button("download_tjsumm", "Download Data", class_="btn-sm mb-3"),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
output_tabulator("table_stuff_all")
|
| 75 |
|
| 76 |
)
|
|
@@ -484,6 +521,10 @@ def server(input, output, session):
|
|
| 484 |
]
|
| 485 |
|
| 486 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 487 |
df_plot = df_merge.to_pandas()
|
| 488 |
|
| 489 |
team_dict = dict(zip(df_spring['pitcher_id'],df_spring['pitcher_team']))
|
|
@@ -638,6 +679,8 @@ def server(input, output, session):
|
|
| 638 |
]
|
| 639 |
|
| 640 |
|
|
|
|
|
|
|
| 641 |
df_plot = df_merge.to_pandas()
|
| 642 |
|
| 643 |
team_dict = dict(zip(df_spring['pitcher_id'],df_spring['pitcher_team']))
|
|
@@ -791,6 +834,7 @@ def server(input, output, session):
|
|
| 791 |
{ "title": "Δ", "field": "tj_stuff_plus_diff", "width": 100, "headerFilter":"input", "formatter":"textarea" }
|
| 792 |
]
|
| 793 |
|
|
|
|
| 794 |
|
| 795 |
df_plot = df_merge.sort(['pitcher_id','count'],descending=True).to_pandas()
|
| 796 |
|
|
@@ -888,6 +932,9 @@ def server(input, output, session):
|
|
| 888 |
pl.col(col).round(0).alias(col) for col in ['CH', 'CU', 'FC', 'FF', 'FS', 'SI', 'SL', 'ST', 'All']
|
| 889 |
])
|
| 890 |
|
|
|
|
|
|
|
|
|
|
| 891 |
df_plot = df_small_pivot.sort(['pitcher_id','count'],descending=True).to_pandas()
|
| 892 |
|
| 893 |
team_dict = dict(zip(df_spring['pitcher_id'],df_spring['pitcher_team']))
|
|
|
|
| 60 |
),
|
| 61 |
ui.navset_tab(
|
| 62 |
ui.nav("All Pitches",
|
| 63 |
+
ui.row(ui.column(1,ui.download_button("download_all", "Download Data", class_="btn-sm mb-3")),
|
| 64 |
+
|
| 65 |
+
ui.column(2,
|
| 66 |
+
ui.div(
|
| 67 |
+
{"class": "input-group"},
|
| 68 |
+
ui.span("Pitches >=", class_="input-label"),
|
| 69 |
+
ui.input_numeric(id='pitches_all_min', label='', value=1, min=1, width="100px")
|
| 70 |
+
)
|
| 71 |
+
)),
|
| 72 |
+
|
| 73 |
output_tabulator("table_all")
|
| 74 |
),
|
| 75 |
ui.nav("Daily Pitches",
|
| 76 |
+
ui.row(
|
| 77 |
+
ui.column(2,
|
| 78 |
+
ui.div(
|
| 79 |
+
{"class": "input-group"},
|
| 80 |
+
ui.span("Pitches >=", class_="input-label"),
|
| 81 |
+
ui.input_numeric(id='pitches_daily_min', label='', value=1, min=1, width="100px")
|
| 82 |
+
)
|
| 83 |
+
)),
|
| 84 |
+
|
| 85 |
+
|
| 86 |
output_tabulator("table_daily")
|
| 87 |
),
|
| 88 |
ui.nav("tjStuff+",
|
| 89 |
+
|
| 90 |
+
ui.row(
|
| 91 |
+
ui.column(2,
|
| 92 |
+
ui.div(
|
| 93 |
+
{"class": "input-group"},
|
| 94 |
+
ui.span("Pitches >=", class_="input-label"),
|
| 95 |
+
ui.input_numeric(id='pitches_tjstuff_min', label='', value=1, min=1, width="100px")
|
| 96 |
+
)
|
| 97 |
+
)),
|
| 98 |
output_tabulator("table_tjstuff")
|
| 99 |
),
|
| 100 |
ui.nav("tjStuff+ Summary",
|
| 101 |
+
ui.row(ui.column(1,ui.download_button("download_tjsumm", "Download Data", class_="btn-sm mb-3")),
|
| 102 |
+
|
| 103 |
+
ui.column(2,
|
| 104 |
+
ui.div(
|
| 105 |
+
{"class": "input-group"},
|
| 106 |
+
ui.span("Pitches >=", class_="input-label"),
|
| 107 |
+
ui.input_numeric(id='pitches_tjsumm_min', label='', value=1, min=1, width="100px")
|
| 108 |
+
)
|
| 109 |
+
)),
|
| 110 |
+
|
| 111 |
output_tabulator("table_stuff_all")
|
| 112 |
|
| 113 |
)
|
|
|
|
| 521 |
]
|
| 522 |
|
| 523 |
|
| 524 |
+
|
| 525 |
+
df_merge = df_merge.filter(pl.col('count')>=int(input.pitches_all_min()))
|
| 526 |
+
|
| 527 |
+
|
| 528 |
df_plot = df_merge.to_pandas()
|
| 529 |
|
| 530 |
team_dict = dict(zip(df_spring['pitcher_id'],df_spring['pitcher_team']))
|
|
|
|
| 679 |
]
|
| 680 |
|
| 681 |
|
| 682 |
+
df_merge = df_merge.filter(pl.col('count')>=int(input.pitches_daily_min()))
|
| 683 |
+
|
| 684 |
df_plot = df_merge.to_pandas()
|
| 685 |
|
| 686 |
team_dict = dict(zip(df_spring['pitcher_id'],df_spring['pitcher_team']))
|
|
|
|
| 834 |
{ "title": "Δ", "field": "tj_stuff_plus_diff", "width": 100, "headerFilter":"input", "formatter":"textarea" }
|
| 835 |
]
|
| 836 |
|
| 837 |
+
df_merge = df_merge.filter(pl.col('count')>=int(input.pitches_tjstuff_min()))
|
| 838 |
|
| 839 |
df_plot = df_merge.sort(['pitcher_id','count'],descending=True).to_pandas()
|
| 840 |
|
|
|
|
| 932 |
pl.col(col).round(0).alias(col) for col in ['CH', 'CU', 'FC', 'FF', 'FS', 'SI', 'SL', 'ST', 'All']
|
| 933 |
])
|
| 934 |
|
| 935 |
+
|
| 936 |
+
df_small_pivot = df_small_pivot.filter(pl.col('count')>=int(input.pitches_tjsumm_min()))
|
| 937 |
+
|
| 938 |
df_plot = df_small_pivot.sort(['pitcher_id','count'],descending=True).to_pandas()
|
| 939 |
|
| 940 |
team_dict = dict(zip(df_spring['pitcher_id'],df_spring['pitcher_team']))
|