I am currently pulling data from an api that is in a json format.
I convert this into a geodataframe using the lat lon columns provided in the dataset.
df_points = gpd.GeoDataFrame.from_dict(all_results)
df_points['lon'] = df_points['lon'].astype(float)
df_points['lat'] = df_points['lat'].astype(float)
df_points['geometry'] = [shapely.geometry.Point(xy) for xy in zip(df_points.lon, df_points.lat)]
gdf = df_points
sedf = arcgis.GeoAccessor.from_geodataframe(gdf)
This part works fine even if it may not be elegant.
From here I can save it off as a shapefile no problem
I would like to send it directly to my GeoDatabase as a Feature Class
however when I attempt to I get an error.
sedf.spatial.to_featureclass(r'...\MyProject.gbd\sample')
--------------------------
AttributeError Traceback(most recent call last)
In[23]:
Line 1: sedf.spatial.to_featureclass(r'...\MyProject.gbd\sample')
File ...\site-packages\arcgis\feature\geo\_accesspr.py, in to_featureclass:
Line 2668: result = to_featureclass(
File ...\site-packages\arcgis\features\geo\_io\fileops.py, in to_featureclass"
Line 1262: raise e
File ...\site-packages\arcgis\features\geo\_io\fileops.py, in to_featureclass:
Line 1075: "point": pd.io.json.dumps(
AttributeError: module 'pandas.io.json' has no attribute 'dumps'
-----------------------
Any thoughts why I am seeing this.
I do thought it might be conflicting with the json library but I removed it and it is still popping this error.