https://github.com/torvaney/understat-db
Create a database of ⚽️ data from understat.com
https://github.com/torvaney/understat-db
database football-data soccer-data understat
Last synced: 20 days ago
JSON representation
Create a database of ⚽️ data from understat.com
- Host: GitHub
- URL: https://github.com/torvaney/understat-db
- Owner: Torvaney
- License: mit
- Created: 2021-05-09T14:25:55.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-19T22:07:29.000Z (over 3 years ago)
- Last Synced: 2025-04-06T17:06:41.387Z (about 1 month ago)
- Topics: database, football-data, soccer-data, understat
- Language: Python
- Homepage:
- Size: 1 MB
- Stars: 27
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Understat DB
> Create a database using data from Understat.Understat DB is a project to scrape data from [Understat](understat.com) and store it in a Postgres database. It aims to be a useful companion or starting point for projects using football data.
## Usage
The simplest way to get started is to populate a local database with `docker-compose`.
First, clone the repository:
```bash
git clone https://github.com/Torvaney/understat-db.git
cd understat-db
```Then, setup the local environment
```bash
make env # Create a virtualenv and installs the project & dependencies
source venv/bin/activate # Activate the virtualenv
cp .env.sample .env # Copy default environment vars to .env
```Run the database
```bash
docker-compose up -d db # Start a postgres database within a docker container
understat-db migrate # Create base database tables
```Finally, import the data you want
```bash
understat-db ingest --leagues EPL --seasons 2020
```## Requirements
To run this project you will need:
* Python 3.6+
* Docker## Contributing
Pull requests are encouraged! For major changes, please open an issue first to discuss what you would like to change.
## License
[MIT](https://choosealicense.com/licenses/mit/)