A web-based MLB Pitching Analyzer built with Python and the Bottle framework, featuring an HTML/CSS/JavaScript frontend with Bootstrap, that looks at all MLB pitching data using SQL from 1890 - 2017 and provides visualizations and interactions for various statistics.
- All MLB pitching data up until 2017
- Interactive charts and tables
- Supports SQLite for local database storage
- Simple, lightweight web interface using Bottle templates (
.tplfiles)
- Python 3.13
- Bottle - lightweight Python web framework
- SQLite - or local data storage (originally was PostGreSQL, but transitioned to SQLite to commit entire project to GitHub)
- Bootstrap
- HTML/CSS/JavaScript
- HTML templates in
views/using Bottle's SimpleTemplate
MLB-Pitching-Analyzer/
├── gui/
│ ├── hello_bottle.py # Main Bottle app
│ ├── views/ # HTML templates (.tpl)
│ └── data/ # SQLite database files
├── requirements.txt # Python dependencies
└── README.md # Project documentation
⚠️ Note: Launch the app usinghello_bottle.pyfrom thegui/folder so paths to templates and the database resolve correctly.
# from psychopg import connect (Not using PostGreSQL anymore, using SQLite3)
from bottle import Bottle, template, static_file, request, SimpleTemplate
import json
import csv
import sqlite3- Clone the Repository
git clone <repo-url>
cd MLB-Pitching-Analyzer- Install dependencies
pip install -r requirements.txt- Navigate to
gui/folder
cd gui- Run the Bottle app
python hello_bottle.py- Open browser and navigate to
http://127.0.0.1:8080/This projet is licensed under the MIT License.