Creating & Importing Data for ArcGIS

geographic formatting & spatial dataframes

Sourcing Proper Data

Double Check your Data

Image for post
Image for post
Image for post
Image for post

Fitting Into the Pipe

from arcgis.gis import GIS
# instantiate new GIS object
gis = GIS("https://www.arcgis.com", 'username', 'password')
# import dataframe as feature collection
covid_fc = gis.content.import_data(df)
import json# create feature_collection_property dict
covid_fc_dict = dict(covid_fc.properties)
# convert to JSON
covid_json = json.dumps({'featureCollection':{"layers": [covid_fc_dict]}}) # careful with the double nesting format
Image for post
Image for post

data scientist, machine learning engineer. passionate about ecology, biotech and AI. https://www.linkedin.com/in/mark-s-cleverley/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store