rebeccafishman / chi-calls-ii

App to Contact Chicago City Council Alderman Via Email or Phone against Blue Lives Ordinance
0 stars 2 forks source link

Move official-matching to backend #20

Open richranallo opened 7 years ago

richranallo commented 7 years ago

This issue is very low-priority, but I'd like to move all the leaflet matching to the backend so that users only need to submit location data and get back data on their officials.

I'll fill more in on this as I think it through

rgroves commented 7 years ago

I looked into this a bit and found two possible options to consider.

1) Use Leaflet on the server-side with Node.js. This requires a wrapper library or a workaround hack, both described in this StackOverflow question: Running leaflet on nodejs server side

2) Load the data into a table using a Postgres database with the PostGIS extension on Heroku. Heroku's free tier allows this with caps: 20 connections and 10,000 rows max. The row max is more than enough (there are only 50 wards) but I'm not sure about that connection cap. I suppose it depends on the load/usage of the site by end users. The geojson data for the ward boundariess and the json data for the ward offices detail data sets are available via the Open Data Portal.

richranallo commented 7 years ago

The plan right now is to go with that leaflet solution. I looked into it when I made the original Bluest Lie page but didn't have time to implement.

PostGIS is a good solution too, I just don't want to bring another database into the mix just yet.

On Tue, Jun 6, 2017 at 11:55 PM Robert Groves notifications@github.com wrote:

I looked into this a bit and found two possible options to consider.

1.

Use Leaflet on the server-side with Node.js. This requires a wrapper library or a workaround hack, both described in this StackOverflow question: Running leaflet on nodejs server side https://stackoverflow.com/questions/28167343/running-leaflet-on-nodejs-server-side 2.

Load the data into a table using a Postgres database with the PostGIS extension on Heroku. Heroku's free tier allows this with caps: 20 connections and 10,000 rows max. The row max is more than enough (there are only 50 wards) but I'm not sure about that connection cap. I suppose it depends on the load/usage of the site by end users. The geojson data for the ward boundaries https://data.cityofchicago.org/Facilities-Geographic-Boundaries/Boundaries-Wards-2015-/sp34-6z76s and the json data for the ward offices detail https://data.cityofchicago.org/Facilities-Geographic-Boundaries/Ward-Offices/htai-wnw4/data data sets are available via the Open Data Portal.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rebeccafishman/chi-calls-ii/issues/20#issuecomment-306686429, or mute the thread https://github.com/notifications/unsubscribe-auth/ABf78EbTOeEsOpCD1OqbrFrrzkALv2Eyks5sBi0-gaJpZM4Nkf8r .