When I make a query from the CMS Nursing Home Compare data and attempt to order using distance_in_meters(...)
I get the following error:
Error: function distance_in_meters is not defined in SoQL.
The docs say distance_in_meters(...)
works with the 2.1 endpoint (further information on endpoints are stuck in a redirect loop from the link at the top of that page at the time of this writing but you can get it from Google cache): https://dev.socrata.com/docs/functions/distance_in_meters.html
I have confirmed the data set is using the 2.1 endpoint.
To be sure it wasn't an issue with just the order clause, I also set it up in the select. Two variations:
- https://data.medicare.gov/resource/4pq5-n9py.json?$select=*,%20distance_in_meters(location,%20%27POINT%20(-78.9627624%2043.0171854)%27)%20AS%20range&$where=within_circle(location,43.0171854,-78.9627624,16093.44)
- https://data.medicare.gov/resource/4pq5-n9py.json?$where=within_circle(location,43.0171854,-78.9627624,16093.44)&$order=distance_in_meters(location,%20%27POINT%20(-78.9627624%2043.0171854)%27)
So, the question ultimately is does the 2.1 endpoint not support distance_in_meters(...)
or am I missing something stupid obvious?