Primarily California

Today is primary day and everyone will be looking to the California results. Although probably not quite me, because Eastern vs. Pacific time means even I will likely be asleep tonight. But before we get to tonight, we have a nice primer from last Friday’s New York Times. It examines the California House of Representatives races that we should be following.

53 districts are a lot to follow in one night…
53 districts are a lot to follow in one night…

Like most election-related pieces, it starts with a map. But it uses some scrolling and progressive data disclosure. The map above, after a bit of scrolling, finally reveals the districts worth following and their 2016 vote margins.

Out of all 53, these are the districts the Times says to watch
Out of all 53, these are the districts the Times says to watch

From there the article moves onto a bit of an exploration of those few districts. You should read the full article—it’s a short read—for the full context on the California votes today. But it does make some nice of bar and line charts to plot the differences in presidential race vs. congressional race margins and the slow Democratic shift.

Credit for the piece goes to Jasmine C. Lee and Karen Yourish.

Forecasting the American Midterm Elections

We are inching ever closer to the US midterm elections in November. In less than a week the largest state, California, will go to the polls to elect their candidates for their districts. So late last week whilst your author was on holiday, the Economist released its forecast model for the results. They will update it everyday so who knows what wild swings we might see between now and the election.

I will strike out against the common knowledge that this is a wave election year and Democrats will sweep swaths through Republican districts in an enormous electoral victory. Because while Democrats will likely win more overall votes across the country, the country’s congressional districts are structurally designed to favour Republicans as a result of gerrymandering after the 2010 Census redistricting. The Economist’s modelling handles this fairly well, I think, as it prescribes only a modest majority and gives that likelihood as only at 2-in-3. (This is as of 30 May.)

But how is it designed?

The big splashy piece is an interactive map of districts.

The overall state of the US in the 30 May run of the model
The overall state of the US in the 30 May run of the model

It does a good job of connecting individual districts to the dots below the map showing the distribution of said seats into safe, solid, likely, leaning, and tossup states. However, the interactivity is limited in an odd way. The dropdown in the upper-right allows the user to select any district they want and then the district is highlighted on the map as well as the distribution plot below. Similarly, the user can select one of the dots below the map to isolate a particular district and it will display upon the map. But the map itself does not function as a navigation element.

Selecting the newly drawn Pennsylvania 6th
Selecting the newly drawn Pennsylvania 6th

I am unsure why that selection function does not extend to the map because clearly the dropdown and the distribution plot are both affecting the objects on the map. Redeeming the map, however, are the district lines. Instead of simply plopping dots onto a US state-level map, the states are instead subdivided into their respective congressional districts.

But if we are going so far as to display individual districts, I wonder if a cartogram would have been a better fit. Of course it is perfectly plausible that one was indeed tried, but it did not work. The cartogram would also have the disadvantage of, in this case, not exhibiting geographically fidelity and thus being unrecognisable and therefore being unhelpful to users.

Now the piece also makes good use of factettes and right-left divisions of information panels to show the quick hit numbers, i.e. how many seats each party is forecast to win in total. But the map, for our purposes, is the big centrepiece.

Overall, this is solid and you better bet that I will be referencing it again and again as we move closer to the midterms.

Credit for the piece goes to the Economist Data Team.

The Short Arc of Pub Trivia Scores Bends Towards Victory

Well, at least over the last three weeks it did. In previous examples of my pub trivia team’s performance, we have had a lacklustre performance. But a few weeks we had an epic collapse. Having been in 4th place out of 10 in the penultimate round we ultimately finished in 8th out of 9—somebody left early—and 14 points out of first place. It probably didn’t help we put Beyonce down as the artist for three different songs. It probably really didn’t help that none of those artists were Beyonce. And it probably definitely didn’t help that we had no idea who those three artists were.

Then after a middling performance two weeks ago, last week we shocked even ourselves with our first victory since last autumn. Just how shocking? 19 points in that oft ill-fated music round. (It’s not really, but I’ll have to make another graphic about that.)

We were perhaps the most shocked of all that week.
We were perhaps the most shocked of all that week.

Credit for the piece is mine. Credit for the score goes to my teammates.

Open Door Cabinets

Here in the States we are accustomed to unstable governments—the Trump administration has set records for the most departures so early in its term. But the United Kingdom is not to be outdone as Amber Rudd, the Home Secretary, resigned in response to an immigration scandal. She makes six the number of cabinet officials who have left the British government.

The Economist put together a small graphic showing how long it took various governments, British and otherwise, to reach the level of so many departures. May’s government has been the fastest to reach so many departures in recent years.

I wonder where the US administration falls…
I wonder where the US administration falls…

The key thing to note here is what I pointed out last week, which is the use of a thin white stroke on the outside of the lines being highlighted with the Theresa May government using a bolder weight to make it stand out just a wee bit more. This is a bit different than the Times version which uses the outline approach for only what would here be the May line, but it still works overall to draw attention to the British governments.

Credit for the piece goes to the Economist graphics department.


Last week Angela Merkel, the German chancellor, visited President Trump in Washington. This post comes from the Economist and, while not specifically about that trip, describes Germany in a few different metrics. Back in the day it would be what I called a country-specific datagraphic. That is, it shows metrics not necessarily connected to each other, but all centred around a country. In theory, the framework can then be used to examine a number of different countries.

The thin red line…
The thin red line…

That sort of works here, except the choropleth is for the Alternative for Germany political party. That only real works as a metric in, you know, Germany.

Overall, I like the piece. The layout works well, but Germany is fortunate in that the geographic shape works here. Try it with Russia and good luck.

First let us dispense with the easy criticism: do we need the box map in the lower right corner to show where in the world Germany is? For Americans, almost certainly yes. But even if you cannot identify where Germany is, I am not certain its location in Europe is terribly important for the data being presented.

But the pie charts. I really wish they had not done that. Despite my well-known hatred of pie charts, they do work in a very few and specific instances. If you want to show a reader 1/4 of something, i.e. a simple fraction, a pie chart works. You could stretch and argue that is the case here: what is the migrant percentage in Bavaria? But the problem is that by having a pie party and throwing pie charts all over the map, the reader will want to compare Bavaria to the Rhineland-Palatinate.

Just try that.

Mentally you have to take out the little red slice from Bavaria and then transpose it to Rhineland-Palatinate. So which slice is larger? Good luck.

Instead, I would have left that little fact out as a separate chart. Basically you need space for 16 lines, presumably ranked, maybe coloured by their location in former East or West Germany, and then set in the graphic. Nudge Germany to the left, and eat up the same portion of Bavaria the box map, cover the Czech Republic, and you can probably fit it.

Or you could place both metrics on a scatter plot and see if there is any correlation. (To the designers’ credit, perhaps they did and found there is none. Although that in and of itself could be a story to tell.)

The point is that I still hate pie charts.

Credit for the piece goes to the Economist’s graphics department.

Differences Between Print and Online

On Monday I read, in print, part of a page one article in the Times. I ran out of times given the whole new royal baby coverage, and opted to read the rest digitally. Originally, this was just for my own enjoyment as there were no graphics in the article.

But this one appeared online.

It's a nice graphic too…
It’s a nice graphic too…

I clearly have nothing to compare it to in print, which is a shame because this is a nice graphic with one thing I really wanted to point out. Although, maybe a print version would not have had the thing I will get to. But maybe there just wasn’t space in the print edition or they tried to make it work, but the colours or layout wasn’t working. Who knows.

When I saw the digital version, the line chart struck me as particularly nice. Now, maybe the Times has been doing this for a little while and I have missed it, but notice the highlighted line, Rural public. Yes the line is thicker or bolder than the others, but more importantly it has a thin white stroke attached that helps separate it from the lines behind it. Those lines are important for context, but not necessarily to tell the story of how rural public servant jobs have been hit the hardest.

You often see this kind of approach taken with maps. Don’t believe me? Take a look at Google Maps as one example. Their text often has a thin white outline to make it stand out from the content of the map. I just have never seen the logic applied to a line chart.

I doubt the design would hold up in a number of other scenarios. For example, a straight line chart with no line highlighted in particular, the spaghetti-ness mess would make the above a largely white line chart. Too much overlap. And a simple comparison, say of two lines, probably is clear enough that the approach is not necessary. But in scenarios like these where the highlighted series is important, the choice clearly works.

On a much smaller note, check out the x-axis labels. They are used only once for the first chart. And then because the bar charts and line charts align, they carry through straight down the rest of the piece. Very efficient.

I only wish I knew how this would have appeared in print…

Credit for the piece goes to the New York Times graphics department.

New York Is Still Beating London

So two weeks ago I posted about the graphics in a BBC article about how London has surpassed New York in terms of murders, due to a spate of stabbings in the British capital. Well, somehow I missed this: an article from the Economist that rebuts that point. And it does it brilliantly.

Lies, damned lies, and statistics.

I think everybody who works with data knows that adage. Now, I am not using it to say that the BBC—or the numerous other media outlets that ran the story—lied. Just that it is easy to change the story based on the data, how it is presented, or which subsets of the data are selected.

The Economist’s article points out that the surpassing of New York is a short term data point, a worrying short term trend, definitely, but they then look at the data. They select two timeframes and look at them side-by-side.

It's all about what data you show, choose to highlight, and then how you show it.
It’s all about what data you show, choose to highlight, and then how you show it.

And that is what I love about this piece. It shows the long-term context of New York having a far-higher medium-term history of murder (some 28 years of data is shown). When I was growing up in the 90s, murders in New York—and to be fair almost all large American cities—was just something that was a known fact. During that time, London hovered below 200 or so, compared to the 2000+ in early 90s New York.

But then they also show the short term, which does point to a steady rise in London murders. But, the data could also show a one-time dip in the murders in New York. But they also show that the total number of deaths is still higher in New York than London, despite the three months of data.

Murder is not good. But these graphics are a good example of how selecting different time series for the same data set, and then showing which parts of the data to show. The earlier BBC piece, and my revision of it, did not show the total deaths. Nor did either piece show the longer timeline of data.

Credit for the piece goes to the Economist graphics department.

Deaths in America

Yesterday was murders in London and New York. Today, we have a nice article from FiveThirtyEight about deaths more broadly in America. If you recall, my point yesterday was that not all graphics need to be full column width. And this article takes that approach—some graphics are full width whereas others are not.

This screenshot shows a nice line chart that, while the graphic sits in the full column, the actual chart is only about half the width of the graphic. I think the only thing that does not sit well with me is the alignment of the chart below the header. I probably would align the two as it creates an odd spacing to the left of the chart. But I applaud the restraint from making the line charts full width, as it would mask the vertical change in the data set.

The screenshot is of the graphic's full width, note the lines only go a little over half the width.
The screenshot is of the graphic’s full width, note the lines only go a little over half the width.

Meanwhile, the article’s maps all sit in the full column. But my favourite graphic of the whole set sits at the very end of the piece. It examines respiratory deaths in a tabular format. But it makes a fantastic use of sparklines to show the trend leading towards the final number in the row.

Loving the sparklines…
Loving the sparklines…

Credit for the piece goes to Ella Koeze and Anna Maria Barry-Jester.

Technical Data Visualisation

I work with economists. And so I get to see working papers and other technical papers on a rather frequent basis. But I still have no way of verifying this premise. Though I most certainly believe in that dip…

I mean all things go downhill when PowerPoint is involved…I'm not bitter, I swear.
I mean all things go downhill when PowerPoint is involved…I’m not bitter, I swear.

Credit for the piece goes to Randall Munroe.