initialisation

This commit is contained in:
Simon 2023-02-04 00:02:12 +01:00
commit 471b194408
10 changed files with 77040 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
resources
.hugo_build.lock

6
archetypes/default.md Normal file
View File

@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

3
config.toml Normal file
View File

@ -0,0 +1,3 @@
baseURL = 'http://example.org/'
languageCode = 'en-us'
title = 'My New Hugo Site'

55
layouts/index.html Normal file
View File

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<base target="_top">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Quick Start - Leaflet</title>
<link rel="shortcut icon" type="image/x-icon" href="docs/images/favicon.ico" />
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.1/dist/leaflet.css" integrity="sha256-sA+zWATbFveLLNqWO2gtiw3HL/lh1giY/Inf1BJ0z14=" crossorigin=""/>
<link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.4.1/dist/MarkerCluster.css" crossorigin=""/>
<link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.4.1/dist/MarkerCluster.Default.css" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.9.1/dist/leaflet.js" integrity="sha256-NDI0K41gVbWqfkkaHj15IzU7PtMoelkzyKp8TOaFQ3s=" crossorigin=""></script>
<script src="https://unpkg.com/leaflet.markercluster@1.4.1/dist/leaflet.markercluster.js" crossorigin=""></script>
<script src="./leaflet.permalink.js"></script>
<style>
html, body {
height: 100%;
margin: 0;
}
</style>
</head>
<body>
<div id="map" style="width: 100%; height: 100%;"></div>
<script>
var mappos = L.Permalink.getMapLocation();
var map = L.map('map').setView(mappos.center || [46.55886, 3.21924], mappos.zoom || 6);
L.Permalink.setup(map);
var tiles = L.tileLayer('https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png', {
maxZoom: 19,
subdomains: 'abcd',
attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
}).addTo(map);
var json = fetch('./finess-small.json').then(response => {
return response.json();
})
.then(jsondata => {
var markersCluster = new L.MarkerClusterGroup();
for (const msp of jsondata) {
const marker = L.marker([msp[5], msp[6]]).bindPopup(msp[0] + "(" + msp[2] + ")<br><a href='tel:" + msp[3] + "'>" + msp[3] + "</a>");
markersCluster.addLayer(marker);
}
map.addLayer(markersCluster);
});
</script>
</body>
</html>

37602
static/commune_2022.csv Normal file

File diff suppressed because it is too large Load Diff

102
static/departement_2022.csv Normal file
View File

@ -0,0 +1,102 @@
DEP,REG,CHEFLIEU,TNCC,NCC,NCCENR,LIBELLE
01,84,01053,5,AIN,Ain,Ain
02,32,02408,5,AISNE,Aisne,Aisne
03,84,03190,5,ALLIER,Allier,Allier
04,93,04070,4,ALPES DE HAUTE PROVENCE,Alpes-de-Haute-Provence,Alpes-de-Haute-Provence
05,93,05061,4,HAUTES ALPES,Hautes-Alpes,Hautes-Alpes
06,93,06088,4,ALPES MARITIMES,Alpes-Maritimes,Alpes-Maritimes
07,84,07186,5,ARDECHE,Ardèche,Ardèche
08,44,08105,4,ARDENNES,Ardennes,Ardennes
09,76,09122,5,ARIEGE,Ariège,Ariège
10,44,10387,5,AUBE,Aube,Aube
11,76,11069,5,AUDE,Aude,Aude
12,76,12202,5,AVEYRON,Aveyron,Aveyron
13,93,13055,4,BOUCHES DU RHONE,Bouches-du-Rhône,Bouches-du-Rhône
14,28,14118,2,CALVADOS,Calvados,Calvados
15,84,15014,2,CANTAL,Cantal,Cantal
16,75,16015,3,CHARENTE,Charente,Charente
17,75,17300,3,CHARENTE MARITIME,Charente-Maritime,Charente-Maritime
18,24,18033,2,CHER,Cher,Cher
19,75,19272,3,CORREZE,Corrèze,Corrèze
21,27,21231,3,COTE D OR,Côte-d'Or,Côte-d'Or
22,53,22278,4,COTES D ARMOR,Côtes-d'Armor,Côtes-d'Armor
23,75,23096,3,CREUSE,Creuse,Creuse
24,75,24322,3,DORDOGNE,Dordogne,Dordogne
25,27,25056,2,DOUBS,Doubs,Doubs
26,84,26362,3,DROME,Drôme,Drôme
27,28,27229,5,EURE,Eure,Eure
28,24,28085,1,EURE ET LOIR,Eure-et-Loir,Eure-et-Loir
29,53,29232,2,FINISTERE,Finistère,Finistère
2A,94,2A004,3,CORSE DU SUD,Corse-du-Sud,Corse-du-Sud
2B,94,2B033,3,HAUTE CORSE,Haute-Corse,Haute-Corse
30,76,30189,2,GARD,Gard,Gard
31,76,31555,3,HAUTE GARONNE,Haute-Garonne,Haute-Garonne
32,76,32013,2,GERS,Gers,Gers
33,75,33063,3,GIRONDE,Gironde,Gironde
34,76,34172,5,HERAULT,Hérault,Hérault
35,53,35238,1,ILLE ET VILAINE,Ille-et-Vilaine,Ille-et-Vilaine
36,24,36044,5,INDRE,Indre,Indre
37,24,37261,1,INDRE ET LOIRE,Indre-et-Loire,Indre-et-Loire
38,84,38185,5,ISERE,Isère,Isère
39,27,39300,2,JURA,Jura,Jura
40,75,40192,4,LANDES,Landes,Landes
41,24,41018,2,LOIR ET CHER,Loir-et-Cher,Loir-et-Cher
42,84,42218,3,LOIRE,Loire,Loire
43,84,43157,3,HAUTE LOIRE,Haute-Loire,Haute-Loire
44,52,44109,3,LOIRE ATLANTIQUE,Loire-Atlantique,Loire-Atlantique
45,24,45234,2,LOIRET,Loiret,Loiret
46,76,46042,2,LOT,Lot,Lot
47,75,47001,2,LOT ET GARONNE,Lot-et-Garonne,Lot-et-Garonne
48,76,48095,3,LOZERE,Lozère,Lozère
49,52,49007,0,MAINE ET LOIRE,Maine-et-Loire,Maine-et-Loire
50,28,50502,3,MANCHE,Manche,Manche
51,44,51108,3,MARNE,Marne,Marne
52,44,52121,3,HAUTE MARNE,Haute-Marne,Haute-Marne
53,52,53130,3,MAYENNE,Mayenne,Mayenne
54,44,54395,0,MEURTHE ET MOSELLE,Meurthe-et-Moselle,Meurthe-et-Moselle
55,44,55029,3,MEUSE,Meuse,Meuse
56,53,56260,2,MORBIHAN,Morbihan,Morbihan
57,44,57463,3,MOSELLE,Moselle,Moselle
58,27,58194,3,NIEVRE,Nièvre,Nièvre
59,32,59350,2,NORD,Nord,Nord
60,32,60057,5,OISE,Oise,Oise
61,28,61001,5,ORNE,Orne,Orne
62,32,62041,2,PAS DE CALAIS,Pas-de-Calais,Pas-de-Calais
63,84,63113,2,PUY DE DOME,Puy-de-Dôme,Puy-de-Dôme
64,75,64445,4,PYRENEES ATLANTIQUES,Pyrénées-Atlantiques,Pyrénées-Atlantiques
65,76,65440,4,HAUTES PYRENEES,Hautes-Pyrénées,Hautes-Pyrénées
66,76,66136,4,PYRENEES ORIENTALES,Pyrénées-Orientales,Pyrénées-Orientales
67,44,67482,2,BAS RHIN,Bas-Rhin,Bas-Rhin
68,44,68066,2,HAUT RHIN,Haut-Rhin,Haut-Rhin
69,84,69123,2,RHONE,Rhône,Rhône
70,27,70550,3,HAUTE SAONE,Haute-Saône,Haute-Saône
71,27,71270,0,SAONE ET LOIRE,Saône-et-Loire,Saône-et-Loire
72,52,72181,3,SARTHE,Sarthe,Sarthe
73,84,73065,3,SAVOIE,Savoie,Savoie
74,84,74010,3,HAUTE SAVOIE,Haute-Savoie,Haute-Savoie
75,11,75056,0,PARIS,Paris,Paris
76,28,76540,3,SEINE MARITIME,Seine-Maritime,Seine-Maritime
77,11,77288,0,SEINE ET MARNE,Seine-et-Marne,Seine-et-Marne
78,11,78646,4,YVELINES,Yvelines,Yvelines
79,75,79191,4,DEUX SEVRES,Deux-Sèvres,Deux-Sèvres
80,32,80021,3,SOMME,Somme,Somme
81,76,81004,2,TARN,Tarn,Tarn
82,76,82121,2,TARN ET GARONNE,Tarn-et-Garonne,Tarn-et-Garonne
83,93,83137,2,VAR,Var,Var
84,93,84007,2,VAUCLUSE,Vaucluse,Vaucluse
85,52,85191,3,VENDEE,Vendée,Vendée
86,75,86194,3,VIENNE,Vienne,Vienne
87,75,87085,3,HAUTE VIENNE,Haute-Vienne,Haute-Vienne
88,44,88160,4,VOSGES,Vosges,Vosges
89,27,89024,5,YONNE,Yonne,Yonne
90,27,90010,2,TERRITOIRE DE BELFORT,Territoire de Belfort,Territoire de Belfort
91,11,91228,5,ESSONNE,Essonne,Essonne
92,11,92050,4,HAUTS DE SEINE,Hauts-de-Seine,Hauts-de-Seine
93,11,93008,3,SEINE SAINT DENIS,Seine-Saint-Denis,Seine-Saint-Denis
94,11,94028,2,VAL DE MARNE,Val-de-Marne,Val-de-Marne
95,11,95500,2,VAL D OISE,Val-d'Oise,Val-d'Oise
971,01,97105,3,GUADELOUPE,Guadeloupe,Guadeloupe
972,02,97209,3,MARTINIQUE,Martinique,Martinique
973,03,97302,3,GUYANE,Guyane,Guyane
974,04,97411,0,LA REUNION,La Réunion,La Réunion
976,06,97608,0,MAYOTTE,Mayotte,Mayotte
1 DEP REG CHEFLIEU TNCC NCC NCCENR LIBELLE
2 01 84 01053 5 AIN Ain Ain
3 02 32 02408 5 AISNE Aisne Aisne
4 03 84 03190 5 ALLIER Allier Allier
5 04 93 04070 4 ALPES DE HAUTE PROVENCE Alpes-de-Haute-Provence Alpes-de-Haute-Provence
6 05 93 05061 4 HAUTES ALPES Hautes-Alpes Hautes-Alpes
7 06 93 06088 4 ALPES MARITIMES Alpes-Maritimes Alpes-Maritimes
8 07 84 07186 5 ARDECHE Ardèche Ardèche
9 08 44 08105 4 ARDENNES Ardennes Ardennes
10 09 76 09122 5 ARIEGE Ariège Ariège
11 10 44 10387 5 AUBE Aube Aube
12 11 76 11069 5 AUDE Aude Aude
13 12 76 12202 5 AVEYRON Aveyron Aveyron
14 13 93 13055 4 BOUCHES DU RHONE Bouches-du-Rhône Bouches-du-Rhône
15 14 28 14118 2 CALVADOS Calvados Calvados
16 15 84 15014 2 CANTAL Cantal Cantal
17 16 75 16015 3 CHARENTE Charente Charente
18 17 75 17300 3 CHARENTE MARITIME Charente-Maritime Charente-Maritime
19 18 24 18033 2 CHER Cher Cher
20 19 75 19272 3 CORREZE Corrèze Corrèze
21 21 27 21231 3 COTE D OR Côte-d'Or Côte-d'Or
22 22 53 22278 4 COTES D ARMOR Côtes-d'Armor Côtes-d'Armor
23 23 75 23096 3 CREUSE Creuse Creuse
24 24 75 24322 3 DORDOGNE Dordogne Dordogne
25 25 27 25056 2 DOUBS Doubs Doubs
26 26 84 26362 3 DROME Drôme Drôme
27 27 28 27229 5 EURE Eure Eure
28 28 24 28085 1 EURE ET LOIR Eure-et-Loir Eure-et-Loir
29 29 53 29232 2 FINISTERE Finistère Finistère
30 2A 94 2A004 3 CORSE DU SUD Corse-du-Sud Corse-du-Sud
31 2B 94 2B033 3 HAUTE CORSE Haute-Corse Haute-Corse
32 30 76 30189 2 GARD Gard Gard
33 31 76 31555 3 HAUTE GARONNE Haute-Garonne Haute-Garonne
34 32 76 32013 2 GERS Gers Gers
35 33 75 33063 3 GIRONDE Gironde Gironde
36 34 76 34172 5 HERAULT Hérault Hérault
37 35 53 35238 1 ILLE ET VILAINE Ille-et-Vilaine Ille-et-Vilaine
38 36 24 36044 5 INDRE Indre Indre
39 37 24 37261 1 INDRE ET LOIRE Indre-et-Loire Indre-et-Loire
40 38 84 38185 5 ISERE Isère Isère
41 39 27 39300 2 JURA Jura Jura
42 40 75 40192 4 LANDES Landes Landes
43 41 24 41018 2 LOIR ET CHER Loir-et-Cher Loir-et-Cher
44 42 84 42218 3 LOIRE Loire Loire
45 43 84 43157 3 HAUTE LOIRE Haute-Loire Haute-Loire
46 44 52 44109 3 LOIRE ATLANTIQUE Loire-Atlantique Loire-Atlantique
47 45 24 45234 2 LOIRET Loiret Loiret
48 46 76 46042 2 LOT Lot Lot
49 47 75 47001 2 LOT ET GARONNE Lot-et-Garonne Lot-et-Garonne
50 48 76 48095 3 LOZERE Lozère Lozère
51 49 52 49007 0 MAINE ET LOIRE Maine-et-Loire Maine-et-Loire
52 50 28 50502 3 MANCHE Manche Manche
53 51 44 51108 3 MARNE Marne Marne
54 52 44 52121 3 HAUTE MARNE Haute-Marne Haute-Marne
55 53 52 53130 3 MAYENNE Mayenne Mayenne
56 54 44 54395 0 MEURTHE ET MOSELLE Meurthe-et-Moselle Meurthe-et-Moselle
57 55 44 55029 3 MEUSE Meuse Meuse
58 56 53 56260 2 MORBIHAN Morbihan Morbihan
59 57 44 57463 3 MOSELLE Moselle Moselle
60 58 27 58194 3 NIEVRE Nièvre Nièvre
61 59 32 59350 2 NORD Nord Nord
62 60 32 60057 5 OISE Oise Oise
63 61 28 61001 5 ORNE Orne Orne
64 62 32 62041 2 PAS DE CALAIS Pas-de-Calais Pas-de-Calais
65 63 84 63113 2 PUY DE DOME Puy-de-Dôme Puy-de-Dôme
66 64 75 64445 4 PYRENEES ATLANTIQUES Pyrénées-Atlantiques Pyrénées-Atlantiques
67 65 76 65440 4 HAUTES PYRENEES Hautes-Pyrénées Hautes-Pyrénées
68 66 76 66136 4 PYRENEES ORIENTALES Pyrénées-Orientales Pyrénées-Orientales
69 67 44 67482 2 BAS RHIN Bas-Rhin Bas-Rhin
70 68 44 68066 2 HAUT RHIN Haut-Rhin Haut-Rhin
71 69 84 69123 2 RHONE Rhône Rhône
72 70 27 70550 3 HAUTE SAONE Haute-Saône Haute-Saône
73 71 27 71270 0 SAONE ET LOIRE Saône-et-Loire Saône-et-Loire
74 72 52 72181 3 SARTHE Sarthe Sarthe
75 73 84 73065 3 SAVOIE Savoie Savoie
76 74 84 74010 3 HAUTE SAVOIE Haute-Savoie Haute-Savoie
77 75 11 75056 0 PARIS Paris Paris
78 76 28 76540 3 SEINE MARITIME Seine-Maritime Seine-Maritime
79 77 11 77288 0 SEINE ET MARNE Seine-et-Marne Seine-et-Marne
80 78 11 78646 4 YVELINES Yvelines Yvelines
81 79 75 79191 4 DEUX SEVRES Deux-Sèvres Deux-Sèvres
82 80 32 80021 3 SOMME Somme Somme
83 81 76 81004 2 TARN Tarn Tarn
84 82 76 82121 2 TARN ET GARONNE Tarn-et-Garonne Tarn-et-Garonne
85 83 93 83137 2 VAR Var Var
86 84 93 84007 2 VAUCLUSE Vaucluse Vaucluse
87 85 52 85191 3 VENDEE Vendée Vendée
88 86 75 86194 3 VIENNE Vienne Vienne
89 87 75 87085 3 HAUTE VIENNE Haute-Vienne Haute-Vienne
90 88 44 88160 4 VOSGES Vosges Vosges
91 89 27 89024 5 YONNE Yonne Yonne
92 90 27 90010 2 TERRITOIRE DE BELFORT Territoire de Belfort Territoire de Belfort
93 91 11 91228 5 ESSONNE Essonne Essonne
94 92 11 92050 4 HAUTS DE SEINE Hauts-de-Seine Hauts-de-Seine
95 93 11 93008 3 SEINE SAINT DENIS Seine-Saint-Denis Seine-Saint-Denis
96 94 11 94028 2 VAL DE MARNE Val-de-Marne Val-de-Marne
97 95 11 95500 2 VAL D OISE Val-d'Oise Val-d'Oise
98 971 01 97105 3 GUADELOUPE Guadeloupe Guadeloupe
99 972 02 97209 3 MARTINIQUE Martinique Martinique
100 973 03 97302 3 GUYANE Guyane Guyane
101 974 04 97411 0 LA REUNION La Réunion La Réunion
102 976 06 97608 0 MAYOTTE Mayotte Mayotte

1
static/finess-small.json Normal file

File diff suppressed because one or more lines are too long

39194
static/laposte_hexasmal.csv Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,56 @@
L.Permalink = {
//gets the map center, zoom-level and rotation from the URL if present, else uses default values
getMapLocation: function (zoom, center) {
'use strict';
zoom = (zoom || zoom === 0) ? zoom : 18;
center = (center) ? center : [52.26869, -113.81034];
if (window.location.hash !== '') {
var hash = window.location.hash.replace('#', '');
var parts = hash.split(',');
if (parts.length === 3) {
center = {
lat: parseFloat(parts[0]),
lng: parseFloat(parts[1])
};
zoom = parseInt(parts[2].slice(0, -1), 10);
}
}
return {zoom: zoom, center: center};
},
setup: function (map) {
'use strict';
var shouldUpdate = true;
var updatePermalink = function () {
if (!shouldUpdate) {
// do not update the URL when the view was changed in the 'popstate' handler (browser history navigation)
shouldUpdate = true;
return;
}
var center = map.getCenter();
var hash = '#' +
Math.round(center.lat * 100000) / 100000 + ',' +
Math.round(center.lng * 100000) / 100000 + ',' +
map.getZoom() + 'z';
var state = {
zoom: map.getZoom(),
center: center
};
window.history.pushState(state, 'map', hash);
};
map.on('moveend', updatePermalink);
// restore the view state when navigating through the history, see
// https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate
window.addEventListener('popstate', function (event) {
if (event.state === null) {
return;
}
map.setView(event.state.center, event.state.zoom);
shouldUpdate = false;
});
}
};

19
static/region_2022.csv Normal file
View File

@ -0,0 +1,19 @@
REG,CHEFLIEU,TNCC,NCC,NCCENR,LIBELLE
01,97105,3,GUADELOUPE,Guadeloupe,Guadeloupe
02,97209,3,MARTINIQUE,Martinique,Martinique
03,97302,3,GUYANE,Guyane,Guyane
04,97411,0,LA REUNION,La Réunion,La Réunion
06,97608,0,MAYOTTE,Mayotte,Mayotte
11,75056,1,ILE DE FRANCE,Île-de-France,Île-de-France
24,45234,2,CENTRE VAL DE LOIRE,Centre-Val de Loire,Centre-Val de Loire
27,21231,0,BOURGOGNE FRANCHE COMTE,Bourgogne-Franche-Comté,Bourgogne-Franche-Comté
28,76540,0,NORMANDIE,Normandie,Normandie
32,59350,4,HAUTS DE FRANCE,Hauts-de-France,Hauts-de-France
44,67482,2,GRAND EST,Grand Est,Grand Est
52,44109,4,PAYS DE LA LOIRE,Pays de la Loire,Pays de la Loire
53,35238,0,BRETAGNE,Bretagne,Bretagne
75,33063,3,NOUVELLE AQUITAINE,Nouvelle-Aquitaine,Nouvelle-Aquitaine
76,31555,1,OCCITANIE,Occitanie,Occitanie
84,69123,1,AUVERGNE RHONE ALPES,Auvergne-Rhône-Alpes,Auvergne-Rhône-Alpes
93,13055,0,PROVENCE ALPES COTE D AZUR,Provence-Alpes-Côte d'Azur,Provence-Alpes-Côte d'Azur
94,2A004,0,CORSE,Corse,Corse
1 REG CHEFLIEU TNCC NCC NCCENR LIBELLE
2 01 97105 3 GUADELOUPE Guadeloupe Guadeloupe
3 02 97209 3 MARTINIQUE Martinique Martinique
4 03 97302 3 GUYANE Guyane Guyane
5 04 97411 0 LA REUNION La Réunion La Réunion
6 06 97608 0 MAYOTTE Mayotte Mayotte
7 11 75056 1 ILE DE FRANCE Île-de-France Île-de-France
8 24 45234 2 CENTRE VAL DE LOIRE Centre-Val de Loire Centre-Val de Loire
9 27 21231 0 BOURGOGNE FRANCHE COMTE Bourgogne-Franche-Comté Bourgogne-Franche-Comté
10 28 76540 0 NORMANDIE Normandie Normandie
11 32 59350 4 HAUTS DE FRANCE Hauts-de-France Hauts-de-France
12 44 67482 2 GRAND EST Grand Est Grand Est
13 52 44109 4 PAYS DE LA LOIRE Pays de la Loire Pays de la Loire
14 53 35238 0 BRETAGNE Bretagne Bretagne
15 75 33063 3 NOUVELLE AQUITAINE Nouvelle-Aquitaine Nouvelle-Aquitaine
16 76 31555 1 OCCITANIE Occitanie Occitanie
17 84 69123 1 AUVERGNE RHONE ALPES Auvergne-Rhône-Alpes Auvergne-Rhône-Alpes
18 93 13055 0 PROVENCE ALPES COTE D AZUR Provence-Alpes-Côte d'Azur Provence-Alpes-Côte d'Azur
19 94 2A004 0 CORSE Corse Corse