2024_spray / home.py
nesticot's picture
Upload 28 files
6c19697 verified
raw
history blame
2.5 kB
##### home.py #####
# Home page
# Thomas Nestico
# Import modules
from shiny import *
import shinyswatch
import plotly.express as px
from shinywidgets import output_widget, render_widget
import pandas as pd
from configure import base_url
# Create app
home = App(ui.page_fluid(
ui.tags.base(href=base_url),
ui.tags.div(
{"style": "width:90%;margin: 0 auto;max-width: 1600px;"},
ui.tags.style(
"""
h4 {
margin-top: 1em;font-size:35px;
}
h2{
font-size:25px;
}
"""
),
shinyswatch.theme.simplex(),
ui.tags.h4("TJStats"),
ui.tags.i("Baseball Analytics and Visualizations"),
ui.navset_tab(
ui.nav_control(
ui.a(
"Home",
href="home/"
),
),
ui.nav_menu(
"Batter Charts",
ui.nav_control(
ui.a(
"Spray",
href="spray/"
),
ui.a(
"Decision Value",
href="decision_value/"
),
ui.a(
"Damage Model",
href="damage_model/"
),
ui.a(
"Batter Scatter",
href="batter_scatter/"
),
ui.a(
"EV vs LA Plot",
href="ev_angle/"
)
),
),
ui.nav_menu(
"Goalie Charts",
ui.nav_control(
ui.a(
"GSAx Timeline",
href="gsax-timeline/"
),
ui.a(
"GSAx Leaderboard",
href="gsax-leaderboard/"
),
ui.a(
"GSAx Comparison",
href="gsax-comparison/"
)
),
),ui.nav_menu(
"Team Charts",
ui.nav_control(
ui.a(
"Team xG Rates",
href="team-xg-rates/"
),
),
),ui.nav_control(
ui.a(
"Games",
href="games/"
),
),ui.nav_control(
ui.a(
"About",
href="about/"
),
),ui.nav_control(
ui.a(
"Articles",
href="articles/"
),
)),ui.tags.br(),ui.tags.h5("Welcome to TJStats!"),ui.tags.h6(""))), None)