Skip to main content

Python api for Statistics Canada New Data Model (NDM)

Tests Documentation Status PyPI version Anaconda-Server Badge

API documentation for StatsCan can be found on the web data service docs

If you're looking for Table/Vector IDs to use in the app you can find them through the StatCan data page

Anaconda package

Read the docs

Introduction

This library implements most of the functions defined by the Statistics Canada Web Data Service. It also has a number of helper functions that make it easy to read Statistics Canada tables or vectors into pandas dataframes.

Installation

The package can either be installed with pip or conda:

conda install -c conda-forge stats_can

Or:

pip install stats-can

The code is also available on

github.

Contributing

Contributions to this project are welcome. Fork the repository from github.

You'll need a python environment with poetry installed. A good guide for setting up an environment and project (that I used for this library) is hypermodern python.

I've configured the project to use nix for environment creation. If you use nix then the makefile in the root of the project will let you create development environments and run tests. However you like to configure a uv project should work though.

I'd also welcome contributions to the docs, or anything else that would make this tool better for you or others.

Release files for stats-can 3.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stats-can 3.3.0
File Size Uploaded
stats_can-3.3.0.tar.gz 24.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for stats-can 3.3.0
File Interpreter ABI Platform
stats_can-3.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 50.2 kB

Release files / stats_can-3.3.0.tar.gz

Download URL stats_can-3.3.0.tar.gz
Size 24.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d3304ebe2053418d9d58b0509def650f5ede133489318c76004b7604e9ab6f07
BLAKE2b-256 checksum
How to use checksums
6f6b55603e9fee63d79e77239ec235db426913d5901a9b17dd1a463061e7ad77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / stats_can-3.3.0-py3-none-any.whl

Download URL stats_can-3.3.0-py3-none-any.whl
Size 25.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53b2d3a6fd0382e083a086cd24a71409f8b52fa4d447f0839f7d1b32c1bec03e
BLAKE2b-256 checksum
How to use checksums
926a9705a6afacbe0a4391316221ab4b09929938cb73bbaf6113ca273fdc96ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

3.3.0 This release

2 release files

3.2.3

2 release files

3.2.2

2 release files

3.2.1

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.9.4

2 release files

2.8.4

2 release files

2.7.4

2 release files

2.6.4

2 release files

2.6.3

2 release files

2.5.3

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4.0

2 release files

2.3.5

2 release files

2.3.4

2 release files

2.3.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page