Skip to content
forked from kieran/vaxme

VaxMe.ca - find out where to get vaccinated

Notifications You must be signed in to change notification settings

damnMeddlingKid/vaxme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0b64341 · Apr 19, 2021

History

23 Commits
Apr 17, 2021
Apr 19, 2021
Apr 19, 2021
Apr 19, 2021
Apr 19, 2021
Apr 17, 2021
Apr 17, 2021
Apr 17, 2021
Apr 17, 2021
Apr 17, 2021
Apr 17, 2021
Apr 17, 2021
Apr 17, 2021
Apr 17, 2021
Apr 18, 2021
Apr 19, 2021
Apr 19, 2021
Apr 19, 2021
Apr 19, 2021
Apr 19, 2021
Apr 18, 2021
Apr 17, 2021
Apr 17, 2021
Apr 17, 2021

Repository files navigation

VaxMe

image

Running locally

# install & run
nvm use
make run

build:

make dist

Sources

Postal code boundaries

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
# convert co-ordinates to lat/lng
ogr2ogr -t_srs EPSG:4326 -f geoJSON -lco COORDINATE_PRECISION=9 postal_codes.json lfsa000a16a_e/lfsa000a16a_e.shp

simplify the shape (for faster lookups)

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

Fix geojson errors

# detect errors
ogrinfo -dialect sqlite -sql "select * from \"postal_codes\" where ST_IsValid(geometry)=0" postal_codes.json

# fix errors
ogr2ogr -f GeoJSON -dialect sqlite -sql "select ST_MakeValid(geometry),PRNAME,PRUID,CFSAUID from \"postal_codes\"" fixed_postal_codes.json postal_codes.json

# remove original, rename fixed, gzip
rm postal_codes.json
mv fixed_postal_codes.json postal_codes.json
gzip postal_codes.json

About

VaxMe.ca - find out where to get vaccinated

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CoffeeScript 68.5%
  • Sass 20.0%
  • HTML 4.7%
  • Makefile 4.6%
  • Dockerfile 1.5%
  • JavaScript 0.7%