Download macroeconomic data from China's National Bureau of Statistics (data.stats.gov.cn).
Project description
cnstats-py
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cnstats_py-0.0.4.tar.gz.
File metadata
- Download URL: cnstats_py-0.0.4.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c14cb79d54754924b2ace80ac245408f880f5c247336a8ed9807845be3f0b349
|
|
| MD5 |
0e966a3ef307028fd0cd2a1390a104c4
|
|
| BLAKE2b-256 |
e92132d37f1a21144d757f935cc477451eed5250b61c2e9703e4a406442ba59c
|
Provenance
The following attestation bundles were made for cnstats_py-0.0.4.tar.gz:
Publisher:
publish.yml on clsrfish/cnstats-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cnstats_py-0.0.4.tar.gz -
Subject digest:
c14cb79d54754924b2ace80ac245408f880f5c247336a8ed9807845be3f0b349 - Sigstore transparency entry: 203179330
- Sigstore integration time:
-
Permalink:
clsrfish/cnstats-py@cd642f1ca67c080d7a1e8d12775bb5294c6438ad -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/clsrfish
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cd642f1ca67c080d7a1e8d12775bb5294c6438ad -
Trigger Event:
push
-
Statement type:
File details
Details for the file cnstats_py-0.0.4-py3-none-any.whl.
File metadata
- Download URL: cnstats_py-0.0.4-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e235990119d7e70b83013434b679957c4a9fccf3c49945aa113acf445d670ee0
|
|
| MD5 |
28d5b949a2604bb43e058928c6d26508
|
|
| BLAKE2b-256 |
c9bb6b20c81179fb0536879f0ae8942a3332a9d23496f00a2423a17c54bed695
|
Provenance
The following attestation bundles were made for cnstats_py-0.0.4-py3-none-any.whl:
Publisher:
publish.yml on clsrfish/cnstats-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cnstats_py-0.0.4-py3-none-any.whl -
Subject digest:
e235990119d7e70b83013434b679957c4a9fccf3c49945aa113acf445d670ee0 - Sigstore transparency entry: 203179334
- Sigstore integration time:
-
Permalink:
clsrfish/cnstats-py@cd642f1ca67c080d7a1e8d12775bb5294c6438ad -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/clsrfish
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cd642f1ca67c080d7a1e8d12775bb5294c6438ad -
Trigger Event:
push
-
Statement type: