kakuilan/china_area_mysql
kakuilan/china_area_mysql has 5,352 GitHub stars and 1,227 forks. GitHot measured +1 stars in 24 hours and +2 in 7 days. Last checked 2026-11-11 21:43 UTC. Last push 2024-07-29.
中国5级行政区域mysql库
Measured star growth
- in 24h
- +1
- in 7 days
- +2
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalchina_area_mysql
注意:cnarea_2023在2020基础上有增减, 增出来的数据merger_name,lng,lat等字段有待完善,感谢@youwen21的贡献。
中国5级行政区域mysql库
爬取国家统计局官网的行政区域数据,包括省市县镇村5个层级;
港澳地区的数据只有3级;台湾地区4级;
包含大陆地区的邮政编码和经纬度信息.
cnarea20200630.7z 是爬取2020年的数据,截止2020年6月30日.
全部共 758049 条
大陆数据共679237 条,其中
- 省/直辖市
31 - 市/州
342 - 县/区
3348 - 乡/镇
42757 - 村/社区
632759
- 省/直辖市
港澳台数据共78812 条,其中
- 省/特区
3 - 港澳辖区
33 - 台湾市/县
23 - 台湾区/镇
371 - 台湾街道/村
78384
- 省/特区
改动:
- 2020比2019的数据少了25513条记录
- 具体说明见 #56
表结构
CREATE TABLE `cnarea_2023`
(
`id` mediumint(7) unsigned NOT NULL AUTO_INCREMENT,
`level` tinyint(1) unsigned NOT NULL COMMENT '层级',
`parent_code` bigint(14) unsigned NOT NULL DEFAULT '0' COMMENT '父级行政代码',
`area_code` bigint(14) unsigned NOT NULL DEFAULT '0' COMMENT '行政代码',
`zip_code` mediumint(6) unsigned zerofill NOT NULL DEFAULT '000000' COMMENT '邮政编码',
`city_code` char(6) NOT NULL DEFAULT '' COMMENT '区号',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '名称',
`short_name` varchar(50) NOT NULL DEFAULT '' COMMENT '简称',
`merger_name` varchar(50) NOT NULL DEFAULT '' COMMENT '组合名',
`pinyin` varchar(30) NOT NULL DEFAULT '' COMMENT '拼音',
`lng` decimal(10, 6) NOT NULL DEFAULT '0.000000' COMMENT '经度',
`lat` decimal(10, 6) NOT NULL DEFAULT '0.000000' COMMENT '纬度',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_code` (`area_code`) USING BTREE,
KEY `idx_parent_code` (`parent_code`) USING BTREE
) ENGINE = MyISAM
DEFAULT CHARSET = utf8 COMMENT ='中国行政地区表';
最快的导入方式
mysql -h127.0.0.1 -uroot -proot -D your_db < /Users/owen/Downloads/cnarea_2023.sql
Explore related projects
Asabeneh/30-Days-Of-Python
The 30 Days of Python programming challenge is a step-by-step guide to learn the Python programming language in 30 days. This challenge may take more than 100 days. Follow your own pace. These videos may help too: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,618 starsgrafana/grafana
The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
77,859 starsredis/redis
For developers, who are building real-time data-driven applications, Redis is the preferred, fastest, and most feature-rich cache, data structure server, and document and vector query engine.
77,472 starsapache/superset
Apache Superset is a Data Visualization and Data Exploration Platform
75,495 stars