Hi, I am a Notebook newbie. I have a simple task. I need to schedule a task to calculate acres for a polygon feature layer in ArcGIS Online. I just need to access the area of the geometry, convert to acres, and set the Acres field. Below is what I have so far in my first-ever notebook. I'm not sure I'm even taking the right approach. I am currently stuck on how to get at the area of the feature shape... Any guidance is appreciated.
from arcgis import GIS
from arcgis.geometry import lengths, areas_and_lengths, project
from arcgis.geometry import Point, Polyline, Polygon, Geometry
from IPython.display import display
import pandas as pd
from arcgis.features import GeoAccessor, GeoSeriesAccessor
## connect to AGOL
agol = GIS("home")
## access the feature service item
item = agol.content.get("xyz")
## get the layer of interest as a FeatureLayer
## the example here is the first layer in the Feature Service
lyr = item.layers[0]
fset = lyr.query()
features = fset.features
for f in features:
print(f.area)
f.attributes['Acres'] = 1
Few things to get you rolling: