PHPackages                             burnbright/silverstripe-regionaldata - 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. burnbright/silverstripe-regionaldata

ActiveSilverstripe-module[Utility &amp; Helpers](/categories/utility)

burnbright/silverstripe-regionaldata
====================================

Provides country and country subdivision datamodels, along with data.

0.3.1(5y ago)53464[3 issues](https://github.com/burnbright/silverstripe-regionaldata/issues)1BSD-2-ClausePHPPHP &gt;=5.3.2CI failing

Since Jul 16Pushed 5y ago1 watchersCompare

[ Source](https://github.com/burnbright/silverstripe-regionaldata)[ Packagist](https://packagist.org/packages/burnbright/silverstripe-regionaldata)[ RSS](/packages/burnbright-silverstripe-regionaldata/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (1)

Regional Data Module
====================

[](#regional-data-module)

Provides reusable models, data, and fields for hierarichal geographical region classification of countries, and their subdivisons. The module should help to close the gap between known data, and arbitrary (possibly invalid) data entered by visitors.

A strong focus has been put on following the [ISO 3166 standard](http://en.wikipedia.org/wiki/ISO_3166).

This module is not intended to replace zend\_locale.

Installation
------------

[](#installation)

- Unzip to your silverstripe root / regionaldata.
- Visit yoursite.tld/dev/tasks/LoadRegionalData

You should now be able to see countries and subdivisions in yoursite.tld/admin/regions

Possible Uses
-------------

[](#possible-uses)

- Auto-completion country and state fields
- Drop-down fields for entering valid data
- Connect with other models for regionalisation
- Addressing systems

Javascript Field Updater
------------------------

[](#javascript-field-updater)

Require the following script to templates / forms which have Country and State fields: `regionaldata/javascript/updater.jquery.js`

If you are using the shop module, a good place to include this is in an extension of `Address`:

```
function updateFormFields(FieldList $fields, $nameprefix = ""){
    Requirements::javascript('regionaldata/javascript/updater.jquery.js');
}

```

Provided Data Set
-----------------

[](#provided-data-set)

[2nd level subdivisons](http://en.wikipedia.org/wiki/Administrative_division) have different names, eg: area, district, parish, county.

Most data has been sourced from [commondatahub.com](http://www.commondatahub.com/live).

In the provided dataset, some countries have multiple types of subregion. There aer about 100 different subregions all toegether. In one case (United Kingdom), 11 types of sub region are present. This results in a very confusing 'Region/State' dropdown.You will probably not want to make every type available to users, so some cleanup will be needed.

This query will identify every type of sub region:

```
	SELECT DISTINCT `Type`
	FROM `CountrySubdivison` WHERE 1
	ORDER BY `Type`

```

Running this query will show the countries with multiple subregion types:

```
	SELECT *, COUNT(DISTINCT `Type`) as `Types`
	FROM `CountrySubdivison`
	GROUP BY `CountryID`
	HAVING `Types` > 1
	ORDER BY `Types` DESC

```

Future TODO / Ideas
-------------------

[](#future-todo--ideas)

- Write a SQL query to clean up data set
- Store address formats. Some countries don't require all address fields, others do.
- Translation of names
- 3rd-level post/zip code storage model

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance8

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.7% 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 ~1118 days

Total

3

Last Release

2081d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1356335?v=4)[Jeremy Shipman](/maintainers/jedateach)[@jedateach](https://github.com/jedateach)

---

Top Contributors

[![jedateach](https://avatars.githubusercontent.com/u/1356335?v=4)](https://github.com/jedateach "jedateach (22 commits)")[![spekulatius](https://avatars.githubusercontent.com/u/8433587?v=4)](https://github.com/spekulatius "spekulatius (1 commits)")[![ToddHossack](https://avatars.githubusercontent.com/u/1192292?v=4)](https://github.com/ToddHossack "ToddHossack (1 commits)")

---

Tags

addressdatasilverstripecountriesstateregionprovince

### Embed Badge

![Health badge](/badges/burnbright-silverstripe-regionaldata/health.svg)

```
[![Health](https://phpackages.com/badges/burnbright-silverstripe-regionaldata/health.svg)](https://phpackages.com/packages/burnbright-silverstripe-regionaldata)
```

###  Alternatives

[dougsisk/laravel-country-state

Country &amp; state helper for Laravel.

1681.7M](/packages/dougsisk-laravel-country-state)[dipeshsukhia/laravel-country-state-city-data

Country State City Data Provider

8230.8k](/packages/dipeshsukhia-laravel-country-state-city-data)[symbiote/silverstripe-datachange-tracker

Record and track changes to any dataobjects. View chages/diffs in model admin.

1622.7k3](/packages/symbiote-silverstripe-datachange-tracker)

PHPackages © 2026

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