A targeted country

When a mass shooting in the US appears at the top of the news cycle, it's difficult to talk or even think about something else. The whole debate is hard to grasp from abroad as the arguments of the gun lobby — people kill people, bad guys will have guns, it's in the Constitution, the government will control us — have all been addressed successfully outside of the U.S. Yet, the debate goes another round. As one famous tweet and may people have said: it seems like the debate was over ever since Americans decided in Sandy Hook that it was ok to mass murder children.

An editorial from the New York Times shows this in a powerful way. The title sets the scene "What Congress Has Accomplished Since the Sandy Hook Massacre" and the visualization does the rest.

Screen Shot 2018-02-16 at 08.55.49.png

And all the way down to today, with the Parkland massacre. The legend is especially poignant as it raises your hopes that something has been done, but then you scroll and scroll and none of these colours appear.  Poignant scrollytelling

What struck me though isn't really visualized: it's the number of mass shootings each month. The Times probably decided not to encode it because it would have distracted from the message. But there seemed to be a trend where they are more common in the summer and I wanted to verify that, so I made this with the data.

Mass shootings.png

Each red dot represents a mass shooting. The black bars in the back top at the monthly average. They happen to form a skyline, targeted by the shootings. A moving art piece hidden in the data.

We, non-Americans, watch in horror each time and feel powerless like many Americans, except we truly are and it's weighing on us. For now, this will be my contribution as I can't stop thinking about it and I dread the moment that I will.

The colour palettes of the Obama official painted portraits

The portraits of Barack and Michelle Obama were unveiled this week and one of their most striking features is their colour palettes. The one from the President especially is a radical break from previous portraits and the one from the First Lady is captivatingly elegant.

Portrait Barack Obama.jpg
Portrait Michelle Obama.jpg

One way to learn about colour is to learn from the best and the two painters of these portraits, Kehinde Wiley and Amy Sherald, have much to teach. This is why it seemed like a good opportunity to test various colour extracting tools. I'll be using three online tools, plus Photoshop. Many tools offered more than five colours so I made my own choices among the suggested colors. I provide the colour codes in all the formats provided by each tool.


ColorExplorer palette.png

This tool may have the best balance of the three online tools for the portrait of Barack, although it seems to have missed entirely the dark blue of the garment in favour of a dark purple that's probably more red than it needs to be. I like the compromise made in brown for the skin tone. For Michelle, the green of the skin tone seems especially well captured. It's interesting that from the vivid colors of the Milly dress, it's a beige that comes out.

On ColorExplorer, I set the “Color refinement analysis” to “rough” because it returns more diverse colours and other settings would return a subtle but similar palette. I set it to 10 colors for the same reason. You can upload your own picture but it has to be 250k and less.

ColorExplorer interface

ColorExplorer interface


Canva Palette.png

Canva captured a light brown for the skin tone of Barack and the dark brown of the chair separately. The accent colors of the flowers are completely left out, perhaps because they are small. For Michelle, there is a reddish brown whose origin is unclear. Perhaps some average based on the bright red found on the dress.

Canva has a beautiful interface that puts the colours in the context of the original image. Initially, it gave me the impression that it provided the best result of the three online tools. You can upload your own image.

Canva interface

Canva interface


DeGraeve Palette.png

Another tool that overlooked the accent colours in Barack's portraits. The brown of the chair is also missing despite its size. The purple of the suit appears with a better balance than with the other online tools. The bright pink of Michelle's dress appears in a very muted shade but at least it's there. The green of the skin on the other hand it completely missing, while its one of the most interesting and visible colours of the painting.

DeGraeve offers two palettes of 5 colors each: dull and vibrant. I selected the dull in both cases because it seemed closer to the original image. One challenge is that you have to provide a link to the image and cannot simply upload yours.

DeGraeve interface

DeGraeve interface


Photoshop

Photoshop Palette.png

Photoshop allows complete control, but whether that's a good thing is unclear. My palette is closer to the original, but also seems less harmonious than those extracted by the online tools. Barack's skin struck me as very bright and so I chose an copper-toned brown. My dark green is taken brown the background of the foliage. I picked the most striking accent colour — lilac — and the dark blue of the suit, which came out without much red if any. For Michelle, I chose to extract the bright pink because is seems like an important colour in the painting despite its small size. In Photoshop, selecting various black parts of the painting made it clear that the underlying colors varied greatly, from yellow, to green, to blue.

Photoshop interface

Photoshop interface


None of the tools aced nor fumbled it. It is a case of trying out each tool to make a combination that suits you. It seems as if the online tools make an effort to extract a harmonious colour palette that may not be accurate, but at least pleasant. They capture the spirit if not the letter of the image. This might be what we have to learn from the masters.

Bonus: You can download the palettes in Adobe Suite format here.

5 tools for getting a little better at colour for dataviz

While organizing my colour tools, I thought of sharing a few of them here, some I’ve used, some new to me. The truth is that I intend to get better at it and it was prompted by a 2015 piece by Elijah Meeks that hit close to home:

If you don’t feel capable of selecting a color scheme based on the fundamental principles of how humans perceive color, then what makes you think you can select between a hive plot and a Gannt Chart?
— Elijah Meeks, circa 2015

So if that applies to you as well, I’ll start with five basic tools.


Color Brewer

The reference in colours for maps and more. It’s on every list. The interface is a bit dated by today’s standards, but it’s incredibly convenient, with options for colour-blind palettes, or even photocopy-safe ones. Why Cynthia Brewer has barely 1200 followers on Twitter is a mystery to me (well, she doesn’t tweet much).*

Color Brewer.png

Chroma.js

Picking a colour scale with constant changes along the gradient is complicated by our non-linear perception of colours. The Color Brewer addresses this problem and Gregor Aisch takes it a step further by allowing us mere mortals to create our own properly-scaled multi-hue scale. It has quickly become an essential resource. It’s worth reading the thinking behind it and checking the color picker developed on top of it by Tristan Brown.

Chroma js.png

Adobe Color

Not everything in data visualization is about a perfect gradient or diverging palette. Many graphs require simply a pleasant palette. Looking at popular palettes from around the world can be inspiring.

Adobe Color.png

Colour Lovers

This tool acknowledges that a colour scheme has a main, a secondary and accent colours, unlike other tools that treat all colours in a palette as equal. Trigger alert: painful interface.

Colour Lovers.png

Color Explorer 

This is a bit of a curve ball in the list. It extracts the colours from an image. Perfect for when you’re smitten by a picture and its palette (hello Wes Anderson).

Color explorer.png

There you go, with fewer excuses for using the default colour palette of your favorite dataviz tools.

*Because we Canadians pride ourselves on our humility yet brag about any famous Canadian, I’ll mention that Cynthia Brewer is Canadian. Also, Drake and the present use of the British spelling “colour”.


*In finding these resources, I’m indebted to Elijah Meeks, Nadiah BremerLisa Charlotte Rost, and Andy Kirk.

This week on the PolicyViz Podcast: Yours Truly

Oh, the pleasure of reaching a milestone in your career. This is one of those days for me as Jon Schwabish has finally relented and had me as a guest on the PolicyViz podcast, after years of me pestering him (tuns out he wanted money).

Seriously, it is an honour to be on the podcast. I listen to it and find it not only useful to know who's who and who's doing what, but engaging too. The live format is less guarded than the blog posts or tweetstorms that we share and it can be revealing of people's strongly held views (and language tics).

I admire greatly what Jon is doing to connect the dataviz community. In person, he's a natural networker and it's very much thanks to his generosity at Visualized in 2014 that I first got to meet many people in the field. I'm glad he's doing the same thing online with the PolicyViz podcast.

So don't miss this episode, especially if you find the French accent sexy. We spoke a lot about my work at the World Bank Group and with my clients, helping people change their ways. How do you convince people to replace their beloved graphs? To give up on their four paragraphs of text on a slide? Foolproof solutions to these age-old problems and more in just 26 minutes. As a bonus, you'll get to know how I got in the field.

Remake: CNBC Holiday Shopping Graph

My friends Ann K. Emery and Jon Schwabish have been discussing a graph published by CNBC about Holiday budgets. Ann reported that her husband was confused by the original graph:

Jon chimed in with his own remake:

Here is the image of his remake.

 
 

Ann's pet peeve is clustered columns and mine is stacked bar charts. On Jon's remake, I can't quite see what's going on with everyone's Holiday shopping, except perhaps that Millenials stuck to their budget more than other generations.

Upon closer look, it seems that the point of the data is to compare how fiscally responsible each generation is in regards to its Holiday budget. Hence, it should be easy, looking at the graph, to see which generation overspends, which sticks to its budget, and which doesn't even have a budget.

Here is my remake.

 
 

The organization of the data is close to the original: I grouped the generations under their spending habits. This way we can immediately see which generation spends more (Generation X), which sticks to its budget (Millenial), which spends less (X again) and who doesn't have a budget (Baby boomer). Unlike Ann's husband, I don't find it difficult (or necessary) to see which data adds to 100%. It seems more interesting to answer the questions "Which generation over/underspends?" Given that the generations follow the same general trend, grouping by generation would yield graphs difficult to differentiate.

My general approach to data visualization is that content matters. It should influence the choice of graph, the order of the data, the colors, the analytical angle. Here are a few explanations for my design choices:

  1. Obviously, I replaced the columns with horizontal bars, giving space to the titles and labels. In my training, I often joke that people would solve 50% of their data visualization issues with horizontal bar charts, but perhaps it's not a joke.
  2. I stuck to the original size because that was the rule of the game and a useful constraint. I saved some space because with the integration of text and data, I no longer needed a separate legend like the original chart did.
  3. I relabeled the "Total" row. When it comes to people, it seems more intuitive and appropriate to talk about "Everyone". I also differentiated it visually. This is another of my pet peeves: calculated data that is shown the same way as the source data.
  4. I stuck to the client colors (except for a lighter grey) but I tried to apply them in a slightly more intuitive sense: yellow for overspending, green for sticking to budget and grey for no budget (neutral in this context of comparing to budget). Blue seemed neutral and indeed I'm not sure if it's that good to spend less than budgeted on gifts.
  5. I changed the order of the charts so that the one on top is about overspending, then the one about sticking to budget, then underspending and finally, no budget. It seems a more intuitive sequence (more-stuck-less-none) than the original (stuck-more-less-none) with the "on-budget" chart in between the more and less ones. The order of the generations also follows that of a population pyramid with the older people on top.

I don't quite hope to get Ann's husband approval given that it keeps the same groupings, but perhaps with better design, the messages will become clearer and he'll understand the data better.


BREAKING: I won the competition! I would like to thank the judge and all those who have supported me on this long journey.