Package Exports
- zoningjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (zoningjs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
zoning
中华人民共和国行政区划:省级、地级、县级、乡级和村级
- GitHub: https://github.com/netnr/zoning
- Gitee: https://gitee.com/netnr/zoning
- Demo: https://ss.netnr.com/zoning
变更日志
来源
- 国家统计局 - 统计用区划和城乡划分代码
- http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/
- 统计数据截止2018-10-31 于 2019-01-31发布
- http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/2018
使用
- 打开页面 http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm
- 打开浏览器控制台(推荐Chrome、Firefox,请不要用IE系列,谢谢)
- 拷贝脚本
zoning.js
的内容粘贴到控制台运行 - 首次抓取会出现大量失败请求,再次抓取会从浏览器缓存获取,非常快
- Chrome比较快,会出现几个链接抓取失败
- Firefox比较稳定,抓取有保障,内存占用高(推荐,测试版本:61.0.2 64-bit)
build.html
用于导出的JSON
文件生成SQLite
和CSV
CSV
导出编码为utf-8
,Excel打开中文会乱码,需要转换编码为ANSI
或指定BOM
发布
- 支持的格式有:
JSON
文件、SQLite
数据库、CSV
文件、SQL
脚本 zoning-*.json
所有数据,zoning-*.db
SQLite数据库,zoning-*.csv
CSV文件,zoning-*.sql
SQL脚本dist/zoning-5
五级dist/zoning-4
四级dist/zoning-3
三级
- npm,
npm install zoningjs
,https://unpkg.com/zoningjs/