Isarithmic Maps of Public Opinion Data

Isarithmic Thumbnail

As a follow-up to my isarithmic maps of county electoral data, I have attempted to experiment with extending the technique in two ways. First, where the electoral maps are based on data aggregated to the county level, I have sought to generalize the method to accept individual responses for which only zip code data is known. Further, since survey respondents are not distributed uniformly across the geographic area of the United States (tending to be concentrated in more populous states and around cities), I have attempted to convey a sense of uncertainty or data sparsity through transparency. Some early products of this experimentation can be seen below.

Party Identification

Isarithmic map of party identification from the 2008 CCES. Click to enlarge.

This map is produced from over 30,000 individual responses to the standard 7-point party identification question. I generate dense grid of points across the map, and calculate a distance-weighted mean value for each point, as well as a distance-weighted response density for each point. This grid is then smoothed through interpolation via the akima package and plotted with Hadley Wickham’s excellent ggplot2. I use a blue-red diverging color scale to encode mean values, and a transparency/alpha parameter to encode local density (similar to this approach for choropleth maps). Thus, in the northwestern U.S., from which relatively few responses were collected, the colors can be seen to “fade to black.” The same process, with a white background, is illustrated below.

CCES 2008, Party Identification (white)

Same approach as above, but with a white background. Click to enlarge.

The feedback I have gotten thus far suggests that the black background has better  æsthetics, but the white background is more clearly interpreted. I would be very interested in hearing your impressions of the relative merits of both.

The party identification maps above show the benefit of this ZIP code-based approach. First, unlike the choropleth approach, local political-geographic features are preserved without being obscured by the shape of boundary lines, such as county borders. For example, there is a clear difference between Atlanta and surrounding, more suburban areas, as well as within Miami, where the southern end of the city stands out as more Republican-leaning than the rest. Additionally, unlike choropleth maps in which variable/color values can change abruptly at boundaries which may be unfamiliar to the viewer, the distance smoothing employed here makes color-encoded information very clear around easily-identifiable major communities.

The other major benefit of this approach is that it can take as input any public opinion data for which some rough information is known about respondent location. Here I use ZIP codes, which are sufficiently granular to offer a nuanced view, but not so specific as to identify respondents. While it unsurprisingly works best with a large number of respondents, as seen here, I have also used a sample of 1,000 respondents, with useful results.

Here is a map of a variable of much current debate — family income. High income levels are concentrated along the coasts and around major cities. Again, compare the white and black backgrounds.

CCES 2008, Family Income (black)

Isarithmic map of the distribution of family income levels. Click to enlarge.

CCES 2008, Family Income (white)

The distribution of family income levels, with a white background to indicate response density. Click to enlarge.

These maps of abortion attitudes, as is the case with many interesting variables, fairly closely mirror the map of party identification. If you have data that you would like to see mapped in this way, especially with variables that don’t correlate so well with party identification or ideology, please get in touch with me.

CCES 2010, Abortion Attitudes (black)

Map of abortion attitudes. I should emphasize here that the legend illustrates color values describing local means, and the legend text list possible survey responses. Click to enlarge.

CCES 2010, Abortion Attitudes (white)

Abortion attitudes, with white background. Click to enlarge.

On color

Identifying optimal color schemes has been a challenge with these maps. I generally prefer to use a diverging palette to maximize color variance and the ease with which value gradations can be discerned. However, the excellent ColorBrewer diverging palettes tend to pass through white, which becomes indistinguishable from areas with low data density. As such, I have used analogous color palettes which span about 150 degrees around the hue spectrum, and tend to work well with varying alpha values over both black and white. Here again, I would be interested in hearing ideas about optimal color schemes when transparency is used to encode an additional data dimension.

Edit: The code as it stands right now is embarrassingly ugly and convoluted. Once I am able to incorporate any feedback, and clean up the code, I will be happy to share.

31 Responses to “Isarithmic Maps of Public Opinion Data”
  1. Tal Galili says:


    Any chance for the R code?


  2. hawkhandler says:

    these are great and the code would be awesome to see.

  3. Yako says:

    Nice! I love to see the code too so I can get a hint on how to achieve something like this with my data.

    Thanks for sharing!

  4. Have you experimented with the amount of smoothing, or even displaying the unsmoothed data? I would worry a little bit that the plots are a bit oversmoothed, particularly when you look at the northeast.

    • d sparks says:

      Hadley: I have experimented a lot with the smoothing, and have settled on the setting shown here as the best for this data. The trade-off, as you know, is an oversmoothed northeast versus having the rest of the country look like the chicken pox. One approach might be to change the smoothing parameter as a function of local density, but I haven’t thought of the best way to implement that as of yet.

      Thanks for ggplot!

  5. tom wood says:

    these are really stunning… would appreciate the code, too!

  6. Phil Donovan says:

    I need to learn how to do this stuff. Excellent and beautiful.

  7. Robert Young says:

    I’m not familiar with the CCES data (and haven’t, yet, waded into it, so…) which measure of income are you displaying: mean or median?

  8. Gabe says:

    I think the white backgrounds all have better aesthetics, and also are more clearly interpreted.

  9. Nate says:

    Nice visualizations. I had the same reaction as others: before I read anything, I thought the black looks cooler, but the white is easier to make sense of, in part because it is closer to purple. This isn’t as bad with the red-to-green scheme on black, but I don’t like the red-to-green palette.

  10. paul G. says:

    1) Gorgeous.

    2) Innovative.

    3) Strongly agree with those who suggest the white background. This is not about aesthetics, it’s about interpretability. The dark background does not convey the correct information to the viewer. Dark implies dense which implies lots of observations, directly the opposite of what you are trying to convey.

  11. kerokan says:

    I would go for white. It is much easier for me to interpret white area as sparse. Good job, by the way.

  12. Brad says:

    I just wanted to say that besides putting up a lot of interesting data in a very useful way, these maps are absolutely stunning to behold. The party identification map with the black background is stunning. I would frame it and hang it up in my house.

  13. D.O. says:

    Great graphics!
    I do not agree with “white for low density” approach. Not sure which is better, but there is a whole series of the photographs of Earth or its parts showing the degree of development by luminocity at night. Dark regions naturally imply less development, which for U.S. most strongly correlates with low density.

  14. Tom says:

    Having been raised on Cleveland’s _Visualizing Data_, I have an extremely strong preference for easy interpretation over prettiness. Go with the white background

  15. Christi says:

    David Sparks has an amazing eye for presenting data…..Beautifully done

  16. Nicholas says:

    Great work. I don’t know if you are still working on this, but some of the color palettes work better than others. I think Red/Blue is better than Red/Green. One of the problems is that the univariate map is now a bivariate map, and it is difficult to perceive bivariate data through color alone. There is quite a bit of cognitive research on how we perceive color. The bottom line is, it’s difficult; but some color spaces are better than others. RGB is really bad. HSV is better. LAB is probably better, yet. But the trick is to get one perceptual axis of color (such as hue) to map into income/or votes, and another perceptual axis of color (such as value) to map into population density. The univariate RColorBrewer palettes aren’t designed for crossing with a second data dimension.
    I’d also suggest trying fewer color bins, especially on the pop density axis. It might reduce the cognitive load of the maps, making it easier to compare both data value and density separately. Or it might not! I don’t know.
    Great stuff.

  17. chad says:

    excellent, excellent, excellent. thanks for sharing!!

    my only comment is more political: your scale implies “independent” is somehow in between or an average of republican and democrat. that may apply to some who are registered independent but is certainly a mislabel of a huge number of independents who certainly don’t want to be smack dab in the middle.

    again, this is great stuff. thanks for sharing!!

Check out what others are saying...
  1. [...] Weitergehende Informationen unter isarithmic maps [...]

  2. [...] Beautiful Isarithmic Maps of Public Opinion Data [...]

  3. [...] the site. DATE: 21/12/2011 | CATEGORY: Uncategorized | Leave a comment [...]

  4. [...] a fifth-year PhD candidate in the Department of Political Science at Duke University, has today published a fascinating set of experiments using ‘Isarithmic’ maps to visualise US party identification. Isarithmic maps are essentially [...]

  5. [...] David Sparks has some nice maps of public opinion, using transparency to indicate the level of uncertainty. [...]

  6. [...] let the viewer play with how the colors are done. And David Sparks has done related work, trying to show confidence/uncertainty on maps based on smoothed data, rather than drawing areas separately as in a choropleth. I like this approach for looking at [...]

  7. [...] Isarithmic maps of public opinion data. [...]

  8. [...] 2012 summer meeting of the Society of Political Methodology, I will be presenting a poster on Isarithmic Maps of Public Opinion. Since last posting on the topic, I have made major improvements to the code and robustness of the [...]

  9. [...] from the beautifull maps from the blog of David B. Sparks I tried to reproduce his results. The basis for my analysis I downloaded the results of the [...]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: