Is there a way to use the ArcGIS API for python to create a map with LOCAL data? All I see on the website are examples with data hosted on ArcGIS Online.
Solved! Go to Solution.
Hi Nils Ratnaweera,
Yes, you can.
By using Pandas, GeoAccessor and GeoSeriesAccessor DataFrame Accessors you can access local shapefiles and gdb feature classes,...
from arcgis.features import GeoAccessor, GeoSeriesAccessor
import pandas as pd
Then these feature classes can be plotted as spatial data frames to a web map in this instance.
The following links give more insights:
Introduction to the Spatially Enabled DataFrame | ArcGIS for Developers
or use
mp.add_layer(layer_item)
to add layers to the web map, then web map can be saved in Portal or AGOL.
Here's an example of how to set up item properties of a web map and save it:
webmap_properties = {'title':'Web Map Sample','snippet': 'Jupyter notebook saved as a web map','tags':['automation', 'python']}
mp.save(item_properties = webmap_properties, mode=None, thumbnail=None, metadata=None, owner=None, folder=None,)
Hi Nils Ratnaweera,
Yes, you can.
By using Pandas, GeoAccessor and GeoSeriesAccessor DataFrame Accessors you can access local shapefiles and gdb feature classes,...
from arcgis.features import GeoAccessor, GeoSeriesAccessor
import pandas as pd
Then these feature classes can be plotted as spatial data frames to a web map in this instance.
The following links give more insights:
Introduction to the Spatially Enabled DataFrame | ArcGIS for Developers
or use
mp.add_layer(layer_item)
to add layers to the web map, then web map can be saved in Portal or AGOL.
Here's an example of how to set up item properties of a web map and save it:
webmap_properties = {'title':'Web Map Sample','snippet': 'Jupyter notebook saved as a web map','tags':['automation', 'python']}
mp.save(item_properties = webmap_properties, mode=None, thumbnail=None, metadata=None, owner=None, folder=None,)