Access Chinese Data via Public APIs and Curated Datasets
Overview
Provides functions to access data from public RESTful APIs including 'Nager.Date' and 'World Bank API', retrieving real-time or historical data related to China, such as holidays and economic indicators. Additionally, the package includes one of the largest curated collections of open datasets focused on China and Hong Kong, covering topics such as air quality, demographics, input-output tables, epidemiology, political structure, names, and social indicators. The package supports reproducible research and teaching by integrating reliable international APIs and structured datasets from public, academic, and government sources. For more information on the APIs, see: 'Nager.Date' https://date.nager.at/Api, 'World Bank API' https://datahelpdesk.worldbank.org/knowledgebase/articles/889392.
Breaking Changes
- **Removed
get_country_info_cn()** from the package. This function depended on the 'REST Countries' API v3.1 endpoint, which was deprecated by its provider. The replacement v5 endpoint now requires an API key, which is incompatible with CRAN's policy that packages using Internet resources must work without user-supplied credentials. As a consequence, all associated tests, documentation, and examples have been removed, and references to the 'REST Countries API' have been removed from the package (DESCRIPTION,README.md, vignette). - The package now integrates **two** APIs instead of three: **World Bank API** and **Nager.Date API**.
---
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-07-09
- ERROR12 OK, 1 ERROR2026-06-12
- OK14 OK2026-03-10
Documentation
- Help pages
- 47includes a package overview page
- Examples that run
- 100%11 run in a plain check (11 of them under a condition)
- Exported functions with examples
- 24%
- Documented parameters
- 3%
- Return-value docs
- 24%
- Help pages citing references
- 0%
Downloads
Repository
Stars over time
3 development-tooling and community-health practices detected across 2 families in the upstream repository
Checks run against github.com/lightbluetitan/chinapis on 2026-10-21.
Dependencies
Installing ChinAPIs adds 27 packages (16 with compiled code, 11 MB of source tarballs). Heaviest: farver 1.2 MB, viridisLite 1.2 MB, openssl 1.1 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- unarchivedReturned to CRAN2026-02-12
- archivedRemoved from CRAN2026-02-12policy violation On Internet access
- 0.2.0Latest
- 0.1.12026-02-12 · diff ↗
- 0.1.02025-08-26
- RR 4.5.0 released · 2025-04-11
Package metadata
- First published
- 2025-08-26
- Total releases
- 3 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Bundled data
- 1.5 MB / 35 files
- Download size
- 1.6 MB
Cite
Cite this package
Run in R for the authors' entry:
citation("ChinAPIs")The package provides a citation file, so citation() returns the authors' own entry.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.