{"id":37645849,"url":"https://github.com/deepwaterpaladin/statscanpy","last_synced_at":"2026-01-16T11:26:07.346Z","repository":{"id":249685837,"uuid":"832242375","full_name":"deepwaterpaladin/statscanpy","owner":"deepwaterpaladin","description":"Basic package for querying \u0026 downloading StatsCan data by table name. ","archived":false,"fork":false,"pushed_at":"2024-08-21T12:33:17.000Z","size":110,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-27T15:54:31.357Z","etag":null,"topics":["api","data"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/statscanpy/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deepwaterpaladin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-22T15:54:56.000Z","updated_at":"2025-07-07T16:31:14.000Z","dependencies_parsed_at":"2024-08-21T13:59:21.091Z","dependency_job_id":null,"html_url":"https://github.com/deepwaterpaladin/statscanpy","commit_stats":null,"previous_names":["deepwaterpaladin/statscanpy"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/deepwaterpaladin/statscanpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepwaterpaladin%2Fstatscanpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepwaterpaladin%2Fstatscanpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepwaterpaladin%2Fstatscanpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepwaterpaladin%2Fstatscanpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepwaterpaladin","download_url":"https://codeload.github.com/deepwaterpaladin/statscanpy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepwaterpaladin%2Fstatscanpy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478250,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","data"],"created_at":"2026-01-16T11:26:07.239Z","updated_at":"2026-01-16T11:26:07.336Z","avatar_url":"https://github.com/deepwaterpaladin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StatsCanPy\n\n[![Unit Tests](https://github.com/deepwaterpaladin/statscanpy/actions/workflows/qa-tests.yml/badge.svg)](https://github.com/deepwaterpaladin/statscanpy/actions/workflows/qa-tests.yml)\n\n[![Upload Python Package](https://github.com/deepwaterpaladin/statscanpy/actions/workflows/python-publish.yml/badge.svg)](https://github.com/deepwaterpaladin/statscanpy/actions/workflows/python-publish.yml)\n\nBasic package for querying \u0026 downloading [StatsCan](https://www.statcan.gc.ca/en/start) data by table name. Saves data into a dataframe (`Pandas` or `PySpark`).\n\nAllows for querying datasets via plain text search or table ID.\n\n## Installation\n\n`pip install statscanpy`\n\n## Usage\n\n### Basic Usage\n\n```python\n  from statscanpy import StatsCanPy\n\n  # if isSpark==True, data returns will be in PySpark; otherwise it will return as a pandas.DataFrame\n  statscan = StatsCanPy(path=\"/data/saved/here\", isSpark=True)\n```\n\n### Getting Table ID from Table Name\n\n```python\n  statscan.get_table_id_from_name(\"Railway industry operating statistics by mainline companies\")\n  \u003e\u003e\u003e TOP MATCH:\n      Railway industry operating statistics by mainline companies: 23-10-0055-01\n      Accessible at: https://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=2310005501\n```\n\n### Getting Table Data from Table Name\n\n```python\n  await statscan.get_table_from_name(\"Household spending, Canada, regions and provinces\")\n  \u003e\u003e\u003e TOP MATCH:\n      Household spending, Canada, regions and provinces: 11-10-0222-01\n      Accessible at: https://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=1110022201\n      DataFrame[REF_DATE: date, GEO: string, ...]\n```\n\n### Searching for Table(s) by String\n\n```python\n  statscan.find_table_id_from_name(\"GDP\", limit=15)\n  \u003e\u003e\u003e TOP 15 MATCHES:\n      1. Gross domestic product (GDP) at basic prices, by industry, monthly, growth rates: 36-10-0434-02\n      Accessible at: https://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=3610043402\n      2. Gross domestic product, expenditure-based, provincial and territorial, annual: 36-10-0222-01\n      Accessible at: https://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=3610022201\n      ...\n```\n\n## Further Reading\n\n- [StatsCan Data](https://www150.statcan.gc.ca/n1/en/type/data?MM=1)\n- [StatsCan API](https://www.statcan.gc.ca/en/developers/wds/user-guide)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepwaterpaladin%2Fstatscanpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepwaterpaladin%2Fstatscanpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepwaterpaladin%2Fstatscanpy/lists"}