CANSIM Guide

This guide is primarily designed to help users unfamiliar with the CANSIM database find and download data.

Note: This guide outlines how to search for CANSIM data on the Statistics Canada website. University of Toronto faculty, staff, and students may also download CANSIM series for free via CHASS. You will need to be using a UofT IP address to access CHASS.

1. Getting Started

a. What is CANSIM?

CANSIM is Statistics Canada’s main socioeconomic time series database. It contains most of the aggregate data collected by Statistics Canada on a regular basis such as data from the Consumer Price Index Survey, the Labour Force Survey, or the National Income and Expenditure accounts.

b. How to access CANSIM:

Since February 1st, 2012, CANSIM data are freely available on the Statistics Canada website. The examples below are based on a search of the website.

2. Searching for Data

a. Classification

Data are classified by tables and series. A table is the largest unit and contains many series. For instance, there are over 201 tables from the Labour Force Survey. One of these is called “Labour Force Survey estimates (LFS), by educational attainment, sex and age group, annual (Persons), 1990 to 2017” (Table 282-0004) and contains over 26 000 series. A series is, for instance, the full-time employment of male teachers and professors in Canada from 1987-2015 (series v2369249).

b. Searching by survey, table, or series number

If you have the name or number of a survey, table, or series, you can easily retrieve the series by typing the information in the search menu.

c. Searching by subject or keywords

Statistics Canada’s interface allow the user to search for series by subject or keywords. However, unless you know the exact name of the series you are looking for, it is usually better to search by subject in the first stage because the concept we have in mind may not be in the title of the right table or series. For instance, to find the CPI-based inflation rate, it is natural to type “inflation” as a keyword. However, this does not return the desired result, because the inflation rate is not by itself a series, but can easily be constructed from the consumer price index.

Suppose we want to find the quarterly Canadian CPI-based inflation rate for the period 1995-2010.

I. From the CANSIM main page, select Browse CANSIM by Subject (default). You can also choose "Browse by subject" from the drop-down menu at the top of the page.

II. From the list, choose Prices and price indexes. There are 306 tables on prices and price indexes. The link redirects us to a more precise list of topics.

 

III. Since we are interested in the CPI (consumer price index), select Consumer price indexes.

 

IV. The Consumer Price Index statistics is the first table. To access the series, click the table number (176-0003) to open the CPI table.

 

Once you have found the relevant table, you are ready to download a series.

3. Playing with Data

We opened Table 176-0003, “Consumer Price Index (CPI) statistics, alternative measures, unadjusted and seasonally adjusted, Bank of Canada, monthly (Percent), Nov 1979 to Nov 2017” and are interested in finding the quarterly inflation rate for Canada from 1995 to 2010.

  1. By default, all the active series in the table are selected. To choose which series to download, we go under the tab Add/Remove data.
    1. Select Geography. The series are only available for all Canada. We have nothing to do.
    2. Select Alternative measures. Different measures of the CPI are available and some series are not collected anymore (indicated by (Terminated)). Since we are interested in the simple inflation rate, select the series Consumer Price Index (CPI) excluding food, energy and the effect of indirect taxes (index, 2002=100). Deselect any others.
    3. Select the time frame. We want data from Jan 1995 to Dec 2010.
    4. Select the Screen output format. To easily visualize the data, choose HTML tables, time as rows from the drop-down menu.
    5. Click on Apply to visualize the series
  2. We have the monthly CPI from January 1995 to December 2010, but we are interested in the quarterly inflation rate. To manipulate the data, go under the Manipulate tab.
    1. Select Quarterly (average) from the first drop-down menu (“Frequency of output data will be”), and Use calendar year from the second drop-down menu (“When converting frequency by summing or averaging”).
    2. To transform the price index into an inflation rate, select Percent changes, year-to-year from the third drop-out menu (“Data table will contain”).
    3. Click on Apply to vizualize the series.
  3. To download the data, go under the Download tab.
    1. Use “Option 1 – Download data as displayed in the Data table tab”.
    2. Select the language, the output format type (time as rows), the file format, and click on Download data (link may open in another window). The output will be a database that can be opened in Excel. To download series in another format (e.g. SPSS, SAS) use CHASS.

4. A more complicated example

Suppose we want the growth rate of real GDP in addition to the inflation rate. These series come from different tables, so we have to use a different approach.

  • From the CANSIM main page, select Combine series (under the “Search CANSIM” tab.)
  • Select Browse by subject.
  • As we did before, choose Prices and price indexes, Consumer price indexes, and then select the first table (176-0003).
  • The Geography, Alternative measures, and Reference period are the same as in the previous example. Select Canada. Consumer Price Index (CPI) excluding the effect of indirect taxes (index, 2002=100), and From: Jan 1995 To: Dec 2010.
  • Click on Retrieve as individual time series.
  • To add the GDP series, click on Add more series.
  • Click on Browse by subject, and select Economic accounts.
  • From the “Economic accounts” menu, choose, Gross domestic product.
  • We will use the table titled “Gross domestic product (GDP) expenditure-based, quarterly (Dollars)”. Click on the table number (380-0002). You may need to click through the pages to find the table.
  • Select the options:
    1. Geography: Canada
    2. Prices: Chained (2002) dollars
    3. Seasonal adjustment: Seasonally adjusted at annual rates
    4. Expenditure-based estimates: Gross domestic product (GDP) at market prices
    5. Reference period: From Quarter 1 1995 To Quarter 4 2010.
  • Click on Retrieve as individual time series
  • We have the two series we are interested in, so click on Continue.
  • Choose the output format you want from the list. To download a file, choose CSV file, time as rows under DOWNLOADABLE FILE formats.
  • Click on Manipulate Data to convert the monthly price index into a quarterly series, and to express both variables in year-to-year percent changes.
  • Select the options:
    1. Frequency of output data will be: Quarterly (average)
    2. When converting frequency by summing or averaging: Use calendar year
    3. Output will contain: Percent changes, year-to-year
  • Click on Apply to download the series.

Here is an example of the download as a CSV file opened in Excel. The second column maps the quarterly inflation rate to each quarter in the first column: