--- id: stats-can version: "3.2.3" license: GPL-3.0-or-later license_treatment: copyleft maintenance: active --- # stats-can — Read StatsCan data into python, mostly pandas dataframes License: copyleft · Maintenance: active · Downloads: 129.5K/mo ## 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 above — verify before relying. Fetches Statistics Canada data through the Web Data Service API and loads it into pandas DataFrames, implementing most WDS functions with helper methods for common table and vector queries. 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 pip install stats-can uv add stats-can poetry add stats-can ## Installing stats-can 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. 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']) Requires Python 3.10 or later (supports current versions, <4.0). Statistics Canada Table/Vector IDs must be obtained from the StatCan data page. 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_current - Install friction: low - Maintenance: active - Downloads: 129.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags statistics canada api client, statcan data to pandas, canadian statistical data download, web data service python, statcan table vector lookup, canadian census data api, canadian-data, statistics-api, data-integration [View on SkillFed](https://skillfed.io/packages/stats-can) · [View on PyPI](https://pypi.org/project/stats-can/)