
Like the urlretrieve function, the function to create the geodatabase ( ) requires a path and a name. Then, you'll create a feature class for each JSON file and save them in the geodatabase. The file contains data for point and polygon features, so you'll separate it into two JSON files, one for each feature type. To visualize the data you downloaded (and become more familiar with how you can use Python to interact with spatial data), you'll create two feature classes based on the JSON file.įirst, you'll create a new file geodatabase to contain the feature classes. The lines that begin with number signs (#) are comments that do not affect the code but provide information to the user. # Do something else outside the 'with' section. # Do something with the 'data_raw' variable Later, you'll use it to connect to ArcGIS Online or ArcGIS Enterprise. ArcGIS API for Python is a Python library that also enables Python to perform GIS tasks.

With it, you can use Python to run geoprocessing tools and other ArcGIS functions. Then, you'll use Python to import ArcPy and ArcGIS API for Python.ĪrcPy is a Python site package.

Import ArcPy and ArcGIS API for Pythonįirst, you'll create a new project in ArcGIS Pro and change its basemap. Later, you'll develop a feed routine so that these layers and services are automatically updated when new data becomes available. Then, you'll create two feature classes based on the data, change their symbology, and publish them. In this section, you'll use ArcGIS Pro and Python to retrieve the most recent coral bleaching data as a JSON file.

The NOAA Coral Reef Watch program provides global data on coral bleaching risk. Oceanic temperatures that are too hot or cold reduce algae, bleaching corals white and increasing mortality rates.
