Skip to content

Repository files navigation

Administrative Divisions of the People's Republic of China · Dataset

License NuGet Version NuGet Downloads GitHub Stars

English | 简体中文


Overview

This project provides data on the administrative divisions of the People's Republic of China (2015). The data was sourced from the website of the National Bureau of Statistics of China.

Directory Structure

  • The src directory contains source code for parsing, reading, and caching administrative division data.
  • The database directory contains the administrative division database schema documentation and all SQL script files.

2015 Data

  • The database/2015 directory contains the general-purpose data scripts for MySQL, SQLite, and DuckDB.
  • The database/2015/.raw directory contains raw administrative division data files collected from government agencies.
  • The database/2015/mssql directory contains the Microsoft SQL Server data scripts.
  • The database/2015/postgres directory contains the PostgreSQL data scripts.

File Descriptions

Database Schema

Data Scripts

The data script filenames are consistent across database variants. Select the appropriate directory for your database:

Running the Scripts

  1. Run a schema creation script to create the administrative division tables:
  2. Select the appropriate year's data script directory for your database:
  3. Run Administratives-China(Province-City-District).sql from the selected directory to initialize the province (prefecture), city, and district/county data.
  4. Run the Administratives-China(Street)-?.sql scripts from the same directory in sequence to create the subdistrict and township data.

License

Note: This project is licensed under the MIT License. Please comply with its terms.

About

中国行政区划 (Administrative divisions of China)

Topics

Resources

Stars

10 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages