This repository accompanies the analysis of Singapore's blood stock levels at https://sriramsami.com/bloodstocks.
Note: This is definitely not the most efficient way to analyze the data (one network call per commit).
- You'll need
python 3+
andgit
- Install python packages, either (a)
conda env create -f environment.yml
or (b)pip install pandas seaborn matplotlib PyGithub
- Clone this repository.
- Get a GitHub personal access token from https://github.com/settings/tokens/new. The token doesn't need any specific permissions.
- Run
TOKEN=<your GitHub personal access token> python3 retrieve.py
. This will download the data to thedata/
subfolder. It'll take a few minutes. PRs are welcome to do this sanely (download the repo oneshot and extract the commits offline) - When the data is downloaded, run
python3 analyze.py
. This should display the overall graph for blood stocks over time.