Skip to main content

Download macroeconomic data from China's National Bureau of Statistics (data.stats.gov.cn).

Project description

cnstats-py

Release

A Python package to easily download macroeconomic data from the National Bureau of Statistics of China (https://data.stats.gov.cn).

Installation

pip install cnstats-py
# or
pipenv install cnstats-py

Basic Usage

import cnstats

# Example: Get data for a specific indicator and year
data: pd.DataFrame = cnstats.query_data(DBCode.hgyd, "A01010G", "2024")
print(data.shape)

In terminal:

python -m cnstats --dbcode hgyd --indicator A01010G --sj 2024

Features

  • Fetch data from the National Bureau of Statistics of China
  • Support for multiple databases and indicators
  • Easy to use command line interface
  • Data is returned as a pandas DataFrame for easy manipulation and analysis
  • Support for multiple data formats (CSV, DTA, etc.)

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

cnstats_py-0.0.2.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

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

cnstats_py-0.0.2-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file cnstats_py-0.0.2.tar.gz.

File metadata

  • Download URL: cnstats_py-0.0.2.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for cnstats_py-0.0.2.tar.gz
Algorithm Hash digest
SHA256 696ddd7471459c9a5a8448c38e0f1d66e860844e6579a7d89053ce91d3d72032
MD5 970c1041826bbad135755914e19e5cc3
BLAKE2b-256 a93df9c67e99177c63a95a037745cfc601618fe4936579e92c538033f015cc31

See more details on using hashes here.

Provenance

The following attestation bundles were made for cnstats_py-0.0.2.tar.gz:

Publisher: publish.yml on clsrfish/cnstats-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cnstats_py-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: cnstats_py-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for cnstats_py-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 486b521fcfffa8c6a33ec31a2689de34cc45d6f3ad465157d740bcb9333bb737
MD5 f3e23bf5491b9080be0f176068122635
BLAKE2b-256 128a615d3be5a67a9eefce819567a3e327cba3b9cd8b5ceab9665af57cb69b98

See more details on using hashes here.

Provenance

The following attestation bundles were made for cnstats_py-0.0.2-py3-none-any.whl:

Publisher: publish.yml on clsrfish/cnstats-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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