Address field, that will always contain our State abbreviation:
What I want:
A pie chart in a dashboard, showing a count of enquiries by State. Example below:
This will actually be used on its own, embedded into an ArcGIS Hub site.
With arcade in a popup, I am familiar with how to pluck out the State abbreviation from the address field:
I have been struggling to try and build a Data Expression in ArcGIS dashboards to achieve this.
I have reviewed the expression in Github, but struggling to find one that I could reverse engineer to work for my fairly simple problem.
Can anyone assist in helping me understand if I can achieve this with a data expression?
The hosted feature layer is here.
The web map is here
The first example here Introducing Data Expressions in ArcGIS Dashboards (esri.com) , might be helpful? I can't code, so I can't try it myself.
The example uses data that is separated by commas.
An alternative (and probably easier, if a little bit time intensive depending on what you already have set up) is having a separate States field.
You could add in a states layer, and then extract data to points.
Or manually create a states field and fill it out, then set up your chart based on that?
Depending on how the data is originally collected, you might already have that as a separate field anyway (e.g. like when you shop online and put in your shipping address, you have two address lines, the state, and postal code). I am assuming this is how it's set up, and then concatenated into the "Address" field.
For the pop-up, you can concatenate all parts of the address together, rather than having them in one field. That way you get a nice, clean address for the viewer, but your data is easier to manipulate and pull apart.
If you can edit the table in Excel (X-tools should be able to do this), you should be able to pretty easily edit the data quickly. It might take a little bit of work but, it would be pretty easy
The following is probably not the most efficient way to do this, but it wouldn't take too long anyway.
If you want an "Other" Value for where no state information is entered into the original address
I probably over-explained here, but this is a pretty fast (like 5 minutes max of set-up time) way to extract that state information out of data you already have.