Microproduct data guideintermediate

Statistics Canada Web Data Service

Canadian statistical tables for building provincial labour, prices, and population tools from Statistics Canada SDMX.

At a glance

Difficulty
Intermediate — some data preparation helps
Size
Small · ≤0.5 GB
Formats
JSON, CSV, SDMX
Access
API or Download
API key
Not required
Provider
Statistics Canada
Updates
Monthly

From source to product signal

Test a product idea in four steps

The Web Data Service returns cube metadata and vector series as JSON. Start with one vector id such as a national unemployment rate. Cube ids change when tables are terminated, and bilingual labels can differ.

1

Check the setup

  • Python 3.10 or newer
  • A notebook environment such as Jupyter or Google Colab
  • An internet connection
2

Access the data

  1. 1.Open the WDS documentation and copy one vector identifier from a CANSIM table.
  2. 2.POST getDataFromVectorsAndLatestNPeriods for a few periods.
  3. 3.Cite Statistics Canada under the Open Licence.
Open official source
3

Run the Python example

Install the packages, then run the notebook cell.

python -m pip install pandas requests

import pandas as pd
import requests

response = requests.post(
    "https://www150.statcan.gc.ca/t1/wds/rest/getDataFromVectorsAndLatestNPeriods",
    json=[{"vectorId": 2062811, "latestN": 12}],
    timeout=30,
)
response.raise_for_status()
series = pd.json_normalize(response.json()[0]["object"]["vectorDataPoint"])
series["retrieved_at_utc"] = pd.Timestamp.now(tz="UTC")
print(series.head())
4

Test a useful signal

Chart a Canadian labour vector

Test whether one WDS vector can power a bounded provincial-or-national labour sketch.

  1. 01Confirm twelve vector data points returned for the selected vector id.
  2. 02Plot the reference periods and values.
  3. 03Cite Statistics Canada and explain that terminated cubes change identifiers and that this is not U.S. BLS data.

Dataset details

Statistics Canada is a government source. Last verified 2026-08-18. Temporal coverage: table-specific Statistics Canada series.

Theme

Demographics & Development

Domains

DemographicsLabor EconomicsInternational Statistics

Data types

Time SeriesTabular

Tasks

Provincial ComparisonEconomic MonitoringTrend Analysis

Geography

Canada

Formats

JSONCSVSDMX

Provider

Statistics Canada

Data terms

Statistics Canada Open Licence