From the course: Python Scripting Using the ArcGIS API for Python
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Getting to the data
From the course: Python Scripting Using the ArcGIS API for Python
Getting to the data
- [Instructor] Let's see how to get to the actual data behind a feature layer collection or a feature service. I have a notebook open that connects to ArcGIS online, and I'm already logged in. So I'm going to look at a data set using its item ID from ArcGIS online. Here I'm in my ArcGIS online account. I'm going to look at this Sturgis_Kentucky feature layer. So I'll go over here to its item details in ArcGIS online. And down here I can find its feature ID, right? And copy that. So I want to get to this map, which is really a, it's not a map, it's a feature layer in ArcGIS online, which is really a group layer, which we call a feature layer collection in the API. So I'll add the code to get and display that layer. I'm going to create a variable called sturgislayers. I'm going to set it equal to g.content.get. And inside the parentheses, I put that item ID. And then I'll display the returned list. So when I run this, it displays the item and describes it as a feature layer collection…