Every time I’ve visited Newfoundland and Labrador I’ve loved it. So, when I hear about the shrinking of small towns there my ears perk up. I thought it would be interesting to visualize the change in communities of all size across all provinces between 2001 and 2016. There are many ways to look at this, here are two. In this post I use the term “city” and “community” interchangeably.
First, a table. Unlikely the first thing to come to mind when thinking data visualization, but not everything has to be New York Times quality D3 animation to enlighten.
|Prince Edward Island|
|Newfoundland and Labrador|
Here, I’ve used R to add shading, colour and bars that indicate the number of growing or shrinking cities out of all the cities in that province. I’ve also added a multi-row header and wrapped the text around the table as you’d see in a newspaper. The provinces and territories are grouped geographically so it’s easy to spot the Maritimes and Newfoundland and Labrador in orange. But I hadn’t heard anything about Saskatchewan until I made this chart. Good thing the CBC was all over it.
Although not essential for this task, the bars and colouring are programmatic. If more than 50% of the cities in a region grew or shrunk then the colour bar gets darker. Same again at 75%. Which got me thinking about this post I read recently about Microsoft Excel and the era of big data.
I think the addition of colour and bars adds visual interest to what are traditionally dry and uninteresting tables. Still, we can’t differentiate between small towns and big cities. Enter, the slope graph.
This grid gives every province its own slope graph with just two dates 2001 on the left and 2016 on the right. Falling populations are indicated with thin red lines, growing ones in black. Most of the slope graphs I’ve seen have just a few lines. In most of the cases here there are hundreds.
I started this project thinking about Newfoundland and Labrador. Their graph, with its dense swath of red, is a powerful representation of the problems they face. Whereas Manitoba, Alberta, and Nunavut have growing cities across a wide range of population sizes.
I find these slope graphs quite pretty. Abstract art almost. Here’s a larger look at beautiful B.C.
R Markdown is pretty neat. You can do things like this . I wonder why more people don’t do this. It’s so much easier to read NOTE: Those people live here