July 12, 2018

Mirror images: city similarity with t-SNE

While putting together the data for the longer post on measuring and visualizing diversity and segregation in Canadian cities, I wanted to see if there was an intuitive way to compare similarity of cities across multiple Census demographic variables at the same time. Comparing across many Census variables at once requires us to think across many dimensions at once. As our eyes really perceive in at best four dimensions, visualizing many dimensions requires a reduction in the number of dimensions from many to the two (or three) dimensions that best allow for visual interpretation. Typically this is done through dimension reducing approaches like principle components but, increasingly, t-SNE has become a preferred technique for embedding highly dimensional data in to lower dimensional space while preserving local structure. Read more

July 9, 2018

Diversity and Segregation in Canadian Cities

This is the first post from what I hope to be is a series of posts looking at the spatial distribution of different demographic variables in Canadian cities. In this post, I take a look at the diversity of visible minority groups in Canadian cities using Census data. By using a measure that relates diversity to segregation, we can also look at how these cities distribute minority groups and to what extent these cities are segregated. Read more

June 6, 2018

Airportr: a lightweight package for airport data

As someone whose day job is in the travel and tourism industry, I have to work with airport codes, names, and locations all the time. airportr is a lightweight package to help deal with a few common airport related tasks. This package bundles open license airport data from OurFlights with several utility functions and does not require any API calls or dependencies beyond dplyr. airportr is easy to install from Github (or soon CRAN). Read more

February 20, 2018

The Great Wait

This interesting post by Nathanael Lauster caught my eye last week looking at the gradual shift in age-specific birth rates for women in British Columbia over the last few decades. Nathanael is a Professor of Sociology at UBC and you may have heard of his book “The Life and Death of the Single-Family House”. _[Tweet no longer available]_ His post includes a striking visual showing the shift in age-specific birth rates for BC between 1989 and 2015. You can really see the year-by-year progression of BC women having more of their children at a later age. Read more

October 23, 2017

Small multiples with maps

TL;DR: Small multiples maps are one of my favourite ways to communicate multiple variables with a quantitative and spatial dimension. This example uses small multiples to show the distribution of the most spoken non-English languages in the Toronto CMA. Scroll to the end to see the results. After seeing the excellent electoral results maps from the Berliner Morgenpost, I wanted to experiment with a similar approach for an alternative take on my maps of linguistic diversity in Canadian cities. Read more

October 3, 2017

Language Diversity in Canada

The Confusion of Tongues, Gustav Doré, engraving c.1865-1868 Language Diversity Index The Language Diversity Index is a quantitative measure of the diversity of languages found in a given area. In a country like Canada with two official languages, a rich history of diverse Aboriginal languages, and a long history of immigration from a wide range of countries and ethno-linguistic cultures, we would expect to see a relatively high score for linguistic diversity. Read more

August 30, 2017

Code

R Packages cancensus Co-creator and maintainer Reference Page | Github Access, retrieve, and work with Canadian Census data and geography. Download data and Census geography in tidy and analysis-ready format Convenience tools for searching for and working with Census regions and variable hierarchies Provides Census geography in multiple R spatial formats Provides data and geography at multiple Census geographic levels including province, Census Metropolitan Area, Census Division, Census Subdividision, Census Tract, and Dissemination Areas Provides up-to-date data for the 2016, 2011, and 2006 Censuses airportr Creator Github This package uses open source airport data to provide tools to look up information, translate names and codes into other formats, as well as some basic calculation functions for measuring distances. Read more

August 30, 2017

Starting a blog

I’m finally getting around to starting a blog/personal site. I’ve thought about it for a long time but never set down to actually do it. There are several motivations behind this blog: I find more and more that other people’s personal blogs – as well as sites like R-bloggers and R Views – are the best place to learn new methods, learn about new packages, and to be inspired by the work of other people. In time, I hope that some of the material on this page ends up useful to someone else. Read more

© Dmitry Shkolnik 2022

Powered by Hugo & adapted from Kiss.