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.0.0-py3-none-any.whl (46.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nbsdata-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 46.6 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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0b27997d6a4bdc4b872b15a9d0b5fc30c7857aa9941fe36b1fd65cb45dce5ce9
MD5 c11a5cae90a2b17c49174f9c8c2a3b5e
BLAKE2b-256 3d29ea18f90329d52d7ad29fee7d30debda131e7061b07059f6d115b30e19ad9

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