codeforokc / school-finder

Geolocation-based web app for locating schools and school districts near you
MIT License
18 stars 17 forks source link

Convert data ingest to simplify school district data to make smaller size #9

Closed joekarl closed 9 years ago

joekarl commented 9 years ago

Basically just reduce precision on floating point lat lon coordinates.

joekarl commented 9 years ago

Will make district lines a bit less precise, but shouldn't be too bad.

jagthedrummer commented 9 years ago

I'd rather that we not do this. Reducing the precision of the district boundaries would directly impact the reliability, and therefore the usefulness of the app. I suspect that places close to a boundary are the ones that would see the most requests.

joekarl commented 9 years ago

Will have to check with @jvrousseau but we're sitting on like 1m precision here and that's pretty much overkill for what we're doing. We reduce it even to 10m precision and we've got a fairly big win on space. I do see your point though, but we can't have that dataset be 100kb (compressed), it's just too big.

jagthedrummer commented 9 years ago

Ok, maybe some slight reduction in precision is OK. However, if just the school district data, in it's most complete and accurate form is "too big" for our current approach, AND we hope to add additional data in the future, does that mean that we really need a different approach? Or maybe at least a different data format? (As has been mentioned before, there's tons of duplication in JSON format.)

joekarl commented 9 years ago

That's probably a discussion we need to have, we're essentially using geojson because it's convenient to just drop into leaflet. Topojson is apparently a lot smaller filesize wise but not natively supported by leaflet (though I think I recall a D3 plugin to handle that).

joekarl commented 9 years ago

(see http://stackoverflow.com/questions/14740705/difference-between-geojson-and-topojson)

joekarl commented 9 years ago

Relevant - http://blog.webkid.io/maps-with-leaflet-and-topojson/

joekarl commented 9 years ago

Topojson won't help us with the school data points but will help us with school district data polygons.

joekarl commented 9 years ago

Closing in favor of #11