How to access feature collection in notebooks

453
1
08-17-2021 08:43 AM
Labels (1)
Anish_Adhikari
Occasional Contributor

I am a newbie to notebooks and I am trying to write a program which uses aggregation to find out how many points are within a polygon and append that information to a field in the same polygon.  I used the aggregate points function and used it without "output_name" parameter. It ran successfully and returned a feature collection. Now, I have no clue on how to access the feature collection. Screenshot is attached. I would appreciate any help.

0 Kudos
1 Reply
xlt208
by Esri Contributor
Esri Contributor

Hi Anish!

You can add the result to a map widget for visualization–

m = gis.map()
m

m.add_layer(auditcountmru)

You can also convert the output to a Spatially Enabled DataFrame–

import pandas as pd
auditcountmru_sedf = pd.DataFrame.spatial.from_layer(auditcountmru.layers[0])

Here is a sample notebook that might be helpful! 

Please let me know if that works for you.

 

Thanks!

Lingtao

0 Kudos