2017 © Pedro Peláez
 

library france-cities-seeds

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

image

kblais/france-cities-seeds

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

  • Wednesday, August 24, 2016
  • by kblais
  • Repository
  • 1 Watchers
  • 1 Stars
  • 1,597 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 2 % Grown

The README.md

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., (*1)

Usage

Place the extracted CSV file (available at this address : 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 :, (*2)

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

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",
                    ],
                    ...
                ],
            ],
            ...
        ],
    ],
    ...
]

The Versions

24/08 2016

dev-master

9999999-dev https://github.com/kblais/france-cities-seeds

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

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Killian Blais

24/08 2016

1.0.0

1.0.0.0 https://github.com/kblais/france-cities-seeds

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

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Killian Blais