stats-can
Read StatsCan data into python, mostly pandas dataframes
Decision gist · record as of 2026-08-14
Yes, if you work with Canadian statistical data and want programmatic access without manual downloads. The package is actively maintained, has low install friction, and covers most WDS use cases. The GPL-3.0-or-later license is a consideration only if you're building proprietary software; for research, analysis, or open-source projects it poses no barrier. No known security vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later (supports current versions, <4.0).
- Statistics Canada Table/Vector IDs must be obtained from the StatCan data page.
- Low install friction with a pure-Python wheel and five common dependencies (requests, tqdm, pandas, numpy, pydantic).
License · maintenance · safety
GPL-3.0-or-later (copyleft) — GPL-3.0-or-later (copyleft): any derivative work or distribution must also be open-source under compatible terms. Suitable for internal or open-source projects but incompatible with proprietary closed-source applications.
last release 2026-04-14 (122 days) · last repo commit 2026-04-14 · 77 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 129,495 downloads/mo, #11,667 on PyPI
Alternatives
Verify before relying
pip install stats-can
import stats_can
df = stats_can.table_to_df('table_id')
# or
df = stats_can.vector_to_df(['vector_id'])- Whether all WDS endpoints are fully implemented or if some remain unsupported
- Performance characteristics when fetching large tables or many vectors
- Rate limiting or throttling behavior from the Statistics Canada API
What it is and what it does
stats-can is a Python client for Statistics Canada's Web Data Service (WDS), wrapping the official API to make it easier to fetch Canadian statistical data directly into pandas DataFrames. It implements most WDS functions and adds convenience helpers for common workflows like loading tables by ID or retrieving vectors of time-series data. The library depends on requests for HTTP calls, pandas and numpy for data handling, tqdm for progress feedback, and pydantic for validation.
The package is aimed at data analysts, researchers, and developers working with Canadian statistics who want to programmatically access StatCan data without manual downloads. It handles the API plumbing and data transformation, letting you focus on analysis rather than HTTP mechanics.
Use it for
- Download Canadian census or demographic tables into a DataFrame for analysis or visualization
- Retrieve time-series economic indicators (e.g., employment, inflation) from StatCan vectors
- Automate regular data pulls from Statistics Canada for reporting or dashboards
- Combine multiple StatCan tables in a single Python script for cross-dataset analysis
- Build data pipelines that ingest official Canadian statistics into a data warehouse
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you work with Canadian statistical data and want programmatic access without manual downloads.
The package is actively maintained, has low install friction, and covers most WDS use cases. The GPL-3.0-or-later license is a consideration only if you're building proprietary software; for research, analysis, or open-source projects it poses no barrier. No known security vulnerabilities.
Install
stats-can on PyPI
Before you install
Low install friction with a pure-Python wheel and five common dependencies (requests, tqdm, pandas, numpy, pydantic). Actively maintained as of 2026-04-14 with regular commits.
Requires Python 3.10 or later (supports current versions, <4.0). Statistics Canada Table/Vector IDs must be obtained from the StatCan data page.
License in practice
GPL-3.0-or-later (copyleft): any derivative work or distribution must also be open-source under compatible terms. Suitable for internal or open-source projects but incompatible with proprietary closed-source applications.
Quickstart
pip install stats-can
import stats_can
df = stats_can.table_to_df('table_id')
# or
df = stats_can.vector_to_df(['vector_id'])
Verify before relying
- Whether all WDS endpoints are fully implemented or if some remain unsupported
- Performance characteristics when fetching large tables or many vectors
- Rate limiting or throttling behavior from the Statistics Canada API
Package facts
| License | GPL-3.0-or-later copyleft |
| Python support | Supports the current Python release <4.0,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 5 packagesrequeststqdmpandasnumpypydantic |
| Maintenance | Actively maintained 122 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 129,495 / month, #11,667 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: stats_can-3.2.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “statistics canada api client”
- stats-canFetches Statistics Canada data through the Web Data Service API and…
- env_canadaProvides async access to Environment Canada weather observations,…
- shippoPython SDK for the Shippo shipping API, enabling integration with…
Give your agent the search over MCP, or paste the wish link into any chat.
More Information Analysis packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyarrow provides Python bindings to Apache Arrow's C++ libraries for efficient columnar data processing, serialization, and interoperability with pandas, NumPy, and other Python ecosystem tools.
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
Snowpark Python provides APIs to query and process data directly in Snowflake without moving data to your local system, with support for both native Snowpark and pandas-compatible interfaces.
Install it if you use Snowflake and want to process data without moving it to your application layer.
See also env_canada · pypostalcode · pandasql · rasterstats · facets-overview · eurostat · wbdata · pandas · stockstats · delta-sharing