<?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 Re: Update Visualization with ArcGIS API for Python in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/update-visualization-with-arcgis-api-for-python/m-p/1264869#M8467</link>
    <description>&lt;P&gt;Hey Pia,&lt;/P&gt;&lt;P&gt;I believe the section&amp;nbsp;&lt;EM&gt;Overwrite the feature layer &lt;/EM&gt;in the&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/samples/overwriting-feature-layers/" target="_self"&gt;following sample&lt;/A&gt; should help resolve this. It will allow the Feature Layer on ArcGIS Online to be overwritten.&lt;/P&gt;&lt;P&gt;The following &lt;A href="https://support.esri.com/en/technical-article/000023164" target="_self"&gt;Technical Article&lt;/A&gt; also provides another sample with a full code block that can be used.&lt;/P&gt;&lt;P&gt;Hopefully these help! if you encounter any issues with them then please let me know.&lt;/P&gt;</description>
    <pubDate>Tue, 07 Mar 2023 10:49:16 GMT</pubDate>
    <dc:creator>David_McRitchie</dc:creator>
    <dc:date>2023-03-07T10:49:16Z</dc:date>
    <item>
      <title>Update Visualization with ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/update-visualization-with-arcgis-api-for-python/m-p/1264837#M8465</link>
      <description>&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;I'm a newbie to arcgis api and new to Python and have two questions.&lt;/P&gt;&lt;P&gt;My script downloads a updated excel file and a feature layer from ArcGIS Online and then merge on a spatial Dataframe. Afterwards, I want to symbolize it and then overwrite another Feature Layer on ArcGIS Online.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;sdf = pd.DataFrame.spatial.from_layer(layer)
new_sp = pd.merge(csv, sdf, on="probeentna")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I tried it with:&lt;/P&gt;&lt;LI-CODE lang="python"&gt; fc = new_sp.spatial.to_featurelayer(
        gis = gis,
        title = 'title',
        tags= 'tags',
        folder= 'folder'
    )&lt;/LI-CODE&gt;&lt;P&gt;but that just uploads a new feature layer and I can't work with fc on my visualization. I also tried to export my spatial Dataframe to a Feature Class, doesn't work.&lt;/P&gt;&lt;P&gt;My Visualization so far:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;map_renderer = {'renderer': "autocast", "type": "uniqueValue",
                    'field1':"field"}

map_renderer["uniqueValueInfos"] = [{"value": "pos",
                                          "symbol": {
                                              "color": [0, 77, 168, 255],
                                              "size": 6,
                                              "angle": 0,
                                              "xoffset": 0,
                                              "yoffset": 0,
                                              "type": "esriSMS",
                                              "style": "esriSMSCircle",
                                              "outline": {
                                                  "color": [190, 210, 255, 88],
                                                  "width": 0.75,
                                                  "type": "esriSLS",
                                                  "style": "esriSLSSolid"
                                              }
                                          },
                                          "label": "Positiv"
                                          },
                                         {"value": "neg",
                                          "symbol": {
                                              "color": [56, 168, 0, 255],
                                              "size": 6,
                                              "angle": 0,
                                              "xoffset": 0,
                                              "yoffset": 0,
                                              "type": "esriSMS",
                                              "style": "esriSMSCircle",
                                              "outline": {
                                                  "color": [163, 255, 115, 82],
                                                  "width": 0.75,
                                                  "type": "esriSLS",
                                                  "style": "esriSLSSolid"
                                              }
                                          },
                                          "label": "Neg"
                                          },
                                        {"value": "&amp;lt;Null&amp;gt;",
                                         "symbol": {
                                             "color": [0, 0, 0, 255],
                                             "size": 6,
                                             "angle": 0,
                                             "xoffset": 0,
                                             "yoffset": 0,
                                             "type": "esriSMS",
                                             "style": "esriSMSCircle",
                                             "outline": {
                                                 "color": [163, 255, 115, 82],
                                                 "width": 0.75,
                                                 "type": "esriSLS",
                                                 "style": "esriSLSSolid"
                                             }
                                         },
                                         "label": "label"
                                         }
                                        ]
fc.update_renderer(renderer_type= 'uniqueValue', symbol = map_renderer)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Overwriting.&lt;/P&gt;&lt;P&gt;I want to update the Feature Layer without creating a webmap. How can I do this? I tried with layer.update_renderer but that obviously doesn't work.&lt;/P&gt;&lt;P&gt;I'm sure that there is a possibility how I can visualize my spatial DF after I exported it to a feature whatsoever and then Overwrite or update the new Information to another Feature Layer in ArcGIS Online. Just can't find any solutions. Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 08:15:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/update-visualization-with-arcgis-api-for-python/m-p/1264837#M8465</guid>
      <dc:creator>Pia</dc:creator>
      <dc:date>2023-03-07T08:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Update Visualization with ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/update-visualization-with-arcgis-api-for-python/m-p/1264869#M8467</link>
      <description>&lt;P&gt;Hey Pia,&lt;/P&gt;&lt;P&gt;I believe the section&amp;nbsp;&lt;EM&gt;Overwrite the feature layer &lt;/EM&gt;in the&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/samples/overwriting-feature-layers/" target="_self"&gt;following sample&lt;/A&gt; should help resolve this. It will allow the Feature Layer on ArcGIS Online to be overwritten.&lt;/P&gt;&lt;P&gt;The following &lt;A href="https://support.esri.com/en/technical-article/000023164" target="_self"&gt;Technical Article&lt;/A&gt; also provides another sample with a full code block that can be used.&lt;/P&gt;&lt;P&gt;Hopefully these help! if you encounter any issues with them then please let me know.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 10:49:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/update-visualization-with-arcgis-api-for-python/m-p/1264869#M8467</guid>
      <dc:creator>David_McRitchie</dc:creator>
      <dc:date>2023-03-07T10:49:16Z</dc:date>
    </item>
  </channel>
</rss>

