DataFrame spatial plot not changing Arcgis map

579
2
08-28-2019 04:19 AM
bgrbgr
by
New Contributor

I'm trying to plot heat-map of the pandas.df over a Arcgis gray map in jupyter notebook, but the map is not changing (not matter what render style).

maybe because: (?) In the anaconda prompt jupyter nbextension list 
- Validating: problems found: require? X arcgis/mapview

The problem is the same also after I create new env in jupyter and install arcgis again.

df = pd.read_csv(csv_path)sdf = pd.DataFrame.spatial.from_xy(prop_df, 'LONGITUDE','LATITUDE')some_map = gis.map('Portland, OR')some_map .basemap = 'streets'some_map 

sdf.spatial.plot(map_widget=some_map )

2 Replies
ChristopherLaBorde
New Contributor

I'm having the same problem, following Atma Mani‌'s tutorial from the GeoDevPDX2018 talk in the jupyter notebook on github..

prop_sdf.spatial.plot(map_widget=pdx_map)
returns True

but doesn't update the map with colored dots.
0 Kudos
Miguel-Fernandez
Occasional Contributor

I am also experiencing the same issue. 

# Convert pandas dataframe to Esri's spatially enabled dataframe
sdf = pd.DataFrame.spatial.from_xy(df1, 'longitude', 'latitude')‍‍

from arcgis.gis import *
gis = GIS()

m = GIS().map()
m.center = [36.081179, -79.556955]
m.zoom = 9
m

# Add sdf to the map
sdf.spatial.plot(kind='map', map_widget=m)

Line 13 returns True with no update to the map. Any guidance or tips would be appreciated.

#arcgisapiforpython#arcgisapi#arcgis api for python 1.6.2#python3.6

Miguel Fernandez
0 Kudos