Ask A Cartographer

Proportional area symbols with graduated colors

November 22 2011 | 5 comments
Categories: Symbology

I have a point feature set with both positive and negative data values that I want to symbolize as proportional area circles. I would like the circle area to be proportional to the absolute value of the data value. For example, -100 and +100 would have the same size circle. I would also like to use a divergent color scheme for the data so that positive and negative values have different hues. Again, by way of example, -100 would be red and +100 would be blue.

I can't figure out any obvious way to do this. I can't use the proportional classification scheme for negative data, but I could create an absolute value field and use that. That would generate all the correct sized circles. However, that scheme provides no way to generate a color ramp for the data.

I thought about creating proportional circle polygon features from the points (using buffering or something) and then symbolizing those features. However, my map is a world map and it occurred to me that polygon features would be subject to distortions found at global scales. Is that right? If so, then the circles wouldn't actually appear as the desired size (or shape, for that matter).

I also wondered whether I could do this with representations or annotation graphics, but couldn't quite figure out how to get the size color combinations I want without having to manually set each circle's attributes individually (which isn't practical in my situation).

Logically, what I want to do is symbolize the data twice, having the second symbolization not override the first. That is, symbolize the features first as proportional area circles using absolute value to set the size. Then, classify the proportional area circles using a divergent graduated color scheme based on the actual value (positive and negative). Sounds simple in concept, but not so much in practice as far as I can see.

Any ideas or guidance will be greatly appreciated. Thanks in advance.

Mapping Center Answer:

We've received this question before so check out the following answer for a way to do this currently:

http://mappingcenter.esri.com/index.cfm?fa=ask.answers&q=2105

an alternative way to do this... posted by Brian Merson on Dec 8 2011 8:42AM
I played around with this a bit. I did not try the multiple layer approach, but that seems interesting as well.

However, I did try the representation approach and that works, with a significant caveats. Note that I was working with point data, so the description here deals with that (which is probably the most common case for what I am trying to accomplish).

My approach was this. First, create a new attribute column that will contain the absolute value of your data. This is only necessary if your data has both positive and negative values.

Second, create a new attribute field called scale and use the field calculator to create whatever values you are going to use for proportional sizing. For reasons explained below, I wanted to use a scaling calculation where scale factor = sqrt(field val / min field value), so that I would be scaling up rather than down.

Now you have three fields you are working with potentially, the original data, the absolute data, and the scaling data.

Third, classify the original data using a graduated color scheme, applying whatever classification breaks are appropriate. Picking a detailed color scheme is probably not crucial at this point as you will need to set colors manually later, but you might want to play with the colors now and write down the chosen values. Also, rename your classification labels (or at least format them) because those will become your representation rule names in the next step.

Fourth, convert the graduated color symbolization to a representation. It helps to name the various fields in a meaningful way, but it's not critical to the procedure.

Fifth, now comes the somewhat tedious part. For each rule you will see an empty global effect and a single point effect. You want to do the following for each rule:

a) Edit the global effect to add a Buffer effect (this turns the point into a circle polygon by buffering it). Set the buffer value to determine the size of the minimum proportional circle (somewhere in the 1-2pt range may well be sufficient).
b) Edit the global effect to add a Scale effect. Change the override display mode to Display Field Overrides (by clicking the little database-looking button below). In the X scaling factor drop boxes, select the scaling attribute field you created earlier. Do the same for the Y scaling factor. This causes the circle area to scale proportionally to the relative data values. That is, if data X is 3 time data y, the area of circle X will be 3 times the area of circle Y.
c) Switch back to Display Default Values mode by clicking the little paintbrush below. Add a new polygon fill layer by clicking the appropriate button below. You will need to set your chosen color for this particular class at this point.
d) Add a new line layer. Set the stroke width and color or use the defaults.
e) Delete the original point (marker) layer.
f) Make sure the order from top to bottom is global, polygon fill, and line.

You do the same thing with each rule/class, but use a different color for each fill.

That's it. You can then choose to symbolize the data using that representation and you will get proportionally scaled graduated color circles.

Now the caveat. What you won't get is a particularly usable table of contents/legend. The legend/TOC entry are based on the original point/marker representations, not on the final on-map appearance. That means that you will have to create your own legend by hand using annotations, graphics, etc. For proportional data like this, my suggestion might be to manually edit the data and add 3-4 data points in fake locations (all together for simplicity) and set their data values to be good round-number representational values for the proportional data (e.g. 10, 100, 1000, and 10,000... but this is, of course, specific to the data set). Do this before beginning this entire process so scale factors are properly calculated. After converting to a representation, you could then edit the representation manually and move those (now scaled) values into a position for use in a legend (or, possibly, convert those individual representation symbols to free representations or graphics).

I personally consider this a bit of a bug, since other effects like transparency are properly reproduced on the legend. However, this would be trickier because the on-map representation is data-dependent. Still, I'm sure that some reasonable technique could be created for automatically generating a meaningful TOC/legend.

So, that's my solution. I tested everything except the legend stuff. I ended up going a different direction with that map and didn't need the graduated color proportional symbols symbology. However, I was able to get it working following this procedure before I changed directions.

I'd love to hear alternative ways to do this, and would be even more enthusiastic if the capability were simply provided as another symbology method on the symbology tab.
Thanks posted by Kenneth Field on Dec 8 2011 9:58AM
Thanks for the alternative approach. We'll look into it and write it up as a blog entry if it looks like being a valuable approach for others to benefit from!
follow-up on representation approach posted by Brian Merson on Dec 8 2011 11:38AM
In rereading my previous post, I realized that I glossed over a couple things.

First, in step 2, you use the absolute value field data to calculate the scale values, so that the scale values are all positive. This is what you want so that circles are scaled to represent their absolute value size. Obviously, with only positive data you are using the original values here.

Also in step 2, my comment about scaling up versus down basically comes down to this: do you start with the smallest circle and scale everything up proportionally, or start with the largest circle on the map and scale everything down proportionally. Either can work. I thought the former was more intuitive. The main differences if you choose the latter approach are that i) you use the max field value to calculate the scaling factor in step 2, and ii) in step 5a you would set your buffer size to be appropriate for the largest circle you want to see on the map.

Also, another consideration, you may want to symbolize the widest possible data set (that is, no definition query or only filter out things you are 100% sure you never want to see) because converting to representation on creates values for things not filtered out. If you go back and change the filter later, you will not have default rules assigned to all of those newly unfiltered data points. Data for which there is no rule uses a default "no rule" symbolization. To get this data to symbolize using your representation rules, the rule ID field for those data points will have to be edited by hand (unfortunately, it appears that you cannot use the field calculator to fill these fields... probably a conscious design choice, to keep people from accidentally overwriting the rule ID, but I would rather have the app ask me (even twice) and then let me do it).
Another possible approach posted by Brian Merson on Dec 8 2011 12:04PM
Another approach to this occurred to me.

Starting with point data, you could calculate the geographic size of the smallest or largest circle you want to appear on the map. Literally, measure it with the measure tool. Then, incorporate this into the calculation of a scaling factor.

For example, say you have a global map and want the smallest proportional symbol to be 1000km diameter. You might create a scaling factor using scale factor = min radius * sqrt(val/min val). Again, this creates a scale that has area proportional to the data, but has the actual map unit built in.

Now, use the geoprocessing Buffer tool and select your scaling field as the buffer radius length, with no dissolve. This will create a new polygon layer, one polygon per point, with each polygon being a proportionally sized circle and containing all the data fields from the point data. You should then be able to use graduated colors classification in the normal manner to symbolize the new polygon circle layer.

I think this should work and is probably easier than the representation method. However, the legend/TOC issue will be similar. The TOC will have color patches, but all the same size. They will probably be rectangles by default, but you could change them to circles. Still, they would all be the same size. That means you still have to do some manual legend work for your final map, probably using an approach similar to the one previously discussed.

Anyway, the idea just sort of popped in and I thought I would write it down before I lost it. :-)
Thanks posted by Kenneth Field on Dec 8 2011 12:10PM
Thanks for writing them down here and making them available for others to learn too.

If you would like to post a comment, please login.

Contact Us | Legal | Privacy |