represent

Simple wrapper for the represent.opennorth.ca data API

Represent

A simple wrapper for the district and politician data from Represent.

npm install represent

Example response: http://represent.opennorth.ca/boundary-sets/federal-electoral-districts/?format=apibrowser

represent.boundarySets("federal-electoral-districts", function(errordata) {});

Example response: http://represent.opennorth.ca/boundaries/toronto-wards/?format=apibrowser

represent.boundaries("toronto-wards", function(errordata) {});

Example response: http://represent.opennorth.ca/boundaries/?contains=45.524,-73.596&format=apibrowser

represent.boundariesLatLon(45.524, -73.596, function(errordata) {});

Example response: http://represent.opennorth.ca/postcodes/L5G4L3/?format=apibrowser

represent.postalCode("L5G4L3", function(errordata) {});

Example response: http://represent.opennorth.ca/representatives/?point=45.524,-73.596&format=apibrowser

represent.representativesLatLon(45.524, -73.596, function(errordata) {});
  • add caching

MIT licensed. See LICENSE file.