Proportional symbol and arcade error

1316
6
Jump to solution
03-07-2018 01:02 PM
WilliamWang
Occasional Contributor

We have a feature class that was converted from a shapefile from a 3rd party software. The software can only convert all the data into String type format. In the ArcMap days, our analyst will painstakingly add needed numeric fields before creating a proportional symbol for his report. When we try to use arcade with proportional symbol we immediately run into a problem in ArcGIS Pro (v 2.1.2). When we click on the layer in the TOC > appearance > Symbology > Symbolize by Quantities, we notice this warning immediately - Layer does not contain any field types that can be used to quantify using proportional symbols

Layer does not contain any field types that can be used to quantify using proportional symbols

Even if closing the warning message, the Arcade option remains unavailable.

Interestingly, if symbology is changed to Unique Values, there is no warning and I can pick the field to apply Arcade.

Any idea?

0 Kudos
1 Solution

Accepted Solutions
XanderBakker
Esri Esteemed Contributor

I strongly agree that the possibility should be provided to use an Arcade expression to create a numeric that can be used for proportional o gradual symbols. I will tag Kory Kramer‌ to see if he can say something about this.

I think there a way to do something, however, it could be a lot easier to do this if the option to use Arcade to create a numeric field was allowed for symbology based on a numeric field when the user does not have any numeric field in the featureclass.

So  I have a shapefile with only text fields:

The last two could be converted to numeric data. As you described I cannot create and proportional or gradual symbology due to the fact that there is no numeric field in my featureclass. 

I used Unique values and an expression to convert the text to number and classify it to have less unique values.

and applied symbols to each class:

Since I want to change the symbol size according to the "value", I can enter the following option "Vary symbology by attribute":

I can define an expression for the size:

And obtain the symbols graduate by size and color based on the text field:

However, it would be a lot easier if you could just define an expression and use the standard symbolize by quantities options.

On the other hand, to avoid other limitations, it would be recommended to manage the numeric data in numeric fields. You can create a script to creates a new featureclass with numeric fields instead of the text fields.

View solution in original post

6 Replies
DanPatterson_Retired
MVP Emeritus

If the numbers that are being represented as text, why not add another field in the table and do a conversion to number into an appropriate numeric field using the field calculator?

a = '1.234'
b = '5'

float(a)
1.234

int(b)
5
0 Kudos
WilliamWang
Occasional Contributor

Thanks Dan. We want to avoid adding another field by using Arcade. I thought we could write an Arcade expression to generate numeric values to symbolize on. 

0 Kudos
DanPatterson_Retired
MVP Emeritus

You must be doing web stuff.  I didn't know that Arcade is designed to convert field values on the fly,

0 Kudos
XanderBakker
Esri Esteemed Contributor

I strongly agree that the possibility should be provided to use an Arcade expression to create a numeric that can be used for proportional o gradual symbols. I will tag Kory Kramer‌ to see if he can say something about this.

I think there a way to do something, however, it could be a lot easier to do this if the option to use Arcade to create a numeric field was allowed for symbology based on a numeric field when the user does not have any numeric field in the featureclass.

So  I have a shapefile with only text fields:

The last two could be converted to numeric data. As you described I cannot create and proportional or gradual symbology due to the fact that there is no numeric field in my featureclass. 

I used Unique values and an expression to convert the text to number and classify it to have less unique values.

and applied symbols to each class:

Since I want to change the symbol size according to the "value", I can enter the following option "Vary symbology by attribute":

I can define an expression for the size:

And obtain the symbols graduate by size and color based on the text field:

However, it would be a lot easier if you could just define an expression and use the standard symbolize by quantities options.

On the other hand, to avoid other limitations, it would be recommended to manage the numeric data in numeric fields. You can create a script to creates a new featureclass with numeric fields instead of the text fields.

WilliamWang
Occasional Contributor

Hi Xander,

wow! Much appreciated your detailed graphic explanation on the alternatives. Thank you.

KoryKramer
Esri Community Moderator

Thanks for the detailed and helpful response on this thread xander_bakker

I wanted to chime in to let you know that we've made the development team aware and they have entered this as an issue to consider.  Thank you!