Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

Switch to use cached GeoJSON #370

Open
konklone opened this issue Jan 13, 2014 · 3 comments
Open

Switch to use cached GeoJSON #370

konklone opened this issue Jan 13, 2014 · 3 comments

Comments

@konklone
Copy link
Contributor

I've cached the GeoJSON that Boundary Service returns for every CD and state over at https://github.com/unitedstates/districts.

They get published to theunitedstates.io using Github Pages automatically, and they're in a CDN suitable for hot-linking. (Though their MIME type is application/octet+stream.) The hosted links look like this:

http://theunitedstates.io/districts/cds/2012/AL-2/shape.geojson
http://theunitedstates.io/districts/states/AL/shape.geojson

Or you could download the repo and put them in S3. But either way, using the cached GeoJSON seems smarter, since boundaries don't change. FWIW, I'm planning to use the hosted links at theunitedstates.io in the Android app.

@konklone
Copy link
Contributor Author

The thought had crossed my mind of syncing these automatically to disk such that they'd appear at congress.api.sunlightfoundation.com, and get served from nginx directly. That doesn't extend the app's dependence on additional domains, and there's a small side benefit that way of making them available by HTTPS, too. (S3's HTTPS support is extremely expensive, and Github Pages' non-existent.)

But that is an extra level of indirection, timeliness, and complexity. Happy to talk it over in the office, too.

@konklone
Copy link
Contributor Author

Also, I'm tempted to learn TopoJSON and use that instead, but maybe I should actually try shipping something first.

@konklone
Copy link
Contributor Author

So after today's news, I'm feeling more motivated to move these GeoJSON files behind HTTPS, at Congress API URLs, as a private workaround until the day comes when Github Pages serves HTTPS. I'll update this thread when I've shipped it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants