explaingit

modood/administrative-divisions-of-china

Analysis updated 2026-05-18

20,742JavaScriptAudience · developerComplexity · 1/5LicenseSetup · easy

TLDR

Complete dataset of China's administrative divisions (provinces, cities, counties, townships, villages) with official codes, available in JSON, CSV, and SQLite formats.

Mindmap

mindmap
  root((repo))
    What it does
      Five-level divisions
      Official area codes
      Hierarchical data
    Data formats
      JSON files
      CSV files
      SQLite database
    Use cases
      Location pickers
      Regional analysis
      Address validation
    Audience
      Developers
      Data analysts
      China-focused apps
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build location pickers or address autocomplete for Chinese apps and websites.

USE CASE 2

Analyze regional data by matching user locations to official administrative codes.

USE CASE 3

Validate and standardize Chinese addresses in databases or forms.

USE CASE 4

Create hierarchical dropdown menus for province-city-county selection flows.

What is it built with?

JavaScriptJSONCSVSQLitenpm

How does it compare?

modood/administrative-divisions-of-chinachokcoco/icsstabler/tabler-icons
Stars20,74220,71220,672
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasyeasyeasy
Complexity1/51/51/5
Audiencedeveloperdeveloperdesigner

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min
Do what the fuck you want. Public-domain-like.

In plain English

This repository provides a comprehensive dataset of China's administrative divisions across all five official levels: province, city, county, township, and village. The data is sourced from the National Bureau of Statistics of China and follows official statistical area codes and rural-urban division coding standards. The project notes that data will no longer be updated as of October 2024, because the National Bureau of Statistics stopped publicly releasing the specific division codes. Data is available for download in both JSON and CSV formats at each administrative level, with files named provinces.json, cities.json, areas.json, streets.json, and villages.json. Multi-level linked datasets are also provided, allowing developers to work with hierarchical combinations such as province-city two-level data, province-city-area three-level data, and province-city-area-township four-level data, each available with or without official area codes. A SQLite database file is also included, and the data can be migrated to other database systems such as MySQL, Oracle, or MSSQL. The dataset was last updated to reflect 2023 statistical codes with a cutoff date of June 30, 2023. It is available as an npm package called china-division.

Copy-paste prompts

Prompt 1
How do I load the china-division npm package and query cities within a specific province?
Prompt 2
Show me how to parse the provinces.json file and build a cascading dropdown for province-city-area selection.
Prompt 3
I need to import the SQLite database into MySQL, what's the best way to migrate this China divisions data?
Prompt 4
How can I use the multi-level linked datasets to validate that a user-entered county belongs to the correct city and province?

Frequently asked questions

What is administrative-divisions-of-china?

Complete dataset of China's administrative divisions (provinces, cities, counties, townships, villages) with official codes, available in JSON, CSV, and SQLite formats.

What language is administrative-divisions-of-china written in?

Mainly JavaScript. The stack also includes JavaScript, JSON, CSV.

What license does administrative-divisions-of-china use?

Do what the fuck you want. Public-domain-like.

How hard is administrative-divisions-of-china to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is administrative-divisions-of-china for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub modood on gitmyhub

Verify against the repo before relying on details.