Coder Social home page Coder Social logo

cuitymiko / administrative-divisions-of-china Goto Github PK

View Code? Open in Web Editor NEW

This project forked from artiely/administrative-divisions-of-china

0.0 1.0 0.0 3.77 MB

**行政区划数据:省份、城市、区县、乡镇,省市区镇三级四级联动。

JavaScript 100.00%

administrative-divisions-of-china's Introduction

Administrative-divisions-of-China

js-standard-style Deps npm npm GitHub license

中华人民共和国行政区划:省份、城市、区县、乡镇(街道)

JSON

文件列表 下载地址
省份数据 provinces.json
城市数据 cities.json
区县数据 areas.json
乡镇(街道)数据 streets.json
“省份、城市” 二级联动数据 address2.json
“省份、城市、区县” 三级联动数据 address3.json
“省份、城市、区县、乡镇” 四级联动数据 address4.json

Usage

抓取并导出最新数据

$ npm install

$ node output.js

preview

提示:

由于抓取乡镇数据为异步操作,每次输出的乡镇数据顺序可能不同

但是不会影响其它数据的顺序以及所有数据的完整性。

TEST

$ npm test

> mocha -t 5000

  中华人民共和国行政区划:
    ✓ 省份数据
    ✓ 城市数据
    ✓ 区县数据
    ✓ 乡镇数据
    ✓ “省份、城市” 二级联动数据
    ✓ “省份、城市、区县” 三级联动数据
    ✓ “省份、城市、区县、乡镇” 四级联动数据
    ✓ “某省、某市、某县、某镇” 不存在

  8 passing (12ms)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

this repo is released under the MIT License.

administrative-divisions-of-china's People

Contributors

modood avatar

Watchers

 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.