Interactive: Population Change in Canadian CMAs, 2011-2016
With the recent release of the 2016 Canadian Census, I decided it was an easy target for a data visualization experiment.
Using Mapbox GL and QGIS, I wanted to harness the big data capabilities of Mapbox GL and its impressive camera movements towards the creation of a chart rather than a traditional map.
Super-pro census maps by my friend Tom Weatherburn here.
Web maps using WebGL have many advantages, and are quickly becoming the standard. Mapbox GL is able to show large amounts of data, render styles client-side, and tilt, fly, and rotate the view. It also looks amazing on mobile.
Working previously with NBA shot data, I knew it was possible to map anything with an x and y coordinate. By adding a delimited text layer in QGIS, any bar chart/scatterplot/etc. can essentially be converted into a spatial file (Note: you may need to reduce the actual values through division as they should remain between -90 to 90 for latitude and -180 to 180 for longitude). Code is on github if you want to see what the files look like.
Now, I admit, this visualization is a bit overboard. The amount of steps involved to get it looking the way it does now was a lengthy experience. I also kept thinking, “D3 is probably way better for something like this,” but I also wanted to see if it would work.
What I think is good about this experiment is when you click on one of the points. The fluid zoom transition to bring you in closer combined with the intuitive labeling looks incredible. It also allows you to read every data point, which would have been nearly impossible in a static chart. The potential for exploring data is where I believe making charts with Mapbox GL could be worth it.
I also think you could push this idea much further – I only have 156 points showing, but Mapbox can handle millions. You could fly someone around and explore all of the important points in a complex scatterplot using the story map technique. Highlighting clusters/outliers could be quite fun - Journey along the line of best fit to explore the landscape of regression.
I'll see myself out...