<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Add geopandas package to AGOL Notebook in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/add-geopandas-package-to-agol-notebook/m-p/1539736#M61546</link>
    <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;I cannot get WFS to work correctly in AGOL by adding a feed as a FeatureLayer. It sort of works but ignores the layer selection and simply gets the first layer.&lt;/P&gt;&lt;P&gt;If I use a WebMap and add a layer with a source as WFS then the same dialogs appear and the layer selection does work to produce a map layer. Fine,&amp;nbsp; but it is not very useful because I cannot use Arcade on it. It is read-only. I can add a cql_filter with custom parameters. Finally I cannot export it to a FeatureLayer from the WebMap. It is slightly promising because it indicates that it might work if the bug when defining a FeatureLayer source is fixed.&lt;/P&gt;&lt;P&gt;I really need to copy the WFS layers into a proper FeatureLayer Collection. You CAN do this easily using Pro! Set up a new WFS server in ArcCatalog, including custom parameters as required, add the layers to the table of contents.&lt;/P&gt;&lt;P&gt;Turn off some fields, add more filters, rename layers, load metadata and edit, set up symbology. Change the download limits from 3000 to 100,000. Now just Share to AGOL! Any schema change or new data requires manually replacing the layer, watch out for caches.&lt;/P&gt;&lt;P&gt;Now I want to automate this with Python. Particularly in AGOL using a Notebook and a Task. Seems to be possible with the new Pandas SeDF (spatially enabled dataframe) in arcgis package. Not so fast!&lt;/P&gt;&lt;P&gt;Loading WFS features into Pandas sdf.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should be easy to do with python requests and geopandas. There are new functions in arcgis to translate from geopandas to sdf and from sdf to a FeatureLayer. You need to import geopandas so that you can read the WFS feed directly into a sdf data frame first. There is a posting noting that you cannot read a WFS feed directly into an Esri sedf.&amp;nbsp; Catch 22 - you cannot import geopandas in a AGOL notebook because it is a Docker instance started up each time. It can work from a Desktop because you can set up a venv that does have geopandas.&lt;/P&gt;&lt;P&gt;So how can I install geopandas in AGOL Notebook?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 17 Sep 2024 22:10:49 GMT</pubDate>
    <dc:creator>KimOllivier</dc:creator>
    <dc:date>2024-09-17T22:10:49Z</dc:date>
    <item>
      <title>Add geopandas package to AGOL Notebook</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-geopandas-package-to-agol-notebook/m-p/1539736#M61546</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;I cannot get WFS to work correctly in AGOL by adding a feed as a FeatureLayer. It sort of works but ignores the layer selection and simply gets the first layer.&lt;/P&gt;&lt;P&gt;If I use a WebMap and add a layer with a source as WFS then the same dialogs appear and the layer selection does work to produce a map layer. Fine,&amp;nbsp; but it is not very useful because I cannot use Arcade on it. It is read-only. I can add a cql_filter with custom parameters. Finally I cannot export it to a FeatureLayer from the WebMap. It is slightly promising because it indicates that it might work if the bug when defining a FeatureLayer source is fixed.&lt;/P&gt;&lt;P&gt;I really need to copy the WFS layers into a proper FeatureLayer Collection. You CAN do this easily using Pro! Set up a new WFS server in ArcCatalog, including custom parameters as required, add the layers to the table of contents.&lt;/P&gt;&lt;P&gt;Turn off some fields, add more filters, rename layers, load metadata and edit, set up symbology. Change the download limits from 3000 to 100,000. Now just Share to AGOL! Any schema change or new data requires manually replacing the layer, watch out for caches.&lt;/P&gt;&lt;P&gt;Now I want to automate this with Python. Particularly in AGOL using a Notebook and a Task. Seems to be possible with the new Pandas SeDF (spatially enabled dataframe) in arcgis package. Not so fast!&lt;/P&gt;&lt;P&gt;Loading WFS features into Pandas sdf.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should be easy to do with python requests and geopandas. There are new functions in arcgis to translate from geopandas to sdf and from sdf to a FeatureLayer. You need to import geopandas so that you can read the WFS feed directly into a sdf data frame first. There is a posting noting that you cannot read a WFS feed directly into an Esri sedf.&amp;nbsp; Catch 22 - you cannot import geopandas in a AGOL notebook because it is a Docker instance started up each time. It can work from a Desktop because you can set up a venv that does have geopandas.&lt;/P&gt;&lt;P&gt;So how can I install geopandas in AGOL Notebook?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Sep 2024 22:10:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-geopandas-package-to-agol-notebook/m-p/1539736#M61546</guid>
      <dc:creator>KimOllivier</dc:creator>
      <dc:date>2024-09-17T22:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Add geopandas package to AGOL Notebook</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-geopandas-package-to-agol-notebook/m-p/1540294#M61568</link>
      <description>&lt;LI-CODE lang="c"&gt;prefix = '\"%s\"' %  sys.prefix
!conda install --yes --prefix {prefix} geopandas&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 19 Sep 2024 11:10:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-geopandas-package-to-agol-notebook/m-p/1540294#M61568</guid>
      <dc:creator>KimOllivier</dc:creator>
      <dc:date>2024-09-19T11:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: Add geopandas package to AGOL Notebook</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-geopandas-package-to-agol-notebook/m-p/1690020#M68158</link>
      <description>&lt;P&gt;Are you able to share your notebook that copies a WFS toa hosted feature layer? Also need this functionality&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2026 17:02:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-geopandas-package-to-agol-notebook/m-p/1690020#M68158</guid>
      <dc:creator>ILoveMap</dc:creator>
      <dc:date>2026-03-11T17:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: Add geopandas package to AGOL Notebook</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-geopandas-package-to-agol-notebook/m-p/1690111#M68163</link>
      <description>&lt;P&gt;I never completed the script because Esri fixed the bug to allow adding a WFS layer directly in AGOL. Since then Esri have made a lot of changes to WFS connections. They do not like them because it is not the preferred REST interface. For a limited number of records it works well, but over a few thousand it might have a performance hit. You can filter the records in the WFS URL but that becomes fiddly and specific. I prefer the 'dynamic' interface that avoids having to run a python Docker container to refresh a featurelayer at intervals. I can see a lot of problems trying to maintain a multiuser live dataset behind the scenes. The result is a fragile interface where sometimes the update is not successful. I also had to solve importing more modules into Docker that were not in the default. This is feeling very hacky! WFS is a batch process so it is not a live update, the full table is cached somewhere. It only gets a snapshot, the on demand button does nothing. Since my source is only updated nightly it did not need a live feed.&lt;/P&gt;&lt;P&gt;The disadvantage of a direct WFS layer is that Avenue is disabled and everything is read-only. This results in a WISIWIG display that depends on how well the source server structures and presents the data. But you can still do most filtering, labelling and symbology suitable to use in a Dashboard which is my sole purpose of using the WFS layer.&lt;/P&gt;&lt;P&gt;I had thought that creating a WFS feature layer and then using it in a Web Map would fool AGOL but it doesn't, everything is read-only, not even a virtual field is permitted.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My original workflow use ArcGISPro to do the WFS feed and then overwrite the AGOL featurelayer. &lt;EM&gt;This menu item has now been disabled in the latest update 3.5 update.&lt;/EM&gt; Copilot suggests this is because keeping the connection open causes problems closing Pro so it had to go. I can still open a WFS feed and export it to a geodatabase. The obvious next step was to automate this with arcpy and arcgis. That is hard to make work because there is no easy way to export a dataframe to a feature layer. The extension for geoframes does not support WFS so I have to use pandas and that is not compatible. Also it required Pro to run. My thoughts turned to using an AGOL notebook. There was a conference technical presentation on how to do it, but I got the impression that the speaker did not recommend it.&lt;/P&gt;&lt;P&gt;I have managed to make a semi-dynamic Dashboard that does not require any update process to get the data as entered into a separate app called Trap.nz that provides a WFS interface with some non-standard format.&lt;/P&gt;&lt;P&gt;&lt;A title="Aotea Trapping" href="http://www.ollivier.co.nz/pest/aotea.html" target="_blank" rel="noopener"&gt;Pest Activities&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In conclusion I have given up any customization in the interests of simplicity. I managed to do most filtering and dynamic displays of the activity in three Dashboards. Any deep analysis is best done on the desktop.&lt;/P&gt;&lt;P&gt;The result is a completely no-code solution, although it still requires a lot of expertise and a manual to set up.&lt;/P&gt;&lt;P&gt;But here is my script anyway. Notebooks are not a valid file type, take off the .txt suffix after downloading.&lt;/P&gt;&lt;P&gt;A second script I have written that does not use arcpy and Pro, only arcgis module and python with a geopackage. You have to upload a geopackage and then go into AGOL and create a published feature layer from the online geopackage item. Then the next time you run the script fill in the item_ids and do an update so that the item_ids are retained for the webmap and dashboard. All good except: &lt;STRONG&gt;geopackages do not have a date field.&lt;/STRONG&gt; &lt;EM&gt;The dates are not recognised by the dashboard.&lt;/EM&gt; How can this be fixed?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2026 07:49:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-geopandas-package-to-agol-notebook/m-p/1690111#M68163</guid>
      <dc:creator>KimOllivier</dc:creator>
      <dc:date>2026-03-12T07:49:27Z</dc:date>
    </item>
  </channel>
</rss>

