Kvartersregeringen uses Flask as a backend to parse GeoJSON find the right election districts and MapBox to visualize the results.
- Install Virtualenv:
$ sudo easy_install virtualenv
- Install Brew
- Install GeoDjango libraries using brew
- Install pip
- Init your personal environment with
$ virtualenv env --no-site-packages
andsource env/bin/activate
- Install requirements:
$ pip install -r requirements.txt
- Start server:
$ python app.py
git subtree push --prefix app heroku master
- Load election data and run simulations in R. Write the results of the simulation to the geoJSON file.
- Methods are stored in
regeringsbildning.R
. - The code for loading data and running simulations is stored in
regering tillGeoJSON.R
.
- Methods are stored in
- Modify and run add-meta-data-and-split.py to split the GeoJSON file into provinces.
- Deploy?!