Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When GPS is within Chicago, use the Chicago Open Data portal. #3

Closed
karbassi opened this issue Nov 6, 2015 · 9 comments
Closed

When GPS is within Chicago, use the Chicago Open Data portal. #3

karbassi opened this issue Nov 6, 2015 · 9 comments
Assignees

Comments

@karbassi
Copy link
Owner

karbassi commented Nov 6, 2015

No description provided.

@pjsier
Copy link
Contributor

pjsier commented Nov 6, 2015

@karbassi
Copy link
Owner Author

karbassi commented Nov 6, 2015

@pjsier where's the api?

@pjsier
Copy link
Contributor

pjsier commented Nov 6, 2015

It's a Socrata site, so they've got the endpoints set up according to this standard https://dev.socrata.com/

@pjsier
Copy link
Contributor

pjsier commented Nov 6, 2015

Actually looking at it now, not sure if they support geospatial queries. May have to either download the GeoJSON and put it on the site or somewhere else to query it

@pjsier
Copy link
Contributor

pjsier commented Nov 6, 2015

Correction: sorry for the spam, but this might work: https://dev.socrata.com/docs/functions/within_circle.html it's a bad workaround, but they weirdly don't have a geospatial within, but this should work the same way

@karbassi
Copy link
Owner Author

karbassi commented Nov 6, 2015

If anything, it would be https://dev.socrata.com/docs/functions/within_polygon.html

@pjsier
Copy link
Contributor

pjsier commented Nov 6, 2015

That's what I thought at first, but that's having the user create a polygon boundary as opposed to finding the polygon boundary. I figured using within_circle would be the easiest proxy for a point

@pjsier
Copy link
Contributor

pjsier commented Nov 6, 2015

So I was playing around with it, and the neighborhoods map isn't actually available through the API at all. It's obviously not ideal, but I converted it to GeoJSON, and while it'd be too much to render it on the site, maybe we could put it in CartoDB or convert it to PostGIS?

@pjsier
Copy link
Contributor

pjsier commented Nov 28, 2015

Turfjs is used with a static GeoJSON file (only about 150kb) to loop through all neighborhoods and print which one the point is within, otherwise returns "outside Chicago"

@pjsier pjsier closed this as completed Dec 6, 2015
@pjsier pjsier removed the ready label Dec 6, 2015
karbassi added a commit that referenced this issue Feb 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants