Skip to content

hammer-hao/Starcraft_dashboard

Repository files navigation

Starcraft-dashboard

This is a group project that explores aspects of the Starcraft II ladder, mmr, and win ratio using Python scripts.

How to use

Setting up virtual env

  1. Clone the repository to your local machine
  2. Set up the virtual env and install the dependencies:
$python3 -m venv env
$source env/bin/activate
(env)$pip install -r requirements.txt

Setting up the configurations

  1. Go to the Blizzard Battle.net API and register an account.
  2. Get your own client ID and secret. Save them into a .env file under /API requests/ in the following format:
CLIENTID=<your client id>
SECRET=<your client secret>
  1. Set up your own mySQL server. This can be done on a local machine or using a web service provider like the RDS service on AWS. Once the database server is set up, input its credentials into a .env file in the following format:
DBHOSTNAME=<path to the database>
DBNAME=<your database name>
DBUSERNAME=<your database username>
PASSWORD=<your database password>

Alternatively, you can set up the a local database. You will need to specify the local database in engine in the following scripts: dataprocessing.py and Visualizations.py

Running the code

  1. Once everything is set up, simply execute task.py under the /API requests/ folder:
(env)$python3 task.py
  1. Alternatively, use crontab job scheduling for periodic updates of player and matches data:
$0 0 0 * * source/env/bin/activate && python3 task.py && deactivate

It is recommended that you use a cloud instance like AWS EC2 for crontab. For details of how cron job scheduling works check their documentations check the Wikipedia page.

About

Exploring Starcraft II player and match level data using the Battle.net API with Pandas and Plotnine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5