Posts

Canada’s aging population

Recently released data from Statistics Canada allows us to explore demographic trends in the age make-up of the Canadian population. The trend is clear: Canada is getting old. In this chart-blog, we will take a look at population by age group – both across regions and over time – and how median age has evolved.

Trucks! Trucks! Trucks!

Quick post to show how easy it is to do quick data exploration using R. This post walks us through making a (nice!) chart of new vehicle sales in Canada, breaking it down by vehicle type and region.

Making animated charts with gganimate

What’s better than making charts? Making them animated, of course! While animation isn’t always (ok, rarely) necessary, it can help tell a story static charts can’t. Recently there has been a lot of discussion in Canada related to equalization.

New Statscan data on victims of violent crime in Canada

Statistics Canada recently released new data on victims of violent crime across Canada from 2009 to 2017. In this post, I explore trends in this data by region, age and gender.

Gasoline demand: BC and the Rest of Canada

This post looks at gasoline demand across the Canadian provinces and territories. It was prompted by this tweet by @sjmuir, noting that gasoline demand per capita in BC is unchanged since 2008, the year of implementation of the BC carbon tax.

Social assistance and unemployment duration in Alberta

In this post, I consider the relationship between Social Assistance Caseloads and Unemployment Duration in Alberta. Let’s start by calling the necessary libraries library(tidyverse) library(zoo) library(cansim) #Big thanks to Jens von Bergmann and Dmitry Shkolnik for this package!

Blogging Charts!

I like to make charts. I often post them on Twitter (@bcshaffer). I thought I might start posting some of them on my website as a way for me to (a) learn to use R Markdown and (b) share some of my R code that creates these charts for others who are interested in learning.