PHPackages                             kblais/france-cities-seeds - 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. kblais/france-cities-seeds

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

kblais/france-cities-seeds
==========================

Extract the tree structure of French metropolitan regions, departments and cities from www.data.gouv.fr CSV

1.0.0(9y ago)12.9k1MITPHPPHP &gt;=5.4

Since Aug 24Pushed 9y ago1 watchersCompare

[ Source](https://github.com/kblais/france-cities-seeds)[ Packagist](https://packagist.org/packages/kblais/france-cities-seeds)[ Docs](https://github.com/kblais/france-cities-seeds)[ RSS](/packages/kblais-france-cities-seeds/feed)WikiDiscussions master Synced 2mo ago

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

France cities seeds
===================

[](#france-cities-seeds)

This package extracts the tree structure of French metropolitan regions, departments and cities from the CSV file provided by [www.data.gouv.fr](http://www.data.gouv.fr/fr/datasets/decoupage-administratif-communal-francais-issu-d-openstreetmap/).

Usage
-----

[](#usage)

Place the extracted CSV file (available at this address : [www.data.gouv.fr/fr/datasets/decoupage-administratif-communal-francais-issu-d-openstreetmap/](http://www.data.gouv.fr/fr/datasets/decoupage-administratif-communal-francais-issu-d-openstreetmap/)) in the folder you need, and use the `extractFromFile($filepath)` function to extract data :

```
$regions = Kblais\FranceCitiesSeeds\extractFromFile('/path/to/csv/file.csv');
```

Output extract
--------------

[](#output-extract)

```
[
    11 => [
        "name" => "ILE-DE-FRANCE",
        "code" => "11",
        "departments" => [
            78 => [
                "name" => "YVELINES",
                "code" => "78",
                "cities" => [
                    78165 => [
                        "insee_code" => "78165",
                        "name" => "Les Clayes-sous-Bois",
                        "surface" => "6111331.000000000000000",
                        "lat" => "1.983682382432120",
                        "lon" => "48.818793614296297",
                        "status" => "Commune simple",
                        "population" => "17.5",
                        "canton_code" => "38",
                        "district_code" => "4",
                    ],
                    78674 => [
                        "insee_code" => "78674",
                        "name" => "Villepreux",
                        "surface" => "10446819.000000000000000",
                        "lat" => "2.012416565085020",
                        "lon" => "48.831123160333597",
                        "status" => "Commune simple",
                        "population" => "9.9",
                        "canton_code" => "22",
                        "district_code" => "3",
                    ],
                    ...
                ],
            ],
            ...
        ],
    ],
    ...
]
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

3548d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/97939cae40692a836e7ebb41802ae630abfb5d3b680e01cd9e41eb262c33e78d?d=identicon)[kblais](/maintainers/kblais)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/kblais-france-cities-seeds/health.svg)

```
[![Health](https://phpackages.com/badges/kblais-france-cities-seeds/health.svg)](https://phpackages.com/packages/kblais-france-cities-seeds)
```

###  Alternatives

[mwdelaney/sage-fonts-preload

Automatically preload fonts from the Sage mix manifest

188.3k](/packages/mwdelaney-sage-fonts-preload)

PHPackages © 2026

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