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 query_data --dbcode hgyd --zbcode 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.3.tar.gz (11.4 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.3-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cnstats_py-0.0.3.tar.gz
  • Upload date:
  • Size: 11.4 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.3.tar.gz
Algorithm Hash digest
SHA256 c951765b94b68e1d52f1e344b2a548c6ab0a38bbd1896fb08f6fabc343e52466
MD5 0811707c4cc68181eb0036427de2755f
BLAKE2b-256 a0191f42ff36a2963759970cdef834e7b7e62220e8c58038e2b076c1d95b7365

See more details on using hashes here.

Provenance

The following attestation bundles were made for cnstats_py-0.0.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: cnstats_py-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 11.1 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 63159e930d61b6fad5f87b8fb0097436e6067d1b200e93efb906ed69ec11c285
MD5 b947298bf8c6c63dc44df8d441778a63
BLAKE2b-256 98a70a5a84fd70961ebe3ea0aa850aaa77fbd65cbee750781a3be8e9faa0b95f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cnstats_py-0.0.3-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