Hello everybody!
Yeah, that´s me again... trying to learn Arcade but hitting my head against the wall!
I have a list of Covid variants reports for every day. Sometimes the “Delta” has different naming but remains a Delta (for example the “B.1.617.2” and the “B.1.617.2.2”).
Variant | Date |
B.1.617.2 (Delta) | 03.01.2022 |
B.1.1.529 (Omicron) | 04.01.2022 |
B.1.617.2.2 (Delta) | 04.01.2022 |
B.1.1.529 (Omicron) | 04.01.2022 |
B.1.1.529 (Omicron) | 05.01.2022 |
B.1.617.2 (Delta) | 05.01.2022 |
B.1.617.2 (Delta) | 07.01.2022 |
B.1.1.529 (Omicron) | 08.01.2022 |
B.1.617.2.2 (Delta) | 09.01.2022 |
B.1.617.2. (Delta) | 09.01.2022 |
My goal is to have a list in the dashboard that looks similar to this:
Introducing Data Expressions in ArcGIS Dashboards (esri.com)
Where instead of the name of the County I will have the name of the variant and instead fo the “sites” I will have the percentage of that variant. It should look like the following graph, but as a list:
Only problem I have to sum up all Deltas first and then rename them simply 'Delta'.
I should Also rename ‘B.1.1.529 (Omicron)’ simply ‘Omicron’.
I thought first to replace the names but stuck immediately there….I think I am not writing the correct “replace” sentence.
I started like this:
var fs = FeatureSetByPortalItem(Portal('https://www.arcgis.com'), 'xxxxx' , 0, ['*'], false);
var fs_renamed = replace(['Variant'], 'B.1.617.2 (Delta)', 'Delta')
var fs_renamed1 = replace(['Variant'], 'B.1.617.2.2 (Delta)', 'Delta')
return fs_renamed1
I Also wanted to copy from this example, but I don´t know how to reference my field correctly. Or if this could be use in a list widget.
https://community.esri.com/t5/arcgis-online-ideas/allow-multiple-replace-functions-in-one-arcade/idi...
Any suggestion will be much appreciated!!
Thank you very much!!