Skip to content

Instantly share code, notes, and snippets.

@ecaldwell
Created November 10, 2015 00:14
Show Gist options
  • Select an option

  • Save ecaldwell/325095d3d6cd3d1c0e1c to your computer and use it in GitHub Desktop.

Select an option

Save ecaldwell/325095d3d6cd3d1c0e1c to your computer and use it in GitHub Desktop.
import urllib
import json
service = 'http://services1.arcgis.com/fGahaSQSAcHXfi8G/arcgis/rest/services/Social_Media_Reports/FeatureServer/0'
params = {
'where': '1=1',
'outFields': '*',
'returnGeometry': 'true',
'f': 'json'
}
queryUrl = '{}/query?{}'.format(service, urllib.urlencode(params))
response = urllib.urlopen(queryUrl).read()
responseData = json.loads(response)
for feature in responseData['features']:
print(feature)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment