nesticot commited on
Commit
3163a6e
·
verified ·
1 Parent(s): 9928250

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +43 -54
app.py CHANGED
@@ -254,68 +254,57 @@ def server(input,output,session):
254
 
255
 
256
 
257
- app = App(ui.page_sidebar(
258
-
259
- ui.sidebar(
260
- # ui.tags.base(href=base_url),
261
- ui.tags.div(
262
- {"style": "width:90%;margin: 0 auto;max-width: 1600px;"},
263
- ui.tags.style(
264
- """
265
- h4 {
266
- margin-top: 1em;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
-
277
- ui.div("By: ",ui.tags.a(
 
278
  "@TJStats",
279
  href="https://x.com/TJStats",
280
  target="_blank"
281
  )
282
  ),
283
- ui.tags.p(
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
- ui.row(
292
-
293
- ui.output_ui('test','Select Player'),
294
- #ui.input_select("id", "Select Pitcher",batter_dict,selected=675911,width=1,size=1,selectize=True),
295
- #ui.input_select("level_id", "Select Level",level_dict,width=1,size=1),
296
- ui.input_select("stat_id", "Select Stat",plot_dict_small,width=1,size=1),
297
- ui.input_numeric("n", "Rolling Window Size", value=50),
298
- ui.input_action_button("go", "Generate",class_="btn-primary"),
299
- ui.output_table("result")
300
- ))),
301
-
302
-
303
- ui.navset_tab(
304
- # ui.nav("Raw Data",
305
- # ui.output_data_frame("raw_table")),
306
- # ui.nav("Season Summary",
307
- # ui.output_plot('plot',
308
- # width='2000px',
309
- # height='2000px')),
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
+ )