Thursday, January 7, 2016

Opendata Added to ArcREST

I am very proud to say that the open data REST has been added to ArcREST. OpenData sites hosted on ArcGIS.com allow groups to share authoritative information to users with just a few clicks on their site. Here is a simple usage example:

import arcrest
url = "http://opendata.arcgis.com"
opendata = arcrest.opendata.OpenData(url=url)
#Search by Query
searchResults = opendata.search(q="parcels")
print (searchResults)


The other big thing that you can do with the open data API is export information:

import arcrest
url = "http://opendata.arcgis.com"
itemId = "f59603825818413f87d9d819c3acff88_0"
opendata = arcrest.opendata.OpenData(url=url)
item = opendata.getDataset(itemId=itemId)
print (item.export(outFormat="kml", outFolder=r"c:\temp4"))
#supports: 'shp', 'kml', 'csv', and 'geojson' in the outFormat parameter.

Hope you enjoy searching and exporting the Open Data site!

ArcREST can be found here.
ArcREST Issues should be logged here.