PHPackages                             red-jasmine/region - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. red-jasmine/region

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

red-jasmine/region
==================

region

v1.0.0(2y ago)485561MITPHP

Since Aug 21Pushed 1y agoCompare

[ Source](https://github.com/red-jasmine/region)[ Packagist](https://packagist.org/packages/red-jasmine/region)[ Docs](https://github.com/red-jasmine/region)[ RSS](/packages/red-jasmine-region/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (4)Versions (3)Used By (1)

Region
======

[](#region)

中华人民共和国行政区划（五级）：省级、地级、县级、乡级和村级

> \[Gitee\]

> \[GitHub\]

数据来源
----

[](#数据来源)

- 国家统计局
    - [数据源 - https://www.stats.gov.cn/sj/tjbz/tjyqhdmhcxhfdm/2023/index.html](https://www.stats.gov.cn/sj/tjbz/tjyqhdmhcxhfdm/2023/index.html)
    - [数据源 - https://www.mca.gov.cn/mzsj/xzqh/2022/202201xzqh.html](https://www.mca.gov.cn/mzsj/xzqh/2022/202201xzqh.html)
    - [编码规范 - http://www.stats.gov.cn/sj/tjbz/gjtjbz/202302/t20230213\_1902741.html](http://www.stats.gov.cn/sj/tjbz/gjtjbz/202302/t20230213_1902741.html)

> 2023年度全国统计用区划代码和城乡划分代码更新维护的标准时点调整为2023年6月30日。未包括我国台湾省、香港特别行政区和澳门特别行政区

城市等级
----

[](#城市等级)

级别Level国家0省、直辖市、自治区、特别行政区1地级市、地区、自治州、盟2县、县级市、区 、旗3乡镇街道4村、社区 、苏木5数据下载
----

[](#数据下载)

数据SQL省市区 三级[regions\_level3.sql](https://github.com/red-jasmine/region/releases)省市区+乡镇街道 四级[regions\_level4.sql](https://github.com/red-jasmine/region/releases)省市区+乡镇街道 +社区、村 五级[regions\_level5.sql](https://github.com/red-jasmine/region/releases)### 数据表

[](#数据表)

```
# 数据表
CREATE TABLE `regions` (
  `id` bigint unsigned NOT NULL,
  `parent_id` bigint unsigned NOT NULL COMMENT '父级ID',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '名称',
  `pinyin` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '拼音',
  `pinyin_prefix` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '首字母',
  `level` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '等级',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB  COMMENT='行政区划表';
```

laravel
-------

[](#laravel)

安装
--

[](#安装)

Via Composer

```
$ composer require red-jasmine/region
```

Usage
-----

[](#usage)

### Command

[](#command)

```
# 爬取数据
php artisan regions:crawl-data
# 优化数据
php artisan regions:optimize
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~420 days

Total

2

Last Release

625d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/aaaa10537dd96827181cb5ff0c4df6078f48054457d9ebaebe0b230829482843?d=identicon)[liushoukun](/maintainers/liushoukun)

---

Top Contributors

[![liushoukun](https://avatars.githubusercontent.com/u/26298472?v=4)](https://github.com/liushoukun "liushoukun (4 commits)")

---

Tags

addresseschina-divisionscitydistrictprovinceprovinces-of-chinaregionslaravelregion

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/red-jasmine-region/health.svg)

```
[![Health](https://phpackages.com/badges/red-jasmine-region/health.svg)](https://phpackages.com/packages/red-jasmine-region)
```

###  Alternatives

[stephenjude/filament-blog

Filament Blog Builder

20619.4k](/packages/stephenjude-filament-blog)[datomatic/nova-detached-actions

A Laravel Nova tool to allow for placing actions in the Nova toolbar detached from the checkbox selection mechanism.

11273.0k](/packages/datomatic-nova-detached-actions)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
