An app designed to help fantasy baseball player and general baseball fanatics satisfy their inner data scientist! Complete with some machine learning models to explore.
- clone this repository:
git clone https://github.com/stanleykywu/MLB-Current-Player-Recent-Statistics-Web-Scraping.git
- install bs4:
pip install bs4
- install flask:
pip install flask
- open python environment:
python
- import scripts:
from stat_scraper.team_scraper import scrape_hitting, scrape_pitching
- run scripts:
scrape_hitting(list: years of data to scrape)
orscrape_pitching(list: years of data to scrape)
- example:
scrape_hitting(list(range(2010, 2020)))
- open python environment:
python
- import scripts:
from stat_scraper.mlb_recent_stats import pitcher_data, hitter_data
- run scripts:
pitcher_data()
orhitter_data()