We recently had primary elections in the community I serve. With the results having been released, there have been some requests for precinct level maps. Many of these primary elections featured more than 2 candidates. Rather than assign a color to each candidate and color precincts strictly by who won, I would like to make some choropleth maps that visualize the balance (or imbalance) in those primary races where there were 3 candidates. For example, if in Precinct 1 Candidate A received 45% of the vote, B 35%, and C 20%, I would like for the symbol to show up as a composite of the three candidates' vote percentage relative to the whole. Essentially I want to make the map below for the three candidates who participated in the primary.

Three Variable diverging color scheme map example

The data I have - % total votes per candidate per precinct - seem similar to what is being used in the map above. Unfortunately, this map is relatively old and the actual nuts and bolts about how it was produced seem to have been left undocumented.

Now, I think it is rather simple to create a diverging color scheme between percentages comparing two variables, but I'm having trouble wrapping my head around how one might use something like ArcGIS Desktop to crunch the numbers to do the same with three variables. It just doesn't seem equipped to natively create a multi-variate, diverging color scheme.

It's also quite possible that I'm using the incorrect terminology describe what I want I'm trying to create.

How can I process my data to be able to make a map like the one above?

I know there are other ways of visualizing this type of data, but I am particularly interested in making the type of map I've described above.

2 Answers 2


You are correct, ArcGIS is not set up to natively do this. It's workable to do it with two, and you might get away with three variables but I have a feeling you're going to want to do it in Illustrator or another third party program to get it to look nice. The primary issue is the way ArcGIS handles transparency - there is only one method available, which means layers on top have a disproportionate effect on lower layers. Also, you have to pretty much manually create your legend and the more classes you have the messier this will get.

For consistency the way to do this (and follow your example above) would be to determine three classes/vote count thresholds. You'll then add a short int field to your data called 'transp' or something like that. For all candidates, select every record of one class (ie all 30% or less records) and then add a transparency percentage to your new field no less than say 20. This will get you intense but still transparent color for high votes, a little less intense and more transparent for middle, and so on.

Now add your data three times to your map. You'll symbolize each of them with a single color (say red green blue) based only on the classification of one candidates results - the others will be unsymbolized and you'll disable the 'other values' class. To enable the transparency, click the Advanced drop-down on the symbology tab and choose transparency, then select your 'transp' field.

Now you've got your multivariate map and you can see the issues with transparency depending on which one is on top. There's going to be some pretty muddy looking colors too. You may be able to play with the method and get decent looking colors but it would be much easier in something like Illustrator. Note, there are also suggestions to convert everything to raster and do it that way, which I won't cover.

As far as building your legend, the easiest way is to go off the side of your map and what would be visible in the dataframe (or something so small it wouldn't be seen) and draw nine new squares/rectangles/whatever records. You can do this IN your data, or you could create a new featureclass to hold it and duplicate your symbology. I'll assume the triangles. Your least transparent/most intense colors go at the points. So does a copy of your most transparent/least intense colors from the other two candidates. Your middle classes go in the middle, again stacked. Then you fill in the center of the triangle with the appropriate combinations. Hopefully that all makes sense if you refer back to your example above. You then insert a second dataframe in your layout and manually place some text labels.

This is one method. There are several approaches and I think even a couple of custom written tools out there. I suggest Googling "arcgis multivariate choropleth" and checking out the results. Or bivariate as well. There are at least two good youtube videos and a relevant ESRI presentation on the subject.

  • Thanks for your very thorough response. I had seen some of the resources you linked to, but not the second video. Between your explanation and actually seeing the manipulation of the data in Arc I have a much better understanding of how to make this all work.
    – maptastik
    Commented May 29, 2014 at 12:51
  • Sure thing. That second video was my primary resource when learning how to do it. It also occurs to me that rather than mess with the transparency field, you could use the classes for your layers - ie all three layers have all three candidates, one layer is the 30%s, another is the 60%s, etc. Then you just have to set the transparency on the layer and not mess with the symbology part. You could also do some calculation and create a 9 color scheme that is manually assigned to each precinct, bypassing any transparency, legend, or multiple layer issues. As I said, many possible approaches.
    – Chris W
    Commented May 29, 2014 at 17:26

Thanks to some guidance from @Chris W, I have at least been able to come up with a way to make this multi-variate choropleth. It may not be the most elegant solution and I think there are some kinks to work out in terms of clarity. Still, I'll share the steps I took to make this multi-variate choropleth map.

Data: The data I worked with was Scott County, KY precinct level data from the recent primary election for the position of family court judge. There were 3 candidates for the position. For simplicity, I'll call the candidates A, B, and C, respectively. There were 7 fields. 3 of the fields were raw numbers of votes for each candidate in each precinct. 3 more fields were the percentage of the total votes each candidate got in each precinct (A_perc, B _perc, C_perc). The 7th field was the total number of votes cast in for each precinct. I worked with the percentage data.

Data Classification: I looked between the 3 candidates and found that the maximum percentage of votes received in any precinct was ~55%; the minimum was ~8%. I created a classification scheme with a numeric code, 1-4, relating to each class: 1: < 10% 2: 10% - 29.99% 3: 30% - 49.99% 4: 50% +

I then made 3 new fields, one each for the class that the candidate's share of the votes fell into (i.e. A_class, B_class, C_class).

Using Select by Attribute I selected for each candidate those attributes that fell into each class. For example, selecting those precincts where A received less than 10% of the vote:

SELECT*FROM layer WHERE: "A_perc" < 10

Having selected the attributes meeting the desired classification criteria I used the Field Calculator to assign the class value for the candidate to their class field ONLY for those selected precincts. The field calculator expression looked like this:

A_class = 1

I repeated this for each candidate and class combination until all the candidate's results had been classified for each precinct.

I then created a new text field, TRIVar, to combine the classifications for each candidate. The combination was facilitated by the Field Calculator. Using the VB Script parser, the expression looked like this:

TRIVar = [A_class] & [B_class] & [C_class]

Essentially this concatenated the attribute values for the _class fields into a single attribute value. For example, where A_class = 3, B_class = 3, and C_class = 2 for a given precinct, TRIVar = 332.

Symbolization We have 3 candidates and, conveniently enough, 3 primary colors with which to work. I assigned each candidate a primary color. A = red, B = green, C = blue. In choosing rgb colors, you have a value range of 0 - 255 for each color. As such, I divided the range of 0 - 255 among the 4 classes so that candidates classified as 4 would receive 255 of their assigned color or a 1 would receive 0. The color classification looked like this: 1: 0 (hex: 00) 2: 85 (hex: 55) 3: 170 (hex: aa) 4: 255 (hex: ff) Following this scheme, a candidate where TRIVar = 332 would have be rgb(170,170,85), while 241 would be rgb(85,255,0). In this way, the candidates who got the most votes would have their color most prominently displayed while those with least votes would be down in the mix. In my data there were only 7 unique combination of classes, which I symbolized using the scheme described above. However, there are 64 3-digit combinations of 1-4. Given the classification scheme, many combination values with multiple 4s or multiple 1s and 2s are either implausible or impossible to have, but I went ahead and made a 4x4x4 color matrix of all the combinations:

TriVariable Color Scheme

Legend I added this matrix as the legend. I made it as a Google Drawing and exported, sans-labels, as an image. I inserted the matrix into my mxd and did the labeling of the matrix from within Arc.

Map Below is the resulting map. I realize it's not quite up to cartographic snuff at the moment, but I did want to get this and my method up here as soon as I got this all to come together.

TriVariable Choropleth Map

Suggestions? I think the classification method I used a fairly standard practice. While my scheme is certainly up for criticism, I'd especially like to hear thoughts on my color mixing method.

I'd welcome any ideas on how to make this map clearer to the reader. I think the color matrix, by virtue of being 3D on a 2D surface, is not immediately intuitive. I feel comfortable navigating it now, but I can imagine some difficulty for Joe Q. Public figuring out how to read the legend and relate it to the map (and vice-versa). In the draft I've posted, I've tried to be economical in my word usage, but I feel I've not struck a good balance. Either their is not enough text to make it clear how the viewer should read the map or I go into way too much detail.

Because this is just a quick draft, I'd like to stay away from nit-picky cartographic critiques. That said, any other suggestions and criticism are welcome.

Thanks again to Chris W for getting me pointed in the right direction on this.

  • Who is your audience? This may help you determine the right direction. As it stands, I honestly have a hard time getting any information out of the map. I don't understand the legend. If your audience is the public, I'd try and make the legend clearer or even straight up put the % over top of the polygons. Or perhaps three separate maps for each candidate. If you're convinced of the triangle theme, you may find this type of diagram useful, it's typically for rock compositions but replace minerals with candidates. tulane.edu/~sanelson/eens212/…
    – GISHuman
    Commented May 30, 2014 at 18:48
  • @GISKid, thanks for your comments. This is a very difficult map to interpret for you, me, and my potential audience, the community I serve. I agree that there are definitely better methods for displaying this data. This was an experiment to specifically make this kind of map, but I am not yet convinced that it is a good means for visualizing this type of data. Like you said, the legend is difficult to interpret. I hadn't been sure how to capture the 3-dimensionality of the data, but after looking at the link you included, there might be some hope yet to bring more legibility to the legend.
    – maptastik
    Commented May 30, 2014 at 19:10
  • That said, separate maps for each candidate or displaying the percentages for each candidate, whether text or in pie chart, I think would definitely be preferable. I just wanted to see if there was an effective way to bring all the results into a single map. While possible, my efforts so far have not resulted in an effective. Thanks again for your comments, @GISKid!
    – maptastik
    Commented May 30, 2014 at 19:12
  • No problem, at least you know that you can do it now! What if you simplified your criteria? So that if a candidate had say >45% they would get a solid colour representative of them, if the vote was split nearly half between two it would be a different colour, if it was split three ways another colour? Or what if you used a solid colour and patterns? Just throwing some ideas out there!
    – GISHuman
    Commented May 30, 2014 at 19:35
  • Agreed the legend is difficult to follow and took me a few minutes to really figure out. I think part of this stems from it presenting 64 choices and only 7 are used. I think it also loses the sense of ranges/spectrums to a point. Fewer classes could help, as could the triangle format in the example. I also note much of the map is similar, suggesting possible adjustment of class definitions could help. And while the color method works mathematically, since most values are going to fall near the middle the resulting colors can get a little muddy. The text labeling does help.
    – Chris W
    Commented May 30, 2014 at 22:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.