Published on 3 June 2024

Oh Canada - Census 2021

Oh Canada - Census 2021
Canada Poster | Ebay

Hi all,

I wanted to share you a project I've been working on for the last two weeks. It lets you explore the 2021 Canadian Census.

It's powered by a custom map tile server built with Node.js and Express. It fetches census data from Redis and dynamically generates map tiles on the fly. The raw census CSVs are processed into Redis for fast retrieval. When the map tile is requested, the server grabs relevant data points, calculates the values and returns the tile.

The buildings are generated from Overture Maps, a collation of billions of buildings worldwide. In fact, for all previous maps I've switched to this source. This allows for easier usage and compression.

The frontend is an interactive map built with Mapbox GL and Deck.GL. You can select different census variables from the dropdown, and the map updates instantly to show the data. There is also a legend, an option to update the legend, and a switch to show and hide the background "areas" layer.

As ever, the source is on Github.

Let me know what you think! 🇨🇦

Guide to usage:

  • Select a variable, such as Yiddish speakers from the top dropdown, by clicking on the category "Mother Tongue". You can search for it as well. You can "unfold" categories by clicking on them.
  • Select the slider, which is visible for percentage values, and reduce it down to 2%.
  • You can then go to Toronto, or any other major Canadian city, and see there exist a few thousand Yiddish speakers.
  • But what if you want to see a small community, such as Kiryas Tosh (75% Yiddish speaking) in Quebec? You can switch the layer view to make visible even small areas.
  • You can now try it on other variables - try immigrants from Britain, Inuit speakers, French speakers, median income, median age - or any other of the 2500+ variables available to you!

The full map is here.