diff --git a/Tutoriel-geoparsing.ipynb b/Tutoriel-geoparsing.ipynb index e91f397f9afcc7ecad5fac9fc639e379ef50a67d..7ad8796e64791841bdf8e885ab18a23df86a09bd 100644 --- a/Tutoriel-geoparsing.ipynb +++ b/Tutoriel-geoparsing.ipynb @@ -28,8 +28,8 @@ "- Utiliser les librairies [Stanza](https://stanfordnlp.github.io/stanza/index.html), [spaCy](https://spacy.io) et [Perdido](https://github.com/ludovicmoncla/perdido) pour la reconnaissance d'entités nommées\n", " - afficher les entités nommées annotées ;\n", " - comparer les résultats de `Stanza`, `spaCy` et `Perdido` ;\n", - " - discuter les limites des 3 outils pour la tâche de NER.\n", - "- Utiliser la librarie `Perdido` pour le geoparsing :\n", + " - discuter les dimites des 3 outils pour la tâche de NER.\n", + "- Utiliser la librarie `Perdido` pour le geoparsing et le geocoding :\n", " - cartographier les lieux geocodés ;\n", " - illustrer la problématique de désambiguïsation des toponymes." ] @@ -38,16 +38,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## 2. Introduction" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 3. Configurer l'environnement\n", + "## 2. Configurer l'environnement\n", "\n", - "### 3.1 Installer les librairies Python\n", + "### 2.1 Installer les librairies Python\n", "\n", "* Si vous avez configuré votre environnement Conda en utilisant le fichier `requirements.txt`, vous pouvez sauter cette étape et aller à la section `3.2 Importer les librairies`.\n", "* Si vous avez configuré votre environnement Conda en utilisant le fichier `environment.yml` ou si vous utilisez un environnement Google Colab / Binder, vous devez installer `perdido` en utilisant `pip` :" @@ -83,7 +76,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### 3.2 Importer les librairies\n", + "### 2.2 Importer les librairies\n", "\n", "\n", "Tout d'abord, nous allons charger certaines bibliothèques spécifiques de `Perdido` que nous utiliserons dans ce notebook. Ensuite, nous importons quelques outils qui nous aideront à analyser et à visualiser le texte." @@ -110,9 +103,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## 4. Chargement et exploration des données\n", + "## 3. Chargement et exploration des données\n", "\n", - "### 4.1 Chargement d'un document texte à partir d'un fichier\n" + "### 3.1 Chargement d'un document texte à partir d'un fichier\n" ] }, { @@ -121,7 +114,7 @@ "metadata": {}, "outputs": [], "source": [ - "def load(filepath):\n", + "def load_txt(filepath):\n", " with open(filepath) as f:\n", " return f.read()" ] @@ -132,7 +125,7 @@ "metadata": {}, "outputs": [], "source": [ - "arques = load('data/volume01-4083.txt')" + "arques = load_txt('data/volume01-4083.txt')" ] }, { @@ -163,11 +156,11 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### 4.2 Chargement d'un jeu de données à partir de la librairie Perdido\n", + "### 3.2 Chargement d'un jeu de données à partir de la librairie Perdido\n", "\n", - "Perdido embarque deux jeux de données : \n", - " 1. articles encyclopédiques (volume 7 de l'Encyclopédie de Diderot et d'Alembert (1751-1772)), fournit par l'[ARTFL](https://encyclopedie.uchicago.edu) dans le cadre du projet [GEODE](https://geode-project.github.io) ;\n", - " 2. descriptions de randonnées (chaque description est associée à sa trace GPS. Elles proviennent du site [www.visorando.fr](https://www.visorando.com) et ont été collectées dans le cadre du projet [ANR CHOUCAS](http://choucas.ign.fr).\n", + "La libraire de geoparsing Perdido embarque deux jeux de données : \n", + " 1. des articles encyclopédiques (volume 7 de l'Encyclopédie de Diderot et d'Alembert (1751-1772)), fournit par l'[ARTFL](https://encyclopedie.uchicago.edu) dans le cadre du projet [GEODE](https://geode-project.github.io) ;\n", + " 2. des descriptions de randonnées (chaque description est associée à sa trace GPS. Elles proviennent du site [www.visorando.fr](https://www.visorando.com) et ont été collectées dans le cadre du projet [ANR CHOUCAS](http://choucas.ign.fr).\n", "\n", " Dans un premier temps nous allons nous intéresser au jeu de données des articles encyclopédiques. Ce jeu de données est présent dans la librairie en deux versions, une version \"brute\" (articles fournis par l'ARTFL) au format dataframe et une version déjà annotée par Perdido (format PerdidoCollection). Nous allons charger la version brute et voir comment manipuler un dataframe." ] @@ -241,7 +234,7 @@ "metadata": {}, "outputs": [], "source": [ - "data_artfl.dropna(inplace=True) # data_artfl = data_artfl.dropna()\n" + "data_artfl.dropna(inplace=True) # data_artfl = data_artfl.dropna()" ] }, { @@ -407,7 +400,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### 4.3 Manipulation d'un dataframe" + "### 3.3 Manipulation d'un dataframe" ] }, { @@ -439,7 +432,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "#### 4.3.1 Recherche par métadonnées\n", + "#### 3.3.1 Recherche par métadonnées\n", "\n", "\n", "Maintenant que les données sont chargées dans un dataframe, nous pouvons sélectionner des groupes d'articles sur la base de leurs métadonnées.\n", @@ -457,7 +450,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 13, "metadata": {}, "outputs": [ { @@ -513,7 +506,7 @@ "5 FRONTIGNAN, (Géog.) petite ville de France. au... " ] }, - "execution_count": 62, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -532,21 +525,22 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 15, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "filename : volume07-1002.tei\n", + "volume : 7\n", + "number : 1002\n", "text : FRONTIGNAN, (Géog.) petite ville de France. au Bas-Languedoc, connue par ses excellens vins muscats, & ses raisins de caisse qu'on appelle passerilles. Quelques savans croyent, sans en donner de preuves, que cette ville est le forum Domitii des Romains. Elle est située sur l'étang de Maguelone, à six lieues N. E. d'Agde, & cinq S. O. de Montpellier. Long. 15d. 24'. lat. 43d. 28'. (D. J.)\n" ] } ], "source": [ - "print('filename :', frontignan.filename.item()) # similaire à frontignan['normClass'].item()\n", - "\n", + "print('volume :', frontignan.volume.item()) # similaire à frontignan['volume'].item()\n", + "print('number :', frontignan.number.item())\n", "print('text :', frontignan.text.item())\n" ] }, @@ -561,7 +555,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 16, "metadata": {}, "outputs": [ { @@ -580,9 +574,16 @@ "print(str(n) + ' articles ont été rédigés par '+ req)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "* Afficher les 5 premiers :" + ] + }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -693,7 +694,7 @@ "38 Fruit, (art de conserver le) Economie rustiq. ... " ] }, - "execution_count": 14, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -702,19 +703,26 @@ "d_Jaucourt.head()" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### 3.3.2 Recherche par mots-clés" + ] + }, { "cell_type": "markdown", "metadata": {}, "source": [ "Autre exemple, nous pouvons filtrer les articles en fonction de leur classification dans l'*Encyclopédie*. \n", - "Pour cela nous utiliserons le champ `normclass`, qui indique la classifications retenue (et normalisée) par l'ARTFL. \n", + "Pour cela nous utiliserons la colonne `normclass`, qui indique la classifications retenue (et normalisée) par l'ARTFL. \n", "\n", - "Par exemple pour la classe 'Géographie', nous pouvons faire la requête suivante (le résultat est stocké dans un nouveau cadre de données `df_geo` : " + "Par exemple pour la classe 'Géographie', nous pouvons faire la requête suivante (le résultat est stocké dans un nouveau dataframe `d_geo` : " ] }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 18, "metadata": {}, "outputs": [ { @@ -733,6 +741,34 @@ "print(str(n) + ' articles sont classés en '+ req)" ] }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "177 articles contiennent l'expression 'ville de'\n" + ] + } + ], + "source": [ + "req = 'ville de'\n", + "d_geo = data_artfl[data_artfl['text'].str.contains(req, case=False)]\n", + "\n", + "n = d_geo.shape[0]\n", + "print(str(n) + \" articles contiennent l'expression '\"+ req + \"'\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### 3.3.3 Regroupements" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -744,7 +780,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -762,7 +798,7 @@ "Name: filename, dtype: int64" ] }, - "execution_count": 16, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -816,33 +852,9 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2f7dc162de524af499c186a7f718214f", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Downloading https://raw.githubusercontent.com/stanfordnlp/stanza-resources/main/resources_1.2.2.json: 0%| …" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2022-09-22 15:58:36 INFO: Downloading default packages for language: fr (French)...\n", - "2022-09-22 15:58:37 INFO: File exists: /Users/lmoncla/stanza_resources/fr/default.zip.\n", - "2022-09-22 15:58:40 INFO: Finished downloading models and saved to /Users/lmoncla/stanza_resources.\n" - ] - } - ], + "outputs": [], "source": [ "import stanza\n", "\n", @@ -858,31 +870,9 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2022-09-22 15:58:43 WARNING: Language fr package default expects mwt, which has been added\n", - "2022-09-22 15:58:43 INFO: Loading these models for language: fr (French):\n", - "=======================\n", - "| Processor | Package |\n", - "-----------------------\n", - "| tokenize | gsd |\n", - "| mwt | gsd |\n", - "| ner | wikiner |\n", - "=======================\n", - "\n", - "2022-09-22 15:58:43 INFO: Use device: cpu\n", - "2022-09-22 15:58:43 INFO: Loading: tokenize\n", - "2022-09-22 15:58:43 INFO: Loading: mwt\n", - "2022-09-22 15:58:43 INFO: Loading: ner\n", - "2022-09-22 15:58:44 INFO: Done loading processors!\n" - ] - } - ], + "outputs": [], "source": [ "stanza_parser = stanza.Pipeline(lang='fr', processors='tokenize,ner')" ] @@ -891,22 +881,14 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "* On utilise la variable `arques` qui contient le texte chargé précédemment à partir du fichier" + "* On utilise la variable `arques` qui contient le texte chargé précédemment à partir du fichier txt" ] }, { "cell_type": "code", - "execution_count": 19, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "* ARQUES, (Géog.) petite ville de France, en Normandie, au pays de Caux, sur la petite riviere d'Arques. Long. 18. 50. lat. 49. 54.\n" - ] - } - ], + "outputs": [], "source": [ "print(arques)" ] @@ -920,7 +902,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -936,7 +918,7 @@ }, { "cell_type": "code", - "execution_count": 0, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -947,21 +929,9 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "ARQUES LOC\n", - "France LOC\n", - "Normandie LOC\n", - "pays de Caux LOC\n", - "Arques LOC\n" - ] - } - ], + "outputs": [], "source": [ "show_ents(arques_stanza)" ] @@ -1004,7 +974,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -1020,7 +990,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -1036,7 +1006,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -1052,24 +1022,9 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "ARQUES LOC\n", - "Géog LOC\n", - "de France LOC\n", - "Normandie LOC\n", - "pays de Caux LOC\n", - "Arques LOC\n", - "Long LOC\n", - "lat LOC\n" - ] - } - ], + "outputs": [], "source": [ "for ent in arques_spacy.ents:\n", " print(ent.text, ent.label_)" @@ -1084,62 +1039,9 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<span class=\"tex2jax_ignore\"><div class=\"entities\" style=\"line-height: 2.5; direction: ltr\">* \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " ARQUES\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ", (\n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Géog\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ".) petite ville \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " de France\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ", en \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Normandie\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ", au \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " pays de Caux\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ", sur la petite riviere d'\n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Arques\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ". \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Long\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ". 18. 50. \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " lat\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ". 49. 54.</div></span>" - ], - "text/plain": [ - "<IPython.core.display.HTML object>" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "displacy.render(arques_spacy, style=\"ent\", jupyter=True) " ] @@ -1160,7 +1062,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -1176,7 +1078,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -1192,22 +1094,9 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "ARQUES place\n", - "France place\n", - "Normandie place\n", - "Caux place\n", - "Arques place\n", - "Long . 18 . 50 . lat . 49 . 54 . latlong\n" - ] - } - ], + "outputs": [], "source": [ "for ent in arques_perdido.named_entities:\n", " print(ent.text, ent.tag)" @@ -1222,52 +1111,9 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<span class=\"tex2jax_ignore\"><div class=\"entities\" style=\"line-height: 2.5; direction: ltr\">* \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " ARQUES\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " , ( Géog . ) petite ville de \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " France\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " , en \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Normandie\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " , au pays de \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Caux\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " , sur la petite riviere d' \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Arques\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " . \n", - "<mark class=\"entity\" style=\"background: #ddd; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Long . 18 . 50 . lat . 49 . 54 .\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">MISC</span>\n", - "</mark>\n", - " </div></span>" - ], - "text/plain": [ - "<IPython.core.display.HTML object>" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "displacy.render(arques_perdido.to_spacy_doc(), style=\"ent\", jupyter=True)" ] @@ -1281,347 +1127,9 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<span class=\"tex2jax_ignore\"><div class=\"spans\" style=\"line-height: 2.5; direction: ltr\">\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " *\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ddd; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " MISC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " ARQUES\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - "<span style=\"background: #ff9561; top: 57px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 57px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - ", ( Géog . ) \n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " petite\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " ville\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " de\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " France\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - "<span style=\"background: #ff9561; top: 57px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 57px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - ", en \n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " Normandie\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - ", au \n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " pays\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " de\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " Caux\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - "<span style=\"background: #ff9561; top: 57px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 57px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - ", sur \n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " la\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " petite\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " riviere\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " d'\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " Arques\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - "<span style=\"background: #ff9561; top: 57px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 57px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - ". \n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " Long\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ddd; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " MISC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " .\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " 18\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " .\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " 50\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " .\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " lat\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " .\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " 49\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " .\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " 54\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " .\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "</div></span>" - ], - "text/plain": [ - "<IPython.core.display.HTML object>" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "displacy.render(arques_perdido.to_spacy_doc(), style=\"span\", jupyter=True)" ] @@ -1635,18 +1143,9 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "* Beaufort, (Géog.) ville de Savoie, sur la riviere \n", - "d'Oron. Long. 24. 18. lat. 45. 40.\n" - ] - } - ], + "outputs": [], "source": [ "beaufort = load('data/volume02-1365.txt')\n", "\n", @@ -1662,301 +1161,9 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<span class=\"tex2jax_ignore\"><div class=\"entities\" style=\"line-height: 2.5; direction: ltr\">* \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Beaufort\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " , ( Géog . ) ville de \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Savoie\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " , sur la riviere d' \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Oron\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " . \n", - "<mark class=\"entity\" style=\"background: #ddd; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Long . 24 . 18 . lat . 45 . 40 .\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">MISC</span>\n", - "</mark>\n", - " </div></span>" - ], - "text/plain": [ - "<IPython.core.display.HTML object>" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "<span class=\"tex2jax_ignore\"><div class=\"spans\" style=\"line-height: 2.5; direction: ltr\">\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " *\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ddd; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " MISC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " Beaufort\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - "<span style=\"background: #ff9561; top: 57px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 57px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - ", ( Géog . ) \n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " ville\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " de\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " Savoie\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - "<span style=\"background: #ff9561; top: 57px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 57px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - ", sur \n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " la\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " riviere\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " d'\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " Oron\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - "<span style=\"background: #ff9561; top: 57px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 57px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - ". \n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " Long\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ddd; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " MISC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " .\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " 24\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " .\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " 18\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " .\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " lat\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " .\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " 45\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " .\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " 40\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative;\">\n", - " .\n", - " \n", - "<span style=\"background: #ddd; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "</div></span>" - ], - "text/plain": [ - "<IPython.core.display.HTML object>" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "beaufort_perdido = geoparser(beaufort)\n", "displacy.render(beaufort_perdido.to_spacy_doc(), style=\"ent\", jupyter=True)\n", @@ -1972,42 +1179,9 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<span class=\"tex2jax_ignore\"><div class=\"entities\" style=\"line-height: 2.5; direction: ltr\">* \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Beaufort\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ", (\n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Géog\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ".) ville de \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Savoie\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ", sur la riviere </br>d'Oron. Long. 24. 18. \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " lat\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ". 45. 40.</div></span>" - ], - "text/plain": [ - "<IPython.core.display.HTML object>" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "beaufort_spacy = spacy_parser(beaufort)\n", "displacy.render(beaufort_spacy, style=\"ent\", jupyter=True) " @@ -2022,52 +1196,9 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<span class=\"tex2jax_ignore\"><div class=\"entities\" style=\"line-height: 2.5; direction: ltr\">* \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Beaufort\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ", (\n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Géog\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ".) ville de \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Savoie\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ", sur la riviere d'\n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Oron\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ". \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Long\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ". 24. 18. \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " lat\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ". 45. 40.</div></span>" - ], - "text/plain": [ - "<IPython.core.display.HTML object>" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "normalized_beaufort = beaufort.replace('\\n', '')\n", "normalized_beaufort_spacy = spacy_parser(normalized_beaufort)\n", @@ -2083,52 +1214,9 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<span class=\"tex2jax_ignore\"><div class=\"entities\" style=\"line-height: 2.5; direction: ltr\">* \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Beaufort\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ", (\n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Géog\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ".) ville de \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Savoie\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ", sur la \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " rivière d'Oron\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ". \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Long\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ". 24. 18. \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " lat\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ". 45. 40.</div></span>" - ], - "text/plain": [ - "<IPython.core.display.HTML object>" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "normalized_beaufort = normalized_beaufort.replace('riviere', 'rivière')\n", "normalized_beaufort_spacy = spacy_parser(normalized_beaufort)\n", @@ -2153,20 +1241,9 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Beaufort LOC\n", - "Géog LOC\n", - "Savoie LOC\n", - "Oron LOC\n" - ] - } - ], + "outputs": [], "source": [ "beaufort_stanza = stanza_parser(beaufort)\n", "show_ents(beaufort_stanza)" @@ -2185,27 +1262,7 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "BEAUFORT ou Beaufort-sur-Doron ou Saint-Maxime-\n", - "de-Bf.aufort. Ch.-l. de cant. du dép. de la Savoie, arr.\n", - "d’Albertville, au débouché de trois vallées dont les tor¬\n", - "rents forment le Doron de Beaufort ; 2,393 hab. Les\n", - "superbes pâturages de la vallée nourrissent de nombreux\n", - "troupeaux ; il se fait à Beaufort un commerce important de\n", - "fromages et de bestiaux. Un assez grand nombre d’habi¬\n", - "tants quittent le pays pendant l’hiver. De l’ancien château\n", - "de la Salle qu’Henri IV habita à deux reprises pendant la\n", - "guerre qu’il soutint contre le duc de Savoie, il subsiste\n", - "trois tours. Ancienne chapelle, reconstruite en 1841,\n", - "qui est le but d’un pèlerinage très fréquenté.\n", - "\n" - ] - } - ], + "outputs": [], "source": [ "lge_beaufort = load('data/beaufort.txt')\n", "print(lge_beaufort)" @@ -2241,338 +1298,14 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<span class=\"tex2jax_ignore\"><div class=\"spans\" style=\"line-height: 2.5; direction: ltr\">\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 60px;\">\n", - " BEAUFORT\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - "ou \n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 60px;\">\n", - " Beaufort-sur-Doron\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - "ou \n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 60px;\">\n", - " Saint-Maxime-\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - "de-Bf.aufort . \n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 60px;\">\n", - " Ch.-l\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - ". de cant . du dép . de la \n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 60px;\">\n", - " Savoie\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - ", arr . d' \n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 60px;\">\n", - " Albertville\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - ", au débouché de trois vallées dont les torrents forment le \n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 60px;\">\n", - " Doron\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 60px;\">\n", - " de\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 60px;\">\n", - " Beaufort\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "; 2,393 hab . Les superbes pâturages de la vallée nourrissent de nombreux troupeaux ; il se fait à \n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 60px;\">\n", - " Beaufort\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - "un commerce important de fromages et de bestiaux . Un assez grand nombre d' habitants quittent le pays pendant l' hiver . De l' \n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 60px;\">\n", - " ancien\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 60px;\">\n", - " château\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 60px;\">\n", - " de\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 60px;\">\n", - " la\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 77px;\">\n", - " Salle\n", - " \n", - "<span style=\"background: #ff9561; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - "<span style=\"background: #ff9561; top: 57px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 57px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - "qu' \n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 60px;\">\n", - " Henri\n", - " \n", - "<span style=\"background: #aa9cfc; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #aa9cfc; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #aa9cfc; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " PERSON\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 60px;\">\n", - " IV\n", - " \n", - "<span style=\"background: #aa9cfc; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "habita à deux reprises pendant la guerre qu' il soutint contre \n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 60px;\">\n", - " le\n", - " \n", - "<span style=\"background: #aa9cfc; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #aa9cfc; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #aa9cfc; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " PERSON\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 60px;\">\n", - " duc\n", - " \n", - "<span style=\"background: #aa9cfc; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 60px;\">\n", - " de\n", - " \n", - "<span style=\"background: #aa9cfc; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 77px;\">\n", - " Savoie\n", - " \n", - "<span style=\"background: #aa9cfc; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - "<span style=\"background: #ff9561; top: 57px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #ff9561; top: 57px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #ff9561; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " LOC\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - ", il subsiste trois tours . Ancienne chapelle , reconstruite \n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 60px;\">\n", - " en\n", - " \n", - "<span style=\"background: #bfe1d9; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "<span style=\"background: #bfe1d9; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - " <span style=\"background: #bfe1d9; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px\">\n", - " DATE\n", - " </span>\n", - "</span>\n", - "\n", - "\n", - "</span>\n", - "\n", - "<span style=\"font-weight: bold; display: inline-block; position: relative; height: 60px;\">\n", - " 1841\n", - " \n", - "<span style=\"background: #bfe1d9; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;\">\n", - "</span>\n", - "\n", - " \n", - "</span>\n", - ", qui est le but d' un pèlerinage très fréquenté . </div></span>" - ], - "text/plain": [ - "<IPython.core.display.HTML object>" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "displacy.render(lge_beaufort_perdido.to_spacy_doc(), style=\"span\", jupyter=True)" ] }, { "cell_type": "code", - "execution_count": 140, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -2583,88 +1316,16 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<span class=\"tex2jax_ignore\"><div class=\"entities\" style=\"line-height: 2.5; direction: ltr\">\n", - "<mark class=\"entity\" style=\"background: #ddd; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " BEAUFORT\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">MISC</span>\n", - "</mark>\n", - " ou \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Beaufort-sur-Doron\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " ou Saint-Maximede-Bf.aufort. Ch.-l. de cant. du dép. de la \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Savoie\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - ", arr. \n", - "<mark class=\"entity\" style=\"background: #ddd; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " d’Albertville\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">PER</span>\n", - "</mark>\n", - ", au débouché de trois vallées dont les torrents forment le \n", - "<mark class=\"entity\" style=\"background: #7aecec; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Doron de Beaufort\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">ORG</span>\n", - "</mark>\n", - " ; 2,393 hab. Les superbes pâturages de la vallée nourrissent de nombreux troupeaux ; il se fait à \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Beaufort\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " un commerce important de fromages et de bestiaux. Un assez grand nombre d’habitants quittent le pays pendant l’hiver. De l’ancien \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " château de la Salle\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " qu’Henri IV habita à deux reprises pendant la guerre qu’il soutint contre le \n", - "<mark class=\"entity\" style=\"background: #ddd; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " duc de Savoie\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">PER</span>\n", - "</mark>\n", - ", il subsiste trois tours. Ancienne chapelle, reconstruite en 1841, qui est le but d’un pèlerinage très fréquenté. </div></span>" - ], - "text/plain": [ - "<IPython.core.display.HTML object>" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "displacy.render(lge_beaufort_spacy, style=\"ent\", jupyter=True)" ] }, { "cell_type": "code", - "execution_count": 144, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "BEAUFORT LOC\n", - "Beaufort-sur-Doron LOC\n", - "Saint-Maxime-\n", - "de-Bf.aufort PER\n", - "Savoie LOC\n", - "Albertville LOC\n", - "Doron de Beaufort LOC\n", - "Beaufort LOC\n", - "château\n", - "de la Salle LOC\n", - "Henri IV PER\n", - "duc de Savoie PER\n" - ] - } - ], + "outputs": [], "source": [ "lge_beaufort_stanza = stanza_parser(lge_beaufort)\n", "show_ents(lge_beaufort_stanza)" @@ -2704,57 +1365,7 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "* ARQUES, (Géog.) petite ville de France, en Normandie, au pays de Caux, sur la petite riviere d'Arques. Long. 18. 50. lat. 49. 54.\n" - ] - }, - { - "data": { - "text/html": [ - "<span class=\"tex2jax_ignore\"><div class=\"entities\" style=\"line-height: 2.5; direction: ltr\">* \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " ARQUES\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " , ( Géog . ) petite ville de \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " France\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " , en \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Normandie\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " , au pays de \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Caux\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " , sur la petite riviere d' \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Arques\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " . \n", - "<mark class=\"entity\" style=\"background: #ddd; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Long . 18 . 50 . lat . 49 . 54 .\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">MISC</span>\n", - "</mark>\n", - " </div></span>" - ], - "text/plain": [ - "<IPython.core.display.HTML object>" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "print(arques)\n", "displacy.render(arques_perdido.to_spacy_doc(), style=\"ent\", jupyter=True)" @@ -2771,21 +1382,7 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><iframe src=\"data:text/html;charset=utf-8;base64,PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHN0eWxlPmh0bWwsIGJvZHkge3dpZHRoOiAxMDAlO2hlaWdodDogMTAwJTttYXJnaW46IDA7cGFkZGluZzogMDt9PC9zdHlsZT4KICAgIDxzdHlsZT4jbWFwIHtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtib3R0b206MDtyaWdodDowO2xlZnQ6MDt9PC9zdHlsZT4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS42LjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2NvZGUuanF1ZXJ5LmNvbS9qcXVlcnktMS4xMi40Lm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3RyYXAvMy4yLjAvanMvYm9vdHN0cmFwLm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9jZG5qcy5jbG91ZGZsYXJlLmNvbS9hamF4L2xpYnMvTGVhZmxldC5hd2Vzb21lLW1hcmtlcnMvMi4wLjIvbGVhZmxldC5hd2Vzb21lLW1hcmtlcnMuanMiPjwvc2NyaXB0PgogICAgPGxpbmsgcmVsPSJzdHlsZXNoZWV0IiBocmVmPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS42LjAvZGlzdC9sZWFmbGV0LmNzcyIvPgogICAgPGxpbmsgcmVsPSJzdHlsZXNoZWV0IiBocmVmPSJodHRwczovL21heGNkbi5ib290c3RyYXBjZG4uY29tL2Jvb3RzdHJhcC8zLjIuMC9jc3MvYm9vdHN0cmFwLm1pbi5jc3MiLz4KICAgIDxsaW5rIHJlbD0ic3R5bGVzaGVldCIgaHJlZj0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3RyYXAvMy4yLjAvY3NzL2Jvb3RzdHJhcC10aGVtZS5taW4uY3NzIi8+CiAgICA8bGluayByZWw9InN0eWxlc2hlZXQiIGhyZWY9Imh0dHBzOi8vbWF4Y2RuLmJvb3RzdHJhcGNkbi5jb20vZm9udC1hd2Vzb21lLzQuNi4zL2Nzcy9mb250LWF3ZXNvbWUubWluLmNzcyIvPgogICAgPGxpbmsgcmVsPSJzdHlsZXNoZWV0IiBocmVmPSJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9MZWFmbGV0LmF3ZXNvbWUtbWFya2Vycy8yLjAuMi9sZWFmbGV0LmF3ZXNvbWUtbWFya2Vycy5jc3MiLz4KICAgIDxsaW5rIHJlbD0ic3R5bGVzaGVldCIgaHJlZj0iaHR0cHM6Ly9jZG4uanNkZWxpdnIubmV0L2doL3B5dGhvbi12aXN1YWxpemF0aW9uL2ZvbGl1bS9mb2xpdW0vdGVtcGxhdGVzL2xlYWZsZXQuYXdlc29tZS5yb3RhdGUubWluLmNzcyIvPgogICAgCiAgICAgICAgICAgIDxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgsCiAgICAgICAgICAgICAgICBpbml0aWFsLXNjYWxlPTEuMCwgbWF4aW11bS1zY2FsZT0xLjAsIHVzZXItc2NhbGFibGU9bm8iIC8+CiAgICAgICAgICAgIDxzdHlsZT4KICAgICAgICAgICAgICAgICNtYXBfYjFkMjMyNTNkMzgwNDcwNGFhNDhkMWY0YjlkODEyNjAgewogICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGhlaWdodDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGxlZnQ6IDAuMCU7CiAgICAgICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAogICAgCiAgICAgICAgICAgICAgICAgICAgPHN0eWxlPgogICAgICAgICAgICAgICAgICAgICAgICAuZm9saXVtdG9vbHRpcCB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgIC5mb2xpdW10b29sdGlwIHRhYmxlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFyZ2luOiBhdXRvOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5mb2xpdW10b29sdGlwIHRyewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dC1hbGlnbjogbGVmdDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuZm9saXVtdG9vbHRpcCB0aHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6IDJweDsgcGFkZGluZy1yaWdodDogOHB4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgPC9zdHlsZT4KICAgICAgICAgICAgCjwvaGVhZD4KPGJvZHk+ICAgIAogICAgCiAgICAgICAgICAgIDxkaXYgY2xhc3M9ImZvbGl1bS1tYXAiIGlkPSJtYXBfYjFkMjMyNTNkMzgwNDcwNGFhNDhkMWY0YjlkODEyNjAiID48L2Rpdj4KICAgICAgICAKPC9ib2R5Pgo8c2NyaXB0PiAgICAKICAgIAogICAgICAgICAgICB2YXIgbWFwX2IxZDIzMjUzZDM4MDQ3MDRhYTQ4ZDFmNGI5ZDgxMjYwID0gTC5tYXAoCiAgICAgICAgICAgICAgICAibWFwX2IxZDIzMjUzZDM4MDQ3MDRhYTQ4ZDFmNGI5ZDgxMjYwIiwKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBjZW50ZXI6IFswLCAwXSwKICAgICAgICAgICAgICAgICAgICBjcnM6IEwuQ1JTLkVQU0czODU3LAogICAgICAgICAgICAgICAgICAgIHpvb206IDEsCiAgICAgICAgICAgICAgICAgICAgem9vbUNvbnRyb2w6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgcHJlZmVyQ2FudmFzOiBmYWxzZSwKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgKTsKCiAgICAgICAgICAgIAoKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgdGlsZV9sYXllcl8wMjBjOWNkODhiYTU0MDIwYWJhYmI3MWE4NWM0ZTM1MyA9IEwudGlsZUxheWVyKAogICAgICAgICAgICAgICAgImh0dHBzOi8ve3N9LnRpbGUub3BlbnN0cmVldG1hcC5vcmcve3p9L3t4fS97eX0ucG5nIiwKICAgICAgICAgICAgICAgIHsiYXR0cmlidXRpb24iOiAiRGF0YSBieSBcdTAwMjZjb3B5OyBcdTAwM2NhIGhyZWY9XCJodHRwOi8vb3BlbnN0cmVldG1hcC5vcmdcIlx1MDAzZU9wZW5TdHJlZXRNYXBcdTAwM2MvYVx1MDAzZSwgdW5kZXIgXHUwMDNjYSBocmVmPVwiaHR0cDovL3d3dy5vcGVuc3RyZWV0bWFwLm9yZy9jb3B5cmlnaHRcIlx1MDAzZU9EYkxcdTAwM2MvYVx1MDAzZS4iLCAiZGV0ZWN0UmV0aW5hIjogZmFsc2UsICJtYXhOYXRpdmVab29tIjogMTgsICJtYXhab29tIjogMTgsICJtaW5ab29tIjogMCwgIm5vV3JhcCI6IGZhbHNlLCAib3BhY2l0eSI6IDEsICJzdWJkb21haW5zIjogImFiYyIsICJ0bXMiOiBmYWxzZX0KICAgICAgICAgICAgKS5hZGRUbyhtYXBfYjFkMjMyNTNkMzgwNDcwNGFhNDhkMWY0YjlkODEyNjApOwogICAgICAgIAogICAgCiAgICAgICAgICAgIG1hcF9iMWQyMzI1M2QzODA0NzA0YWE0OGQxZjRiOWQ4MTI2MC5maXRCb3VuZHMoCiAgICAgICAgICAgICAgICBbWzQzLjUwOTY1NCwgMC4zMTM4NTNdLCBbNTAuNzM5NjY0LCAzLjM2MzU3Nl1dLAogICAgICAgICAgICAgICAge30KICAgICAgICAgICAgKTsKICAgICAgICAKICAgIAoKICAgICAgICBmdW5jdGlvbiBnZW9fanNvbl8zYzgwZThhMGZkYTY0ZTkxOGM2OTI0OTBiZDU5ZDE2NF9vbkVhY2hGZWF0dXJlKGZlYXR1cmUsIGxheWVyKSB7CiAgICAgICAgICAgIGxheWVyLm9uKHsKICAgICAgICAgICAgfSk7CiAgICAgICAgfTsKICAgICAgICB2YXIgZ2VvX2pzb25fM2M4MGU4YTBmZGE2NGU5MThjNjkyNDkwYmQ1OWQxNjQgPSBMLmdlb0pzb24obnVsbCwgewogICAgICAgICAgICAgICAgb25FYWNoRmVhdHVyZTogZ2VvX2pzb25fM2M4MGU4YTBmZGE2NGU5MThjNjkyNDkwYmQ1OWQxNjRfb25FYWNoRmVhdHVyZSwKICAgICAgICAgICAgCiAgICAgICAgfSk7CgogICAgICAgIGZ1bmN0aW9uIGdlb19qc29uXzNjODBlOGEwZmRhNjRlOTE4YzY5MjQ5MGJkNTlkMTY0X2FkZCAoZGF0YSkgewogICAgICAgICAgICBnZW9fanNvbl8zYzgwZThhMGZkYTY0ZTkxOGM2OTI0OTBiZDU5ZDE2NAogICAgICAgICAgICAgICAgLmFkZERhdGEoZGF0YSkKICAgICAgICAgICAgICAgIC5hZGRUbyhtYXBfYjFkMjMyNTNkMzgwNDcwNGFhNDhkMWY0YjlkODEyNjApOwogICAgICAgIH0KICAgICAgICAgICAgZ2VvX2pzb25fM2M4MGU4YTBmZGE2NGU5MThjNjkyNDkwYmQ1OWQxNjRfYWRkKHsiZmVhdHVyZXMiOiBbeyJnZW9tZXRyeSI6IHsiY29vcmRpbmF0ZXMiOiBbMi4zMDYyMDcsIDUwLjczOTY2NF0sICJ0eXBlIjogIlBvaW50In0sICJwcm9wZXJ0aWVzIjogeyJjb3VudHJ5IjogIkZyYW5jZSIsICJpZCI6ICJlbi4zIiwgIm5hbWUiOiAiQVJRVUVTIiwgInNvdXJjZSI6ICJub21pbmF0aW0iLCAic291cmNlTmFtZSI6ICJBcnF1ZXMsIFNhaW50LU9tZXIsIFBhcy1kZS1DYWxhaXMsIEhhdXRzLWRlLUZyYW5jZSwgRnJhbmNlIG1cdTAwZTl0cm9wb2xpdGFpbmUsIDYyNTEwLCBGcmFuY2UiLCAidHlwZSI6ICJhZG1pbmlzdHJhdGl2ZSJ9LCAidHlwZSI6ICJGZWF0dXJlIn0sIHsiZ2VvbWV0cnkiOiB7ImNvb3JkaW5hdGVzIjogWzEuODg4MzM0LCA0Ni42MDMzNTRdLCAidHlwZSI6ICJQb2ludCJ9LCAicHJvcGVydGllcyI6IHsiY291bnRyeSI6ICJGcmFuY2UiLCAiaWQiOiAiZW4uNyIsICJuYW1lIjogIkZyYW5jZSIsICJzb3VyY2UiOiAibm9taW5hdGltIiwgInNvdXJjZU5hbWUiOiAiRnJhbmNlIiwgInR5cGUiOiAiYWRtaW5pc3RyYXRpdmUifSwgInR5cGUiOiAiRmVhdHVyZSJ9LCB7Imdlb21ldHJ5IjogeyJjb29yZGluYXRlcyI6IFswLjMxMzg1MywgNDkuMDY3NzcxXSwgInR5cGUiOiAiUG9pbnQifSwgInByb3BlcnRpZXMiOiB7ImNvdW50cnkiOiAiRnJhbmNlIiwgImlkIjogImVuLjkiLCAibmFtZSI6ICJOb3JtYW5kaWUiLCAic291cmNlIjogIm5vbWluYXRpbSIsICJzb3VyY2VOYW1lIjogIk5vcm1hbmRpZSwgRnJhbmNlIG1cdTAwZTl0cm9wb2xpdGFpbmUsIEZyYW5jZSIsICJ0eXBlIjogImFkbWluaXN0cmF0aXZlIn0sICJ0eXBlIjogIkZlYXR1cmUifSwgeyJnZW9tZXRyeSI6IHsiY29vcmRpbmF0ZXMiOiBbMy4zNjM1NzYsIDQzLjUwOTY1NF0sICJ0eXBlIjogIlBvaW50In0sICJwcm9wZXJ0aWVzIjogeyJjb3VudHJ5IjogIkZyYW5jZSIsICJpZCI6ICJlbi4xMyIsICJuYW1lIjogIkNhdXgiLCAic291cmNlIjogIm5vbWluYXRpbSIsICJzb3VyY2VOYW1lIjogIkNhdXgsIEJcdTAwZTl6aWVycywgSFx1MDBlOXJhdWx0LCBPY2NpdGFuaWUsIEZyYW5jZSBtXHUwMGU5dHJvcG9saXRhaW5lLCAzNDcyMCwgRnJhbmNlIiwgInR5cGUiOiAiYWRtaW5pc3RyYXRpdmUifSwgInR5cGUiOiAiRmVhdHVyZSJ9LCB7Imdlb21ldHJ5IjogeyJjb29yZGluYXRlcyI6IFsyLjMwNjIwNywgNTAuNzM5NjY0XSwgInR5cGUiOiAiUG9pbnQifSwgInByb3BlcnRpZXMiOiB7ImNvdW50cnkiOiAiRnJhbmNlIiwgImlkIjogImVuLjE3IiwgIm5hbWUiOiAiQXJxdWVzIiwgInNvdXJjZSI6ICJub21pbmF0aW0iLCAic291cmNlTmFtZSI6ICJBcnF1ZXMsIFNhaW50LU9tZXIsIFBhcy1kZS1DYWxhaXMsIEhhdXRzLWRlLUZyYW5jZSwgRnJhbmNlIG1cdTAwZTl0cm9wb2xpdGFpbmUsIDYyNTEwLCBGcmFuY2UiLCAidHlwZSI6ICJhZG1pbmlzdHJhdGl2ZSJ9LCAidHlwZSI6ICJGZWF0dXJlIn1dLCAidHlwZSI6ICJGZWF0dXJlQ29sbGVjdGlvbiJ9KTsKCiAgICAgICAgCiAgICAKICAgIGdlb19qc29uXzNjODBlOGEwZmRhNjRlOTE4YzY5MjQ5MGJkNTlkMTY0LmJpbmRUb29sdGlwKAogICAgZnVuY3Rpb24obGF5ZXIpewogICAgbGV0IGRpdiA9IEwuRG9tVXRpbC5jcmVhdGUoJ2RpdicpOwogICAgCiAgICBsZXQgaGFuZGxlT2JqZWN0ID0gZmVhdHVyZT0+dHlwZW9mKGZlYXR1cmUpPT0nb2JqZWN0JyA/IEpTT04uc3RyaW5naWZ5KGZlYXR1cmUpIDogZmVhdHVyZTsKICAgIGxldCBmaWVsZHMgPSBbIm5hbWUiLCAic291cmNlIl07CiAgICBsZXQgYWxpYXNlcyA9IFsibmFtZSIsICJzb3VyY2UiXTsKICAgIGxldCB0YWJsZSA9ICc8dGFibGU+JyArCiAgICAgICAgU3RyaW5nKAogICAgICAgIGZpZWxkcy5tYXAoCiAgICAgICAgKHYsaSk9PgogICAgICAgIGA8dHI+CiAgICAgICAgICAgIDx0aD4ke2FsaWFzZXNbaV0udG9Mb2NhbGVTdHJpbmcoKX08L3RoPgogICAgICAgICAgICAKICAgICAgICAgICAgPHRkPiR7aGFuZGxlT2JqZWN0KGxheWVyLmZlYXR1cmUucHJvcGVydGllc1t2XSkudG9Mb2NhbGVTdHJpbmcoKX08L3RkPgogICAgICAgIDwvdHI+YCkuam9pbignJykpCiAgICArJzwvdGFibGU+JzsKICAgIGRpdi5pbm5lckhUTUw9dGFibGU7CiAgICAKICAgIHJldHVybiBkaXYKICAgIH0KICAgICx7ImNsYXNzTmFtZSI6ICJmb2xpdW10b29sdGlwIiwgInN0aWNreSI6IHRydWV9KTsKICAgICAgICAgICAgICAgICAgICAgCjwvc2NyaXB0Pg==\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>" - ], - "text/plain": [ - "<folium.folium.Map at 0x7f2cfcda8bb0>" - ] - }, - "execution_count": null, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# afficher la carte des lieux localisés\n", "arques_perdido.get_folium_map()" @@ -2795,50 +1392,7 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<span class=\"tex2jax_ignore\"><div class=\"entities\" style=\"line-height: 2.5; direction: ltr\">* \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " ARQUES\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " , ( Géog . ) petite ville de \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " France\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " , en \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Normandie\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " , au pays de \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Caux\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " , sur la petite riviere d' \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Arques\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " . \n", - "<mark class=\"entity\" style=\"background: #ddd; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Long . 18 . 50 . lat . 49 . 54 .\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">MISC</span>\n", - "</mark>\n", - " </div></span>" - ], - "text/plain": [ - "<IPython.core.display.HTML object>" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "displacy.render(doc.to_spacy_doc(), style=\"ent\", jupyter=True)" ] @@ -2863,150 +1417,9 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe srcdoc=\"<!DOCTYPE html>\n", - "<head> \n", - " <meta http-equiv="content-type" content="text/html; charset=UTF-8" />\n", - " \n", - " <script>\n", - " L_NO_TOUCH = false;\n", - " L_DISABLE_3D = false;\n", - " </script>\n", - " \n", - " <style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>\n", - " <style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>\n", - " <script src="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.js"></script>\n", - " <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>\n", - " <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>\n", - " <script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>\n", - " <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"/>\n", - " <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>\n", - " <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css"/>\n", - " \n", - " <meta name="viewport" content="width=device-width,\n", - " initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />\n", - " <style>\n", - " #map_dd89ac42ae870cbb7159446777545839 {\n", - " position: relative;\n", - " width: 100.0%;\n", - " height: 100.0%;\n", - " left: 0.0%;\n", - " top: 0.0%;\n", - " }\n", - " </style>\n", - " \n", - " \n", - " <style>\n", - " .foliumtooltip {\n", - " \n", - " }\n", - " .foliumtooltip table{\n", - " margin: auto;\n", - " }\n", - " .foliumtooltip tr{\n", - " text-align: left;\n", - " }\n", - " .foliumtooltip th{\n", - " padding: 2px; padding-right: 8px;\n", - " }\n", - " </style>\n", - " \n", - "</head>\n", - "<body> \n", - " \n", - " <div class="folium-map" id="map_dd89ac42ae870cbb7159446777545839" ></div>\n", - " \n", - "</body>\n", - "<script> \n", - " \n", - " var map_dd89ac42ae870cbb7159446777545839 = L.map(\n", - " "map_dd89ac42ae870cbb7159446777545839",\n", - " {\n", - " center: [0, 0],\n", - " crs: L.CRS.EPSG3857,\n", - " zoom: 1,\n", - " zoomControl: true,\n", - " preferCanvas: false,\n", - " }\n", - " );\n", - "\n", - " \n", - "\n", - " \n", - " \n", - " var tile_layer_4782d904886c3e3281ca12fdeeb6a9d5 = L.tileLayer(\n", - " "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",\n", - " {"attribution": "Data by \\u0026copy; \\u003ca href=\\"http://openstreetmap.org\\"\\u003eOpenStreetMap\\u003c/a\\u003e, under \\u003ca href=\\"http://www.openstreetmap.org/copyright\\"\\u003eODbL\\u003c/a\\u003e.", "detectRetina": false, "maxNativeZoom": 18, "maxZoom": 18, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}\n", - " ).addTo(map_dd89ac42ae870cbb7159446777545839);\n", - " \n", - " \n", - " map_dd89ac42ae870cbb7159446777545839.fitBounds(\n", - " [[43.509654, 0.313853], [50.739664, 3.363576]],\n", - " {}\n", - " );\n", - " \n", - " \n", - "\n", - " function geo_json_e9249a4c2a76a2aa70bfb96df78778d6_onEachFeature(feature, layer) {\n", - " layer.on({\n", - " });\n", - " };\n", - " var geo_json_e9249a4c2a76a2aa70bfb96df78778d6 = L.geoJson(null, {\n", - " onEachFeature: geo_json_e9249a4c2a76a2aa70bfb96df78778d6_onEachFeature,\n", - " \n", - " });\n", - "\n", - " function geo_json_e9249a4c2a76a2aa70bfb96df78778d6_add (data) {\n", - " geo_json_e9249a4c2a76a2aa70bfb96df78778d6\n", - " .addData(data)\n", - " .addTo(map_dd89ac42ae870cbb7159446777545839);\n", - " }\n", - " geo_json_e9249a4c2a76a2aa70bfb96df78778d6_add({"features": [{"geometry": {"coordinates": [2.306207, 50.739664], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Arques", "source": "nominatim", "sourceName": "Arques, Saint-Omer, Pas-de-Calais, Hauts-de-France, France m\\u00e9tropolitaine, 62510, France", "type": "administrative"}, "type": "Feature"}, {"geometry": {"coordinates": [1.888334, 46.603354], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "France", "source": "nominatim", "sourceName": "France", "type": "administrative"}, "type": "Feature"}, {"geometry": {"coordinates": [0.313853, 49.067771], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Normandie", "source": "nominatim", "sourceName": "Normandie, France m\\u00e9tropolitaine, France", "type": "administrative"}, "type": "Feature"}, {"geometry": {"coordinates": [3.363576, 43.509654], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Caux", "source": "nominatim", "sourceName": "Caux, B\\u00e9ziers, H\\u00e9rault, Occitanie, France m\\u00e9tropolitaine, 34720, France", "type": "administrative"}, "type": "Feature"}], "type": "FeatureCollection"});\n", - "\n", - " \n", - " \n", - " geo_json_e9249a4c2a76a2aa70bfb96df78778d6.bindTooltip(\n", - " function(layer){\n", - " let div = L.DomUtil.create('div');\n", - " \n", - " let handleObject = feature=>typeof(feature)=='object' ? JSON.stringify(feature) : feature;\n", - " let fields = ["name", "source"];\n", - " let aliases = ["name", "source"];\n", - " let table = '<table>' +\n", - " String(\n", - " fields.map(\n", - " (v,i)=>\n", - " `<tr>\n", - " <th>${aliases[i].toLocaleString()}</th>\n", - " \n", - " <td>${handleObject(layer.feature.properties[v]).toLocaleString()}</td>\n", - " </tr>`).join(''))\n", - " +'</table>';\n", - " div.innerHTML=table;\n", - " \n", - " return div\n", - " }\n", - " ,{"className": "foliumtooltip", "sticky": true});\n", - " \n", - "</script>\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>" - ], - "text/plain": [ - "<folium.folium.Map at 0x1364444c0>" - ] - }, - "execution_count": 43, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "geocoder = Geocoder()\n", "doc = geocoder(['Arques', 'France', 'Normandie', 'Caux'])\n", @@ -3029,150 +1442,9 @@ }, { "cell_type": "code", - "execution_count": 44, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe srcdoc=\"<!DOCTYPE html>\n", - "<head> \n", - " <meta http-equiv="content-type" content="text/html; charset=UTF-8" />\n", - " \n", - " <script>\n", - " L_NO_TOUCH = false;\n", - " L_DISABLE_3D = false;\n", - " </script>\n", - " \n", - " <style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>\n", - " <style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>\n", - " <script src="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.js"></script>\n", - " <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>\n", - " <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>\n", - " <script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>\n", - " <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"/>\n", - " <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>\n", - " <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css"/>\n", - " \n", - " <meta name="viewport" content="width=device-width,\n", - " initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />\n", - " <style>\n", - " #map_59535c55be1b5637c40456b8f5f7883d {\n", - " position: relative;\n", - " width: 100.0%;\n", - " height: 100.0%;\n", - " left: 0.0%;\n", - " top: 0.0%;\n", - " }\n", - " </style>\n", - " \n", - " \n", - " <style>\n", - " .foliumtooltip {\n", - " \n", - " }\n", - " .foliumtooltip table{\n", - " margin: auto;\n", - " }\n", - " .foliumtooltip tr{\n", - " text-align: left;\n", - " }\n", - " .foliumtooltip th{\n", - " padding: 2px; padding-right: 8px;\n", - " }\n", - " </style>\n", - " \n", - "</head>\n", - "<body> \n", - " \n", - " <div class="folium-map" id="map_59535c55be1b5637c40456b8f5f7883d" ></div>\n", - " \n", - "</body>\n", - "<script> \n", - " \n", - " var map_59535c55be1b5637c40456b8f5f7883d = L.map(\n", - " "map_59535c55be1b5637c40456b8f5f7883d",\n", - " {\n", - " center: [0, 0],\n", - " crs: L.CRS.EPSG3857,\n", - " zoom: 1,\n", - " zoomControl: true,\n", - " preferCanvas: false,\n", - " }\n", - " );\n", - "\n", - " \n", - "\n", - " \n", - " \n", - " var tile_layer_47edb15d276c90ac632a05cf233927bf = L.tileLayer(\n", - " "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",\n", - " {"attribution": "Data by \\u0026copy; \\u003ca href=\\"http://openstreetmap.org\\"\\u003eOpenStreetMap\\u003c/a\\u003e, under \\u003ca href=\\"http://www.openstreetmap.org/copyright\\"\\u003eODbL\\u003c/a\\u003e.", "detectRetina": false, "maxNativeZoom": 18, "maxZoom": 18, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}\n", - " ).addTo(map_59535c55be1b5637c40456b8f5f7883d);\n", - " \n", - " \n", - " map_59535c55be1b5637c40456b8f5f7883d.fitBounds(\n", - " [[50.739664, 2.306207], [50.739664, 2.306207]],\n", - " {}\n", - " );\n", - " \n", - " \n", - "\n", - " function geo_json_64e3f540392f97569e50336fe10eccb6_onEachFeature(feature, layer) {\n", - " layer.on({\n", - " });\n", - " };\n", - " var geo_json_64e3f540392f97569e50336fe10eccb6 = L.geoJson(null, {\n", - " onEachFeature: geo_json_64e3f540392f97569e50336fe10eccb6_onEachFeature,\n", - " \n", - " });\n", - "\n", - " function geo_json_64e3f540392f97569e50336fe10eccb6_add (data) {\n", - " geo_json_64e3f540392f97569e50336fe10eccb6\n", - " .addData(data)\n", - " .addTo(map_59535c55be1b5637c40456b8f5f7883d);\n", - " }\n", - " geo_json_64e3f540392f97569e50336fe10eccb6_add({"features": [{"geometry": {"coordinates": [2.306207, 50.739664], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Arques", "source": "nominatim", "sourceName": "Arques, Saint-Omer, Pas-de-Calais, Hauts-de-France, France m\\u00e9tropolitaine, 62510, France", "type": "administrative"}, "type": "Feature"}], "type": "FeatureCollection"});\n", - "\n", - " \n", - " \n", - " geo_json_64e3f540392f97569e50336fe10eccb6.bindTooltip(\n", - " function(layer){\n", - " let div = L.DomUtil.create('div');\n", - " \n", - " let handleObject = feature=>typeof(feature)=='object' ? JSON.stringify(feature) : feature;\n", - " let fields = ["name", "source"];\n", - " let aliases = ["name", "source"];\n", - " let table = '<table>' +\n", - " String(\n", - " fields.map(\n", - " (v,i)=>\n", - " `<tr>\n", - " <th>${aliases[i].toLocaleString()}</th>\n", - " \n", - " <td>${handleObject(layer.feature.properties[v]).toLocaleString()}</td>\n", - " </tr>`).join(''))\n", - " +'</table>';\n", - " div.innerHTML=table;\n", - " \n", - " return div\n", - " }\n", - " ,{"className": "foliumtooltip", "sticky": true});\n", - " \n", - "</script>\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>" - ], - "text/plain": [ - "<folium.folium.Map at 0x139498370>" - ] - }, - "execution_count": 44, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "geocoder = Geocoder()\n", "doc = geocoder('Arques')\n", @@ -3192,150 +1464,9 @@ }, { "cell_type": "code", - "execution_count": 45, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe srcdoc=\"<!DOCTYPE html>\n", - "<head> \n", - " <meta http-equiv="content-type" content="text/html; charset=UTF-8" />\n", - " \n", - " <script>\n", - " L_NO_TOUCH = false;\n", - " L_DISABLE_3D = false;\n", - " </script>\n", - " \n", - " <style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>\n", - " <style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>\n", - " <script src="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.js"></script>\n", - " <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>\n", - " <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>\n", - " <script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>\n", - " <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"/>\n", - " <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>\n", - " <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css"/>\n", - " \n", - " <meta name="viewport" content="width=device-width,\n", - " initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />\n", - " <style>\n", - " #map_63618c96462536617818b2f8b2a44078 {\n", - " position: relative;\n", - " width: 100.0%;\n", - " height: 100.0%;\n", - " left: 0.0%;\n", - " top: 0.0%;\n", - " }\n", - " </style>\n", - " \n", - " \n", - " <style>\n", - " .foliumtooltip {\n", - " \n", - " }\n", - " .foliumtooltip table{\n", - " margin: auto;\n", - " }\n", - " .foliumtooltip tr{\n", - " text-align: left;\n", - " }\n", - " .foliumtooltip th{\n", - " padding: 2px; padding-right: 8px;\n", - " }\n", - " </style>\n", - " \n", - "</head>\n", - "<body> \n", - " \n", - " <div class="folium-map" id="map_63618c96462536617818b2f8b2a44078" ></div>\n", - " \n", - "</body>\n", - "<script> \n", - " \n", - " var map_63618c96462536617818b2f8b2a44078 = L.map(\n", - " "map_63618c96462536617818b2f8b2a44078",\n", - " {\n", - " center: [0, 0],\n", - " crs: L.CRS.EPSG3857,\n", - " zoom: 1,\n", - " zoomControl: true,\n", - " preferCanvas: false,\n", - " }\n", - " );\n", - "\n", - " \n", - "\n", - " \n", - " \n", - " var tile_layer_9f730c6cce107b4cd251ef58c29c184d = L.tileLayer(\n", - " "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",\n", - " {"attribution": "Data by \\u0026copy; \\u003ca href=\\"http://openstreetmap.org\\"\\u003eOpenStreetMap\\u003c/a\\u003e, under \\u003ca href=\\"http://www.openstreetmap.org/copyright\\"\\u003eODbL\\u003c/a\\u003e.", "detectRetina": false, "maxNativeZoom": 18, "maxZoom": 18, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}\n", - " ).addTo(map_63618c96462536617818b2f8b2a44078);\n", - " \n", - " \n", - " map_63618c96462536617818b2f8b2a44078.fitBounds(\n", - " [[41.661452, -8.721672], [50.746125, 3.119602]],\n", - " {}\n", - " );\n", - " \n", - " \n", - "\n", - " function geo_json_bec8a3ab7635a52f96c2bb02f32faa57_onEachFeature(feature, layer) {\n", - " layer.on({\n", - " });\n", - " };\n", - " var geo_json_bec8a3ab7635a52f96c2bb02f32faa57 = L.geoJson(null, {\n", - " onEachFeature: geo_json_bec8a3ab7635a52f96c2bb02f32faa57_onEachFeature,\n", - " \n", - " });\n", - "\n", - " function geo_json_bec8a3ab7635a52f96c2bb02f32faa57_add (data) {\n", - " geo_json_bec8a3ab7635a52f96c2bb02f32faa57\n", - " .addData(data)\n", - " .addTo(map_63618c96462536617818b2f8b2a44078);\n", - " }\n", - " geo_json_bec8a3ab7635a52f96c2bb02f32faa57_add({"features": [{"geometry": {"coordinates": [2.306207, 50.739664], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Arques", "source": "nominatim", "sourceName": "Arques, Saint-Omer, Pas-de-Calais, Hauts-de-France, France m\\u00e9tropolitaine, 62510, France", "type": "administrative"}, "type": "Feature"}, {"geometry": {"coordinates": [2.374819, 42.952872], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Arques", "source": "nominatim", "sourceName": "Arques, Limoux, Aude, Occitanie, France m\\u00e9tropolitaine, 11190, France", "type": "administrative"}, "type": "Feature"}, {"geometry": {"coordinates": [2.799134, 44.317619], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Arques", "source": "nominatim", "sourceName": "Arques, Millau, Aveyron, Occitanie, France m\\u00e9tropolitaine, 12290, France", "type": "administrative"}, "type": "Feature"}, {"geometry": {"coordinates": [1.648002, 44.968669], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Arques", "source": "nominatim", "sourceName": "Arques, Strenquels, Gourdon, Lot, Occitanie, France m\\u00e9tropolitaine, 46110, France", "type": "hamlet"}, "type": "Feature"}, {"geometry": {"coordinates": [-8.721672, 41.661452], "type": "Point"}, "properties": {"country": "Portugal", "id": 0, "name": "Arques", "source": "nominatim", "sourceName": "Arques, Vila de Punhe, Viana do Castelo, 4905-643, Portugal", "type": "hamlet"}, "type": "Feature"}, {"geometry": {"coordinates": [3.119602, 44.004793], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Arques", "source": "nominatim", "sourceName": "Arques, Lapanouse-de-Cernon, Millau, Aveyron, Occitanie, France m\\u00e9tropolitaine, 12230, France", "type": "isolated_dwelling"}, "type": "Feature"}, {"geometry": {"coordinates": [2.320674, 50.746125], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Arques", "source": "nominatim", "sourceName": "Arques (Parc naturel r\\u00e9gional des caps et marais d\\u0027Opale), Arques, Saint-Omer, Pas-de-Calais, Hauts-de-France, France m\\u00e9tropolitaine, 62510, France", "type": "admin_fraction"}, "type": "Feature"}, {"geometry": {"coordinates": [2.05149, 42.812241], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Arques", "source": "nominatim", "sourceName": "Arques, Galinagues, Limoux, Aude, Occitanie, France m\\u00e9tropolitaine, 11140, France", "type": "locality"}, "type": "Feature"}, {"geometry": {"coordinates": [0.252495, 43.245551], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Arques", "source": "nominatim", "sourceName": "Arqu\\u00e8s, Goudon, Tarbes, Hautes-Pyr\\u00e9n\\u00e9es, Occitanie, France m\\u00e9tropolitaine, 65190, France", "type": "locality"}, "type": "Feature"}, {"geometry": {"coordinates": [2.302074, 50.728092], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Arques", "source": "nominatim", "sourceName": "Arques, Rue de Boulogne, Arques, Saint-Omer, Pas-de-Calais, Hauts-de-France, France m\\u00e9tropolitaine, 62510, France", "type": "station"}, "type": "Feature"}], "type": "FeatureCollection"});\n", - "\n", - " \n", - " \n", - " geo_json_bec8a3ab7635a52f96c2bb02f32faa57.bindTooltip(\n", - " function(layer){\n", - " let div = L.DomUtil.create('div');\n", - " \n", - " let handleObject = feature=>typeof(feature)=='object' ? JSON.stringify(feature) : feature;\n", - " let fields = ["name", "source"];\n", - " let aliases = ["name", "source"];\n", - " let table = '<table>' +\n", - " String(\n", - " fields.map(\n", - " (v,i)=>\n", - " `<tr>\n", - " <th>${aliases[i].toLocaleString()}</th>\n", - " \n", - " <td>${handleObject(layer.feature.properties[v]).toLocaleString()}</td>\n", - " </tr>`).join(''))\n", - " +'</table>';\n", - " div.innerHTML=table;\n", - " \n", - " return div\n", - " }\n", - " ,{"className": "foliumtooltip", "sticky": true});\n", - " \n", - "</script>\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>" - ], - "text/plain": [ - "<folium.folium.Map at 0x13960ae50>" - ] - }, - "execution_count": 45, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "geocoder = Geocoder(max_rows=10)\n", "doc = geocoder('Arques')\n", @@ -3353,311 +1484,29 @@ }, { "cell_type": "code", - "execution_count": 46, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe srcdoc=\"<!DOCTYPE html>\n", - "<head> \n", - " <meta http-equiv="content-type" content="text/html; charset=UTF-8" />\n", - " \n", - " <script>\n", - " L_NO_TOUCH = false;\n", - " L_DISABLE_3D = false;\n", - " </script>\n", - " \n", - " <style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>\n", - " <style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>\n", - " <script src="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.js"></script>\n", - " <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>\n", - " <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>\n", - " <script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>\n", - " <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"/>\n", - " <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>\n", - " <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css"/>\n", - " \n", - " <meta name="viewport" content="width=device-width,\n", - " initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />\n", - " <style>\n", - " #map_df27575fa06ed6bef2bba3057abe507b {\n", - " position: relative;\n", - " width: 100.0%;\n", - " height: 100.0%;\n", - " left: 0.0%;\n", - " top: 0.0%;\n", - " }\n", - " </style>\n", - " \n", - " \n", - " <style>\n", - " .foliumtooltip {\n", - " \n", - " }\n", - " .foliumtooltip table{\n", - " margin: auto;\n", - " }\n", - " .foliumtooltip tr{\n", - " text-align: left;\n", - " }\n", - " .foliumtooltip th{\n", - " padding: 2px; padding-right: 8px;\n", - " }\n", - " </style>\n", - " \n", - "</head>\n", - "<body> \n", - " \n", - " <div class="folium-map" id="map_df27575fa06ed6bef2bba3057abe507b" ></div>\n", - " \n", - "</body>\n", - "<script> \n", - " \n", - " var map_df27575fa06ed6bef2bba3057abe507b = L.map(\n", - " "map_df27575fa06ed6bef2bba3057abe507b",\n", - " {\n", - " center: [0, 0],\n", - " crs: L.CRS.EPSG3857,\n", - " zoom: 1,\n", - " zoomControl: true,\n", - " preferCanvas: false,\n", - " }\n", - " );\n", - "\n", - " \n", - "\n", - " \n", - " \n", - " var tile_layer_08e1e9b0627908a05f97b17fd829ee58 = L.tileLayer(\n", - " "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",\n", - " {"attribution": "Data by \\u0026copy; \\u003ca href=\\"http://openstreetmap.org\\"\\u003eOpenStreetMap\\u003c/a\\u003e, under \\u003ca href=\\"http://www.openstreetmap.org/copyright\\"\\u003eODbL\\u003c/a\\u003e.", "detectRetina": false, "maxNativeZoom": 18, "maxZoom": 18, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}\n", - " ).addTo(map_df27575fa06ed6bef2bba3057abe507b);\n", - " \n", - " \n", - " map_df27575fa06ed6bef2bba3057abe507b.fitBounds(\n", - " [[42.734711, 1.544996], [42.734711, 1.544996]],\n", - " {}\n", - " );\n", - " \n", - " \n", - "\n", - " function geo_json_90ec7e368d77ecab5072aa089af85213_onEachFeature(feature, layer) {\n", - " layer.on({\n", - " });\n", - " };\n", - " var geo_json_90ec7e368d77ecab5072aa089af85213 = L.geoJson(null, {\n", - " onEachFeature: geo_json_90ec7e368d77ecab5072aa089af85213_onEachFeature,\n", - " \n", - " });\n", - "\n", - " function geo_json_90ec7e368d77ecab5072aa089af85213_add (data) {\n", - " geo_json_90ec7e368d77ecab5072aa089af85213\n", - " .addData(data)\n", - " .addTo(map_df27575fa06ed6bef2bba3057abe507b);\n", - " }\n", - " geo_json_90ec7e368d77ecab5072aa089af85213_add({"features": [{"geometry": {"coordinates": [1.544996, 42.734711], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Arques", "source": "ign", "sourceName": "Siguer", "type": "Versant"}, "type": "Feature"}], "type": "FeatureCollection"});\n", - "\n", - " \n", - " \n", - " geo_json_90ec7e368d77ecab5072aa089af85213.bindTooltip(\n", - " function(layer){\n", - " let div = L.DomUtil.create('div');\n", - " \n", - " let handleObject = feature=>typeof(feature)=='object' ? JSON.stringify(feature) : feature;\n", - " let fields = ["name", "source"];\n", - " let aliases = ["name", "source"];\n", - " let table = '<table>' +\n", - " String(\n", - " fields.map(\n", - " (v,i)=>\n", - " `<tr>\n", - " <th>${aliases[i].toLocaleString()}</th>\n", - " \n", - " <td>${handleObject(layer.feature.properties[v]).toLocaleString()}</td>\n", - " </tr>`).join(''))\n", - " +'</table>';\n", - " div.innerHTML=table;\n", - " \n", - " return div\n", - " }\n", - " ,{"className": "foliumtooltip", "sticky": true});\n", - " \n", - "</script>\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>" - ], - "text/plain": [ - "<folium.folium.Map at 0x1393e1a60>" - ] - }, - "execution_count": 46, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "geocoder = Geocoder(sources=['ign'])\n", "doc = geocoder('Arques')\n", - "doc.get_folium_map()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "On observe que le premier résultat retourné par l'IGN ne se situe ni en Normandie (comme attendu), ni dans le Pas-de-Calais comme le premier résultat retourné par OpenStreetMap.\n", - "\n", - "* Augmenter le nombre de résultats retournés par l'IGN" - ] - }, - { - "cell_type": "code", - "execution_count": 47, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe srcdoc=\"<!DOCTYPE html>\n", - "<head> \n", - " <meta http-equiv="content-type" content="text/html; charset=UTF-8" />\n", - " \n", - " <script>\n", - " L_NO_TOUCH = false;\n", - " L_DISABLE_3D = false;\n", - " </script>\n", - " \n", - " <style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>\n", - " <style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>\n", - " <script src="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.js"></script>\n", - " <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>\n", - " <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>\n", - " <script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>\n", - " <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"/>\n", - " <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>\n", - " <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css"/>\n", - " \n", - " <meta name="viewport" content="width=device-width,\n", - " initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />\n", - " <style>\n", - " #map_6ba7d3b7d2655ead73b72063fddf7be4 {\n", - " position: relative;\n", - " width: 100.0%;\n", - " height: 100.0%;\n", - " left: 0.0%;\n", - " top: 0.0%;\n", - " }\n", - " </style>\n", - " \n", - " \n", - " <style>\n", - " .foliumtooltip {\n", - " \n", - " }\n", - " .foliumtooltip table{\n", - " margin: auto;\n", - " }\n", - " .foliumtooltip tr{\n", - " text-align: left;\n", - " }\n", - " .foliumtooltip th{\n", - " padding: 2px; padding-right: 8px;\n", - " }\n", - " </style>\n", - " \n", - "</head>\n", - "<body> \n", - " \n", - " <div class="folium-map" id="map_6ba7d3b7d2655ead73b72063fddf7be4" ></div>\n", - " \n", - "</body>\n", - "<script> \n", - " \n", - " var map_6ba7d3b7d2655ead73b72063fddf7be4 = L.map(\n", - " "map_6ba7d3b7d2655ead73b72063fddf7be4",\n", - " {\n", - " center: [0, 0],\n", - " crs: L.CRS.EPSG3857,\n", - " zoom: 1,\n", - " zoomControl: true,\n", - " preferCanvas: false,\n", - " }\n", - " );\n", - "\n", - " \n", - "\n", - " \n", - " \n", - " var tile_layer_9721647b4c037252ae072e97ea081792 = L.tileLayer(\n", - " "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",\n", - " {"attribution": "Data by \\u0026copy; \\u003ca href=\\"http://openstreetmap.org\\"\\u003eOpenStreetMap\\u003c/a\\u003e, under \\u003ca href=\\"http://www.openstreetmap.org/copyright\\"\\u003eODbL\\u003c/a\\u003e.", "detectRetina": false, "maxNativeZoom": 18, "maxZoom": 18, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}\n", - " ).addTo(map_6ba7d3b7d2655ead73b72063fddf7be4);\n", - " \n", - " \n", - " map_6ba7d3b7d2655ead73b72063fddf7be4.fitBounds(\n", - " [[42.734711, 0.253068], [50.733882, 2.799876]],\n", - " {}\n", - " );\n", - " \n", - " \n", - "\n", - " function geo_json_d25949ec49df3d1b808485fe3abfc56e_onEachFeature(feature, layer) {\n", - " layer.on({\n", - " });\n", - " };\n", - " var geo_json_d25949ec49df3d1b808485fe3abfc56e = L.geoJson(null, {\n", - " onEachFeature: geo_json_d25949ec49df3d1b808485fe3abfc56e_onEachFeature,\n", - " \n", - " });\n", - "\n", - " function geo_json_d25949ec49df3d1b808485fe3abfc56e_add (data) {\n", - " geo_json_d25949ec49df3d1b808485fe3abfc56e\n", - " .addData(data)\n", - " .addTo(map_6ba7d3b7d2655ead73b72063fddf7be4);\n", - " }\n", - " geo_json_d25949ec49df3d1b808485fe3abfc56e_add({"features": [{"geometry": {"coordinates": [1.544996, 42.734711], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Arques", "source": "ign", "sourceName": "Siguer", "type": "Versant"}, "type": "Feature"}, {"geometry": {"coordinates": [2.376764, 42.952434], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Arques", "source": "ign", "sourceName": "Arques", "type": "Commune"}, "type": "Feature"}, {"geometry": {"coordinates": [2.799876, 44.317956], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Arques", "source": "ign", "sourceName": "Arques", "type": "Commune"}, "type": "Feature"}, {"geometry": {"coordinates": [1.250132, 43.293669], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Arques", "source": "ign", "sourceName": "Marquefave", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [1.647947, 44.968879], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Arques", "source": "ign", "sourceName": "Strenquels", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [2.294824, 50.733882], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Arques", "source": "ign", "sourceName": "Arques", "type": "Commune"}, "type": "Feature"}, {"geometry": {"coordinates": [0.253068, 43.245235], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Arques", "source": "ign", "sourceName": "Goudon", "type": "Lieu-dit non habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [2.792246, 44.065762], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Arques", "source": "ign", "sourceName": "Viala-du-Tarn", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [2.793915, 44.068551], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Arques", "source": "ign", "sourceName": "Viala-du-Tarn", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [1.125078, 49.880248], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Arques", "source": "ign", "sourceName": "Arques-la-Bataille", "type": "Commune"}, "type": "Feature"}], "type": "FeatureCollection"});\n", - "\n", - " \n", - " \n", - " geo_json_d25949ec49df3d1b808485fe3abfc56e.bindTooltip(\n", - " function(layer){\n", - " let div = L.DomUtil.create('div');\n", - " \n", - " let handleObject = feature=>typeof(feature)=='object' ? JSON.stringify(feature) : feature;\n", - " let fields = ["name", "source"];\n", - " let aliases = ["name", "source"];\n", - " let table = '<table>' +\n", - " String(\n", - " fields.map(\n", - " (v,i)=>\n", - " `<tr>\n", - " <th>${aliases[i].toLocaleString()}</th>\n", - " \n", - " <td>${handleObject(layer.feature.properties[v]).toLocaleString()}</td>\n", - " </tr>`).join(''))\n", - " +'</table>';\n", - " div.innerHTML=table;\n", - " \n", - " return div\n", - " }\n", - " ,{"className": "foliumtooltip", "sticky": true});\n", - " \n", - "</script>\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>" - ], - "text/plain": [ - "<folium.folium.Map at 0x1393e1e80>" - ] - }, - "execution_count": 47, - "metadata": {}, - "output_type": "execute_result" - } - ], + "doc.get_folium_map()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "On observe que le premier résultat retourné par l'IGN ne se situe ni en Normandie (comme attendu), ni dans le Pas-de-Calais comme le premier résultat retourné par OpenStreetMap.\n", + "\n", + "* Augmenter le nombre de résultats retournés par l'IGN" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "geocoder = Geocoder(sources=['ign'], max_rows=10)\n", "doc = geocoder('Arques')\n", @@ -3692,150 +1541,9 @@ }, { "cell_type": "code", - "execution_count": 48, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe srcdoc=\"<!DOCTYPE html>\n", - "<head> \n", - " <meta http-equiv="content-type" content="text/html; charset=UTF-8" />\n", - " \n", - " <script>\n", - " L_NO_TOUCH = false;\n", - " L_DISABLE_3D = false;\n", - " </script>\n", - " \n", - " <style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>\n", - " <style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>\n", - " <script src="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.js"></script>\n", - " <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>\n", - " <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>\n", - " <script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>\n", - " <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"/>\n", - " <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>\n", - " <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css"/>\n", - " \n", - " <meta name="viewport" content="width=device-width,\n", - " initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />\n", - " <style>\n", - " #map_2f60482e1ad76c06d8a0a164e1edf2e8 {\n", - " position: relative;\n", - " width: 100.0%;\n", - " height: 100.0%;\n", - " left: 0.0%;\n", - " top: 0.0%;\n", - " }\n", - " </style>\n", - " \n", - " \n", - " <style>\n", - " .foliumtooltip {\n", - " \n", - " }\n", - " .foliumtooltip table{\n", - " margin: auto;\n", - " }\n", - " .foliumtooltip tr{\n", - " text-align: left;\n", - " }\n", - " .foliumtooltip th{\n", - " padding: 2px; padding-right: 8px;\n", - " }\n", - " </style>\n", - " \n", - "</head>\n", - "<body> \n", - " \n", - " <div class="folium-map" id="map_2f60482e1ad76c06d8a0a164e1edf2e8" ></div>\n", - " \n", - "</body>\n", - "<script> \n", - " \n", - " var map_2f60482e1ad76c06d8a0a164e1edf2e8 = L.map(\n", - " "map_2f60482e1ad76c06d8a0a164e1edf2e8",\n", - " {\n", - " center: [0, 0],\n", - " crs: L.CRS.EPSG3857,\n", - " zoom: 1,\n", - " zoomControl: true,\n", - " preferCanvas: false,\n", - " }\n", - " );\n", - "\n", - " \n", - "\n", - " \n", - " \n", - " var tile_layer_07e97932ffccc7aa63a649d591b507a9 = L.tileLayer(\n", - " "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",\n", - " {"attribution": "Data by \\u0026copy; \\u003ca href=\\"http://openstreetmap.org\\"\\u003eOpenStreetMap\\u003c/a\\u003e, under \\u003ca href=\\"http://www.openstreetmap.org/copyright\\"\\u003eODbL\\u003c/a\\u003e.", "detectRetina": false, "maxNativeZoom": 18, "maxZoom": 18, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}\n", - " ).addTo(map_2f60482e1ad76c06d8a0a164e1edf2e8);\n", - " \n", - " \n", - " map_2f60482e1ad76c06d8a0a164e1edf2e8.fitBounds(\n", - " [[43.079622, -4.068862], [50.130325, 5.821841]],\n", - " {}\n", - " );\n", - " \n", - " \n", - "\n", - " function geo_json_af9c2205b1a91c46be98c458d8993c75_onEachFeature(feature, layer) {\n", - " layer.on({\n", - " });\n", - " };\n", - " var geo_json_af9c2205b1a91c46be98c458d8993c75 = L.geoJson(null, {\n", - " onEachFeature: geo_json_af9c2205b1a91c46be98c458d8993c75_onEachFeature,\n", - " \n", - " });\n", - "\n", - " function geo_json_af9c2205b1a91c46be98c458d8993c75_add (data) {\n", - " geo_json_af9c2205b1a91c46be98c458d8993c75\n", - " .addData(data)\n", - " .addTo(map_2f60482e1ad76c06d8a0a164e1edf2e8);\n", - " }\n", - " geo_json_af9c2205b1a91c46be98c458d8993c75_add({"features": [{"geometry": {"coordinates": [5.096652, 45.869265], "type": "Point"}, "properties": {"country": "France", "id": "en.5", "name": "France", "source": "ign", "sourceName": "Bressolles", "type": "Quartier"}, "type": "Feature"}, {"geometry": {"coordinates": [5.354185, 46.233164], "type": "Point"}, "properties": {"country": "France", "id": "en.5", "name": "France", "source": "ign", "sourceName": "Meillonnas", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [5.67897, 44.471041], "type": "Point"}, "properties": {"country": "France", "id": "en.5", "name": "France", "source": "ign", "sourceName": "La Piarre", "type": "Bois"}, "type": "Feature"}, {"geometry": {"coordinates": [2.175565, 43.079622], "type": "Point"}, "properties": {"country": "France", "id": "en.5", "name": "France", "source": "ign", "sourceName": "Gaja-et-Villedieu", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [1.789769, 43.233532], "type": "Point"}, "properties": {"country": "France", "id": "en.5", "name": "France", "source": "ign", "sourceName": "Saint-Sernin", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [5.577606, 43.570891], "type": "Point"}, "properties": {"country": "France", "id": "en.5", "name": "France", "source": "ign", "sourceName": "Vauvenargues", "type": "Ruines"}, "type": "Feature"}, {"geometry": {"coordinates": [-0.848019, 45.603663], "type": "Point"}, "properties": {"country": "France", "id": "en.5", "name": "France", "source": "ign", "sourceName": "Gr\\u00e9zac", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [-0.581724, 45.494817], "type": "Point"}, "properties": {"country": "France", "id": "en.5", "name": "France", "source": "ign", "sourceName": "Bois", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [1.617984, 45.368456], "type": "Point"}, "properties": {"country": "France", "id": "en.5", "name": "France", "source": "ign", "sourceName": "Lagrauli\\u00e8re", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [0.941046, 43.167396], "type": "Point"}, "properties": {"country": "France", "id": "en.5", "name": "France", "source": "ign", "sourceName": "Mancioux", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [4.851823, 50.130325], "type": "Point"}, "properties": {"country": "France", "id": "en.7", "name": "Normandie", "source": "ign", "sourceName": "Givet", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [2.447184, 44.723667], "type": "Point"}, "properties": {"country": "France", "id": "en.7", "name": "Normandie", "source": "ign", "sourceName": "Junhac", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [-0.855164, 46.246698], "type": "Point"}, "properties": {"country": "France", "id": "en.7", "name": "Normandie", "source": "ign", "sourceName": "Saint-Jean-de-Liversay", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [-2.743228, 48.323177], "type": "Point"}, "properties": {"country": "France", "id": "en.7", "name": "Normandie", "source": "ign", "sourceName": "Pl\\u0153uc-L\\u0027Hermitage", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [1.102508, 49.443031], "type": "Point"}, "properties": {"country": "France", "id": "en.7", "name": "Normandie", "source": "ign", "sourceName": "Rouen", "type": "R\\u00e9gion"}, "type": "Feature"}, {"geometry": {"coordinates": [-4.068862, 48.297443], "type": "Point"}, "properties": {"country": "France", "id": "en.7", "name": "Normandie", "source": "ign", "sourceName": "Pont-de-Buis-l\\u00e8s-Quimerch", "type": "Lieu-dit non habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [-1.64847, 48.231258], "type": "Point"}, "properties": {"country": "France", "id": "en.7", "name": "Normandie", "source": "ign", "sourceName": "Melesse", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [5.821841, 47.307332], "type": "Point"}, "properties": {"country": "France", "id": "en.7", "name": "Normandie", "source": "ign", "sourceName": "Brussey", "type": "Lieu-dit non habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [2.90554, 48.223278], "type": "Point"}, "properties": {"country": "France", "id": "en.7", "name": "Normandie", "source": "ign", "sourceName": "Lorrez-le-Bocage-Pr\\u00e9aux", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [1.240619, 44.159185], "type": "Point"}, "properties": {"country": "France", "id": "en.7", "name": "Normandie", "source": "ign", "sourceName": "Lafran\\u00e7aise", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [2.553925, 46.432375], "type": "Point"}, "properties": {"country": "France", "id": "en.11", "name": "Caux", "source": "ign", "sourceName": "La Chapelaude", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [2.255493, 43.225454], "type": "Point"}, "properties": {"country": "France", "id": "en.11", "name": "Caux", "source": "ign", "sourceName": "Caux-et-Sauzens", "type": "Commune"}, "type": "Feature"}, {"geometry": {"coordinates": [2.047133, 45.725903], "type": "Point"}, "properties": {"country": "France", "id": "en.11", "name": "Caux", "source": "ign", "sourceName": "Peyrelevade", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [2.039653, 45.401722], "type": "Point"}, "properties": {"country": "France", "id": "en.11", "name": "Caux", "source": "ign", "sourceName": "\\u00c9gletons", "type": "Quartier"}, "type": "Feature"}, {"geometry": {"coordinates": [1.888828, 45.30495], "type": "Point"}, "properties": {"country": "France", "id": "en.11", "name": "Caux", "source": "ign", "sourceName": "Saint-Priest-de-Gimel", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [1.787262, 46.284578], "type": "Point"}, "properties": {"country": "France", "id": "en.11", "name": "Caux", "source": "ign", "sourceName": "La Celle-Dunoise", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [3.368457, 43.50344], "type": "Point"}, "properties": {"country": "France", "id": "en.11", "name": "Caux", "source": "ign", "sourceName": "Caux", "type": "Commune"}, "type": "Feature"}, {"geometry": {"coordinates": [3.448328, 45.208555], "type": "Point"}, "properties": {"country": "France", "id": "en.11", "name": "Caux", "source": "ign", "sourceName": "Saint-Privat-du-Dragon", "type": "Bois"}, "type": "Feature"}, {"geometry": {"coordinates": [1.13549, 44.381744], "type": "Point"}, "properties": {"country": "France", "id": "en.11", "name": "Caux", "source": "ign", "sourceName": "Montcuq-en-Quercy-Blanc", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}, {"geometry": {"coordinates": [2.684528, 45.458418], "type": "Point"}, "properties": {"country": "France", "id": "en.11", "name": "Caux", "source": "ign", "sourceName": "Saint-Donat", "type": "Lieu-dit habit\\u00e9"}, "type": "Feature"}], "type": "FeatureCollection"});\n", - "\n", - " \n", - " \n", - " geo_json_af9c2205b1a91c46be98c458d8993c75.bindTooltip(\n", - " function(layer){\n", - " let div = L.DomUtil.create('div');\n", - " \n", - " let handleObject = feature=>typeof(feature)=='object' ? JSON.stringify(feature) : feature;\n", - " let fields = ["name", "source"];\n", - " let aliases = ["name", "source"];\n", - " let table = '<table>' +\n", - " String(\n", - " fields.map(\n", - " (v,i)=>\n", - " `<tr>\n", - " <th>${aliases[i].toLocaleString()}</th>\n", - " \n", - " <td>${handleObject(layer.feature.properties[v]).toLocaleString()}</td>\n", - " </tr>`).join(''))\n", - " +'</table>';\n", - " div.innerHTML=table;\n", - " \n", - " return div\n", - " }\n", - " ,{"className": "foliumtooltip", "sticky": true});\n", - " \n", - "</script>\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>" - ], - "text/plain": [ - "<folium.folium.Map at 0x13667f8e0>" - ] - }, - "execution_count": 48, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "geoparser = Geoparser(sources=['ign'], max_rows=10)\n", "doc = geoparser(content)\n", @@ -3875,141 +1583,9 @@ }, { "cell_type": "code", - "execution_count": 49, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<div>\n", - "<style scoped>\n", - " .dataframe tbody tr th:only-of-type {\n", - " vertical-align: middle;\n", - " }\n", - "\n", - " .dataframe tbody tr th {\n", - " vertical-align: top;\n", - " }\n", - "\n", - " .dataframe thead th {\n", - " text-align: right;\n", - " }\n", - "</style>\n", - "<table border=\"1\" class=\"dataframe\">\n", - " <thead>\n", - " <tr style=\"text-align: right;\">\n", - " <th></th>\n", - " <th>name</th>\n", - " <th>text</th>\n", - " <th>geometry</th>\n", - " <th>#_places</th>\n", - " <th>#_person</th>\n", - " <th>#_event</th>\n", - " <th>#_date</th>\n", - " <th>#_misc</th>\n", - " <th>#_locations</th>\n", - " </tr>\n", - " </thead>\n", - " <tbody>\n", - " <tr>\n", - " <th>0</th>\n", - " <td>Chalets de la Fullie</td>\n", - " <td>\\n\\nBoucle des chalets de la Fullie au départ ...</td>\n", - " <td>(LINESTRING (6.11174 45.616041, 6.11174 45.616...</td>\n", - " <td>17</td>\n", - " <td>0</td>\n", - " <td>0</td>\n", - " <td>0</td>\n", - " <td>0</td>\n", - " <td>17</td>\n", - " </tr>\n", - " <tr>\n", - " <th>1</th>\n", - " <td>Traversée cabane de Pravouta à la Plagne</td>\n", - " <td>\\n\\nPartir de la cabane de Pravouta juste de l...</td>\n", - " <td>(LINESTRING (5.832543 45.315222, 5.832444 45.3...</td>\n", - " <td>23</td>\n", - " <td>2</td>\n", - " <td>0</td>\n", - " <td>0</td>\n", - " <td>0</td>\n", - " <td>23</td>\n", - " </tr>\n", - " <tr>\n", - " <th>2</th>\n", - " <td>Refuge Entre Le Lac - Refuge de la Leisse</td>\n", - " <td>\\n\\nDépart du refuge d'Entre le Lac près du la...</td>\n", - " <td>(LINESTRING (6.839184 45.480323, 6.83987 45.47...</td>\n", - " <td>22</td>\n", - " <td>0</td>\n", - " <td>0</td>\n", - " <td>0</td>\n", - " <td>0</td>\n", - " <td>22</td>\n", - " </tr>\n", - " <tr>\n", - " <th>3</th>\n", - " <td>Le lac du Retour</td>\n", - " <td>\\n\\nDu parking de Pierre Giret, suivre la rout...</td>\n", - " <td>(LINESTRING (6.917631 45.619278, 6.917527 45.6...</td>\n", - " <td>6</td>\n", - " <td>1</td>\n", - " <td>0</td>\n", - " <td>0</td>\n", - " <td>0</td>\n", - " <td>6</td>\n", - " </tr>\n", - " <tr>\n", - " <th>4</th>\n", - " <td>Traversée Alpette - Dent de Crolles</td>\n", - " <td>\\n</td>\n", - " <td>(LINESTRING (5.907402 45.440585, 5.907439 45.4...</td>\n", - " <td>0</td>\n", - " <td>0</td>\n", - " <td>0</td>\n", - " <td>0</td>\n", - " <td>0</td>\n", - " <td>0</td>\n", - " </tr>\n", - " </tbody>\n", - "</table>\n", - "</div>" - ], - "text/plain": [ - " name \\\n", - "0 Chalets de la Fullie \n", - "1 Traversée cabane de Pravouta à la Plagne \n", - "2 Refuge Entre Le Lac - Refuge de la Leisse \n", - "3 Le lac du Retour \n", - "4 Traversée Alpette - Dent de Crolles \n", - "\n", - " text \\\n", - "0 \\n\\nBoucle des chalets de la Fullie au départ ... \n", - "1 \\n\\nPartir de la cabane de Pravouta juste de l... \n", - "2 \\n\\nDépart du refuge d'Entre le Lac près du la... \n", - "3 \\n\\nDu parking de Pierre Giret, suivre la rout... \n", - "4 \\n \n", - "\n", - " geometry #_places #_person \\\n", - "0 (LINESTRING (6.11174 45.616041, 6.11174 45.616... 17 0 \n", - "1 (LINESTRING (5.832543 45.315222, 5.832444 45.3... 23 2 \n", - "2 (LINESTRING (6.839184 45.480323, 6.83987 45.47... 22 0 \n", - "3 (LINESTRING (6.917631 45.619278, 6.917527 45.6... 6 1 \n", - "4 (LINESTRING (5.907402 45.440585, 5.907439 45.4... 0 0 \n", - "\n", - " #_event #_date #_misc #_locations \n", - "0 0 0 0 17 \n", - "1 0 0 0 23 \n", - "2 0 0 0 22 \n", - "3 0 0 0 6 \n", - "4 0 0 0 0 " - ] - }, - "execution_count": 49, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "dataset_choucas = load_choucas_perdido()\n", "data_choucas = dataset_choucas['data']\n", @@ -4020,20 +1596,9 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "30" - ] - }, - "execution_count": 50, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "len(data_choucas)" ] @@ -4047,7 +1612,7 @@ }, { "cell_type": "code", - "execution_count": 51, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -4057,341 +1622,27 @@ }, { "cell_type": "code", - "execution_count": 52, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "\"\\n\\nDépart du refuge d'Entre le Lac près du lac de la Plagne.\\nDu refuge Entre le Lac, un sentier remonte les pentes herbeuses et permet de rejoindre le GR5 un peu avant le chalet de la Grassaz (chalet du berger 2335m). Toujours en direction du sud, on remonte le vallon en longeant le ruisseau. On parvient ainsi à l'extrémité ouest du lac de Grattaleu; un peu plus haut, on atteint le refuge du col du Palet (2550m). On admire la beauté de la vallée et le sommet de Bellecote recouvert de glaciers. Le GR descend vers l'Est; le sentier serpente entre des entonnoirs créés dans le gypse par dissolution. Le GR passe sous un 1er télésiège, celui de Grattaleu, et près de l'arrivée d'un second, le Tichot. Au chalet de Lognan (croix) prendre à droite un sentier qui descend à Val Claret (2107m) (station de ski). Poursuivre jusqu'au chalet de la Leisse. Le GR55 s'élève vers le vallon du paquis. On passe en contrebas du chalet du Prariond; un peu plus loin on arrive à la bifurcation du col de Fresse (2531m). Laisser à gauche le sentier montant au col de Fresse (2576m), le GR55 continue sud sud ouest dans un décor sauvage entre le massif de la Grande motte et la pointe du Grand Pré; il grimpe parmi des rochers: les balises peuvent être des cairns; bien être attentif pour bien les suivre jusqu'au col de la Leisse (2758 m). Le GR55 descend dans une zone d'éboulis, bien suivre les cairns, par une piste peu visible. Ensuite, il longe le lac des Nettes dans un univers très minéral sur sa rive et pour en atteindre l'extrémité sud. On retrouve dans les alpages le sentier bien tracé qui parcourt le plan des Nettes sur la rive droite du torrent. Peu après un petit barrage qui est en cours de destruction, on arrive au refuge de la Leisse (2487m).\\n\\n\\n\\n\"" - ] - }, - "execution_count": 52, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "doc.text" ] }, { "cell_type": "code", - "execution_count": 53, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<span class=\"tex2jax_ignore\"><div class=\"entities\" style=\"line-height: 2.5; direction: ltr\">Départ du refuge d' Entre le Lac près du lac de la \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Plagne\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " . Du refuge Entre le Lac , un sentier remonte les pentes herbeuses et permet de rejoindre le GR5 un peu avant le chalet de la \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Grassaz\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " ( chalet du \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " berger\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " 2335m ) . Toujours en direction du sud , on remonte le vallon en longeant le ruisseau . On parvient ainsi à l' extrémité ouest du lac de \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Grattaleu\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " ; un peu plus haut , on atteint le refuge du \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " col\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " du \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Palet\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " ( 2550m ) . On admire la beauté de la vallée et le sommet de \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Bellecote\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " recouvert de glaciers . Le \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " GR\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " descend vers l' Est ; le sentier serpente entre des entonnoirs créés dans le gypse par dissolution . Le \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " GR\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " passe sous un 1er télésiège , celui de \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Grattaleu\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " , et près de l' arrivée d' un second , le \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Tichot\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " . Au chalet de \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Lognan\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " ( croix ) prendre à droite un sentier qui descend à Val \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Claret\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " ( 2107m ) ( station de ski ) . Poursuivre jusqu' au chalet de la \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Leisse\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " . Le \n", - "<mark class=\"entity\" style=\"background: #ddd; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " GR55\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">MISC</span>\n", - "</mark>\n", - " s' élève vers le vallon du \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " paquis\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " . On passe en contrebas du chalet du \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Prariond\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " ; un peu plus loin on arrive à la bifurcation du col de \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Fresse\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " ( 2531m ) . Laisser à gauche le sentier montant au col de \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Fresse\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " ( 2576m ) , le \n", - "<mark class=\"entity\" style=\"background: #ddd; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " GR55\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">MISC</span>\n", - "</mark>\n", - " continue sud sud ouest dans un décor sauvage entre le massif de la \n", - "<mark class=\"entity\" style=\"background: #ddd; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Grande\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">MISC</span>\n", - "</mark>\n", - " motte et la pointe du Grand Pré ; il grimpe parmi des rochers : les balises peuvent être des cairns ; bien être attentif pour bien les suivre jusqu' au col de la \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Leisse\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " ( 2758 m ) . Le \n", - "<mark class=\"entity\" style=\"background: #ddd; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " GR55\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">MISC</span>\n", - "</mark>\n", - " descend dans une zone d' éboulis , bien suivre les cairns , par une piste peu visible . Ensuite , il longe le lac des \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Nettes\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " dans un univers très minéral sur sa rive et pour en atteindre l' extrémité sud . On retrouve dans les alpages le sentier bien tracé qui parcourt le plan des \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Nettes\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " sur la rive droite du torrent . Peu après un petit barrage qui est en cours de destruction , on arrive au refuge de la \n", - "<mark class=\"entity\" style=\"background: #ff9561; padding: 0.45em 0.6em; margin: 0 0.25em; line-height: 1; border-radius: 0.35em;\">\n", - " Leisse\n", - " <span style=\"font-size: 0.8em; font-weight: bold; line-height: 1; border-radius: 0.35em; vertical-align: middle; margin-left: 0.5rem\">LOC</span>\n", - "</mark>\n", - " ( 2487m ) . </div></span>" - ], - "text/plain": [ - "<IPython.core.display.HTML object>" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "displacy.render(doc.to_spacy_doc(), style=\"ent\", jupyter=True) " ] }, { "cell_type": "code", - "execution_count": 54, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe srcdoc=\"<!DOCTYPE html>\n", - "<head> \n", - " <meta http-equiv="content-type" content="text/html; charset=UTF-8" />\n", - " \n", - " <script>\n", - " L_NO_TOUCH = false;\n", - " L_DISABLE_3D = false;\n", - " </script>\n", - " \n", - " <style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>\n", - " <style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>\n", - " <script src="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.js"></script>\n", - " <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>\n", - " <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>\n", - " <script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>\n", - " <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"/>\n", - " <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>\n", - " <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css"/>\n", - " \n", - " <meta name="viewport" content="width=device-width,\n", - " initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />\n", - " <style>\n", - " #map_d85dc9fc1256e22e38aed83c0294ee98 {\n", - " position: relative;\n", - " width: 100.0%;\n", - " height: 100.0%;\n", - " left: 0.0%;\n", - " top: 0.0%;\n", - " }\n", - " </style>\n", - " \n", - " \n", - " <style>\n", - " .foliumtooltip {\n", - " \n", - " }\n", - " .foliumtooltip table{\n", - " margin: auto;\n", - " }\n", - " .foliumtooltip tr{\n", - " text-align: left;\n", - " }\n", - " .foliumtooltip th{\n", - " padding: 2px; padding-right: 8px;\n", - " }\n", - " </style>\n", - " \n", - "</head>\n", - "<body> \n", - " \n", - " <div class="folium-map" id="map_d85dc9fc1256e22e38aed83c0294ee98" ></div>\n", - " \n", - "</body>\n", - "<script> \n", - " \n", - " var map_d85dc9fc1256e22e38aed83c0294ee98 = L.map(\n", - " "map_d85dc9fc1256e22e38aed83c0294ee98",\n", - " {\n", - " center: [0, 0],\n", - " crs: L.CRS.EPSG3857,\n", - " zoom: 1,\n", - " zoomControl: true,\n", - " preferCanvas: false,\n", - " }\n", - " );\n", - "\n", - " \n", - "\n", - " \n", - " \n", - " var tile_layer_d92dd5bc2df5e5c972a44c1fa7ae80d4 = L.tileLayer(\n", - " "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",\n", - " {"attribution": "Data by \\u0026copy; \\u003ca href=\\"http://openstreetmap.org\\"\\u003eOpenStreetMap\\u003c/a\\u003e, under \\u003ca href=\\"http://www.openstreetmap.org/copyright\\"\\u003eODbL\\u003c/a\\u003e.", "detectRetina": false, "maxNativeZoom": 18, "maxZoom": 18, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}\n", - " ).addTo(map_d85dc9fc1256e22e38aed83c0294ee98);\n", - " \n", - " \n", - "\n", - " function geo_json_7694814747b554faf16d28136cbe8bb4_onEachFeature(feature, layer) {\n", - " layer.on({\n", - " });\n", - " };\n", - " var geo_json_7694814747b554faf16d28136cbe8bb4 = L.geoJson(null, {\n", - " onEachFeature: geo_json_7694814747b554faf16d28136cbe8bb4_onEachFeature,\n", - " \n", - " });\n", - "\n", - " function geo_json_7694814747b554faf16d28136cbe8bb4_add (data) {\n", - " geo_json_7694814747b554faf16d28136cbe8bb4\n", - " .addData(data)\n", - " .addTo(map_d85dc9fc1256e22e38aed83c0294ee98);\n", - " }\n", - " geo_json_7694814747b554faf16d28136cbe8bb4_add({"bbox": [6.839184, 45.396851, 6.92214, 45.480323], "features": [{"bbox": [6.839184, 45.396851, 6.92214, 45.480323], "geometry": {"coordinates": [[[6.839184, 45.480323], [6.83987, 45.479299], [6.841973, 45.478562], [6.843969, 45.47857], [6.845235, 45.479931], [6.847187, 45.479675], [6.847766, 45.480112], [6.848368, 45.479932], [6.849569, 45.480172], [6.850213, 45.479029], [6.850685, 45.477254], [6.8509, 45.476306], [6.851114, 45.474425], [6.851758, 45.472889], [6.853217, 45.471626], [6.855106, 45.46982], [6.855534, 45.468766], [6.855191, 45.468014], [6.85605, 45.46684], [6.856092, 45.464914], [6.856049, 45.463891], [6.855663, 45.462356], [6.856093, 45.461679], [6.856822, 45.46137], [6.857122, 45.460038], [6.857166, 45.458864], [6.857724, 45.458021], [6.858754, 45.457765], [6.859698, 45.458503], [6.860513, 45.458097], [6.861564, 45.458676], [6.861575, 45.457732], [6.860641, 45.456396], [6.864246, 45.456245], [6.865748, 45.455944], [6.867508, 45.455763], [6.869139, 45.455884], [6.870942, 45.456034], [6.875319, 45.454649], [6.879224, 45.455432], [6.881391, 45.454996], [6.883816, 45.455463], [6.886091, 45.455613], [6.887936, 45.456004], [6.890725, 45.457841], [6.890789, 45.45608], [6.891379, 45.454687], [6.892742, 45.454379], [6.894287, 45.453084], [6.896261, 45.45191], [6.896733, 45.452663], [6.898192, 45.452602], [6.899759, 45.453009], [6.90184, 45.452392], [6.902398, 45.451308], [6.903771, 45.450827], [6.905102, 45.450525], [6.906303, 45.451308], [6.909179, 45.449742], [6.911582, 45.448568], [6.913986, 45.447755], [6.916839, 45.44619], [6.917944, 45.444971], [6.920036, 45.444083], [6.92214, 45.441493], [6.921732, 45.440138], [6.91921, 45.437713], [6.916174, 45.435741], [6.915831, 45.433859], [6.915701, 45.432067], [6.914092, 45.430877], [6.912398, 45.429567], [6.912054, 45.428845], [6.910767, 45.428423], [6.910209, 45.4277], [6.910423, 45.427038], [6.908664, 45.425321], [6.906861, 45.423603], [6.905509, 45.42261], [6.903985, 45.421586], [6.904544, 45.420486], [6.904587, 45.418784], [6.903986, 45.41779], [6.9039, 45.416254], [6.904393, 45.414838], [6.9042, 45.413301], [6.902741, 45.411855], [6.90081, 45.411524], [6.900123, 45.410636], [6.90111, 45.409476], [6.901003, 45.408707], [6.900349, 45.408564], [6.900064, 45.409095], [6.899343, 45.408773], [6.89742, 45.408511], [6.893514, 45.404624], [6.890639, 45.403811], [6.889116, 45.403374], [6.887592, 45.402576], [6.886176, 45.401822], [6.886262, 45.400858], [6.886444, 45.400128], [6.887142, 45.4], [6.88652, 45.399201], [6.885339, 45.398297], [6.885704, 45.397966], [6.88403, 45.397318], [6.88227, 45.396851]]], "type": "MultiLineString"}, "id": "0", "properties": {}, "type": "Feature"}], "type": "FeatureCollection"});\n", - "\n", - " \n", - " \n", - " map_d85dc9fc1256e22e38aed83c0294ee98.fitBounds(\n", - " [[45.412971, 6.837532], [45.462018, 6.963285]],\n", - " {}\n", - " );\n", - " \n", - " \n", - "\n", - " function geo_json_4b8eea9ca004e82e08a123391c62e40e_onEachFeature(feature, layer) {\n", - " layer.on({\n", - " });\n", - " };\n", - " var geo_json_4b8eea9ca004e82e08a123391c62e40e = L.geoJson(null, {\n", - " onEachFeature: geo_json_4b8eea9ca004e82e08a123391c62e40e_onEachFeature,\n", - " \n", - " });\n", - "\n", - " function geo_json_4b8eea9ca004e82e08a123391c62e40e_add (data) {\n", - " geo_json_4b8eea9ca004e82e08a123391c62e40e\n", - " .addData(data)\n", - " .addTo(map_d85dc9fc1256e22e38aed83c0294ee98);\n", - " }\n", - " geo_json_4b8eea9ca004e82e08a123391c62e40e_add({"features": [{"geometry": {"coordinates": [6.837532, 45.456069], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.456069, "longitude": 6.837532, "name": "Grassaz", "source": "nominatim", "sourceName": "Col de la Grassaz, Peisey-Nancroix, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73210, France", "xmlID": "en.7"}, "type": "Feature"}, {"geometry": {"coordinates": [6.858926, 45.461481], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.461481, "longitude": 6.858926, "name": "Grattaleu", "source": "nominatim", "sourceName": "Lac du Grattaleu, Peisey-Nancroix, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73210, France", "xmlID": "en.15"}, "type": "Feature"}, {"geometry": {"coordinates": [6.863067, 45.451642], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.451642, "longitude": 6.863067, "name": "Palet", "source": "nominatim", "sourceName": "Signal du Palet, Champagny-en-Vanoise, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73350, France", "xmlID": "en.22"}, "type": "Feature"}, {"geometry": {"coordinates": [6.963285, 45.462018], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.462018, "longitude": 6.963285, "name": "Bellecote", "source": "nominatim", "sourceName": "Bellecote, Sentier de la Vall\\u00e9e Perdue, Le Cr\\u00eat, La Daille, Val-d\\u0027Is\\u00e8re, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73150, France", "xmlID": "en.26"}, "type": "Feature"}, {"geometry": {"coordinates": [6.858926, 45.461481], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.461481, "longitude": 6.858926, "name": "Grattaleu", "source": "nominatim", "sourceName": "Lac du Grattaleu, Peisey-Nancroix, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73210, France", "xmlID": "en.32"}, "type": "Feature"}, {"geometry": {"coordinates": [6.896874, 45.454039], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.454039, "longitude": 6.896874, "name": "Tichot", "source": "nominatim", "sourceName": "Tichot, Tarte \\u00e0 Lognan, Val-Claret, Tignes, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73320, France", "xmlID": "en.34"}, "type": "Feature"}, {"geometry": {"coordinates": [6.898275, 45.419228], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.419228, "longitude": 6.898275, "name": "Leisse", "source": "nominatim", "sourceName": "Leisse, Chemin de Borsat, Val-d\\u0027Is\\u00e8re, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73150, France", "xmlID": "en.46"}, "type": "Feature"}, {"geometry": {"coordinates": [6.914334, 45.458216], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.458216, "longitude": 6.914334, "name": "paquis", "source": "nominatim", "sourceName": "Paquis, GunPowder, Tignes, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73320, France", "xmlID": "en.52"}, "type": "Feature"}, {"geometry": {"coordinates": [6.92583, 45.442088], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.442088, "longitude": 6.92583, "name": "Fresse", "source": "nominatim", "sourceName": "Fresse, Piste du Col de Fresse, Val-d\\u0027Is\\u00e8re, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73150, France", "xmlID": "en.62"}, "type": "Feature"}, {"geometry": {"coordinates": [6.92583, 45.442088], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.442088, "longitude": 6.92583, "name": "Fresse", "source": "nominatim", "sourceName": "Fresse, Piste du Col de Fresse, Val-d\\u0027Is\\u00e8re, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73150, France", "xmlID": "en.66"}, "type": "Feature"}, {"geometry": {"coordinates": [6.898275, 45.419228], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.419228, "longitude": 6.898275, "name": "Leisse", "source": "nominatim", "sourceName": "Leisse, Chemin de Borsat, Val-d\\u0027Is\\u00e8re, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73150, France", "xmlID": "en.76"}, "type": "Feature"}, {"geometry": {"coordinates": [6.89952, 45.412971], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.412971, "longitude": 6.89952, "name": "Nettes", "source": "nominatim", "sourceName": "Lac des Nettes, Termignon, Val-Cenis, Saint-Jean-de-Maurienne, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73500, France", "xmlID": "en.82"}, "type": "Feature"}, {"geometry": {"coordinates": [6.89952, 45.412971], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.412971, "longitude": 6.89952, "name": "Nettes", "source": "nominatim", "sourceName": "Lac des Nettes, Termignon, Val-Cenis, Saint-Jean-de-Maurienne, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73500, France", "xmlID": "en.86"}, "type": "Feature"}, {"geometry": {"coordinates": [6.898275, 45.419228], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.419228, "longitude": 6.898275, "name": "Leisse", "source": "nominatim", "sourceName": "Leisse, Chemin de Borsat, Val-d\\u0027Is\\u00e8re, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73150, France", "xmlID": "en.90"}, "type": "Feature"}], "type": "FeatureCollection"});\n", - "\n", - " \n", - " \n", - " geo_json_4b8eea9ca004e82e08a123391c62e40e.bindTooltip(\n", - " function(layer){\n", - " let div = L.DomUtil.create('div');\n", - " \n", - " let handleObject = feature=>typeof(feature)=='object' ? JSON.stringify(feature) : feature;\n", - " let fields = ["name", "source"];\n", - " let aliases = ["name", "source"];\n", - " let table = '<table>' +\n", - " String(\n", - " fields.map(\n", - " (v,i)=>\n", - " `<tr>\n", - " <th>${aliases[i].toLocaleString()}</th>\n", - " \n", - " <td>${handleObject(layer.feature.properties[v]).toLocaleString()}</td>\n", - " </tr>`).join(''))\n", - " +'</table>';\n", - " div.innerHTML=table;\n", - " \n", - " return div\n", - " }\n", - " ,{"className": "foliumtooltip", "sticky": true});\n", - " \n", - "</script>\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>" - ], - "text/plain": [ - "<folium.folium.Map at 0x13f337e80>" - ] - }, - "execution_count": 54, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "doc.get_folium_map()" ] @@ -4412,7 +1663,7 @@ }, { "cell_type": "code", - "execution_count": 59, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -4422,150 +1673,9 @@ }, { "cell_type": "code", - "execution_count": 60, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe srcdoc=\"<!DOCTYPE html>\n", - "<head> \n", - " <meta http-equiv="content-type" content="text/html; charset=UTF-8" />\n", - " \n", - " <script>\n", - " L_NO_TOUCH = false;\n", - " L_DISABLE_3D = false;\n", - " </script>\n", - " \n", - " <style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>\n", - " <style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>\n", - " <script src="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.js"></script>\n", - " <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>\n", - " <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>\n", - " <script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>\n", - " <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"/>\n", - " <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>\n", - " <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css"/>\n", - " \n", - " <meta name="viewport" content="width=device-width,\n", - " initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />\n", - " <style>\n", - " #map_236dda3e0e68a8613374fa70e4ec0fd1 {\n", - " position: relative;\n", - " width: 100.0%;\n", - " height: 100.0%;\n", - " left: 0.0%;\n", - " top: 0.0%;\n", - " }\n", - " </style>\n", - " \n", - " \n", - " <style>\n", - " .foliumtooltip {\n", - " \n", - " }\n", - " .foliumtooltip table{\n", - " margin: auto;\n", - " }\n", - " .foliumtooltip tr{\n", - " text-align: left;\n", - " }\n", - " .foliumtooltip th{\n", - " padding: 2px; padding-right: 8px;\n", - " }\n", - " </style>\n", - " \n", - "</head>\n", - "<body> \n", - " \n", - " <div class="folium-map" id="map_236dda3e0e68a8613374fa70e4ec0fd1" ></div>\n", - " \n", - "</body>\n", - "<script> \n", - " \n", - " var map_236dda3e0e68a8613374fa70e4ec0fd1 = L.map(\n", - " "map_236dda3e0e68a8613374fa70e4ec0fd1",\n", - " {\n", - " center: [0, 0],\n", - " crs: L.CRS.EPSG3857,\n", - " zoom: 1,\n", - " zoomControl: true,\n", - " preferCanvas: false,\n", - " }\n", - " );\n", - "\n", - " \n", - "\n", - " \n", - " \n", - " var tile_layer_473a370b14096c30545fb4b27e2b9a30 = L.tileLayer(\n", - " "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",\n", - " {"attribution": "Data by \\u0026copy; \\u003ca href=\\"http://openstreetmap.org\\"\\u003eOpenStreetMap\\u003c/a\\u003e, under \\u003ca href=\\"http://www.openstreetmap.org/copyright\\"\\u003eODbL\\u003c/a\\u003e.", "detectRetina": false, "maxNativeZoom": 18, "maxZoom": 18, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}\n", - " ).addTo(map_236dda3e0e68a8613374fa70e4ec0fd1);\n", - " \n", - " \n", - " map_236dda3e0e68a8613374fa70e4ec0fd1.fitBounds(\n", - " [[38.674213, -91.338769], [53.582329, 21.987713]],\n", - " {}\n", - " );\n", - " \n", - " \n", - "\n", - " function geo_json_f8c01c3d777e056b4d3bdab8e8e77bcc_onEachFeature(feature, layer) {\n", - " layer.on({\n", - " });\n", - " };\n", - " var geo_json_f8c01c3d777e056b4d3bdab8e8e77bcc = L.geoJson(null, {\n", - " onEachFeature: geo_json_f8c01c3d777e056b4d3bdab8e8e77bcc_onEachFeature,\n", - " \n", - " });\n", - "\n", - " function geo_json_f8c01c3d777e056b4d3bdab8e8e77bcc_add (data) {\n", - " geo_json_f8c01c3d777e056b4d3bdab8e8e77bcc\n", - " .addData(data)\n", - " .addTo(map_236dda3e0e68a8613374fa70e4ec0fd1);\n", - " }\n", - " geo_json_f8c01c3d777e056b4d3bdab8e8e77bcc_add({"features": [{"geometry": {"coordinates": [1.060214, 43.157123], "type": "Point"}, "properties": {"country": "France", "id": "en.3", "name": "Plagne", "source": "nominatim", "sourceName": "Plagne, Muret, Haute-Garonne, Occitanie, France m\\u00e9tropolitaine, 31220, France", "type": "administrative"}, "type": "Feature"}, {"geometry": {"coordinates": [6.837532, 45.456069], "type": "Point"}, "properties": {"country": "France", "id": "en.7", "name": "Grassaz", "source": "nominatim", "sourceName": "Col de la Grassaz, Peisey-Nancroix, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73210, France", "type": "yes"}, "type": "Feature"}, {"geometry": {"coordinates": [-91.338769, 38.674213], "type": "Point"}, "properties": {"country": "United States", "id": "en.11", "name": "berger", "source": "nominatim", "sourceName": "Berger, Franklin County, Missouri, United States", "type": "administrative"}, "type": "Feature"}, {"geometry": {"coordinates": [6.858926, 45.461481], "type": "Point"}, "properties": {"country": "France", "id": "en.15", "name": "Grattaleu", "source": "nominatim", "sourceName": "Lac du Grattaleu, Peisey-Nancroix, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73210, France", "type": "water"}, "type": "Feature"}, {"geometry": {"coordinates": [6.959974, 50.938361], "type": "Point"}, "properties": {"country": "Deutschland", "id": "en.20", "name": "col", "source": "nominatim", "sourceName": "K\\u00f6ln, Nordrhein-Westfalen, Deutschland", "type": "administrative"}, "type": "Feature"}, {"geometry": {"coordinates": [-1.244805, 48.200191], "type": "Point"}, "properties": {"country": "France", "id": "en.22", "name": "Palet", "source": "nominatim", "sourceName": "Palet, Taillis, Foug\\u00e8res-Vitr\\u00e9, Ille-et-Vilaine, Bretagne, France m\\u00e9tropolitaine, 35500, France", "type": "hamlet"}, "type": "Feature"}, {"geometry": {"coordinates": [6.963285, 45.462018], "type": "Point"}, "properties": {"country": "France", "id": "en.26", "name": "Bellecote", "source": "nominatim", "sourceName": "Bellecote, Sentier de la Vall\\u00e9e Perdue, Le Cr\\u00eat, La Daille, Val-d\\u0027Is\\u00e8re, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73150, France", "type": "yes"}, "type": "Feature"}, {"geometry": {"coordinates": [21.987713, 38.995368], "type": "Point"}, "properties": {"country": "\\u0395\\u03bb\\u03bb\\u03ac\\u03c2", "id": "en.28", "name": "GR", "source": "nominatim", "sourceName": "\\u0395\\u03bb\\u03bb\\u03ac\\u03c2", "type": "administrative"}, "type": "Feature"}, {"geometry": {"coordinates": [21.987713, 38.995368], "type": "Point"}, "properties": {"country": "\\u0395\\u03bb\\u03bb\\u03ac\\u03c2", "id": "en.30", "name": "GR", "source": "nominatim", "sourceName": "\\u0395\\u03bb\\u03bb\\u03ac\\u03c2", "type": "administrative"}, "type": "Feature"}, {"geometry": {"coordinates": [6.858926, 45.461481], "type": "Point"}, "properties": {"country": "France", "id": "en.32", "name": "Grattaleu", "source": "nominatim", "sourceName": "Lac du Grattaleu, Peisey-Nancroix, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73210, France", "type": "water"}, "type": "Feature"}, {"geometry": {"coordinates": [6.896874, 45.454039], "type": "Point"}, "properties": {"country": "France", "id": "en.34", "name": "Tichot", "source": "nominatim", "sourceName": "Tichot, Tarte \\u00e0 Lognan, Val-Claret, Tignes, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73320, France", "type": "station"}, "type": "Feature"}, {"geometry": {"coordinates": [6.926505, 45.978552], "type": "Point"}, "properties": {"country": "France", "id": "en.38", "name": "Lognan", "source": "nominatim", "sourceName": "Lognan, Chemin de la Glaci\\u00e8re, Les Chosalets, Argenti\\u00e8re, Chamonix-Mont-Blanc, Bonneville, Haute-Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 74400, France", "type": "station"}, "type": "Feature"}, {"geometry": {"coordinates": [3.905872, 43.862148], "type": "Point"}, "properties": {"country": "France", "id": "en.42", "name": "Claret", "source": "nominatim", "sourceName": "Claret, Lod\\u00e8ve, H\\u00e9rault, Occitanie, France m\\u00e9tropolitaine, 34270, France", "type": "administrative"}, "type": "Feature"}, {"geometry": {"coordinates": [8.303371, 51.188893], "type": "Point"}, "properties": {"country": "Deutschland", "id": "en.46", "name": "Leisse", "source": "nominatim", "sourceName": "Lei\\u00dfe, Bad Fredeburg, Schmallenberg, Hochsauerlandkreis, Nordrhein-Westfalen, 57392, Deutschland", "type": "stream"}, "type": "Feature"}, {"geometry": {"coordinates": [6.147314, 46.219521], "type": "Point"}, "properties": {"country": "Schweiz/Suisse/Svizzera/Svizra", "id": "en.52", "name": "paquis", "source": "nominatim", "sourceName": "P\\u00e2quis, Gen\\u00e8ve, 1202, Schweiz/Suisse/Svizzera/Svizra", "type": "administrative"}, "type": "Feature"}, {"geometry": {"coordinates": [7.072597, 45.650494], "type": "Point"}, "properties": {"country": "Italia", "id": "en.57", "name": "Prariond", "source": "nominatim", "sourceName": "Prariond, Plant\\u00e9, Valgrisenche, Valle d\\u0027Aosta / Vall\\u00e9e d\\u0027Aoste, Italia", "type": "hamlet"}, "type": "Feature"}, {"geometry": {"coordinates": [2.844478, 45.408958], "type": "Point"}, "properties": {"country": "France", "id": "en.62", "name": "Fresse", "source": "nominatim", "sourceName": "Fresse, \\u00c9gliseneuve-d\\u0027Entraigues, Issoire, Puy-de-D\\u00f4me, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 63850, France", "type": "isolated_dwelling"}, "type": "Feature"}, {"geometry": {"coordinates": [2.844478, 45.408958], "type": "Point"}, "properties": {"country": "France", "id": "en.66", "name": "Fresse", "source": "nominatim", "sourceName": "Fresse, \\u00c9gliseneuve-d\\u0027Entraigues, Issoire, Puy-de-D\\u00f4me, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 63850, France", "type": "isolated_dwelling"}, "type": "Feature"}, {"geometry": {"coordinates": [10.38635, 53.582329], "type": "Point"}, "properties": {"country": "Deutschland", "id": "en.72", "name": "Grande", "source": "nominatim", "sourceName": "Grande, Trittau, Stormarn, Schleswig-Holstein, Deutschland", "type": "administrative"}, "type": "Feature"}, {"geometry": {"coordinates": [8.303371, 51.188893], "type": "Point"}, "properties": {"country": "Deutschland", "id": "en.76", "name": "Leisse", "source": "nominatim", "sourceName": "Lei\\u00dfe, Bad Fredeburg, Schmallenberg, Hochsauerlandkreis, Nordrhein-Westfalen, 57392, Deutschland", "type": "stream"}, "type": "Feature"}, {"geometry": {"coordinates": [6.89952, 45.412971], "type": "Point"}, "properties": {"country": "France", "id": "en.82", "name": "Nettes", "source": "nominatim", "sourceName": "Lac des Nettes, Termignon, Val-Cenis, Saint-Jean-de-Maurienne, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73500, France", "type": "water"}, "type": "Feature"}, {"geometry": {"coordinates": [6.89952, 45.412971], "type": "Point"}, "properties": {"country": "France", "id": "en.86", "name": "Nettes", "source": "nominatim", "sourceName": "Lac des Nettes, Termignon, Val-Cenis, Saint-Jean-de-Maurienne, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73500, France", "type": "water"}, "type": "Feature"}, {"geometry": {"coordinates": [8.303371, 51.188893], "type": "Point"}, "properties": {"country": "Deutschland", "id": "en.90", "name": "Leisse", "source": "nominatim", "sourceName": "Lei\\u00dfe, Bad Fredeburg, Schmallenberg, Hochsauerlandkreis, Nordrhein-Westfalen, 57392, Deutschland", "type": "stream"}, "type": "Feature"}], "type": "FeatureCollection"});\n", - "\n", - " \n", - " \n", - " geo_json_f8c01c3d777e056b4d3bdab8e8e77bcc.bindTooltip(\n", - " function(layer){\n", - " let div = L.DomUtil.create('div');\n", - " \n", - " let handleObject = feature=>typeof(feature)=='object' ? JSON.stringify(feature) : feature;\n", - " let fields = ["name", "source"];\n", - " let aliases = ["name", "source"];\n", - " let table = '<table>' +\n", - " String(\n", - " fields.map(\n", - " (v,i)=>\n", - " `<tr>\n", - " <th>${aliases[i].toLocaleString()}</th>\n", - " \n", - " <td>${handleObject(layer.feature.properties[v]).toLocaleString()}</td>\n", - " </tr>`).join(''))\n", - " +'</table>';\n", - " div.innerHTML=table;\n", - " \n", - " return div\n", - " }\n", - " ,{"className": "foliumtooltip", "sticky": true});\n", - " \n", - "</script>\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>" - ], - "text/plain": [ - "<folium.folium.Map at 0x13f038520>" - ] - }, - "execution_count": 60, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "doc_geoparsed.get_folium_map()" ] @@ -4583,17 +1693,9 @@ }, { "cell_type": "code", - "execution_count": 61, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['Palet', 'Bellecote', 'berger', 'Tichot', 'Claret', 'paquis', 'Grattaleu', 'Plagne', 'Nettes', 'Fresse', 'GR', 'Grande', 'Grassaz', 'Prariond', 'Lognan', 'Leisse', 'col']\n" - ] - } - ], + "outputs": [], "source": [ "places_list = list(set([ent.text for ent in doc_geoparsed.ne_place]))\n", "print(places_list)" @@ -4608,169 +1710,9 @@ }, { "cell_type": "code", - "execution_count": 62, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe srcdoc=\"<!DOCTYPE html>\n", - "<head> \n", - " <meta http-equiv="content-type" content="text/html; charset=UTF-8" />\n", - " \n", - " <script>\n", - " L_NO_TOUCH = false;\n", - " L_DISABLE_3D = false;\n", - " </script>\n", - " \n", - " <style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>\n", - " <style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>\n", - " <script src="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.js"></script>\n", - " <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>\n", - " <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>\n", - " <script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>\n", - " <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"/>\n", - " <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>\n", - " <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css"/>\n", - " \n", - " <meta name="viewport" content="width=device-width,\n", - " initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />\n", - " <style>\n", - " #map_c52bf484a7fd98eba5168dfeb14a820b {\n", - " position: relative;\n", - " width: 100.0%;\n", - " height: 100.0%;\n", - " left: 0.0%;\n", - " top: 0.0%;\n", - " }\n", - " </style>\n", - " \n", - " \n", - " <style>\n", - " .foliumtooltip {\n", - " \n", - " }\n", - " .foliumtooltip table{\n", - " margin: auto;\n", - " }\n", - " .foliumtooltip tr{\n", - " text-align: left;\n", - " }\n", - " .foliumtooltip th{\n", - " padding: 2px; padding-right: 8px;\n", - " }\n", - " </style>\n", - " \n", - "</head>\n", - "<body> \n", - " \n", - " <div class="folium-map" id="map_c52bf484a7fd98eba5168dfeb14a820b" ></div>\n", - " \n", - "</body>\n", - "<script> \n", - " \n", - " var map_c52bf484a7fd98eba5168dfeb14a820b = L.map(\n", - " "map_c52bf484a7fd98eba5168dfeb14a820b",\n", - " {\n", - " center: [0, 0],\n", - " crs: L.CRS.EPSG3857,\n", - " zoom: 1,\n", - " zoomControl: true,\n", - " preferCanvas: false,\n", - " }\n", - " );\n", - "\n", - " \n", - "\n", - " \n", - " \n", - " var tile_layer_8e58d1c530dcad40e22bd4d2d772f562 = L.tileLayer(\n", - " "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",\n", - " {"attribution": "Data by \\u0026copy; \\u003ca href=\\"http://openstreetmap.org\\"\\u003eOpenStreetMap\\u003c/a\\u003e, under \\u003ca href=\\"http://www.openstreetmap.org/copyright\\"\\u003eODbL\\u003c/a\\u003e.", "detectRetina": false, "maxNativeZoom": 18, "maxZoom": 18, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}\n", - " ).addTo(map_c52bf484a7fd98eba5168dfeb14a820b);\n", - " \n", - " \n", - "\n", - " function geo_json_2a278dedf94bc78af3ffa2917f457355_onEachFeature(feature, layer) {\n", - " layer.on({\n", - " });\n", - " };\n", - " var geo_json_2a278dedf94bc78af3ffa2917f457355 = L.geoJson(null, {\n", - " onEachFeature: geo_json_2a278dedf94bc78af3ffa2917f457355_onEachFeature,\n", - " \n", - " });\n", - "\n", - " function geo_json_2a278dedf94bc78af3ffa2917f457355_add (data) {\n", - " geo_json_2a278dedf94bc78af3ffa2917f457355\n", - " .addData(data)\n", - " .addTo(map_c52bf484a7fd98eba5168dfeb14a820b);\n", - " }\n", - " geo_json_2a278dedf94bc78af3ffa2917f457355_add({"bbox": [6.839184, 45.396851, 6.92214, 45.480323], "features": [{"bbox": [6.839184, 45.396851, 6.92214, 45.480323], "geometry": {"coordinates": [[[6.839184, 45.480323], [6.83987, 45.479299], [6.841973, 45.478562], [6.843969, 45.47857], [6.845235, 45.479931], [6.847187, 45.479675], [6.847766, 45.480112], [6.848368, 45.479932], [6.849569, 45.480172], [6.850213, 45.479029], [6.850685, 45.477254], [6.8509, 45.476306], [6.851114, 45.474425], [6.851758, 45.472889], [6.853217, 45.471626], [6.855106, 45.46982], [6.855534, 45.468766], [6.855191, 45.468014], [6.85605, 45.46684], [6.856092, 45.464914], [6.856049, 45.463891], [6.855663, 45.462356], [6.856093, 45.461679], [6.856822, 45.46137], [6.857122, 45.460038], [6.857166, 45.458864], [6.857724, 45.458021], [6.858754, 45.457765], [6.859698, 45.458503], [6.860513, 45.458097], [6.861564, 45.458676], [6.861575, 45.457732], [6.860641, 45.456396], [6.864246, 45.456245], [6.865748, 45.455944], [6.867508, 45.455763], [6.869139, 45.455884], [6.870942, 45.456034], [6.875319, 45.454649], [6.879224, 45.455432], [6.881391, 45.454996], [6.883816, 45.455463], [6.886091, 45.455613], [6.887936, 45.456004], [6.890725, 45.457841], [6.890789, 45.45608], [6.891379, 45.454687], [6.892742, 45.454379], [6.894287, 45.453084], [6.896261, 45.45191], [6.896733, 45.452663], [6.898192, 45.452602], [6.899759, 45.453009], [6.90184, 45.452392], [6.902398, 45.451308], [6.903771, 45.450827], [6.905102, 45.450525], [6.906303, 45.451308], [6.909179, 45.449742], [6.911582, 45.448568], [6.913986, 45.447755], [6.916839, 45.44619], [6.917944, 45.444971], [6.920036, 45.444083], [6.92214, 45.441493], [6.921732, 45.440138], [6.91921, 45.437713], [6.916174, 45.435741], [6.915831, 45.433859], [6.915701, 45.432067], [6.914092, 45.430877], [6.912398, 45.429567], [6.912054, 45.428845], [6.910767, 45.428423], [6.910209, 45.4277], [6.910423, 45.427038], [6.908664, 45.425321], [6.906861, 45.423603], [6.905509, 45.42261], [6.903985, 45.421586], [6.904544, 45.420486], [6.904587, 45.418784], [6.903986, 45.41779], [6.9039, 45.416254], [6.904393, 45.414838], [6.9042, 45.413301], [6.902741, 45.411855], [6.90081, 45.411524], [6.900123, 45.410636], [6.90111, 45.409476], [6.901003, 45.408707], [6.900349, 45.408564], [6.900064, 45.409095], [6.899343, 45.408773], [6.89742, 45.408511], [6.893514, 45.404624], [6.890639, 45.403811], [6.889116, 45.403374], [6.887592, 45.402576], [6.886176, 45.401822], [6.886262, 45.400858], [6.886444, 45.400128], [6.887142, 45.4], [6.88652, 45.399201], [6.885339, 45.398297], [6.885704, 45.397966], [6.88403, 45.397318], [6.88227, 45.396851]]], "type": "MultiLineString"}, "id": "0", "properties": {}, "type": "Feature"}], "type": "FeatureCollection"});\n", - "\n", - " \n", - " \n", - " map_c52bf484a7fd98eba5168dfeb14a820b.fitBounds(\n", - " [[43.157123, -1.244805], [50.823249, 7.211431]],\n", - " {}\n", - " );\n", - " \n", - " \n", - "\n", - " function geo_json_0a28f4e8674d4f86f4621fd379905d71_onEachFeature(feature, layer) {\n", - " layer.on({\n", - " });\n", - " };\n", - " var geo_json_0a28f4e8674d4f86f4621fd379905d71 = L.geoJson(null, {\n", - " onEachFeature: geo_json_0a28f4e8674d4f86f4621fd379905d71_onEachFeature,\n", - " \n", - " });\n", - "\n", - " function geo_json_0a28f4e8674d4f86f4621fd379905d71_add (data) {\n", - " geo_json_0a28f4e8674d4f86f4621fd379905d71\n", - " .addData(data)\n", - " .addTo(map_c52bf484a7fd98eba5168dfeb14a820b);\n", - " }\n", - " geo_json_0a28f4e8674d4f86f4621fd379905d71_add({"features": [{"geometry": {"coordinates": [-1.244805, 48.200191], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Palet", "source": "nominatim", "sourceName": "Palet, Taillis, Foug\\u00e8res-Vitr\\u00e9, Ille-et-Vilaine, Bretagne, France m\\u00e9tropolitaine, 35500, France", "type": "hamlet"}, "type": "Feature"}, {"geometry": {"coordinates": [6.963285, 45.462018], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Bellecote", "source": "nominatim", "sourceName": "Bellecote, Sentier de la Vall\\u00e9e Perdue, Le Cr\\u00eat, La Daille, Val-d\\u0027Is\\u00e8re, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73150, France", "type": "yes"}, "type": "Feature"}, {"geometry": {"coordinates": [5.060961, 46.105022], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "berger", "source": "nominatim", "sourceName": "Berger, Saint-Andr\\u00e9-le-Bouchoux, Bourg-en-Bresse, Ain, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 01240, France", "type": "hamlet"}, "type": "Feature"}, {"geometry": {"coordinates": [6.896874, 45.454039], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Tichot", "source": "nominatim", "sourceName": "Tichot, Tarte \\u00e0 Lognan, Val-Claret, Tignes, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73320, France", "type": "station"}, "type": "Feature"}, {"geometry": {"coordinates": [3.905872, 43.862148], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Claret", "source": "nominatim", "sourceName": "Claret, Lod\\u00e8ve, H\\u00e9rault, Occitanie, France m\\u00e9tropolitaine, 34270, France", "type": "administrative"}, "type": "Feature"}, {"geometry": {"coordinates": [7.211431, 48.207614], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "paquis", "source": "nominatim", "sourceName": "Paquis, Aubure, Colmar-Ribeauvill\\u00e9, Haut-Rhin, Grand Est, France m\\u00e9tropolitaine, 68150, France", "type": "locality"}, "type": "Feature"}, {"geometry": {"coordinates": [6.858926, 45.461481], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Grattaleu", "source": "nominatim", "sourceName": "Lac du Grattaleu, Peisey-Nancroix, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73210, France", "type": "water"}, "type": "Feature"}, {"geometry": {"coordinates": [1.060214, 43.157123], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Plagne", "source": "nominatim", "sourceName": "Plagne, Muret, Haute-Garonne, Occitanie, France m\\u00e9tropolitaine, 31220, France", "type": "administrative"}, "type": "Feature"}, {"geometry": {"coordinates": [6.89952, 45.412971], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Nettes", "source": "nominatim", "sourceName": "Lac des Nettes, Termignon, Val-Cenis, Saint-Jean-de-Maurienne, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73500, France", "type": "water"}, "type": "Feature"}, {"geometry": {"coordinates": [2.844478, 45.408958], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Fresse", "source": "nominatim", "sourceName": "Fresse, \\u00c9gliseneuve-d\\u0027Entraigues, Issoire, Puy-de-D\\u00f4me, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 63850, France", "type": "isolated_dwelling"}, "type": "Feature"}, {"geometry": {"coordinates": [2.014202, 50.823249], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "GR", "source": "nominatim", "sourceName": "Grande Rue, Louches, Calais, Pas-de-Calais, Hauts-de-France, France m\\u00e9tropolitaine, 62610, France", "type": "hamlet"}, "type": "Feature"}, {"geometry": {"coordinates": [3.682996, 44.905336], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Grande", "source": "nominatim", "sourceName": "Grande, Alleyras, Le Puy-en-Velay, Haute-Loire, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 43580, France", "type": "residential"}, "type": "Feature"}, {"geometry": {"coordinates": [6.837532, 45.456069], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Grassaz", "source": "nominatim", "sourceName": "Col de la Grassaz, Peisey-Nancroix, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73210, France", "type": "yes"}, "type": "Feature"}, {"geometry": {"coordinates": [6.43923, 45.445076], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Prariond", "source": "nominatim", "sourceName": "Prariond, Mottet, Les Avanchers-Valmorel, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73260, France", "type": "platter"}, "type": "Feature"}, {"geometry": {"coordinates": [6.926505, 45.978552], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Lognan", "source": "nominatim", "sourceName": "Lognan, Chemin de la Glaci\\u00e8re, Les Chosalets, Argenti\\u00e8re, Chamonix-Mont-Blanc, Bonneville, Haute-Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 74400, France", "type": "station"}, "type": "Feature"}, {"geometry": {"coordinates": [6.898275, 45.419228], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Leisse", "source": "nominatim", "sourceName": "Leisse, Chemin de Borsat, Val-d\\u0027Is\\u00e8re, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73150, France", "type": "station"}, "type": "Feature"}, {"geometry": {"coordinates": [4.467755, 44.831458], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "col", "source": "nominatim", "sourceName": "Col, Saint-Pierreville, Tournon-sur-Rh\\u00f4ne, Ard\\u00e8che, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 07190, France", "type": "hamlet"}, "type": "Feature"}], "type": "FeatureCollection"});\n", - "\n", - " \n", - " \n", - " geo_json_0a28f4e8674d4f86f4621fd379905d71.bindTooltip(\n", - " function(layer){\n", - " let div = L.DomUtil.create('div');\n", - " \n", - " let handleObject = feature=>typeof(feature)=='object' ? JSON.stringify(feature) : feature;\n", - " let fields = ["name", "source"];\n", - " let aliases = ["name", "source"];\n", - " let table = '<table>' +\n", - " String(\n", - " fields.map(\n", - " (v,i)=>\n", - " `<tr>\n", - " <th>${aliases[i].toLocaleString()}</th>\n", - " \n", - " <td>${handleObject(layer.feature.properties[v]).toLocaleString()}</td>\n", - " </tr>`).join(''))\n", - " +'</table>';\n", - " div.innerHTML=table;\n", - " \n", - " return div\n", - " }\n", - " ,{"className": "foliumtooltip", "sticky": true});\n", - " \n", - "</script>\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>" - ], - "text/plain": [ - "<folium.folium.Map at 0x13f31d100>" - ] - }, - "execution_count": 62, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# instancier le geocoder avec le code pays\n", "geocoder = Geocoder(country_code = 'fr')\n", @@ -4791,169 +1733,9 @@ }, { "cell_type": "code", - "execution_count": 63, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe srcdoc=\"<!DOCTYPE html>\n", - "<head> \n", - " <meta http-equiv="content-type" content="text/html; charset=UTF-8" />\n", - " \n", - " <script>\n", - " L_NO_TOUCH = false;\n", - " L_DISABLE_3D = false;\n", - " </script>\n", - " \n", - " <style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>\n", - " <style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>\n", - " <script src="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.js"></script>\n", - " <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>\n", - " <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>\n", - " <script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>\n", - " <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"/>\n", - " <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>\n", - " <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css"/>\n", - " \n", - " <meta name="viewport" content="width=device-width,\n", - " initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />\n", - " <style>\n", - " #map_5bf1a37e3c2b212528bc5a8888604341 {\n", - " position: relative;\n", - " width: 100.0%;\n", - " height: 100.0%;\n", - " left: 0.0%;\n", - " top: 0.0%;\n", - " }\n", - " </style>\n", - " \n", - " \n", - " <style>\n", - " .foliumtooltip {\n", - " \n", - " }\n", - " .foliumtooltip table{\n", - " margin: auto;\n", - " }\n", - " .foliumtooltip tr{\n", - " text-align: left;\n", - " }\n", - " .foliumtooltip th{\n", - " padding: 2px; padding-right: 8px;\n", - " }\n", - " </style>\n", - " \n", - "</head>\n", - "<body> \n", - " \n", - " <div class="folium-map" id="map_5bf1a37e3c2b212528bc5a8888604341" ></div>\n", - " \n", - "</body>\n", - "<script> \n", - " \n", - " var map_5bf1a37e3c2b212528bc5a8888604341 = L.map(\n", - " "map_5bf1a37e3c2b212528bc5a8888604341",\n", - " {\n", - " center: [0, 0],\n", - " crs: L.CRS.EPSG3857,\n", - " zoom: 1,\n", - " zoomControl: true,\n", - " preferCanvas: false,\n", - " }\n", - " );\n", - "\n", - " \n", - "\n", - " \n", - " \n", - " var tile_layer_4f325f8681c1b4ad752ce036bbeccba7 = L.tileLayer(\n", - " "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",\n", - " {"attribution": "Data by \\u0026copy; \\u003ca href=\\"http://openstreetmap.org\\"\\u003eOpenStreetMap\\u003c/a\\u003e, under \\u003ca href=\\"http://www.openstreetmap.org/copyright\\"\\u003eODbL\\u003c/a\\u003e.", "detectRetina": false, "maxNativeZoom": 18, "maxZoom": 18, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}\n", - " ).addTo(map_5bf1a37e3c2b212528bc5a8888604341);\n", - " \n", - " \n", - "\n", - " function geo_json_57516ce8bc05e142ec173cab7c1bf20a_onEachFeature(feature, layer) {\n", - " layer.on({\n", - " });\n", - " };\n", - " var geo_json_57516ce8bc05e142ec173cab7c1bf20a = L.geoJson(null, {\n", - " onEachFeature: geo_json_57516ce8bc05e142ec173cab7c1bf20a_onEachFeature,\n", - " \n", - " });\n", - "\n", - " function geo_json_57516ce8bc05e142ec173cab7c1bf20a_add (data) {\n", - " geo_json_57516ce8bc05e142ec173cab7c1bf20a\n", - " .addData(data)\n", - " .addTo(map_5bf1a37e3c2b212528bc5a8888604341);\n", - " }\n", - " geo_json_57516ce8bc05e142ec173cab7c1bf20a_add({"bbox": [6.839184, 45.396851, 6.92214, 45.480323], "features": [{"bbox": [6.839184, 45.396851, 6.92214, 45.480323], "geometry": {"coordinates": [[[6.839184, 45.480323], [6.83987, 45.479299], [6.841973, 45.478562], [6.843969, 45.47857], [6.845235, 45.479931], [6.847187, 45.479675], [6.847766, 45.480112], [6.848368, 45.479932], [6.849569, 45.480172], [6.850213, 45.479029], [6.850685, 45.477254], [6.8509, 45.476306], [6.851114, 45.474425], [6.851758, 45.472889], [6.853217, 45.471626], [6.855106, 45.46982], [6.855534, 45.468766], [6.855191, 45.468014], [6.85605, 45.46684], [6.856092, 45.464914], [6.856049, 45.463891], [6.855663, 45.462356], [6.856093, 45.461679], [6.856822, 45.46137], [6.857122, 45.460038], [6.857166, 45.458864], [6.857724, 45.458021], [6.858754, 45.457765], [6.859698, 45.458503], [6.860513, 45.458097], [6.861564, 45.458676], [6.861575, 45.457732], [6.860641, 45.456396], [6.864246, 45.456245], [6.865748, 45.455944], [6.867508, 45.455763], [6.869139, 45.455884], [6.870942, 45.456034], [6.875319, 45.454649], [6.879224, 45.455432], [6.881391, 45.454996], [6.883816, 45.455463], [6.886091, 45.455613], [6.887936, 45.456004], [6.890725, 45.457841], [6.890789, 45.45608], [6.891379, 45.454687], [6.892742, 45.454379], [6.894287, 45.453084], [6.896261, 45.45191], [6.896733, 45.452663], [6.898192, 45.452602], [6.899759, 45.453009], [6.90184, 45.452392], [6.902398, 45.451308], [6.903771, 45.450827], [6.905102, 45.450525], [6.906303, 45.451308], [6.909179, 45.449742], [6.911582, 45.448568], [6.913986, 45.447755], [6.916839, 45.44619], [6.917944, 45.444971], [6.920036, 45.444083], [6.92214, 45.441493], [6.921732, 45.440138], [6.91921, 45.437713], [6.916174, 45.435741], [6.915831, 45.433859], [6.915701, 45.432067], [6.914092, 45.430877], [6.912398, 45.429567], [6.912054, 45.428845], [6.910767, 45.428423], [6.910209, 45.4277], [6.910423, 45.427038], [6.908664, 45.425321], [6.906861, 45.423603], [6.905509, 45.42261], [6.903985, 45.421586], [6.904544, 45.420486], [6.904587, 45.418784], [6.903986, 45.41779], [6.9039, 45.416254], [6.904393, 45.414838], [6.9042, 45.413301], [6.902741, 45.411855], [6.90081, 45.411524], [6.900123, 45.410636], [6.90111, 45.409476], [6.901003, 45.408707], [6.900349, 45.408564], [6.900064, 45.409095], [6.899343, 45.408773], [6.89742, 45.408511], [6.893514, 45.404624], [6.890639, 45.403811], [6.889116, 45.403374], [6.887592, 45.402576], [6.886176, 45.401822], [6.886262, 45.400858], [6.886444, 45.400128], [6.887142, 45.4], [6.88652, 45.399201], [6.885339, 45.398297], [6.885704, 45.397966], [6.88403, 45.397318], [6.88227, 45.396851]]], "type": "MultiLineString"}, "id": "0", "properties": {}, "type": "Feature"}], "type": "FeatureCollection"});\n", - "\n", - " \n", - " \n", - " map_5bf1a37e3c2b212528bc5a8888604341.fitBounds(\n", - " [[45.207191, 5.867346], [45.462018, 6.963285]],\n", - " {}\n", - " );\n", - " \n", - " \n", - "\n", - " function geo_json_f3b3c496857253002b6ceab4b824bd98_onEachFeature(feature, layer) {\n", - " layer.on({\n", - " });\n", - " };\n", - " var geo_json_f3b3c496857253002b6ceab4b824bd98 = L.geoJson(null, {\n", - " onEachFeature: geo_json_f3b3c496857253002b6ceab4b824bd98_onEachFeature,\n", - " \n", - " });\n", - "\n", - " function geo_json_f3b3c496857253002b6ceab4b824bd98_add (data) {\n", - " geo_json_f3b3c496857253002b6ceab4b824bd98\n", - " .addData(data)\n", - " .addTo(map_5bf1a37e3c2b212528bc5a8888604341);\n", - " }\n", - " geo_json_f3b3c496857253002b6ceab4b824bd98_add({"features": [{"geometry": {"coordinates": [6.863067, 45.451642], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Palet", "source": "nominatim", "sourceName": "Signal du Palet, Champagny-en-Vanoise, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73350, France", "type": "peak"}, "type": "Feature"}, {"geometry": {"coordinates": [6.963285, 45.462018], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Bellecote", "source": "nominatim", "sourceName": "Bellecote, Sentier de la Vall\\u00e9e Perdue, Le Cr\\u00eat, La Daille, Val-d\\u0027Is\\u00e8re, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73150, France", "type": "yes"}, "type": "Feature"}, {"geometry": {"coordinates": [5.867346, 45.308667], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "berger", "source": "nominatim", "sourceName": "Berger, Saint-Hilaire, Plateau-des-Petites-Roches, Grenoble, Is\\u00e8re, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 38660, France", "type": "footway"}, "type": "Feature"}, {"geometry": {"coordinates": [6.896874, 45.454039], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Tichot", "source": "nominatim", "sourceName": "Tichot, Tarte \\u00e0 Lognan, Val-Claret, Tignes, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73320, France", "type": "station"}, "type": "Feature"}, {"geometry": {"coordinates": [6.422623, 45.255481], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Claret", "source": "nominatim", "sourceName": "Claret, Saint-Julien-Mont-Denis, Saint-Jean-de-Maurienne, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73870, France", "type": "hamlet"}, "type": "Feature"}, {"geometry": {"coordinates": [6.914334, 45.458216], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "paquis", "source": "nominatim", "sourceName": "Paquis, GunPowder, Tignes, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73320, France", "type": "station"}, "type": "Feature"}, {"geometry": {"coordinates": [6.858926, 45.461481], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Grattaleu", "source": "nominatim", "sourceName": "Lac du Grattaleu, Peisey-Nancroix, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73210, France", "type": "water"}, "type": "Feature"}, {"geometry": {"coordinates": [6.392506, 45.207191], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Plagne", "source": "nominatim", "sourceName": "Plagne, Copies, La Plagne, Albanne, Montricher-Albanne, Saint-Jean-de-Maurienne, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73870, France", "type": "platter"}, "type": "Feature"}, {"geometry": {"coordinates": [6.89952, 45.412971], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Nettes", "source": "nominatim", "sourceName": "Lac des Nettes, Termignon, Val-Cenis, Saint-Jean-de-Maurienne, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73500, France", "type": "water"}, "type": "Feature"}, {"geometry": {"coordinates": [6.92583, 45.442088], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Fresse", "source": "nominatim", "sourceName": "Fresse, Piste du Col de Fresse, Val-d\\u0027Is\\u00e8re, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73150, France", "type": "station"}, "type": "Feature"}, {"geometry": {"coordinates": [6.579058, 45.298166], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "GR", "source": "nominatim", "sourceName": "Grande Rue, Saint-Martin-de-Belleville, Les Belleville, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73440, France", "type": "quarter"}, "type": "Feature"}, {"geometry": {"coordinates": [6.837532, 45.456069], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Grassaz", "source": "nominatim", "sourceName": "Col de la Grassaz, Peisey-Nancroix, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73210, France", "type": "yes"}, "type": "Feature"}, {"geometry": {"coordinates": [6.43923, 45.445076], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Prariond", "source": "nominatim", "sourceName": "Prariond, Mottet, Les Avanchers-Valmorel, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73260, France", "type": "platter"}, "type": "Feature"}, {"geometry": {"coordinates": [6.395829, 45.350595], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Lognan", "source": "nominatim", "sourceName": "Cr\\u00eat Lognan, Les Belleville, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, France", "type": "peak"}, "type": "Feature"}, {"geometry": {"coordinates": [6.898275, 45.419228], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "Leisse", "source": "nominatim", "sourceName": "Leisse, Chemin de Borsat, Val-d\\u0027Is\\u00e8re, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73150, France", "type": "station"}, "type": "Feature"}, {"geometry": {"coordinates": [6.60536, 45.273046], "type": "Point"}, "properties": {"country": "France", "id": 0, "name": "col", "source": "nominatim", "sourceName": "Col, Boulevard Lauzes, Slalom, Saint-Martin-de-Belleville, Les Belleville, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73440, France", "type": "station"}, "type": "Feature"}], "type": "FeatureCollection"});\n", - "\n", - " \n", - " \n", - " geo_json_f3b3c496857253002b6ceab4b824bd98.bindTooltip(\n", - " function(layer){\n", - " let div = L.DomUtil.create('div');\n", - " \n", - " let handleObject = feature=>typeof(feature)=='object' ? JSON.stringify(feature) : feature;\n", - " let fields = ["name", "source"];\n", - " let aliases = ["name", "source"];\n", - " let table = '<table>' +\n", - " String(\n", - " fields.map(\n", - " (v,i)=>\n", - " `<tr>\n", - " <th>${aliases[i].toLocaleString()}</th>\n", - " \n", - " <td>${handleObject(layer.feature.properties[v]).toLocaleString()}</td>\n", - " </tr>`).join(''))\n", - " +'</table>';\n", - " div.innerHTML=table;\n", - " \n", - " return div\n", - " }\n", - " ,{"className": "foliumtooltip", "sticky": true});\n", - " \n", - "</script>\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>" - ], - "text/plain": [ - "<folium.folium.Map at 0x13e6491f0>" - ] - }, - "execution_count": 63, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "bbox = [5.62216508714297, 45.051683489057, 7.18563279407213, 45.9384576816403] # zone d'intervention du PGHM Isère\n", "\n", @@ -4977,169 +1759,9 @@ }, { "cell_type": "code", - "execution_count": 64, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe srcdoc=\"<!DOCTYPE html>\n", - "<head> \n", - " <meta http-equiv="content-type" content="text/html; charset=UTF-8" />\n", - " \n", - " <script>\n", - " L_NO_TOUCH = false;\n", - " L_DISABLE_3D = false;\n", - " </script>\n", - " \n", - " <style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>\n", - " <style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>\n", - " <script src="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.js"></script>\n", - " <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>\n", - " <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>\n", - " <script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>\n", - " <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"/>\n", - " <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"/>\n", - " <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>\n", - " <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css"/>\n", - " \n", - " <meta name="viewport" content="width=device-width,\n", - " initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />\n", - " <style>\n", - " #map_5fcfb6c99d65b3ae71495beba4ac0f49 {\n", - " position: relative;\n", - " width: 100.0%;\n", - " height: 100.0%;\n", - " left: 0.0%;\n", - " top: 0.0%;\n", - " }\n", - " </style>\n", - " \n", - " \n", - " <style>\n", - " .foliumtooltip {\n", - " \n", - " }\n", - " .foliumtooltip table{\n", - " margin: auto;\n", - " }\n", - " .foliumtooltip tr{\n", - " text-align: left;\n", - " }\n", - " .foliumtooltip th{\n", - " padding: 2px; padding-right: 8px;\n", - " }\n", - " </style>\n", - " \n", - "</head>\n", - "<body> \n", - " \n", - " <div class="folium-map" id="map_5fcfb6c99d65b3ae71495beba4ac0f49" ></div>\n", - " \n", - "</body>\n", - "<script> \n", - " \n", - " var map_5fcfb6c99d65b3ae71495beba4ac0f49 = L.map(\n", - " "map_5fcfb6c99d65b3ae71495beba4ac0f49",\n", - " {\n", - " center: [0, 0],\n", - " crs: L.CRS.EPSG3857,\n", - " zoom: 1,\n", - " zoomControl: true,\n", - " preferCanvas: false,\n", - " }\n", - " );\n", - "\n", - " \n", - "\n", - " \n", - " \n", - " var tile_layer_6b04f5f1384eba8f33ba05dda6dcb573 = L.tileLayer(\n", - " "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",\n", - " {"attribution": "Data by \\u0026copy; \\u003ca href=\\"http://openstreetmap.org\\"\\u003eOpenStreetMap\\u003c/a\\u003e, under \\u003ca href=\\"http://www.openstreetmap.org/copyright\\"\\u003eODbL\\u003c/a\\u003e.", "detectRetina": false, "maxNativeZoom": 18, "maxZoom": 18, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}\n", - " ).addTo(map_5fcfb6c99d65b3ae71495beba4ac0f49);\n", - " \n", - " \n", - "\n", - " function geo_json_a491f7fa51a4af06c5d28be388749b20_onEachFeature(feature, layer) {\n", - " layer.on({\n", - " });\n", - " };\n", - " var geo_json_a491f7fa51a4af06c5d28be388749b20 = L.geoJson(null, {\n", - " onEachFeature: geo_json_a491f7fa51a4af06c5d28be388749b20_onEachFeature,\n", - " \n", - " });\n", - "\n", - " function geo_json_a491f7fa51a4af06c5d28be388749b20_add (data) {\n", - " geo_json_a491f7fa51a4af06c5d28be388749b20\n", - " .addData(data)\n", - " .addTo(map_5fcfb6c99d65b3ae71495beba4ac0f49);\n", - " }\n", - " geo_json_a491f7fa51a4af06c5d28be388749b20_add({"bbox": [6.839184, 45.396851, 6.92214, 45.480323], "features": [{"bbox": [6.839184, 45.396851, 6.92214, 45.480323], "geometry": {"coordinates": [[[6.839184, 45.480323], [6.83987, 45.479299], [6.841973, 45.478562], [6.843969, 45.47857], [6.845235, 45.479931], [6.847187, 45.479675], [6.847766, 45.480112], [6.848368, 45.479932], [6.849569, 45.480172], [6.850213, 45.479029], [6.850685, 45.477254], [6.8509, 45.476306], [6.851114, 45.474425], [6.851758, 45.472889], [6.853217, 45.471626], [6.855106, 45.46982], [6.855534, 45.468766], [6.855191, 45.468014], [6.85605, 45.46684], [6.856092, 45.464914], [6.856049, 45.463891], [6.855663, 45.462356], [6.856093, 45.461679], [6.856822, 45.46137], [6.857122, 45.460038], [6.857166, 45.458864], [6.857724, 45.458021], [6.858754, 45.457765], [6.859698, 45.458503], [6.860513, 45.458097], [6.861564, 45.458676], [6.861575, 45.457732], [6.860641, 45.456396], [6.864246, 45.456245], [6.865748, 45.455944], [6.867508, 45.455763], [6.869139, 45.455884], [6.870942, 45.456034], [6.875319, 45.454649], [6.879224, 45.455432], [6.881391, 45.454996], [6.883816, 45.455463], [6.886091, 45.455613], [6.887936, 45.456004], [6.890725, 45.457841], [6.890789, 45.45608], [6.891379, 45.454687], [6.892742, 45.454379], [6.894287, 45.453084], [6.896261, 45.45191], [6.896733, 45.452663], [6.898192, 45.452602], [6.899759, 45.453009], [6.90184, 45.452392], [6.902398, 45.451308], [6.903771, 45.450827], [6.905102, 45.450525], [6.906303, 45.451308], [6.909179, 45.449742], [6.911582, 45.448568], [6.913986, 45.447755], [6.916839, 45.44619], [6.917944, 45.444971], [6.920036, 45.444083], [6.92214, 45.441493], [6.921732, 45.440138], [6.91921, 45.437713], [6.916174, 45.435741], [6.915831, 45.433859], [6.915701, 45.432067], [6.914092, 45.430877], [6.912398, 45.429567], [6.912054, 45.428845], [6.910767, 45.428423], [6.910209, 45.4277], [6.910423, 45.427038], [6.908664, 45.425321], [6.906861, 45.423603], [6.905509, 45.42261], [6.903985, 45.421586], [6.904544, 45.420486], [6.904587, 45.418784], [6.903986, 45.41779], [6.9039, 45.416254], [6.904393, 45.414838], [6.9042, 45.413301], [6.902741, 45.411855], [6.90081, 45.411524], [6.900123, 45.410636], [6.90111, 45.409476], [6.901003, 45.408707], [6.900349, 45.408564], [6.900064, 45.409095], [6.899343, 45.408773], [6.89742, 45.408511], [6.893514, 45.404624], [6.890639, 45.403811], [6.889116, 45.403374], [6.887592, 45.402576], [6.886176, 45.401822], [6.886262, 45.400858], [6.886444, 45.400128], [6.887142, 45.4], [6.88652, 45.399201], [6.885339, 45.398297], [6.885704, 45.397966], [6.88403, 45.397318], [6.88227, 45.396851]]], "type": "MultiLineString"}, "id": "0", "properties": {}, "type": "Feature"}], "type": "FeatureCollection"});\n", - "\n", - " \n", - " \n", - " map_5fcfb6c99d65b3ae71495beba4ac0f49.fitBounds(\n", - " [[45.412971, 6.837532], [45.462018, 6.963285]],\n", - " {}\n", - " );\n", - " \n", - " \n", - "\n", - " function geo_json_65a37b14e1dcc6fc446f098e9b6d3509_onEachFeature(feature, layer) {\n", - " layer.on({\n", - " });\n", - " };\n", - " var geo_json_65a37b14e1dcc6fc446f098e9b6d3509 = L.geoJson(null, {\n", - " onEachFeature: geo_json_65a37b14e1dcc6fc446f098e9b6d3509_onEachFeature,\n", - " \n", - " });\n", - "\n", - " function geo_json_65a37b14e1dcc6fc446f098e9b6d3509_add (data) {\n", - " geo_json_65a37b14e1dcc6fc446f098e9b6d3509\n", - " .addData(data)\n", - " .addTo(map_5fcfb6c99d65b3ae71495beba4ac0f49);\n", - " }\n", - " geo_json_65a37b14e1dcc6fc446f098e9b6d3509_add({"features": [{"geometry": {"coordinates": [6.863067, 45.451642], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.451642, "longitude": 6.863067, "name": "Palet", "source": "nominatim", "sourceName": "Signal du Palet, Champagny-en-Vanoise, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73350, France", "xmlID": 0}, "type": "Feature"}, {"geometry": {"coordinates": [6.963285, 45.462018], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.462018, "longitude": 6.963285, "name": "Bellecote", "source": "nominatim", "sourceName": "Bellecote, Sentier de la Vall\\u00e9e Perdue, Le Cr\\u00eat, La Daille, Val-d\\u0027Is\\u00e8re, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73150, France", "xmlID": 0}, "type": "Feature"}, {"geometry": {"coordinates": [6.896874, 45.454039], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.454039, "longitude": 6.896874, "name": "Tichot", "source": "nominatim", "sourceName": "Tichot, Tarte \\u00e0 Lognan, Val-Claret, Tignes, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73320, France", "xmlID": 0}, "type": "Feature"}, {"geometry": {"coordinates": [6.914334, 45.458216], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.458216, "longitude": 6.914334, "name": "paquis", "source": "nominatim", "sourceName": "Paquis, GunPowder, Tignes, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73320, France", "xmlID": 0}, "type": "Feature"}, {"geometry": {"coordinates": [6.858926, 45.461481], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.461481, "longitude": 6.858926, "name": "Grattaleu", "source": "nominatim", "sourceName": "Lac du Grattaleu, Peisey-Nancroix, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73210, France", "xmlID": 0}, "type": "Feature"}, {"geometry": {"coordinates": [6.89952, 45.412971], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.412971, "longitude": 6.89952, "name": "Nettes", "source": "nominatim", "sourceName": "Lac des Nettes, Termignon, Val-Cenis, Saint-Jean-de-Maurienne, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73500, France", "xmlID": 0}, "type": "Feature"}, {"geometry": {"coordinates": [6.92583, 45.442088], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.442088, "longitude": 6.92583, "name": "Fresse", "source": "nominatim", "sourceName": "Fresse, Piste du Col de Fresse, Val-d\\u0027Is\\u00e8re, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73150, France", "xmlID": 0}, "type": "Feature"}, {"geometry": {"coordinates": [6.837532, 45.456069], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.456069, "longitude": 6.837532, "name": "Grassaz", "source": "nominatim", "sourceName": "Col de la Grassaz, Peisey-Nancroix, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73210, France", "xmlID": 0}, "type": "Feature"}, {"geometry": {"coordinates": [6.898275, 45.419228], "type": "Point"}, "properties": {"cluster": 0, "country": "France", "latitude": 45.419228, "longitude": 6.898275, "name": "Leisse", "source": "nominatim", "sourceName": "Leisse, Chemin de Borsat, Val-d\\u0027Is\\u00e8re, Albertville, Savoie, Auvergne-Rh\\u00f4ne-Alpes, France m\\u00e9tropolitaine, 73150, France", "xmlID": 0}, "type": "Feature"}], "type": "FeatureCollection"});\n", - "\n", - " \n", - " \n", - " geo_json_65a37b14e1dcc6fc446f098e9b6d3509.bindTooltip(\n", - " function(layer){\n", - " let div = L.DomUtil.create('div');\n", - " \n", - " let handleObject = feature=>typeof(feature)=='object' ? JSON.stringify(feature) : feature;\n", - " let fields = ["name", "source"];\n", - " let aliases = ["name", "source"];\n", - " let table = '<table>' +\n", - " String(\n", - " fields.map(\n", - " (v,i)=>\n", - " `<tr>\n", - " <th>${aliases[i].toLocaleString()}</th>\n", - " \n", - " <td>${handleObject(layer.feature.properties[v]).toLocaleString()}</td>\n", - " </tr>`).join(''))\n", - " +'</table>';\n", - " div.innerHTML=table;\n", - " \n", - " return div\n", - " }\n", - " ,{"className": "foliumtooltip", "sticky": true});\n", - " \n", - "</script>\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>" - ], - "text/plain": [ - "<folium.folium.Map at 0x13f0388b0>" - ] - }, - "execution_count": 64, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# appliquer la désambiguïsation \n", "doc_geocoded.cluster_disambiguation()\n", @@ -5176,7 +1798,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.3" + "version": "3.9.13" }, "vscode": { "interpreter": {