How modood/administrative-divisions-of-china works
This repository distributes China’s five-level administrative-division data and provides a workflow to refresh it from the National Bureau of Statistics, store it in SQLite, and format hierarchical selector datasets. Consumers load the packaged JSON exports; the README also documents CSV and SQLite downloads. The sampled source supports the fetch and JSON-formatting paths; CSV generation details are not shown, so those outputs are represented without inferred processing links.
Main entry points: sqlite.js Division models · build.js Format entry · worker.js Fetch orchestration · export.js Export interface
Components 13
Data acquisition
- Fetch entry
lib/fetch.js - Fetch orchestration
lib/worker.js - Page crawler
lib/crawler.js
Relational store
- Division models
lib/sqlite.js - SQLite dataset
dist/data.sqlite
Published data
- Format entry
lib/build.js - Hierarchy formatter
lib/format.js - Five-tier files
dist - Linked selectors
dist - CSV tables
dist
Consumer access
- Export interface
lib/export.js
Other components
- Package consumer
- Statistics site
Connections 13
- Package consumer → Export interface: loads
- Export interface → Five-tier files: loads JSON
- Export interface → Linked selectors: loads JSON
- Fetch entry → Division models: initializes
- Fetch entry → Fetch orchestration: runs fetch
- Fetch orchestration → Page crawler: requests divisions
- Page crawler → Statistics site: fetches pages
- Fetch orchestration → Division models: reads and writes
- Division models → SQLite dataset: persists records
- Format entry → Division models: initializes
- Format entry → Hierarchy formatter: formats tiers
- Hierarchy formatter → Division models: queries hierarchy
- Format entry → Linked selectors: writes JSON