Closed EliasLahham closed 10 months ago
API Docs: https://dev.socrata.com/foundry/data.cityofnewyork.us/ve3w-z72j (Version 2.1)
I am currently using this data https://data.cityofnewyork.us/City-Government/City-Council-Districts/yusd-j4xi which links to this API endpoint (https://data.cityofnewyork.us/resource/ve3w-z72j.json)
I have a known lat/long that's within one of the city council districts (40.7529212,-73.990647299999) however when I apply the $within_circle clause it does not return results. Here's the endpoint I'm using:
https://data.cityofnewyork.us/resource/ve3w-z72j.json?$where=within_circle(the_geom,40.7529212,-73.99064729999999,100)
I'm using a 100 meter radius as a test, but it still returns nothing. When I up the radius to something like 5000 it will (https://data.cityofnewyork.us/resource/ve3w-z72j.json?$where=within_circle(the_geom,40.7529212,-73.99064729999999,5000))
but I only want to get 1 row from the JSON rather than multiple which is why I have the radius so low at 100.
Looks like I should have been using the intersects clause.
intersects
https://data.cityofnewyork.us/resource/ve3w-z72j.json?$where=intersects(the_geom,%20%27POINT%20(-73.99064729999999%2040.7529212)%27)
This endpoint returned what I was after
API Docs: https://dev.socrata.com/foundry/data.cityofnewyork.us/ve3w-z72j (Version 2.1)
I am currently using this data https://data.cityofnewyork.us/City-Government/City-Council-Districts/yusd-j4xi which links to this API endpoint (https://data.cityofnewyork.us/resource/ve3w-z72j.json)
I have a known lat/long that's within one of the city council districts (40.7529212,-73.990647299999) however when I apply the $within_circle clause it does not return results. Here's the endpoint I'm using:
https://data.cityofnewyork.us/resource/ve3w-z72j.json?$where=within_circle(the_geom,40.7529212,-73.99064729999999,100)
I'm using a 100 meter radius as a test, but it still returns nothing. When I up the radius to something like 5000 it will (https://data.cityofnewyork.us/resource/ve3w-z72j.json?$where=within_circle(the_geom,40.7529212,-73.99064729999999,5000))
but I only want to get 1 row from the JSON rather than multiple which is why I have the radius so low at 100.