PHPackages                             madnh/hanhchinhvn - 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. madnh/hanhchinhvn

ActiveLibrary

madnh/hanhchinhvn
=================

Phân cấp hành chính Việt Nam

v1.6.0(3y ago)404286↓100%320[1 PRs](https://github.com/madnh/hanhchinhvn/pulls)MITPHPCI failing

Since Mar 6Pushed 2y ago20 watchersCompare

[ Source](https://github.com/madnh/hanhchinhvn)[ Packagist](https://packagist.org/packages/madnh/hanhchinhvn)[ RSS](/packages/madnh-hanhchinhvn/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (7)Dependencies (3)Versions (9)Used By (0)

Phân cấp hành chính Việt Nam
============================

[](#phân-cấp-hành-chính-việt-nam)

Phân cấp hành chính Việt Nam export từ nguồn Tổng Cục Thống Kê.

Cài đặt:
--------

[](#cài-đặt)

### NPM:

[](#npm)

```
npm install hanhchinhvn
```

### Cấu trúc thư mục:

[](#cấu-trúc-thư-mục)

- **excel\_files/**: thư mục chứa các file excel lấy từ Tổng Cục Thống Kê
- **dist/**: thư mục chứa các file đã được trích xuất dạng json
- `export.php`: export file json từ file excel
- `include.php`: thư viện chung

### Thư mục `dist/`

[](#thư-mục-dist)

- `tinh_tp.json`: thông tin về các tỉnh, thành phố
- `quan_huyen.json`: thông tin về các quận, huyện, thị xã, thành phố trực thuộc tỉnh
- `xa_phuong.json`: thông tin về các xã, phường, thị trấn
- `tree.json`: cấu trúc hành chính dạng cây thư mục
- **quan\_huyen/**: thư mục chứa các file json là thông tin các quận, huyện, thị xã, thành phố trực thuộc của một tỉnh. Tên file là mã của tỉnh. Dùng để truy vấn ở client. Ví dụ: `quan_huyen/92.json` là thông tin các quận, huyện,... của tỉnh có mã **92**.
- **xa\_phuong/**: thư mục chứa các file json là thông tin các xã, phường, thị trấn của một quận, huyện,.... Tên file là mã của quận, huyện, thị xã hoặc thành phố trực thuộc tỉnh. Dùng để truy vấn ở client. Ví dụ: `xa_phuong/92.json` là thông tin các xã, phường,... của quận/huyện có mã **92**.

### Nguồn dữ liệu

[](#nguồn-dữ-liệu)

**Tổng Cục Thống Kê**:

### Changelog

[](#changelog)

Tham khảo file [changelog.md](./changelog.md) để biết lịch sử thay đổi.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community25

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 69.2% 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 ~370 days

Recently: every ~500 days

Total

7

Last Release

1130d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8559855?v=4)[Đỗ Danh Mạnh](/maintainers/madnh)[@madnh](https://github.com/madnh)

---

Top Contributors

[![madnh](https://avatars.githubusercontent.com/u/8559855?v=4)](https://github.com/madnh "madnh (18 commits)")[![manh-gntvn](https://avatars.githubusercontent.com/u/47617295?v=4)](https://github.com/manh-gntvn "manh-gntvn (5 commits)")[![anhskohbo](https://avatars.githubusercontent.com/u/1529454?v=4)](https://github.com/anhskohbo "anhskohbo (2 commits)")[![nvtienanh](https://avatars.githubusercontent.com/u/21037387?v=4)](https://github.com/nvtienanh "nvtienanh (1 commits)")

---

Tags

jsonphpvietnam

### Embed Badge

![Health badge](/badges/madnh-hanhchinhvn/health.svg)

```
[![Health](https://phpackages.com/badges/madnh-hanhchinhvn/health.svg)](https://phpackages.com/packages/madnh-hanhchinhvn)
```

PHPackages © 2026

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