3 ms·
I really like the ESRI API's (much faster than Socrata). This is a crazy url, but they do allow for different SQL operations (including spatial operations) righ
by apwheele 3y ago
I really like the ESRI API's (much faster than Socrata). This is a crazy url, but they do allow for different SQL operations (including spatial operations) right in the API. Here is top 10 crime street segments in Raleigh for example:
https://services.arcgis.com/v400IkDOw1ad7Yad/ArcGIS/rest/services/Police_Incidents/FeatureServer/0/query?where=reported_block_address+NOT+IN+%28%27+%27%29+AND+Crime_Category+NOT+IN+%28%27MISCELLANEOUS%27%2C%27ALL+OTHER+OFFENSES%27%29&orderByFields=CrimeCount+DESC&groupByFieldsForStatistics=reported_block_address&outStatistics=%5B%7BonStatisticField%3A+%22case_number%22%2C%0D%0A++outStatisticFieldName%3A+%22CrimeCount%22%2C%0D%0A++statisticType%3A+%22count%22%7D%2C%0D%0A+%7BonStatisticField%3A+%22latitude%22%2C%0D%0A++outStatisticFieldName%3A+%22latitude%22%2C%0D%0A++statisticType%3A+%22avg%22%7D%2C%0D%0A+%7BonStatisticField%3A+%22longitude%22%2C%0D%0A++outStatisticFieldName%3A+%22longitude%22%2C%0D%0A++statisticType%3A+%22avg%22%7D%0D%0A%5D&resultRecordCount=10&f=json https://services.arcgis.com/v400IkDOw1ad7Yad/ArcGIS/rest/ser...
If you go to https://services.arcgis.com/v400IkDOw1ad7Yad/ArcGIS/rest/services/Police_Incidents/FeatureServer/0/query https://services.arcgis.com/v400IkDOw1ad7Yad/ArcGIS/rest/ser... you can putz around in the query engine to figure out the API strings (easier than reading the ESRI docs anyway!)