Giter VIP home page Giter VIP logo

areajson_cn's Introduction

AreaJson_CN

(已更新2020年数据,切换不同分支以获取不同年份数据)

最新**省市区县乡镇 5 级行政区划代码

index_2020_level_3.json:全国省市区 3 级 6 位行政区划代码

index_2020_level_5.json:全国省市区县乡镇 5 级 12 位行政区划代码

province 文件夹是全国各省行政区划代码(文件名开头的两位数为各省行政区划代码前两位)

province/level_3 为各省 3 级 6 位行政区划代码
province/ level_5 为各省 5 级 12 位行政区划代码

数据来源:国家统计局

getArea.py 为简易的爬虫脚本,需要修改爬取内容的见脚本说明

脚本说明:

# config #

year = '2012'       # 年份,目前国家统计局官网有2009-2019年的数据
level = 3           # 可选:3|5   获取的层级 3层为省-市-区  最多5级省-市-区-县(街道)-乡镇(居委会)
digit = 6           # 可选:6|12  行政区划代码位数  层级为3级时通常使用6位代码 如110000,层级为5级时使用12位代码 如 110000000000
head_url = "index"  # 可选:index|各省行政区划前两位  要从哪开始获取 index为全国所有省份  要获取单独的省份修改为省行政区划的前两位

# config #

按照注释修改 config 中的内容再运行脚本可以获取自己想要的结果

最新**省市区县 geoJSON 格式地图数据的点这里

areajson_cn's People

Contributors

lyhmyd1211 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.