This Streamlit application provides an interactive dashboard for exploring and visualizing various baseball statistics. The dashboard covers team and player performance across different seasons, offering insights into batting, pitching, and fielding metrics.
- Multi-page application with different views:
- Home
- Weekly Article
- Team Batting
- Team Fielding
- Team Pitching
- Position Player Offense
- Position Player Defense
- Pitcher
- Season selection for historical data analysis
- Player selection and comparison
- League average comparisons
- Interactive charts and tables
-
Ensure you have Python installed on your system.
-
Install the required dependencies after navigating to the /dashboard directory:
pip install -r requirements.txt
app.py
: Main application file and navigation setupposition_player_off.py
: Position player offensive statisticsposition_player_def.py
: Position player defensive statisticspitcher.py
: Pitcher statistics and metricsdocker-compose.yml
: Docker configuration for running the application- Additional utility files for data processing, player selection, and season selection
To run the dashboard locally:
- Navigate to the /dashboard project directory in your terminal.
- Make sure you have python installed
- Run the following command:
python -m streamlit run app.py
- The application should open in your default web browser.
- Use the sidebar to navigate between different pages of the application.
- On each page, you can select seasons, players, or teams to analyze.
- For player comparisons:
- Select a player using the player selection tool
- Choose seasons for comparison
- View the resulting statistics and visualizations
You can easily extend the dashboard by adding new pages or modifying existing ones. To add a new page:
- Create a new Python file for your page (e.g.,
new_stats_page.py
) - Add the page to the
show_pages
function inapp.py
- Implement your new statistics or visualizations in the new file
Contributions to improve the dashboard are welcome. Please feel free to submit pull requests or open issues for any bugs or feature requests.