PHPackages                             ngankt2/vn-location - 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. ngankt2/vn-location

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

ngankt2/vn-location
===================

Tỉnh thành phường xã của Việt Nam (2 cấp), cập nhật theo thông tin mới từ ngày 01/07/2025

v5.0.4(2mo ago)01.8k—5.1%MITPHPPHP ^8.3

Since Jul 1Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/ngankt2/vn-location)[ Packagist](https://packagist.org/packages/ngankt2/vn-location)[ RSS](/packages/ngankt2-vn-location/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (26)Used By (0)

Vietnamese Administrative Units Dataset (Updated July 2025)
===========================================================

[](#vietnamese-administrative-units-dataset-updated-july-2025)

This repository provides a comprehensive dataset of Vietnamese administrative units, updated to reflect the administrative restructuring effective from July 1, 2025. The dataset includes:

- **List of 34 provinces and centrally governed cities** with their official state-standard names and codes.
- **List of 3,321 commune-level administrative units** (communes, wards, and special zones).
- **Data formats**: SQL, CSV, and JSON.

The data is sourced from official announcements by the Vietnamese government, including Resolution No. 60-NQ/TW and Decision No. 759/QD-TTg, and is aligned with the two-tier local government model (provincial and commune levels) effective from July 1, 2025.

Dataset Structure
-----------------

[](#dataset-structure)

### Provinces

[](#provinces)

- **Table Name**: `vn_locations`
- **Fields**:
    - `id`: Unique identifier (auto-increment).
    - `name`: Official name of the province/city (e.g., Hà Nội).
    - `full_name`: Full name with diacritics (e.g., Thành phố Hà Nội).
    - `code`: Official two-digit code (e.g., 01 for Hà Nội).
    - `level`: Type of administrative unit (e.g., province, city).
    - `parent_code`: Not applicable for provinces (set to NULL).

### Communes

[](#communes)

- **Table Name**: `vn_locations` (same table, differentiated by `type` and `parent_code`)
- **Fields**:
    - `id`: Unique identifier (auto-increment).
    - `name`: Name of the commune/ward (e.g., Trung Yên).
    - `full_name`: Full name with diacritics (e.g., Xã Trung Yên).
    - `code`: Unique code for the commune/ward.
    - `level`: Type of unit (commune, ward, special\_zone).
    - `parent_code`: Code of the parent province/city.

Usage
-----

[](#usage)

**COMPOSER**: `composer require ngankt2/vn-location`

**SQL**:

- Execute `vn_locations.sql` in your database (e.g., MySQL, PostgreSQL) to create the table and import data.
- Example: ```
    mysql -u username -p database_name plugin(FilamentVnLocationPlugins::make())
 ```

```

License
-------

[](#license)

This dataset is provided under the MIT License. Feel free to use, modify, and distribute it for non-commercial and commercial purposes, with attribution to this repository.

Contributing
------------

[](#contributing)

Contributions are welcome! Please submit a pull request with updates or corrections to the dataset.

Contact
-------

[](#contact)

For questions or feedback, please open an issue on this repository.

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance89

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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 ~9 days

Total

25

Last Release

87d ago

Major Versions

v1.4.1 → v4.0.02025-08-25

v4.1.2 → v5.0.02026-01-20

PHP version history (2 changes)v1.0.0PHP ^8.2

v5.0.1PHP ^8.3

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/ngankt2-vn-location/health.svg)

```
[![Health](https://phpackages.com/badges/ngankt2-vn-location/health.svg)](https://phpackages.com/packages/ngankt2-vn-location)
```

###  Alternatives

[naxeem/thaana-transliterator

Thaana transliterator

202.5k](/packages/naxeem-thaana-transliterator)

PHPackages © 2026

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