Skip to content

Create a database of ⚽️ data from understat.com

License

Notifications You must be signed in to change notification settings

Torvaney/understat-db

Repository files navigation

Understat DB

Create a database using data from Understat.

Understat DB is a project to scrape data from Understat 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:

git clone https://github.com/Torvaney/understat-db.git
cd understat-db

Then, setup the local environment

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

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

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

About

Create a database of ⚽️ data from understat.com

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published