Skip to content

kieran/votewell

Repository files navigation

VoteWell

Blog post

image

Running locally

# install & run
nvm use
make run

build:

make dist

Sources

Poll data

Ward boundaries (Canada 2021)

Converting boundary Shapefiles to geoJson

install ogr2ogr for coordinate conversion

  • run a GDAL docker container
docker run -it ghcr.io/osgeo/gdal:ubuntu-small-latest

copy the shapefile directory into the container

convert coordinates:

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

import that geojson into mongo

if you want to 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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published