Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -254,68 +254,57 @@ def server(input,output,session):
|
|
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
-
app = App(
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
|
|
|
| 278 |
"@TJStats",
|
| 279 |
href="https://x.com/TJStats",
|
| 280 |
target="_blank"
|
| 281 |
)
|
| 282 |
),
|
| 283 |
-
|
| 284 |
ui.tags.a(
|
| 285 |
"Support me on Patreon for more baseball content",
|
| 286 |
href="https://www.patreon.com/TJ_Stats",
|
| 287 |
target="_blank"
|
| 288 |
)
|
| 289 |
),
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
ui.
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
ui.nav("MLB",
|
| 311 |
-
ui.output_plot("plot_mlb",height = "1000px",width="1000px")),
|
| 312 |
-
ui.nav("AAA",
|
| 313 |
-
ui.output_plot("plot_aaa",height = "1000px",width="1000px")),
|
| 314 |
-
ui.nav("AA",
|
| 315 |
-
ui.output_plot("plot_aa",height = "1000px",width="1000px")) ,
|
| 316 |
-
ui.nav("A+",
|
| 317 |
-
ui.output_plot("plot_ha",height = "1000px",width="1000px")),
|
| 318 |
-
ui.nav("A",
|
| 319 |
-
ui.output_plot("plot_a",height = "1000px",width="1000px"))
|
| 320 |
-
|
| 321 |
-
,id="my_tabs"),server)
|
|
|
|
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
+
app = App(
|
| 258 |
+
ui.page_sidebar(
|
| 259 |
+
ui.sidebar(
|
| 260 |
+
ui.tags.div(
|
| 261 |
+
{"style": "width:90%;margin: 0 auto;max-width: 1600px;"},
|
| 262 |
+
ui.tags.style(
|
| 263 |
+
"""
|
| 264 |
+
h4 {
|
| 265 |
+
margin-top: 1em;
|
| 266 |
+
font-size: 35px;
|
| 267 |
+
}
|
| 268 |
+
h2 {
|
| 269 |
+
font-size: 25px;
|
| 270 |
+
}
|
| 271 |
+
"""
|
| 272 |
+
),
|
| 273 |
+
shinyswatch.theme.simplex(),
|
| 274 |
+
ui.tags.h4("TJStats"),
|
| 275 |
+
ui.tags.i("Baseball Analytics and Visualizations"),
|
| 276 |
+
ui.div(
|
| 277 |
+
"By: ",
|
| 278 |
+
ui.tags.a(
|
| 279 |
"@TJStats",
|
| 280 |
href="https://x.com/TJStats",
|
| 281 |
target="_blank"
|
| 282 |
)
|
| 283 |
),
|
| 284 |
+
ui.tags.p(
|
| 285 |
ui.tags.a(
|
| 286 |
"Support me on Patreon for more baseball content",
|
| 287 |
href="https://www.patreon.com/TJ_Stats",
|
| 288 |
target="_blank"
|
| 289 |
)
|
| 290 |
),
|
| 291 |
+
ui.row(
|
| 292 |
+
ui.output_ui('test', 'Select Player'),
|
| 293 |
+
ui.input_select("stat_id", "Select Stat", plot_dict_small, width=1, size=1),
|
| 294 |
+
ui.input_numeric("n", "Rolling Window Size", value=50),
|
| 295 |
+
ui.input_action_button("go", "Generate", class_="btn-primary"),
|
| 296 |
+
ui.output_table("result")
|
| 297 |
+
)
|
| 298 |
+
)
|
| 299 |
+
),
|
| 300 |
+
ui.navset_tab(
|
| 301 |
+
ui.nav("MLB", ui.output_plot("plot_mlb", height="1000px", width="1000px")),
|
| 302 |
+
ui.nav("AAA", ui.output_plot("plot_aaa", height="1000px", width="1000px")),
|
| 303 |
+
ui.nav("AA", ui.output_plot("plot_aa", height="1000px", width="1000px")),
|
| 304 |
+
ui.nav("A+", ui.output_plot("plot_ha", height="1000px", width="1000px")),
|
| 305 |
+
ui.nav("A", ui.output_plot("plot_a", height="1000px", width="1000px")),
|
| 306 |
+
id="my_tabs"
|
| 307 |
+
)
|
| 308 |
+
),
|
| 309 |
+
server
|
| 310 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|