Last active
December 11, 2017 18:28
Revisions
-
maptastik revised this gist
Dec 11, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,7 @@ def agolSearch(term): item_list.append(item) return item_list results = agolSearch('search terms') results_select = results[0] # select the index postions at which the item you want is positione. This example selects the first result. # Create dataframe from selected dataset results_select_df = results_select.layers[0].query().df -
maptastik created this gist
Dec 11, 2017 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ import pandas as pd from arcgis.gis import GIS # Login to AGOL gis = GIS() # For other login methods see: https://developers.arcgis.com/python/guide/working-with-different-authentication-schemes/ # use for logging in within active ArcGIS Pro session # gis = GIS('pro') # Create a function that returns a list of feature layer collections for a search def agolSearch(term): item_list = [] items = gis.content.search(term, item_type="Feature Layer Collection") for item in items: item_list.append(item) return item_list results = agolSearch(<some search terms>) results_select = results[0] # select the index postions at which the item you want is positione. This example selects the first result. # Create dataframe from selected dataset results_select_df = results_select.layers[0].query().df # Check out the first 5 records of the new DataFrame results_select_df.head()