https://github.com/open-data-plan/gbt2260
🇨🇳中华人民共和国国家标准 GB/T 2260 行政区划代码
https://github.com/open-data-plan/gbt2260
Last synced: 27 days ago
JSON representation
🇨🇳中华人民共和国国家标准 GB/T 2260 行政区划代码
- Host: GitHub
- URL: https://github.com/open-data-plan/gbt2260
- Owner: open-data-plan
- License: mit
- Created: 2019-03-11T02:39:26.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-20T14:41:08.000Z (8 months ago)
- Last Synced: 2025-04-05T21:04:30.757Z (about 2 months ago)
- Language: TypeScript
- Homepage:
- Size: 2.84 MB
- Stars: 11
- Watchers: 1
- Forks: 3
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GBT2260
[](http://www.gb688.cn/bzgk/gb/newGbInfo?hcno=C9C488FD717AFDCD52157F41C3302C6D)
[](https://www.npmjs.com/package/@opd/gbt2260)
[](https://www.npmjs.com/package/@opd/gbt2260)
[](https://github.com/open-data-plan/gbt2260/blob/master/LICENSE)
[](https://travis-ci.org/open-data-plan/gbt2260)
[](http://standardjs.com/)
[](https://coveralls.io/github/open-data-plan/gbt2260?branch=master)
[](https://snyk.io/test/github/open-data-plan/gbt2260?targetFile=package.json)> latest Chinese administrative divisions from [`MCA`](https://www.mca.gov.cn/n156/n2679/index.html), and based on [`gb2260`](https://github.com/cn/GB2260.js)
## Install
```bash
npm i @opd/gbt2260
```## Use
```js
const gbt2260 = require('@opd/gbt2260')
```### API
- `gbt2260.provinces()`: 获取省级行政区划
- `gbt2260.prefectures()`: 获取市级行政区划,若为直辖市,则返回辖区
- `gbt2260.counties()`: 获取县级行政区划## Crawl Data
```bash
npm run generate
```### Difference with [`gb2260`](https://github.com/cn/GB2260.js)
1. `gb2260` looks like a dead project, no one in maintain
2. rewrite `prefectures()`