Skip to content

mr-cal/starcraft-stats

Repository files navigation

craft-stats

test-status-badge data-collection-badge

Overview

Dashboard, insights, and statistics for the *craft applications and libraries.

https://mr-cal.github.io/starcraft-stats/html/index.html

Design

This project contains a few parts:

  • A Python command-line application that retrieves, processes, and stores data in a set of CSV and JSON files.
  • A static webpage that loads and displays the JSON as tables and CSV as graphs.
  • A nightly cron job to refresh data

How to

How to update data

Data is updated once a day, but you can manually trigger the data-collection workflow in GitHub.

How to update what data is collected

Update the starcraft-config.yaml file.

How to run locally

It's a Python package with a CLI, so it can be installed and run locally.

You will need a github token. You can create a new fine-grained token in your settings page.

export GITHUB_TOKEN=<your token from github>
pip install -e .
starcraft-stats --help

Web browsers will not run Javascript from a local webpage. The easiest way to view the webpage locally is to run a web server:

  1. Install Visual Studio Code
  2. Install the Live Server extension
  3. Open the html directory in Visual Studio Code
  4. Right-click on index.html and select "Open with Live Server"

Contributing

Contributions are encouraged!