All Projects → basecss → City

basecss / City

Licence: mit
国家行政区划分数据

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to City

node-red-contrib-FIWARE official
FIWARE-Node-Red integration supporting NGSI-LD
Stars: ✭ 14 (-95.09%)
Mutual labels:  city
google streetview
A command line tool and module for Google Street View Image API
Stars: ✭ 77 (-72.98%)
Mutual labels:  city
icity
Get the tools for the city where your phone number is located
Stars: ✭ 47 (-83.51%)
Mutual labels:  city
Forms
Tracking our progress moving all city paper and pdf forms online.
Stars: ✭ 14 (-95.09%)
Mutual labels:  city
magento2-regions-manager
Manage regions in magento2 addresses, regions manager in magento 2
Stars: ✭ 34 (-88.07%)
Mutual labels:  city
311
New web portal for BOS:311
Stars: ✭ 15 (-94.74%)
Mutual labels:  city
ip2location-nginx
Nginx module that allows user to lookup for geolocation information using IP2Location database.
Stars: ✭ 33 (-88.42%)
Mutual labels:  city
Citypicker
🔥🔥🔥城市选择、定位、搜索及右侧字母导航,类似美团 百度糯米 饿了么等APP选择城市功能
Stars: ✭ 2,973 (+943.16%)
Mutual labels:  city
IP2Location-PHP-Module
This module is a PHP module that enables the user to find the country, region, city, coordinates, zip code, ISP, domain name, timezone, connection speed, IDD code, area code, weather station code, weather station name, mobile, usage types, address type, IAB category, etc that any IP address or host name originates from.
Stars: ✭ 154 (-45.96%)
Mutual labels:  city
jqIpLocation
jqIpLocation – jQuery Plugin that returns the location of an IP address in JSON format
Stars: ✭ 18 (-93.68%)
Mutual labels:  city
React-Pincode
A NPM module which auto fills City, District and State fields when a valid Zip Code in entered!
Stars: ✭ 26 (-90.88%)
Mutual labels:  city
citylines
Citylines.co is a collaborative platform for mapping the transit systems of the world!
Stars: ✭ 53 (-81.4%)
Mutual labels:  city
local-government-design-systems
A repo of local government design systems & pattern libraries. Specifically for municipal (local) & sub-state governments
Stars: ✭ 24 (-91.58%)
Mutual labels:  city
PSCityPickerView
城市选择器,可以选择国内所有的城市和地区
Stars: ✭ 47 (-83.51%)
Mutual labels:  city
zoning
中华人民共和国行政区划:省级(省份直辖市自治区)、 地级(城市)、 县级(区县)、 乡级(乡镇街道)、 村级(村委会居委会)
Stars: ✭ 110 (-61.4%)
Mutual labels:  city
IP2Location-C-Library
IP2Location C library enables the user to find the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather station code, weather station name, mobile, usage types, etc that any IP address or hostname originates from.
Stars: ✭ 37 (-87.02%)
Mutual labels:  city
Oppidums
Oppidums is open source app that provide cultural, historical and touristic information on different cities.
Stars: ✭ 18 (-93.68%)
Mutual labels:  city
Citypicker
citypicker城市选择器,详细的省市区地址信息,支持仿iOS滚轮实现,仿京东样式,一级或者三级列表展示方式。
Stars: ✭ 3,057 (+972.63%)
Mutual labels:  city
city-tour
A procedurally generated city built with WebGL and three.js
Stars: ✭ 57 (-80%)
Mutual labels:  city
arboles
Mapa de Arbolado Urbano
Stars: ✭ 13 (-95.44%)
Mutual labels:  city

city

一款用于生成行政区划联动数据的小工具,如

[{
    "name":"北京市",
    "children":[{
        "name":"东城区"
    },{
        "name":"西城区"
    }]
},{
    "name":"天津市",
    "children":[{
        "name":"和平区"
    }]
}]

特色

  • 数据权威,来自国家统计局,每年更新
  • 自由选择是否包含海外国家列表数据(来自维基百科)
  • 自由选择生成一级(省)、二级(省市)、三级(省市县)数据
  • 可自定义数据对象键名(key)
  • 支持输出JSON、原生js文件、AMD/CMD规范js文件
  • 支持输出压缩后的代码及格式化后的代码
  • 支持输出地区代码(身份证前6位)
  • 支持拼音输出
  • 支持自定义去除 省|市|区|地区|县 等后缀

使用方法

使用npm安装

npm install -g city

使用:

city

支持参数:

  • -V --version 输出版本号
  • -h --help 输出菜单
  • -l --level level 输出指定级别行政区数据,取值1-3
  • -k --key name,children,code 自定义输出格式中的对象键名(必须包含三个值)
  • -o --output fileName 输出文件路径
  • -j --js varibleName 以指定变量名输出js文件(配合--output选项写入文件)
  • -a --amd 以AMD规范输出js文件
  • -m --cmd 以CMD规范输出js文件
  • -p --pretty 格式化输出
  • -s --overseas 包含海外地区
  • -c --code 包含地区编码(身份证前6位)
  • -u --update 重新抓取原始数据
  • -y --pinyin 输出pinyin
  • -i --ignore '省|市|区|地区|县' 忽略 省|市|区|地区|县
  • -k --key name,children,code,pinyin 导出的键名(顺序不能改变,例如n,s,c,p)
  • -f --flat 'parentId' 扁平化输出,可以指定parentId参数名称
  •  `--closed` 地区树结点默认为关闭状态
    
  •  `--father` 转出指定父节点的所有子节点,不含父节点
    
  • -r --reserve 转出以子节点为根的树,便于倒查父节点

示例:

  1. 嵌套方式列出所有地区,name改为n,children改为s,code改为c,并带上地区编码
city -k n,s,c -o ./area.json -c
  1. 平面方式列出所有地区,name改为n,children改为s,code改为c,parentId为p,并带上地区编码
city -k n,s,c -o ./flat-area.json -c -f p
  1. 倒树方式列出所有地区,子地区的code为key,val为父地区的{code:code, name:name};
city -k n,s,c -o ./reverse-area.js -j reverse_area -r

Todo

Changelog

2020.06.12

  • 更新内置 citydata.json 数据
  • 移除 市辖区 数据项
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].