Jupyter Lab spatial.plot local gdb multiple feature classes

1112
1
Jump to solution
10-09-2020 11:42 AM
TylerTownes
New Contributor III

Hello Fellow GISers,

I have created a simple spatial.plot in Jupyter Lab notebook of a single local feature class.  See image below for code and output.  What I'm struggling with is adding another feature class to the same output (same map widget).  I would prefer to keep it simple like below and not open a connection to ArcGIS online, especially since my feature classes are local.  Any ideas?  Thank you.

Tyler

0 Kudos
1 Solution

Accepted Solutions
MehdiPira1
Esri Contributor

Hi Tyler Townes‌,

you can create another spatial dataframe and plot it to the same map widget:

df1 = pd.DataFrame.spatial.from_featureclass(path to feature class1)
df2 = pd.DataFrame.spatial.from_featureclass(path to feature class2)

mp = gis.map('area of interest')
mp

df1.spatial.plot(map_widget = mp, renderer_type = 'u', col = xxxx)‍‍‍
df2.spatial.plot(map_widget = mp, renderer_type = 'u', col = xxxx)‍‍‍

View solution in original post

1 Reply
MehdiPira1
Esri Contributor

Hi Tyler Townes‌,

you can create another spatial dataframe and plot it to the same map widget:

df1 = pd.DataFrame.spatial.from_featureclass(path to feature class1)
df2 = pd.DataFrame.spatial.from_featureclass(path to feature class2)

mp = gis.map('area of interest')
mp

df1.spatial.plot(map_widget = mp, renderer_type = 'u', col = xxxx)‍‍‍
df2.spatial.plot(map_widget = mp, renderer_type = 'u', col = xxxx)‍‍‍