kieran / votewell

strategic voting calculator

Home Page:https://votewell.ca

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VoteWell

Blog post

image

Running locally

# install & run
nvm use
make run

build:

make dist

Sources

Poll data (Ontario 2018) Poll data (Canada 2019)

Ward boundaries (Ontario 2018) Ward boundaries (Canada 2019)

Converting boundary Shapefiles to geoJson

install ogr2ogr for coordinate conversion

echo 'export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH' >> ~/.bash_profile
source ~/.bash_profile

convert coordinates:

cd data
ogr2ogr -t_srs EPSG:4326 -f geoJSON -lco COORDINATE_PRECISION=7 ridings.json path/to/your_shapefile.shp

simplify the shape (for faster lookups)

  • go to https://mapshaper.org/
  • upload ridings.json
  • simplify (6-12% is a good starting range)
  • export, overwrite original file

About

strategic voting calculator

https://votewell.ca


Languages

Language:CoffeeScript 77.5%Language:Sass 15.1%Language:Makefile 3.3%Language:HTML 3.1%Language:Dockerfile 0.6%Language:JavaScript 0.4%