LCHansson / HackForSweden

Kod för insamling, munging (och analyser?) av data till HfS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kvartersregeringen

Installation

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 pip
  • Init your personal environment with $ virtualenv env --no-site-packages and source env/bin/activate
  • Install requirements: $ pip install -r requirements.txt
  • Start server: $ python app.py

Update Heroku

  • git subtree push --prefix app heroku master

Update with new data

  • 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.
  • Modify and run add-meta-data-and-split.py to split the GeoJSON file into provinces.
  • Deploy?!

About

Kod för insamling, munging (och analyser?) av data till HfS


Languages

Language:R 43.5%Language:CSS 22.2%Language:JavaScript 18.9%Language:Python 15.5%