The Magdeburg skyline in an area chart
June 1st, 2023
Datawrapper lets you show your data as beautiful charts, maps or tables with a few clicks. Find out more about all the available visualization types.
Our mission is to help everyone communicate with data - from newsrooms to global enterprises, non-profits or public service.
We want to enable everyone to create beautiful charts, maps, and tables. New to data visualization? Or do you have specific questions about us? You'll find all the answers here.
Data vis best practices, news, and examples
100+ articles that explain how to use Datawrapper
Answers to common questions
An exchange place for Datawrapper visualizations
Workshop materials to teach Datawrapper
Learn about available positions on our team
Our latest small and big improvements
Build your integration with Datawrapper's API
We're happy to help. Get in touch with us.
This article is brought to you by Datawrapper, a data visualization tool for creating charts, maps, and tables. Learn more.
This is Simon, a software engineer at Datawrapper. While everyone was agonizing about the outcome of this year’s U.S. presidential election, I decided to take a look at data from past presidential races. In this week’s edition of the Weekly Chart, I am presenting an alternative way of visualizing election results.
For the above chart I used a heavily customized heatmap to create a small multiple view of the election results in which each row can be understood as a very minimal cartogram. Each stripe represents a state, laid out from west to east. There are a number of interesting patterns that can be seen that way. For example, the chart highlights how strong Republican candidates were throughout the 1980s and how eventually, large parts of the East and West Coast regions flipped to blue. There’s also the exception of Florida, which keeps alternating between Democratic and Republican majorities. And then there is the dark blue line in the east which is the overwhelmingly Democratic Washington D.C.
Over the past couple of days you’ve probably seen dozens of election maps, both of the choropleth and the cartogram variety. Choropleth maps are normal geographic maps that use color to encode a variable, such as votes in an election. Cartograms, on the other hand, distort the spatial dimensions of regions on a map to represent an additional variable, for example the population. Cartograms often use grids or individual geometric shapes, such as squares or hexagons, to represent regions. That can help to directly compare the regions but it can also be confusing for readers who don’t know the regions’ geography.
For visualizing US presidential election results, it often makes sense to use cartograms instead of maps that represent geographic areas, since we can assume that readers are somewhat familiar with American geography. But more importantly, cartograms enable us to show Electoral College votes right on the map. With the heatmap, I went one step further: By arranging all states from west to east, I reduced the geographical dimensions to the absolute minimum, which created space to show additional data over time for each state. That way it is possible to see patterns in the data that would not be easily visible in other forms of small multiples, e.g. in a grid view of multiple choropleth maps.
Transforming the data to the format needed to create the above heatmap required a bit work. If you would like to build a similar visualization, you can have a look at the Observable notebook that I used to prepare the data. For more information about the other techniques used in this article, have a look at the following resources:
That’s it from me for this week. As always, do let me know if you have feedback, suggestions, or questions. I am looking forward to hearing from you at firstname.lastname@example.org, Mastodon, or Twitter. We’ll see you next week!
If you can’t get enough of election results, my coworker Lisa C. Rost has compiled a long list of election maps and other result pages over on Twitter.
Read this blog post by Datawrapper CTO Gregor Aisch for more reasons why you should not use cartographs for election results