Skip to main content

Read StatsCan data into python, mostly pandas dataframes

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stats_can-3.2.1.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stats_can-3.2.1-py3-none-any.whl (24.5 kB view details)

Uploaded Python 3

File details

Details for the file stats_can-3.2.1.tar.gz.

File metadata

  • Download URL: stats_can-3.2.1.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","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}

File hashes

Hashes for stats_can-3.2.1.tar.gz
Algorithm Hash digest
SHA256 34702f45803bd39acffc61b3f3b56ff3cb7f569d375727fe91ff51d01d01696a
MD5 165e0084febf4643abbc19cc65f2f802
BLAKE2b-256 476dd401dc8339f74428e5214e3a5954167bf8c07d937648e1b25c3706af1bd9

See more details on using hashes here.

File details

Details for the file stats_can-3.2.1-py3-none-any.whl.

File metadata

  • Download URL: stats_can-3.2.1-py3-none-any.whl
  • Upload date:
  • Size: 24.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","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}

File hashes

Hashes for stats_can-3.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 229c8343dba6aed2e758eb05709bc170526177177b326de4528344ea696e8991
MD5 885e533ac85075fd09c672824f3e523e
BLAKE2b-256 c3baf0df2230e50803c4303288f1d1dede2df622d739b0751ccfcb32892a7a6d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page