kblais/france-cities-seeds
Composer 安装命令:
composer require kblais/france-cities-seeds
包简介
Extract the tree structure of French metropolitan regions, departments and cities from www.data.gouv.fr CSV
README 文档
README
This package extracts the tree structure of French metropolitan regions, departments and cities from the CSV file provided by www.data.gouv.fr.
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 :
$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",
],
...
],
],
...
],
],
...
]
统计信息
- 总下载量: 2.94k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-08-24