Animating geodemographic data with D3

What’s here

  • Some thoughts on the cost of establishing provincial bodies to design, deliver, and monitor public services whose geographic boundaries are misaligned with the national census
  • An extensive collection of geodemographic files
  • Some cool (at least I think so!) data visualizations involving sliders and animation

An aside

Since last time, I have been familiarizing myself with some of the more technical details of the Canadian government’s census and the administrative bodies that the Ontario government has established to plan, deliver, and monitor health and human services. In many instances, the geographic boundaries of these administrative bodies are difficult – if not impossible – to align with Canada’s census divisions, census subdivisions, dissemination areas, dissemination blocks, and other geographic units. This misalignment seriously challenges the use of expensive census data to address the social determinants of health and well-being in our public services. 1 The cost of this misalignment needs to figure more prominently and explicitly in any future decisions to establish new or modify existing administrative bodies. In this regard, the decision of the Ministry of Children and Youth to align the geographic boundaries of its five Integrated Service Regions (ISRs) and its thirty-three children and youth mental health Service Areas (CYMHSAs) with Ontario’s census divisions is commendable.

New geodemographic datasets

I have to admit that earlier posts have run the risk of presenting a somewhat disjointed view of the population projections and the geographic boundaries of administrative bodies that the Ontario government has established to plan, deliver, and monitor health and human services. So I want to consolidate some of my thinking and share a number of geodemographic datasets that will form the basis of future data analyses and visualizations. I have structured these datasets using three main categories – geographic unit, classification of age, and demographic variable – each with a number of sub-types:

  • Geographic Unit (4)
    • Statistics Canada
      • Census Division (CD)
    • Ontario Ministry of Children and Youth Services
      • Child and Youth Mental Health Service Area (CYMHSA)
      • Integrated Service Region (ISR)
    • Ontario Ministry of Health and Long Term Care
      • Local Health Integration Network (LHIN)
  • Classification of Age (5)
    • Life Cycle Grouping (LCG)
      • Child (0 – 14)
      • Youth (15 – 24)
    • Young Person
      • LCG-Child and LCG-combined (0 – 24)
      • CFSA-Child (0 – 17)
    • Transitional-Age Person
      • Emerging Adult (16 – 20)
  • Demographic Variable (7)
    • Population
    • Population Density
    • Population Share
    • Population Growth
      • Annual Growth
        • Change in number of persons
        • Rate of growth (%)
      • 5 Year Growth
        • Change in number of persons
        • Rate of growth (%)

We have met with most of these categories and sub-types before, or they carry their usual meanings here. One exception is the CFSA-Child (0 – 17) classification of age, which refers to the definition of “child” under the Child and Family Services Act in Ontario. CFSA-Child is central to any data analyses and visualizations relating to the CYMHSAs and ISRs defined by the province’s Ministry of Children and Youth.

We have compiled twenty-eight datasets in *.csv format that profile the different classifications of age for the years 2016 to 2041:2

Table 1. Datafiles for five classifications of age (above), 2016 to 2041 within a Geographic Unit x Demographic Variable tuple.
Geographic Unit
Demographic Variable CD CYMHSA ISR LHIN
Population data data data data
Population density data data data data
Population share data data data data
Growth
   Annual growth
       Change in number of persons data data data data
       Rate of growth (%) data data data data
   5-year growth
       Change in number of persons data data data data
       Rate of growth (%) data data data data

Sliders and animations

Of course, compiling all of these geodemographic datasets is only worthwhile if we can use them to make better decisions. In earlier posts, we have illustrated how to generate static maps of the geographic boundaries of administrative bodies like the MCYS’s CYMHSAs and ISRs, the MOHLTC’s LHINs, and we have introduced some limited capabilities for the user to interact (zoom, pan) with more dynamic maps.

Before leaving off here, I wanted to illustrate the use of sliders and animation to enhance the user’s abilities – not only to interact with maps – but to discern spatial-temporal patterns in the demographic data.

First, let’s introduce a slider that allows the user to move forward and backwards in time as we use a choropleth map to illustrate the rate of growth in the Child (0 – 14) population in Ontario’s fourty-nine Census Divisions, 2016 to 2041 [interactive version]:

Screen CDS GrowthPC Child slider
Figure 1. Choropleth with slider, illustrating annual rate of growth in Child (0 – 14) population by Census Division in Ontario, 2016 to 2041.

Second, let’s use animation to display the same data [interactive version]:

Screen CDS GrowthPC Child animation
Figure 2. Choropleth with animation, illustrating annual rate of growth in Child (0 – 14) population by Census Division in Ontario, 2016 to 2041.

Next time: I will provide a (fairly) friendly interface that will allow users to select among the 140 possible combinations of Classification of Age x Demographic Variable x Geographic Unit.

 

  1. For example, consider the challenge that Ontario’s Ministry of Finance confronts when it provides population projections for Ontario’s Local Health Integration Networks (LHINs). Except for a few cases, the boundaries of the LHINs do not conform to those of Census Divisions (CDs) or Census Subdivisions (CSDs). Thus, to take advantage of Statistics Canada’s annual updates of population projections to revise the basic demographic profiles of the LHINs, the Ministry of Finance must resort to a number of fiddles, depending on how a particular LHIN splits one or more CDs and/or CSDs. Case 1: If the LHIN consists of intact CDs (the Erie St. Clair LHIN), the Ministry of Finance’s CD-level projections for each CD are aggregated. Case 2: If the LHIN does not include any part of Toronto, York, and Peel AND its boundary splits CDs but not CSDs (the Champlain, South East, North-East, and North-West LHINs), the share-of-growth method is used. Case 3:  If the LHIN boundary splits CSDs (as well as CDs) in Toronto, York, and Peel (the Central West, Mississauga Halton, Toronto Central, and Central East LHINs), the share-of-growth method is used based on the growth of Dissemination Areas. Case 4: If the LHIN boundary splits CSDs (as well as CDs) in CDs other than Toronto, York, and Peel (the South West, Waterloo-Wellington, Hamiltion Niagara Haldimand Brant, Central, and North Simcoe Muskoka LHINs), the constant-share method is used. Additional iterative prorating procedure is required to deal with the age-sex structure of CSDs and split CSDs. All of this merely to update basic population projections! Imagine the impracticality, if not impossibility, of taking advantage of Statistics Canada’s periodic updates of subtler, and potentially more valuable, census-based socioeconomic data.
  2. For a given year within these twenty-eight datasets, the data corresponding to the Child, Youth, LCG-Combined, CFSA-Child, and Emerging Adult classifications of age are identified with the prefix Child_, Youth_, Young_, CFSAC_, and Mixed_, respectively, plus a suffix for the year. For data relating to annual growth of population, the suffix refers to the later year in the comparison.