Skip to main content

data from National Bureau of Statistics, China

Project description

Retrieving Data from China National Bureau of Statistics

https://data.stats.gov.cn/easyquery.htm

Installation

pip install nbsdata

Usage

from nbsdata import NBS
bs = NBS()

Get Databases

bs.databases

Get Region Codes

bs.regioncode('浙江')   # 330000
bs.regioncode('杭州', city = True)   # 330100

Query Indicator Codes

Indicator codes for each database are retrived with module get_nbs_indicators (in directory 'rhopy')

Indicator data files are stored in package's 'asset' directory. The indicators are somewhat stable. We will update them if needed.

To update these files, run related function in module 'get_nbs_indicators'

bs.indicatorcode('csnd', '生产总值')

NB: only indicators on selection bar on the left in the official pages (excluding indicators appear in the table only ) are available

National Data

annual data of GDP

bs.nationaldata('hgnd', 'A0201', 'LAST5')

Regional Data

quarterly data of urban disposable income of Zhejiang

bs.regionaldata('fsjd', 'A0301', '2010A-2025C', '330000')

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

nbsdata-0.2.1-py3-none-any.whl (46.7 kB view details)

Uploaded Python 3

File details

Details for the file nbsdata-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: nbsdata-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 46.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for nbsdata-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c3e35c61ddd6c3e30ef4bec6b817ba23d59567773421441fa8cd42a4326b2ff3
MD5 1d0cdcf2a116d07fbfc946f075a054a4
BLAKE2b-256 01e0bb80afd34a58030925bc0f31b9a89f52eca3fe2c074e14a49b5d5cff4be2

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