Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 1.31 KB

README.md

File metadata and controls

49 lines (35 loc) · 1.31 KB

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