Check the Setup
- Python 3.10 or newer
- A notebook environment such as Jupyter or Google Colab
- An internet connection
Canadian statistical tables for building provincial labour, prices, and population tools from Statistics Canada SDMX.
Report a ProblemFrom Source to Product Signal
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.
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())Test a Useful Signal
Test whether one WDS vector can power a bounded provincial-or-national labour sketch.
Statistics Canada is a government source. Last verified 2026-08-18. Temporal coverage: table-specific Statistics Canada series.