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

Download whl file (say, 'nbsdata-0.1.0-py3-none-any.whl') from github release page, and install with pip

pip install nbsdata-0.1.0-py3-none-any.whl

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

To update these files, run related function yn 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', 'A020101', 'LAST5')

Regional Data

quarterly data of urban disposable income of Zhejiang

bs.regionaldata('fsjd', 'A030102', '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.0-py3-none-any.whl (46.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nbsdata-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 46.8 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 63b6bd02ba86bb90f3cccde707d1af060a2f2ad5c2506c83a745a59252d174fe
MD5 e055e7cbd3d460cded1e4c754ed0af75
BLAKE2b-256 b361d404d3480555c6e1c6eeafdddd38fd4b3d0986c41208af2907547cf8ed1d

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