Skip to content

Instantly share code, notes, and snippets.

@laowantong
Last active June 8, 2023 12:30
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save laowantong/5a11b6c0ecdc76fc8490fd0679bcd0b0 to your computer and use it in GitHub Desktop.
Génération de la base d'itinéraires utilisée sur https://maisonrougevernet.fr/transports
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"cells": [
{
"cell_type": "markdown",
"id": "3454bcd9",
"metadata": {},
"source": [
"# Base des transports"
]
},
{
"cell_type": "markdown",
"id": "84e42cb8",
"metadata": {},
"source": [
"## Initialisations"
]
},
{
"cell_type": "code",
"execution_count": 77,
"id": "8ae7dce0",
"metadata": {
"init_cell": true
},
"outputs": [],
"source": [
"import json\n",
"import re\n",
"import unicodedata\n",
"from pathlib import Path\n",
"from pprint import pprint\n",
"from itertools import groupby\n",
"import time\n",
"import os\n",
"\n",
"import pandas as pd\n",
"import requests\n",
"\n",
"import bz2\n",
"import importlib\n",
"import pickle\n",
"from collections import defaultdict\n",
"from datetime import datetime\n",
"from functools import lru_cache\n",
"\n",
"import camelot\n",
"import numpy as np\n",
"from neo4j import GraphDatabase\n",
"\n",
"import pypdfium2 as pdfium"
]
},
{
"cell_type": "code",
"execution_count": 71,
"id": "d9eb00ce",
"metadata": {
"code_folding": [
0
],
"init_cell": true
},
"outputs": [],
"source": [
"class StopExecution(Exception):\n",
" def _render_traceback_(self):\n",
" pass\n",
"\n",
"normalize = lambda s: unicodedata.normalize(\"NFKD\", s)\n",
"\n",
"OK = \"\\033[92m\"\n",
"WARNING = \"\\033[1m\\033[38;5;166m\"\n",
"FAIL = \"\\033[1m\\033[91m\"\n",
"RESET = \"\\033[0m\"\n",
"\n",
"PDF_DIR = Path(\"pdf\")\n",
"PBZ2_DIR = Path(\"pbz2\")\n",
"TEXTS_DIR = Path(\"texts\")\n",
"SEGMENTS_DIR = Path(\"segments\")\n",
"QUERIES_DIR = Path(\"queries\")\n",
"\n",
"def hhmm_to_minutes(time):\n",
" return int(time[:2]) * 60 + int(time[3:5])\n",
"\n",
"def calculate_int_duration(dep_time, arr_time):\n",
" return hhmm_to_minutes(arr_time) - hhmm_to_minutes(dep_time)\n",
"\n",
"def minutes_to_hhmm(minutes):\n",
" return \"%02d:%02d\" % divmod(minutes, 60)\n",
"\n",
"LINES_OF_INTEREST = [\n",
" \"520\",\n",
" \"521\",\n",
" \"523\",\n",
" \"525\",\n",
" \"530\",\n",
" \"540\",\n",
" \"560\",\n",
" \"561\",\n",
" \"564\",\n",
" \"train_jaune\",\n",
" \"PORT BOU - NARBONNE\",\n",
" \"PERPIGNAN - VILLEFRANCHE\",\n",
"]\n",
"SUBGRAPHS = [\n",
" [\n",
" (\"Vernet\", \"Casteil\"),\n",
" (\"Vernet\", \"Villefranche\"),\n",
" (\"Villefranche\", \"Prades\"),\n",
" (\"Prades\", \"Mosset\"),\n",
" (\"Prades\", \"Py\"),\n",
" (\"Villefranche\", \"Mont-Louis\"),\n",
" (\"Mont-Louis\", \"Bouillouses\"),\n",
" (\"Mont-Louis\", \"Formiguères\"),\n",
" (\"Prades\", \"Perpignan\"),\n",
" (\"Perpignan\", \"Collioure\"),\n",
" (\"Perpignan\", \"Céret\"),\n",
" (\"Céret\", \"Arles-sur-Tech\"),\n",
" ],\n",
" [\n",
" (\"Perpignan\", \"Prades\"),\n",
" (\"Prades\", \"Villefranche\"),\n",
" (\"Villefranche\", \"Vernet\"),\n",
" (\"Vernet\", \"Casteil\"),\n",
" (\"Prades\", \"Mosset\"),\n",
" (\"Prades\", \"Py\"),\n",
" (\"Villefranche\", \"Mont-Louis\"),\n",
" (\"Mont-Louis\", \"Bouillouses\"),\n",
" (\"Mont-Louis\", \"Formiguères\"),\n",
" # Omit the last three arcs of the main graph, which would be redundant.\n",
" ] \n",
"]\n",
"for i in range(len(SUBGRAPHS)-1, -1, -1):\n",
" SUBGRAPHS.insert(i+1, [(y, x) for (x, y) in SUBGRAPHS[i]])\n",
"CITIES = sorted(set([edge[0] for edge in SUBGRAPHS[0]] + [edge[1] for edge in SUBGRAPHS[0]]))"
]
},
{
"cell_type": "markdown",
"id": "b7445f1c",
"metadata": {},
"source": [
"## Récupérer les url des fiches horaires"
]
},
{
"cell_type": "markdown",
"id": "eda86786",
"metadata": {},
"source": [
"Plutôt que de coder en dur les url des fiches horaires en PDF (leur nom varie à chaque mise à jour), on récupère autant que possible celles-ci dans des pages d'adresse censément fixe.\n",
"\n",
"Malheureusement, il ne semble pas y avoir de page statique où récupérer les fiches horaires SNCF. Les chercher sur [cette page](https://www.ter.sncf.com/occitanie/se-deplacer/fiches-horaires) et copier leurs urls dans la constante `URLS` ci-dessous (qui contient donc aussi bien des liens directs qu'indirects vers les pdf). Les lignes concernées sont :\n",
"- Port-Bou-Perpignan-Narbonne.\n",
"- Perpignan-Villefranche-Vernet-les-Bains."
]
},
{
"cell_type": "code",
"execution_count": 72,
"id": "28c2c242",
"metadata": {
"code_folding": []
},
"outputs": [],
"source": [
"URLS = [\n",
" \"https://www.lio-occitanie.fr/horaires-et-plans/\",\n",
" \"https://www.tourisme-canigou.com/decouvrez/le-train-jaune\",\n",
" \"https://ter-fiches-horaires.sncf.fr/publish/WEB%20FH24%20PERPIGNAN%20-%20VILLEFRANCHE%20VERNET%20LES%20BAINS_2023.pdf\",\n",
" \"https://ter-fiches-horaires.sncf.fr/publish/WEB%20FH23%20PORT%20BOU%20-%20NARBONNE%20PAYSAGE_2023.pdf\",\n",
" \"https://storage.googleapis.com/is-wp-90-prod/uploads-preprod/2023/06/100522_liO_flyer_ligne564.pdf\",\n",
"]\n",
"page_text_compilation = \"\\n\".join(requests.get(url).text for url in URLS if not url.endswith(\"pdf\"))"
]
},
{
"cell_type": "code",
"execution_count": 73,
"id": "503368e0",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Files to download:\n",
" 520: https://storage.googleapis.com/is-wp-90-preprod/uploads-preprod/2023/03/66-FH-520-032023.pdf\n",
" 521: https://storage.googleapis.com/is-wp-90-preprod/uploads-preprod/2023/03/66-FH-521-032023.pdf\n",
" 523: https://storage.googleapis.com/is-wp-90-preprod/uploads-preprod/2023/03/66-FH-523-032023.pdf\n",
" 525: https://storage.googleapis.com/is-wp-90-preprod/uploads-preprod/2023/03/66-FH-525-032023.pdf\n",
" 530: https://storage.googleapis.com/is-wp-90-preprod/uploads-preprod/2023/03/66-FH-530-032023.pdf\n",
" 540: https://storage.googleapis.com/is-wp-90-preprod/uploads-preprod/2023/03/66-FH-540-032023.pdf\n",
" 560: https://storage.googleapis.com/is-wp-90-preprod/uploads-preprod/2023/03/66-FH-560-032023.pdf\n",
" 561: https://storage.googleapis.com/is-wp-90-preprod/uploads-preprod/2023/03/66-FH-561-032023.pdf\n",
" 564: https://storage.googleapis.com/is-wp-90-prod/uploads-preprod/2023/06/100522_liO_flyer_ligne564.pdf\n",
" train_jaune: https://www.tourisme-canigou.com/sites/tourisme-canigou/files/content/files/horaires_train_jaune_27_mai_au_9_decembre_2023.pdf\n",
" PORT BOU - NARBONNE: https://ter-fiches-horaires.sncf.fr/publish/WEB%20FH23%20PORT%20BOU%20-%20NARBONNE%20PAYSAGE_2023.pdf\n",
" PERPIGNAN - VILLEFRANCHE: https://ter-fiches-horaires.sncf.fr/publish/WEB%20FH24%20PERPIGNAN%20-%20VILLEFRANCHE%20VERNET%20LES%20BAINS_2023.pdf\n",
"If you want to exclude some of them from downloading, extend BLACKLISTED_SUBSTRINGS.\n"
]
}
],
"source": [
"BLACKLISTED_SUBSTRINGS = [\n",
" \"PLAN\",\n",
" \"Oc22\",\n",
" \"du_2702_au_2804\",\n",
" \"2022\",\n",
" \"social\",\n",
"]\n",
"\n",
"pdf_urls = {n: \"\" for n in LINES_OF_INTEREST}\n",
"for line in pdf_urls:\n",
" for pdf_url in re.findall(fr'href=\"([^\"]*?(?<=[\\W_]){line}(?=[\\W_])[^\"]*?\\.pdf)', page_text_compilation):\n",
" for s in BLACKLISTED_SUBSTRINGS:\n",
" if re.search(rf\"\\b{s}\\b\", pdf_url):\n",
" break\n",
" else:\n",
" pdf_urls[line] = pdf_url\n",
"print(\"Files to download:\")\n",
"for (line_of_interest, pdf_url) in pdf_urls.items():\n",
" print(f\" {line_of_interest}: \", end=\"\")\n",
" if pdf_url:\n",
" print(pdf_url)\n",
" continue\n",
" for url in URLS:\n",
" if url.endswith(\".pdf\") and line_of_interest.replace(\" \", \"%20\") in url:\n",
" pdf_urls[line_of_interest] = url\n",
" print(url)\n",
" break\n",
" else:\n",
" print(f\"{WARNING}Not found.{RESET}\")\n",
"print(\"If you want to exclude some of them from downloading, extend BLACKLISTED_SUBSTRINGS.\")"
]
},
{
"cell_type": "markdown",
"id": "1553f38f",
"metadata": {},
"source": [
"## Télécharger les fiches horaires dans `pdf/`"
]
},
{
"cell_type": "code",
"execution_count": 80,
"id": "67b0c14c",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"520.pdf \u001b[92malready up to date.\u001b[0m\n",
"521.pdf \u001b[92malready up to date.\u001b[0m\n",
"523.pdf \u001b[92malready up to date.\u001b[0m\n",
"525.pdf \u001b[92malready up to date.\u001b[0m\n",
"530.pdf \u001b[92malready up to date.\u001b[0m\n",
"540.pdf \u001b[92malready up to date.\u001b[0m\n",
"560.pdf \u001b[92malready up to date.\u001b[0m\n",
"561.pdf \u001b[92malready up to date.\u001b[0m\n",
"564.pdf \u001b[92malready up to date.\u001b[0m\n",
"train_jaune.pdf \u001b[92malready up to date.\u001b[0m\n",
"PORT BOU - NARBONNE.pdf \u001b[92malready up to date.\u001b[0m\n",
"PERPIGNAN - VILLEFRANCHE.pdf \u001b[92malready up to date.\u001b[0m\n"
]
}
],
"source": [
"touched = set()\n",
"for (line, pdf_url) in pdf_urls.items():\n",
" print(line, end=\".pdf \")\n",
" path = PDF_DIR / f\"{line}.pdf\"\n",
" if not pdf_url:\n",
" if path.is_file():\n",
" print(f\"{OK}already downloaded.{RESET}\")\n",
" else:\n",
" print(f\"{FAIL}No schedule!{RESET}\")\n",
" continue\n",
" response = requests.get(pdf_url)\n",
" touched.add(normalize(path.name))\n",
" if path.is_file():\n",
" if path.read_bytes() == response.content:\n",
" print(f\"{OK}already up to date.{RESET}\")\n",
" continue\n",
" path.rename(path.parent / f\"{path.stem}_old.pdf\")\n",
" print(f\"{WARNING}updated. {RESET}\", end=\"\")\n",
" else:\n",
" print(f\"{OK}created. {RESET}\", end=\"\")\n",
" path.write_bytes(response.content)\n",
" if line == 564:\n",
" print(f'{WARNING}Update the corresponding code cell in this notebook.{RESET}')\n",
" else:\n",
" print(f'{WARNING}Verify \"config.json\".{RESET}')\n",
"\n",
"untouched = [path for path in PDF_DIR.glob(\"*.pdf\") if normalize(path.name) not in touched]\n",
"if untouched:\n",
" print(f\"\\n{WARNING}You may delete the following file(s) before proceeding:{RESET}\")\n",
" for path in untouched:\n",
" print(f\" {path.name}\")\n",
" os.system(\"open pdf\")"
]
},
{
"cell_type": "markdown",
"id": "d9196775",
"metadata": {},
"source": [
"Le cas échéant, les vérifications à faire dans `\"config.json\"` sont :\n",
"- `col_headers` : copier-coller le contenu de la liste mis en forme au moment de l'extraction du texte (script suivant) ;\n",
"- `periods_to_uncheck` : 1-based indexed. Compter les colonnes dans le PDF jusqu'à arriver à celles où le symbole « • » est manquant."
]
},
{
"cell_type": "markdown",
"id": "382235c5",
"metadata": {},
"source": [
"## PyPdfium : enregistrer le texte des fiches dans `textes/`"
]
},
{
"cell_type": "code",
"execution_count": 83,
"id": "5d78cb36",
"metadata": {
"code_folding": [],
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"520: up to date.\n",
"521: up to date.\n",
"523: up to date.\n",
"525: up to date.\n",
"530: up to date.\n",
"540: up to date.\n",
"560: up to date.\n",
"561: up to date.\n",
"564: \u001b[92mupdated.\u001b[0m\n",
"train_jaune: up to date.\n",
"PORT BOU - NARBONNE: up to date.\n",
"PERPIGNAN - VILLEFRANCHE: up to date.\n"
]
}
],
"source": [
"FIND_AND_REPLACE = {\n",
" r\"\\*\": \"\",\n",
" r\"Tous\\s*\\nles\\s*\\njours\": '\"LMWJVSD\", ',\n",
" r\"Lun\\s*\\nà\\s*\\nSam\": '\"LMWJVS\", ',\n",
" r\"Lun\\s*\\nà\\s*\\nVen\": '\"LMWJV\", ',\n",
" r\"Lun\\s*\\nà\\s*\\nJeu\": '\"LMWJ\", ',\n",
" r\"Lun\\s*\\nà\\s*\\nMer\": '\"LMW\", ',\n",
" r\"Ven\\s*\\nà\\s*\\nDim\": '\"VSD\", ',\n",
" r\"Sam\\s*\\nDim\\s*\\n(et\\s*\\n)?Fêtes\": '\"SD\", ',\n",
" r\"Dim\\s*\\n(et\\s*\\n)?Fêtes\": '\"D\", ',\n",
" r\"Ven\\s*\\n(et\\s*\\n)?Sam\": '\"VS\", ',\n",
" r\"Sam\\s*\\n(et\\s*\\n)?Dim\": '\"SD\", ',\n",
" r\"Sauf\\s*\\nSam\": '\"LMWJVD\", ',\n",
" r\"(?<!-)Sam\\b\": '\"S\", ',\n",
" r\"(?<!-)Dim\\b\": '\"D\", ',\n",
" r\"(?<!-)Lun\\b\": '\"L\", ',\n",
" r\"(?<!-)Mar\\b\": '\"M\", ',\n",
" r\"(?<!-)Mer\\b\": '\"W\", ',\n",
" r\"(?<!-)Jeu\\b\": '\"J\", ',\n",
" r\"(?<!-)Ven\\b\": '\"V\", ',\n",
" r'\",\\s+\"': '\", \"',\n",
" r'(\".+\"),': r'\\n[\\1]',\n",
" r\"LàV\": \"LMWJV\",\n",
" r\"LàS\": \"LMWJVS\",\n",
" r\"LàD\": \"LMWJVSD\",\n",
" r\"ET FÊTES\": \"\",\n",
" r\"L à D\": \"LMWJVSD\",\n",
" r\"L à S\": \"LMWJVS\",\n",
" r\"L à V\": \"LMWJV\",\n",
" r\" D\\s+D \": \" D D \",\n",
" r\"Train\\s+[Jj]aune\": \"train_jaune\",\n",
" r\"\\bMe\\b\": \"W\",\n",
" \" +\": \" \",\n",
" \"Villefranche-Vernet-les-Bains\": \"Villefranche\",\n",
" \"Villefranche Gare SNCF\": \"Villefranche\",\n",
" \"Mont-Louis-La Cabanasse\": \"Mont-Louis\",\n",
" \"Perpignan Gare SNCF\": \"Perpignan\",\n",
" \"Prades Espace Multimodal .+\\nGare SNCF\": \"Prades\",\n",
" \"Prades Gare SNCF\": \"Prades\",\n",
" \"Perpignan Gare Routière .+\\nGare SNCF\": \"Perpignan\",\n",
" \"Mont Louis -\\s+Porte de France\": \"Mont-Louis\",\n",
" \"Les Bouillouses -\\s+Pla de Barres\": \"Bouillouses\",\n",
"}\n",
"\n",
"FORCE = False\n",
"\n",
"for line in LINES_OF_INTEREST:\n",
" print(f\"{line}: \", end=\"\")\n",
" text_path = TEXTS_DIR / f\"{line}.txt\"\n",
" pdf_path = PDF_DIR / f\"{line}.pdf\"\n",
" if not FORCE and text_path.is_file() and pdf_path.stat().st_mtime < text_path.stat().st_mtime:\n",
" print(\"up to date.\")\n",
" continue\n",
" reader = pdfium.PdfDocument(pdf_path)\n",
" text = \"\\n\\n<PAGE BREAK>\\n\\n\".join(reader[i].get_textpage().get_text_range() for i in (0, 1))\n",
" for (find, replace) in FIND_AND_REPLACE.items():\n",
" text = re.sub(find, replace, text)\n",
" text = re.sub(r\"(?m)(JOURS DE LA SEMAINE )((?:[LMWJVSD]+\\s+)+)\", lambda m: m[1] + re.sub(r\"(\\S+)\\s+\", r'\"\\1\", ', m[2]) + \"\\n\", text)\n",
" text_path.write_text(text)\n",
" print(f\"{OK}updated.{RESET}\")"
]
},
{
"cell_type": "markdown",
"id": "3b168709",
"metadata": {},
"source": [
"## Mettre à jour `transports.md.html`\n",
"Injecter les dates de validité et les urls de téléchargement des fiches horaires."
]
},
{
"cell_type": "code",
"execution_count": 87,
"id": "8497ec07",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<details><summary>Fiches horaires à télécharger…</summary>\n",
"\n",
"<p style=\"color: gray\">Jusqu'au 7 juillet 2023</p>\n",
"<p><span class=\"bus\"></span>&nbsp; [car 540 Perpignan ⇄ Collioure](https://storage.googleapis.com/is-wp-90-preprod/uploads-preprod/2023/03/66-FH-540-032023.pdf)</p>\n",
"<p><span class=\"train\"></span>&nbsp; [train Perpignan ⇄ Collioure](https://ter-fiches-horaires.sncf.fr/publish/WEB%20FH23%20PORT%20BOU%20-%20NARBONNE%20PAYSAGE_2023.pdf)</p>\n",
"<p><span class=\"train\"></span>&nbsp; [train Perpignan ⇄ Villefranche](https://ter-fiches-horaires.sncf.fr/publish/WEB%20FH24%20PERPIGNAN%20-%20VILLEFRANCHE%20VERNET%20LES%20BAINS_2023.pdf)</p>\n",
"<p style=\"color: gray\">Jusqu'au 31 août 2023</p>\n",
"<p><span class=\"bus\"></span>&nbsp; [car 520 Prades ⇄ Perpignan](https://storage.googleapis.com/is-wp-90-preprod/uploads-preprod/2023/03/66-FH-520-032023.pdf)</p>\n",
"<p><span class=\"bus\"></span>&nbsp; [car 521 Perpignan ⇄ Casteil](https://storage.googleapis.com/is-wp-90-preprod/uploads-preprod/2023/03/66-FH-521-032023.pdf)</p>\n",
"<p><span class=\"bus\"></span>&nbsp; [car 523 Mosset ⇄ Prades](https://storage.googleapis.com/is-wp-90-preprod/uploads-preprod/2023/03/66-FH-523-032023.pdf)</p>\n",
"<p><span class=\"bus\"></span>&nbsp; [car 525 Py ⇄ Prades](https://storage.googleapis.com/is-wp-90-preprod/uploads-preprod/2023/03/66-FH-525-032023.pdf)</p>\n",
"<p><span class=\"bus\"></span>&nbsp; [car 530 Perpignan ⇄ Arles-sur-Tech](https://storage.googleapis.com/is-wp-90-preprod/uploads-preprod/2023/03/66-FH-530-032023.pdf)</p>\n",
"<p><span class=\"bus\"></span>&nbsp; [car 560 Mont-Louis ⇄ Perpignan](https://storage.googleapis.com/is-wp-90-preprod/uploads-preprod/2023/03/66-FH-560-032023.pdf)</p>\n",
"<p><span class=\"bus\"></span>&nbsp; [car 561 Formiguères ⇄ Mont-Louis](https://storage.googleapis.com/is-wp-90-preprod/uploads-preprod/2023/03/66-FH-561-032023.pdf)</p>\n",
"<p style=\"color: gray\">Jusqu'au 9 décembre 2023</p>\n",
"<p><span class=\"train_jaune\"></span>&nbsp; [Train Jaune Villefranche ⇄ Mont-Louis](https://www.tourisme-canigou.com/sites/tourisme-canigou/files/content/files/horaires_train_jaune_27_mai_au_9_decembre_2023.pdf)</p>\n",
"<p style=\"color: gray\">Été 2023</p>\n",
"<p><span class=\"bus\"></span>&nbsp; [car 564 Mont-Louis ⇄ Bouillouses](https://storage.googleapis.com/is-wp-90-prod/uploads-preprod/2023/06/100522_liO_flyer_ligne564.pdf)</p>\n",
"\n",
"\u001b[92mtransports.md.html updated with new dates of validity.\u001b[0m\n"
]
}
],
"source": [
"configurations = json.loads(Path(\"config.json\").read_text())\n",
"\n",
"MONTHS = \"janvier février mars avril mai juin juillet août septembre octobre novembre décembre\".split()\n",
"\n",
"def month_name_to_number(name):\n",
" return MONTHS.index(name) + 1\n",
"\n",
"def month_number_to_name(number):\n",
" return MONTHS[number - 1]\n",
"\n",
"rex = re.compile(r\"(?i)du \\d{1,2}(?:/\\d{1,2}/| \\w+\\s)(?:20\\d{2})?\\s*au (\\d{1,2})[/ ]+(\\d{1,2}|\\w+)[/ ]+(20\\d{2})\")\n",
"\n",
"missing_lines = []\n",
"quadruples = []\n",
"for (line, d) in configurations.items():\n",
" text = (TEXTS_DIR / f\"{line}.txt\").read_text()\n",
" if (m := rex.search(text.lower())):\n",
" day = int(m[1])\n",
" month = int(m[2]) if m[2].isdigit() else month_name_to_number(m[2])\n",
" year = int(m[3])\n",
" mode = f\"[{d['mode']} {d['from']} ⇄ {d['to']}]({pdf_urls[line]})\"\n",
" quadruples.append((year, month, day, mode))\n",
" else:\n",
" missing_lines.append(line)\n",
"if missing_lines:\n",
" print(f\"{WARNING}Enable to extract validity dates in: {', '.join(missing_lines)}.{RESET}\")\n",
"quadruples.sort()\n",
"title = '<details><summary>Fiches horaires à télécharger…</summary>'\n",
"result = [title, \"\"]\n",
"for ((year, month, day), modes) in groupby(quadruples, key=lambda x: x[:3]):\n",
" result.append(f'<p style=\"color: gray\">Jusqu\\'au {day} {month_number_to_name(month)} {year}</p>')\n",
" for mode in modes:\n",
" result.append(f\"<p>{mode[3]}</p>\")\n",
"result.append(f'<p style=\"color: gray\">Été 2023</p>')\n",
"result.append(f'<p>[car 564 Mont-Louis ⇄ Bouillouses]({pdf_urls[\"564\"]})</p>')\n",
"result.append(\"\")\n",
"result = \"\\n\".join(result)\n",
"result = re.sub(r\"(\\[car)\", r'<span class=\"bus\"></span>&nbsp; \\1', result)\n",
"result = re.sub(r\"(\\[train)\", r'<span class=\"train\"></span>&nbsp; \\1', result)\n",
"result = re.sub(r\"(\\[Train Jaune)\", r'<span class=\"train_jaune\"></span>&nbsp; \\1', result)\n",
"print(result)\n",
"path = Path(\"../pages/transports.md.html\")\n",
"text = path.read_text()\n",
"(text, n) = re.subn(fr\"{title}\\n+(<p.+\\n)*\", result, text)\n",
"if n == 1:\n",
" path.write_text(text)\n",
" print(f\"{OK}transports.md.html updated with new dates of validity.{RESET}\")\n",
"else:\n",
" print(f\"{WARNING}Unable to find a paragraph to update in transports.md.html.{RESET}\")"
]
},
{
"cell_type": "markdown",
"id": "75975e83",
"metadata": {},
"source": [
"## Mettre à jour `search.js`"
]
},
{
"cell_type": "code",
"execution_count": 88,
"id": "a40bf02b",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[92msearch.js updated with the current list of cities.\u001b[0m\n"
]
}
],
"source": [
"path = Path(\"../www/search.js\")\n",
"text = path.read_text()\n",
"(text, n) = re.subn(fr\"\\\\b\\(.*Perpignan.*\\)\\\\b\", fr\"\\\\b({'|'.join(CITIES)})\\\\b\", text)\n",
"if n == 2:\n",
" path.write_text(text)\n",
" print(f\"{OK}search.js updated with the current list of cities.{RESET}\")\n",
"else:\n",
" print(f\"{WARNING}Unable to find two list of cities in search.js.{RESET}\")"
]
},
{
"cell_type": "markdown",
"id": "2e35de35",
"metadata": {},
"source": [
"## Camelot : extraire les dataframes des cars dans `pbz2/`\n",
"Extraire le texte d'une fiche horaire PDF n'est pas suffisant lorsque les rangées correspondant aux arrêts retenus ne comportent pas le même nombre de valeurs. Par exemple, ligne 521, plusieurs dizaines d'autocars desservent Prades, mais seule une demi-douzaine desservent Casteil. Le texte résultant sera du genre :\n",
"```\n",
"Prades 07:54 08:00 08:46 09:00 09:48 10:00 11:49 12:00 13:28 13:10 ...\n",
"Casteil 08:23 12:23 19:45 12:45 19:23\n",
"```\n",
"Cela se produit pour la quasi-totalité des lignes d'autocars, tandis que les TER desservent toutes les gares situées. Pour les cars, on doit donc opter pour une méthode d'extraction qui préserve les alignements verticaux. La bibliothèque `camelot` permet de repérer les tableaux d'un PDF et de les convertir en _dataframes_ Pandas.\n",
"\n",
"Le traitement des lignes de car se faisant par colonne, il n'est pas nécessaire de supprimer celles qui sont incomplètes. Par exemple, dans la ligne 540, certains trains de Perpignan ne vont pas jusqu'à Collioure. Après filtrage des rangées inutiles, les colonnes correspondantes ne comportent donc que l'horaire à Perpignan, et sont ignorées dans le résultat, puisqu'on ne peut pas l'apparier avec un horaire de Collioure.\n",
"\n",
"**NB.** En cas d'erreur `Camelot: DeprecationError: PdfFileReader is deprecated` appliquer https://stackoverflow.com/a/74957139/173003 et relancer le kernel.\n",
"```\n",
"pip install 'PyPDF2<3.0'\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": 89,
"id": "babb92c6",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"520: up to date.\n",
"521: up to date.\n",
"523: up to date.\n",
"525: up to date.\n",
"530: up to date.\n",
"540: up to date.\n",
"560: up to date.\n",
"561: up to date.\n",
"train_jaune: up to date.\n",
"PORT BOU - NARBONNE: up to date.\n",
"PERPIGNAN - VILLEFRANCHE: up to date.\n"
]
}
],
"source": [
"for line in LINES_OF_INTEREST:\n",
" if line == \"564\":\n",
" continue # treated as a special case\n",
" print(f\"{line}: \", end=\"\")\n",
" pbz2_path = PBZ2_DIR / f\"{line}.pbz2\"\n",
" pdf_path = PDF_DIR / f\"{line}.pdf\"\n",
" if pbz2_path.is_file() and pdf_path.stat().st_mtime < pbz2_path.stat().st_mtime:\n",
" print(\"up to date.\")\n",
" continue\n",
" df = [camelot.read_pdf(str(PDF_DIR / f\"{line}.pdf\"), pages=page)[0].df for page in \"12\"]\n",
" with bz2.BZ2File(pbz2_path, \"w\") as file:\n",
" pickle.dump(df, file)\n",
" print(f\"{OK}updated.{RESET}\")"
]
},
{
"cell_type": "markdown",
"id": "d70de8a8",
"metadata": {},
"source": [
"## Extraire les segments des lignes de train dans `segments/trains.json`"
]
},
{
"cell_type": "markdown",
"id": "c5a2f768",
"metadata": {},
"source": [
"En cas d'avertissement sur le nombre de colonnes, vérifier le champ `to_delete`. C'est un dictionnaire dont les clés sont la concaténation des rangées où supprimer des colonnes, et les valeurs les index (0-based) des colonnes à supprimer. Le but est d'avoir uniquement des colonnes pleines."
]
},
{
"cell_type": "code",
"execution_count": 90,
"id": "b408c40f",
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"PERPIGNAN - VILLEFRANCHE\n",
" 0. PERPIGNAN VILLEFRANCHE-VERNET LES BAINS\n",
" 1. VILLEFRANCHE-VERNET LES BAINS PERPIGNAN\n",
"PORT BOU - NARBONNE\n",
" 0. PERPIGNAN PORT-BOU\n",
" 1. PORT-BOU PERPIGNAN\n",
"train_jaune\n",
" 0. VILLEFRANCHE-VERNET-LES-BAINS LATOUR-DE-CAROL\n",
" 1. LATOUR-DE-CAROL-ENVEITG VILLEFRANCHE-VERNET-LES-BAINS\n"
]
}
],
"source": [
"configurations = json.loads(Path(\"config.json\").read_text())\n",
"segments = {}\n",
"for (line, pages) in configurations.items():\n",
" if line.isdigit():\n",
" continue\n",
" texts = (TEXTS_DIR / f\"{line}.txt\").read_text().split(\"<PAGE BREAK>\")\n",
" print(line)\n",
" for (i, config) in enumerate(configurations[line][\"pages\"]):\n",
" print(f' {i}. {config[\"expected_substring\"]}')\n",
" # Make a sanity check on the title of the page\n",
" if config[\"expected_substring\"] not in texts[i]:\n",
" print(f'Please replace configurations[\"{line}\"][\"pages\"][{i}][\"expected_substring\"] with an actual substring of the text.')\n",
" raise StopExecution\n",
" result = {\n",
" \"Jours\": [day.partition(\"/\")[0] for day in config[\"col_headers\"][1:]],\n",
" \"Note\": [config.get(\"notes\", {}).get(day.partition(\"/\")[2], \"\") for day in config[\"col_headers\"][1:]]\n",
" }\n",
" if line == \"train_jaune\":\n",
" result[\"Mode\"] = [\"Train Jaune\"] * len(config[\"col_headers\"][1:])\n",
" else:\n",
" result[\"Mode\"] = []\n",
" for match in re.findall(r\"Numéro de circulation (.+)\", texts[i]):\n",
" result[\"Mode\"].extend(re.findall(\"(?:ligne )?(\\d+)\", match))\n",
" result[\"Mode\"] = [f\"train {n}\" for n in result[\"Mode\"]]\n",
" for city in config[\"row_headers\"][2:]:\n",
" result[city] = []\n",
" for match in re.findall(fr\"{city}[- \\w]+?([\\d+. ]+)\", texts[i]):\n",
" result[city].extend(s.replace(\".\", \":\") for s in re.findall(\"\\d{1,2}\\.\\d\\d\", match))\n",
" for (row_headers, indexes_to_delete) in config.get(\"to_delete\", {}).items():\n",
" for row_header in row_headers.split():\n",
" result[row_header] = [x for (i, x) in enumerate(result[row_header]) if i not in indexes_to_delete]\n",
" expected_number_of_columns = len(result[\"Jours\"])\n",
" for (k, v) in result.items():\n",
" if k == \"Note\":\n",
" continue\n",
" if len(v) != expected_number_of_columns:\n",
" print(f\"{WARNING}Row {k} has {len(v)} columns, but {expected_number_of_columns} are expected.{RESET}\")\n",
" key = f\"{line} / {config['expected_substring']}\"\n",
" data = list(zip(*result.values()))\n",
" segments[key] = {\"columns\": list(result), \"data\": data}\n",
"(SEGMENTS_DIR / \"trains.json\").write_text(json.dumps(segments, indent=2, ensure_ascii=False));"
]
},
{
"cell_type": "markdown",
"id": "520bdd24",
"metadata": {},
"source": [
"## Extraire les segments des lignes de car dans `segments/cars.json`"
]
},
{
"cell_type": "code",
"execution_count": 91,
"id": "530e2dd3",
"metadata": {
"code_folding": [
0,
19
],
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"520: 0. PRADES > PERPIGNAN"
]
},
{
"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>Jours</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJV</th>\n",
" <th>...</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>SD</th>\n",
" <th>SD</th>\n",
" <th>SD</th>\n",
" <th>S</th>\n",
" <th>SD</th>\n",
" <th>SD</th>\n",
" <th>SD</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>PS</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>...</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>PV</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td></td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>...</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Mode</th>\n",
" <td>520</td>\n",
" <td>521</td>\n",
" <td>TRAIN</td>\n",
" <td>520</td>\n",
" <td>521</td>\n",
" <td>520</td>\n",
" <td>521</td>\n",
" <td>TRAIN</td>\n",
" <td>TRAIN</td>\n",
" <td>520</td>\n",
" <td>...</td>\n",
" <td>520</td>\n",
" <td>TRAIN</td>\n",
" <td>521</td>\n",
" <td>TRAIN</td>\n",
" <td>TRAIN</td>\n",
" <td>TRAIN</td>\n",
" <td>521</td>\n",
" <td>TRAIN</td>\n",
" <td>TRAIN</td>\n",
" <td>TRAIN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Prades</th>\n",
" <td>04:55</td>\n",
" <td>06:01</td>\n",
" <td>06:19</td>\n",
" <td>06:25</td>\n",
" <td>06:35</td>\n",
" <td>06:40</td>\n",
" <td>07:09</td>\n",
" <td>07:16</td>\n",
" <td>08:17</td>\n",
" <td>08:40</td>\n",
" <td>...</td>\n",
" <td>17:35</td>\n",
" <td>18:22</td>\n",
" <td>19:06</td>\n",
" <td>09:18</td>\n",
" <td>11:18</td>\n",
" <td>13:18</td>\n",
" <td>13:44</td>\n",
" <td>15:18</td>\n",
" <td>17:18</td>\n",
" <td>19:17</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Perpignan</th>\n",
" <td>05:55</td>\n",
" <td>07:05</td>\n",
" <td>06:59</td>\n",
" <td>07:30</td>\n",
" <td>07:20</td>\n",
" <td>07:50</td>\n",
" <td>08:15</td>\n",
" <td>07:57</td>\n",
" <td>08:59</td>\n",
" <td>09:50</td>\n",
" <td>...</td>\n",
" <td>18:45</td>\n",
" <td>19:04</td>\n",
" <td>20:10</td>\n",
" <td>09:59</td>\n",
" <td>11:59</td>\n",
" <td>13:59</td>\n",
" <td>14:50</td>\n",
" <td>15:59</td>\n",
" <td>17:59</td>\n",
" <td>19:55</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>5 rows × 27 columns</p>\n",
"</div>"
],
"text/plain": [
"Jours LMWJV LMWJV LMWJV LMWJV LMWJV LMWJV LMWJV LMWJVS LMWJVS \\\n",
"PS • • • • • • • • • \n",
"PV • • • • • • • • \n",
"Mode 520 521 TRAIN 520 521 520 521 TRAIN TRAIN \n",
"Prades 04:55 06:01 06:19 06:25 06:35 06:40 07:09 07:16 08:17 \n",
"Perpignan 05:55 07:05 06:59 07:30 07:20 07:50 08:15 07:57 08:59 \n",
"\n",
"Jours LMWJV ... LMWJV LMWJV LMWJV SD SD SD S SD \\\n",
"PS • ... • • • • • • • • \n",
"PV • ... • • • • • • • • \n",
"Mode 520 ... 520 TRAIN 521 TRAIN TRAIN TRAIN 521 TRAIN \n",
"Prades 08:40 ... 17:35 18:22 19:06 09:18 11:18 13:18 13:44 15:18 \n",
"Perpignan 09:50 ... 18:45 19:04 20:10 09:59 11:59 13:59 14:50 15:59 \n",
"\n",
"Jours SD SD \n",
"PS • • \n",
"PV • • \n",
"Mode TRAIN TRAIN \n",
"Prades 17:18 19:17 \n",
"Perpignan 17:59 19:55 \n",
"\n",
"[5 rows x 27 columns]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"520: 1. PERPIGNAN > PRADES"
]
},
{
"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>Jours</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>W</th>\n",
" <th>W</th>\n",
" <th>LMWJV</th>\n",
" <th>...</th>\n",
" <th>LMWJV</th>\n",
" <th>SD</th>\n",
" <th>SD</th>\n",
" <th>S</th>\n",
" <th>SD</th>\n",
" <th>SD</th>\n",
" <th>SD</th>\n",
" <th>SD</th>\n",
" <th>D</th>\n",
" <th>D</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>PS</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>...</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>PV</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>•</td>\n",
" <td>...</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Mode</th>\n",
" <td>TRAIN</td>\n",
" <td>520</td>\n",
" <td>520</td>\n",
" <td>TRAIN</td>\n",
" <td>520</td>\n",
" <td>TRAIN</td>\n",
" <td>521</td>\n",
" <td>520</td>\n",
" <td>521</td>\n",
" <td>520</td>\n",
" <td>...</td>\n",
" <td>521</td>\n",
" <td>TRAIN</td>\n",
" <td>TRAIN</td>\n",
" <td>521</td>\n",
" <td>TRAIN</td>\n",
" <td>TRAIN</td>\n",
" <td>TRAIN</td>\n",
" <td>TRAIN</td>\n",
" <td>TRAIN</td>\n",
" <td>TRAIN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Perpignan</th>\n",
" <td>07:11</td>\n",
" <td>07:30</td>\n",
" <td>08:05</td>\n",
" <td>09:09</td>\n",
" <td>10:05</td>\n",
" <td>11:10</td>\n",
" <td>12:15</td>\n",
" <td>12:30</td>\n",
" <td>12:30</td>\n",
" <td>12:45</td>\n",
" <td>...</td>\n",
" <td>19:30</td>\n",
" <td>08:11</td>\n",
" <td>10:11</td>\n",
" <td>11:05</td>\n",
" <td>12:11</td>\n",
" <td>14:11</td>\n",
" <td>16:11</td>\n",
" <td>18:13</td>\n",
" <td>19:11</td>\n",
" <td>20:11</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Prades</th>\n",
" <td>07:54</td>\n",
" <td>08:46</td>\n",
" <td>09:21</td>\n",
" <td>09:48</td>\n",
" <td>11:21</td>\n",
" <td>11:49</td>\n",
" <td>13:28</td>\n",
" <td>13:20</td>\n",
" <td>13:10</td>\n",
" <td>13:55</td>\n",
" <td>...</td>\n",
" <td>20:43</td>\n",
" <td>08:55</td>\n",
" <td>10:50</td>\n",
" <td>12:18</td>\n",
" <td>12:50</td>\n",
" <td>14:50</td>\n",
" <td>16:50</td>\n",
" <td>18:52</td>\n",
" <td>19:53</td>\n",
" <td>20:50</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>5 rows × 31 columns</p>\n",
"</div>"
],
"text/plain": [
"Jours LMWJV LMWJV LMWJV LMWJV LMWJV LMWJV LMWJV W W \\\n",
"PS • • • • • • • • • \n",
"PV • • • • • • • \n",
"Mode TRAIN 520 520 TRAIN 520 TRAIN 521 520 521 \n",
"Perpignan 07:11 07:30 08:05 09:09 10:05 11:10 12:15 12:30 12:30 \n",
"Prades 07:54 08:46 09:21 09:48 11:21 11:49 13:28 13:20 13:10 \n",
"\n",
"Jours LMWJV ... LMWJV SD SD S SD SD SD SD \\\n",
"PS • ... • • • • • • • • \n",
"PV • ... • • • • • • • • \n",
"Mode 520 ... 521 TRAIN TRAIN 521 TRAIN TRAIN TRAIN TRAIN \n",
"Perpignan 12:45 ... 19:30 08:11 10:11 11:05 12:11 14:11 16:11 18:13 \n",
"Prades 13:55 ... 20:43 08:55 10:50 12:18 12:50 14:50 16:50 18:52 \n",
"\n",
"Jours D D \n",
"PS • • \n",
"PV • • \n",
"Mode TRAIN TRAIN \n",
"Perpignan 19:11 20:11 \n",
"Prades 19:53 20:50 \n",
"\n",
"[5 rows x 31 columns]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"521: 0. PERPIGNAN > VERNET"
]
},
{
"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>Jours</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>W</th>\n",
" <th>...</th>\n",
" <th>LMWJV</th>\n",
" <th>SD</th>\n",
" <th>S</th>\n",
" <th>SD</th>\n",
" <th>S</th>\n",
" <th>S</th>\n",
" <th>SD</th>\n",
" <th>S</th>\n",
" <th>SD</th>\n",
" <th>S</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>PS</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>...</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>PV</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td></td>\n",
" <td>...</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Mode</th>\n",
" <td>TRAIN</td>\n",
" <td>522</td>\n",
" <td>520</td>\n",
" <td>522</td>\n",
" <td>TRAIN</td>\n",
" <td>522</td>\n",
" <td>TRAIN</td>\n",
" <td>522</td>\n",
" <td>521</td>\n",
" <td>521</td>\n",
" <td>...</td>\n",
" <td>521</td>\n",
" <td>TRAIN</td>\n",
" <td>522</td>\n",
" <td>TRAIN</td>\n",
" <td>522</td>\n",
" <td>521</td>\n",
" <td>TRAIN</td>\n",
" <td>522</td>\n",
" <td>TRAIN</td>\n",
" <td>522</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Perpignan</th>\n",
" <td>07:11</td>\n",
" <td></td>\n",
" <td>07:30</td>\n",
" <td></td>\n",
" <td>09:09</td>\n",
" <td></td>\n",
" <td>11:10</td>\n",
" <td></td>\n",
" <td>12:15</td>\n",
" <td>12:30</td>\n",
" <td>...</td>\n",
" <td>19:30</td>\n",
" <td>08:11</td>\n",
" <td></td>\n",
" <td>10:11</td>\n",
" <td></td>\n",
" <td>11:05</td>\n",
" <td>16:11</td>\n",
" <td></td>\n",
" <td>18:13</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>Prades</th>\n",
" <td>07:54</td>\n",
" <td>08:00</td>\n",
" <td>08:46</td>\n",
" <td>09:00</td>\n",
" <td>09:48</td>\n",
" <td>10:00</td>\n",
" <td>11:49</td>\n",
" <td>12:00</td>\n",
" <td>13:28</td>\n",
" <td>13:10</td>\n",
" <td>...</td>\n",
" <td>20:43</td>\n",
" <td>08:55</td>\n",
" <td>09:00</td>\n",
" <td>10:50</td>\n",
" <td>11:00</td>\n",
" <td>12:18</td>\n",
" <td>16:50</td>\n",
" <td>17:00</td>\n",
" <td>18:52</td>\n",
" <td>19:00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Villefranche</th>\n",
" <td></td>\n",
" <td>08:11</td>\n",
" <td></td>\n",
" <td>09:11</td>\n",
" <td></td>\n",
" <td>10:11</td>\n",
" <td></td>\n",
" <td>12:11</td>\n",
" <td>13:42</td>\n",
" <td>13:24</td>\n",
" <td>...</td>\n",
" <td>20:57</td>\n",
" <td></td>\n",
" <td>09:11</td>\n",
" <td></td>\n",
" <td>11:11</td>\n",
" <td>12:32</td>\n",
" <td></td>\n",
" <td>17:11</td>\n",
" <td></td>\n",
" <td>19:11</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Vernet</th>\n",
" <td></td>\n",
" <td>08:19</td>\n",
" <td></td>\n",
" <td>09:19</td>\n",
" <td></td>\n",
" <td>10:19</td>\n",
" <td></td>\n",
" <td>12:19</td>\n",
" <td>13:49</td>\n",
" <td>13:32</td>\n",
" <td>...</td>\n",
" <td>21:04</td>\n",
" <td></td>\n",
" <td>09:19</td>\n",
" <td></td>\n",
" <td>11:19</td>\n",
" <td>12:39</td>\n",
" <td></td>\n",
" <td>17:19</td>\n",
" <td></td>\n",
" <td>19:19</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Casteil</th>\n",
" <td></td>\n",
" <td>08:23</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>12:23</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>...</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>12:45</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>19:23</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>8 rows × 27 columns</p>\n",
"</div>"
],
"text/plain": [
"Jours LMWJV LMWJV LMWJV LMWJV LMWJV LMWJV LMWJV LMWJV LMWJV \\\n",
"PS • • • • • • • • • \n",
"PV • • • • • • • • • \n",
"Mode TRAIN 522 520 522 TRAIN 522 TRAIN 522 521 \n",
"Perpignan 07:11 07:30 09:09 11:10 12:15 \n",
"Prades 07:54 08:00 08:46 09:00 09:48 10:00 11:49 12:00 13:28 \n",
"Villefranche 08:11 09:11 10:11 12:11 13:42 \n",
"Vernet 08:19 09:19 10:19 12:19 13:49 \n",
"Casteil 08:23 12:23 \n",
"\n",
"Jours W ... LMWJV SD S SD S S SD \\\n",
"PS • ... • • • • • • • \n",
"PV ... • • • • • • • \n",
"Mode 521 ... 521 TRAIN 522 TRAIN 522 521 TRAIN \n",
"Perpignan 12:30 ... 19:30 08:11 10:11 11:05 16:11 \n",
"Prades 13:10 ... 20:43 08:55 09:00 10:50 11:00 12:18 16:50 \n",
"Villefranche 13:24 ... 20:57 09:11 11:11 12:32 \n",
"Vernet 13:32 ... 21:04 09:19 11:19 12:39 \n",
"Casteil ... 12:45 \n",
"\n",
"Jours S SD S \n",
"PS • • • \n",
"PV • • • \n",
"Mode 522 TRAIN 522 \n",
"Perpignan 18:13 \n",
"Prades 17:00 18:52 19:00 \n",
"Villefranche 17:11 19:11 \n",
"Vernet 17:19 19:19 \n",
"Casteil 19:23 \n",
"\n",
"[8 rows x 27 columns]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"521: 1. VERNET > PERPIGNAN"
]
},
{
"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>Jours</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>...</th>\n",
" <th>LMWJV</th>\n",
" <th>S</th>\n",
" <th>SD</th>\n",
" <th>S</th>\n",
" <th>SD</th>\n",
" <th>S</th>\n",
" <th>S</th>\n",
" <th>SD</th>\n",
" <th>S</th>\n",
" <th>SD</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>PS</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>...</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>PV</th>\n",
" <td>•</td>\n",
" <td></td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>...</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Mode</th>\n",
" <td>521</td>\n",
" <td>521</td>\n",
" <td>521</td>\n",
" <td>522</td>\n",
" <td>TRAIN</td>\n",
" <td>522</td>\n",
" <td>522</td>\n",
" <td>TRAIN</td>\n",
" <td>522</td>\n",
" <td>TRAIN</td>\n",
" <td>...</td>\n",
" <td>521</td>\n",
" <td>522</td>\n",
" <td>TRAIN</td>\n",
" <td>522</td>\n",
" <td>TRAIN</td>\n",
" <td>521</td>\n",
" <td>522</td>\n",
" <td>TRAIN</td>\n",
" <td>522</td>\n",
" <td>TRAIN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Casteil</th>\n",
" <td></td>\n",
" <td>06:15</td>\n",
" <td>06:45</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>08:30</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>...</td>\n",
" <td></td>\n",
" <td>08:30</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>13:20</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>Vernet</th>\n",
" <td>05:41</td>\n",
" <td>06:19</td>\n",
" <td>06:49</td>\n",
" <td>07:31</td>\n",
" <td></td>\n",
" <td>08:35</td>\n",
" <td>09:31</td>\n",
" <td></td>\n",
" <td>11:31</td>\n",
" <td></td>\n",
" <td>...</td>\n",
" <td>18:46</td>\n",
" <td>08:35</td>\n",
" <td></td>\n",
" <td>10:31</td>\n",
" <td></td>\n",
" <td>13:24</td>\n",
" <td>16:31</td>\n",
" <td></td>\n",
" <td>18:31</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>Villefranche</th>\n",
" <td>05:50</td>\n",
" <td>06:25</td>\n",
" <td>06:58</td>\n",
" <td>07:42</td>\n",
" <td></td>\n",
" <td>08:46</td>\n",
" <td>09:42</td>\n",
" <td></td>\n",
" <td>11:42</td>\n",
" <td></td>\n",
" <td>...</td>\n",
" <td>18:55</td>\n",
" <td>08:46</td>\n",
" <td></td>\n",
" <td>10:42</td>\n",
" <td></td>\n",
" <td>13:33</td>\n",
" <td>16:42</td>\n",
" <td></td>\n",
" <td>18:42</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>Prades</th>\n",
" <td>06:01</td>\n",
" <td>06:35</td>\n",
" <td>07:09</td>\n",
" <td>07:53</td>\n",
" <td>08:17</td>\n",
" <td>08:57</td>\n",
" <td>09:53</td>\n",
" <td>10:18</td>\n",
" <td>11:53</td>\n",
" <td>12:18</td>\n",
" <td>...</td>\n",
" <td>19:06</td>\n",
" <td>08:57</td>\n",
" <td>09:18</td>\n",
" <td>10:53</td>\n",
" <td>11:18</td>\n",
" <td>13:44</td>\n",
" <td>16:53</td>\n",
" <td>17:18</td>\n",
" <td>18:53</td>\n",
" <td>19:17</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Perpignan</th>\n",
" <td>07:05</td>\n",
" <td>07:20</td>\n",
" <td>08:15</td>\n",
" <td></td>\n",
" <td>08:59</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>10:59</td>\n",
" <td></td>\n",
" <td>12:59</td>\n",
" <td>...</td>\n",
" <td>20:10</td>\n",
" <td></td>\n",
" <td>09:59</td>\n",
" <td></td>\n",
" <td>11:59</td>\n",
" <td>14:50</td>\n",
" <td></td>\n",
" <td>17:59</td>\n",
" <td></td>\n",
" <td>19:55</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>8 rows × 25 columns</p>\n",
"</div>"
],
"text/plain": [
"Jours LMWJV LMWJV LMWJV LMWJV LMWJVS LMWJV LMWJV LMWJV LMWJV \\\n",
"PS • • • • • • • • • \n",
"PV • • • • • • • • \n",
"Mode 521 521 521 522 TRAIN 522 522 TRAIN 522 \n",
"Casteil 06:15 06:45 08:30 \n",
"Vernet 05:41 06:19 06:49 07:31 08:35 09:31 11:31 \n",
"Villefranche 05:50 06:25 06:58 07:42 08:46 09:42 11:42 \n",
"Prades 06:01 06:35 07:09 07:53 08:17 08:57 09:53 10:18 11:53 \n",
"Perpignan 07:05 07:20 08:15 08:59 10:59 \n",
"\n",
"Jours LMWJV ... LMWJV S SD S SD S S \\\n",
"PS • ... • • • • • • • \n",
"PV • ... • • • • • • • \n",
"Mode TRAIN ... 521 522 TRAIN 522 TRAIN 521 522 \n",
"Casteil ... 08:30 13:20 \n",
"Vernet ... 18:46 08:35 10:31 13:24 16:31 \n",
"Villefranche ... 18:55 08:46 10:42 13:33 16:42 \n",
"Prades 12:18 ... 19:06 08:57 09:18 10:53 11:18 13:44 16:53 \n",
"Perpignan 12:59 ... 20:10 09:59 11:59 14:50 \n",
"\n",
"Jours SD S SD \n",
"PS • • • \n",
"PV • • • \n",
"Mode TRAIN 522 TRAIN \n",
"Casteil \n",
"Vernet 18:31 \n",
"Villefranche 18:42 \n",
"Prades 17:18 18:53 19:17 \n",
"Perpignan 17:59 19:55 \n",
"\n",
"[8 rows x 25 columns]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"523: 0. MOSSET > PRADES"
]
},
{
"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>Jours</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>S</th>\n",
" <th>S</th>\n",
" <th>S</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>PS</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>PV</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Mosset</th>\n",
" <td>05:51</td>\n",
" <td>07:22</td>\n",
" <td>08:27</td>\n",
" <td>10:27</td>\n",
" <td>13:31</td>\n",
" <td>14:27</td>\n",
" <td>16:27</td>\n",
" <td>07:06</td>\n",
" <td>12:57</td>\n",
" <td>17:22</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Prades</th>\n",
" <td>06:20</td>\n",
" <td>07:50</td>\n",
" <td>08:55</td>\n",
" <td>10:55</td>\n",
" <td>14:00</td>\n",
" <td>14:57</td>\n",
" <td>16:55</td>\n",
" <td>07:35</td>\n",
" <td>13:25</td>\n",
" <td>17:50</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
"Jours LMWJV LMWJV LMWJVS LMWJV LMWJV LMWJV LMWJV S S S\n",
"PS • • • • • • • • • •\n",
"PV • • • • • • • • • •\n",
"Mosset 05:51 07:22 08:27 10:27 13:31 14:27 16:27 07:06 12:57 17:22\n",
"Prades 06:20 07:50 08:55 10:55 14:00 14:57 16:55 07:35 13:25 17:50"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"523: 1. PRADES > MOSSET"
]
},
{
"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>Jours</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>S</th>\n",
" <th>S</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>PS</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>PV</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Prades</th>\n",
" <td>06:56</td>\n",
" <td>08:01</td>\n",
" <td>10:01</td>\n",
" <td>12:01</td>\n",
" <td>14:01</td>\n",
" <td>16:01</td>\n",
" <td>18:11</td>\n",
" <td>12:31</td>\n",
" <td>16:56</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Mosset</th>\n",
" <td>07:22</td>\n",
" <td>08:27</td>\n",
" <td>10:27</td>\n",
" <td>12:27</td>\n",
" <td>14:27</td>\n",
" <td>16:27</td>\n",
" <td>18:37</td>\n",
" <td>12:57</td>\n",
" <td>17:22</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
"Jours LMWJV LMWJVS LMWJV LMWJV LMWJV LMWJV LMWJV S S\n",
"PS • • • • • • • • •\n",
"PV • • • • • • • • •\n",
"Prades 06:56 08:01 10:01 12:01 14:01 16:01 18:11 12:31 16:56\n",
"Mosset 07:22 08:27 10:27 12:27 14:27 16:27 18:37 12:57 17:22"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"525: 0. PY > PRADES"
]
},
{
"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>Jours</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>PS</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>PV</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Py</th>\n",
" <td>08:20</td>\n",
" <td>13:00</td>\n",
" <td>17:45</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Prades</th>\n",
" <td>08:53</td>\n",
" <td>13:33</td>\n",
" <td>18:18</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
"Jours LMWJVS LMWJVS LMWJVS\n",
"PS • • •\n",
"PV • • •\n",
"Py 08:20 13:00 17:45\n",
"Prades 08:53 13:33 18:18"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"525: 1. PRADES > PY"
]
},
{
"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>Jours</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>PS</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>PV</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Prades</th>\n",
" <td>07:46</td>\n",
" <td>12:21</td>\n",
" <td>17:11</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Py</th>\n",
" <td>08:20</td>\n",
" <td>12:55</td>\n",
" <td>17:45</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
"Jours LMWJVS LMWJVS LMWJVS\n",
"PS • • •\n",
"PV • • •\n",
"Prades 07:46 12:21 17:11\n",
"Py 08:20 12:55 17:45"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"530: 0. ARLES SUR TECH > PERPIGNAN"
]
},
{
"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>Jours</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVSD</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVSD</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVSD</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>D</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>PS</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>PV</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td></td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Arles-sur-Tech</th>\n",
" <td>05:45</td>\n",
" <td>06:10</td>\n",
" <td>06:25</td>\n",
" <td></td>\n",
" <td>06:55</td>\n",
" <td></td>\n",
" <td>07:25</td>\n",
" <td>08:25</td>\n",
" <td>09:30</td>\n",
" <td>10:30</td>\n",
" <td>11:25</td>\n",
" <td>12:30</td>\n",
" <td>13:35</td>\n",
" <td>14:25</td>\n",
" <td>15:30</td>\n",
" <td>16:30</td>\n",
" <td>17:30</td>\n",
" <td>18:35</td>\n",
" <td></td>\n",
" <td>11:30</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Céret</th>\n",
" <td>06:15</td>\n",
" <td>06:40</td>\n",
" <td>06:55</td>\n",
" <td></td>\n",
" <td>07:25</td>\n",
" <td>07:15</td>\n",
" <td>07:55</td>\n",
" <td>08:55</td>\n",
" <td>10:00</td>\n",
" <td>11:00</td>\n",
" <td>11:55</td>\n",
" <td>13:00</td>\n",
" <td>14:05</td>\n",
" <td>14:55</td>\n",
" <td>16:00</td>\n",
" <td>17:00</td>\n",
" <td>18:00</td>\n",
" <td>19:05</td>\n",
" <td>18:45</td>\n",
" <td>12:00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Perpignan</th>\n",
" <td>07:10</td>\n",
" <td>07:40</td>\n",
" <td>07:50</td>\n",
" <td>07:20</td>\n",
" <td>08:20</td>\n",
" <td>08:05</td>\n",
" <td>08:50</td>\n",
" <td>09:45</td>\n",
" <td>10:45</td>\n",
" <td>11:45</td>\n",
" <td>12:45</td>\n",
" <td>13:45</td>\n",
" <td>14:50</td>\n",
" <td>15:45</td>\n",
" <td>16:45</td>\n",
" <td>17:45</td>\n",
" <td>18:45</td>\n",
" <td>19:50</td>\n",
" <td>19:35</td>\n",
" <td>12:45</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
"Jours LMWJVS LMWJVS LMWJVS LMWJV LMWJV LMWJV LMWJVS LMWJVS \\\n",
"PS • • • • • • • • \n",
"PV • • • • • • • \n",
"Arles-sur-Tech 05:45 06:10 06:25 06:55 07:25 08:25 \n",
"Céret 06:15 06:40 06:55 07:25 07:15 07:55 08:55 \n",
"Perpignan 07:10 07:40 07:50 07:20 08:20 08:05 08:50 09:45 \n",
"\n",
"Jours LMWJVSD LMWJVS LMWJVS LMWJVS LMWJVS LMWJVS LMWJVSD LMWJVS \\\n",
"PS • • • • • • • • \n",
"PV • • • • • • • • \n",
"Arles-sur-Tech 09:30 10:30 11:25 12:30 13:35 14:25 15:30 16:30 \n",
"Céret 10:00 11:00 11:55 13:00 14:05 14:55 16:00 17:00 \n",
"Perpignan 10:45 11:45 12:45 13:45 14:50 15:45 16:45 17:45 \n",
"\n",
"Jours LMWJVSD LMWJVS LMWJVS D \n",
"PS • • • • \n",
"PV • • • • \n",
"Arles-sur-Tech 17:30 18:35 11:30 \n",
"Céret 18:00 19:05 18:45 12:00 \n",
"Perpignan 18:45 19:50 19:35 12:45 "
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"530: 1. PERPIGNAN > ARLES SUR TECH"
]
},
{
"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>Jours</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>W</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>...</th>\n",
" <th>LMWJVSD</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>D</th>\n",
" <th>D</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>PS</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>...</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>PV</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td></td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>...</td>\n",
" <td>•</td>\n",
" <td></td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td></td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Perpignan</th>\n",
" <td>06:25</td>\n",
" <td>07:10</td>\n",
" <td>08:10</td>\n",
" <td>09:10</td>\n",
" <td>10:10</td>\n",
" <td>12:30</td>\n",
" <td>12:10</td>\n",
" <td>12:20</td>\n",
" <td>12:45</td>\n",
" <td>13:10</td>\n",
" <td>...</td>\n",
" <td>17:10</td>\n",
" <td>17:30</td>\n",
" <td>17:45</td>\n",
" <td>17:50</td>\n",
" <td>18:10</td>\n",
" <td>18:30</td>\n",
" <td>18:45</td>\n",
" <td>19:30</td>\n",
" <td>09:10</td>\n",
" <td>11:10</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Céret</th>\n",
" <td>07:15</td>\n",
" <td>07:57</td>\n",
" <td>08:57</td>\n",
" <td>09:54</td>\n",
" <td>10:57</td>\n",
" <td></td>\n",
" <td>12:57</td>\n",
" <td>13:04</td>\n",
" <td>13:32</td>\n",
" <td>13:57</td>\n",
" <td>...</td>\n",
" <td>17:52</td>\n",
" <td>18:20</td>\n",
" <td>18:27</td>\n",
" <td>18:32</td>\n",
" <td>18:52</td>\n",
" <td>19:20</td>\n",
" <td>19:27</td>\n",
" <td>20:17</td>\n",
" <td>09:57</td>\n",
" <td>11:57</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Arles-sur-Tech</th>\n",
" <td></td>\n",
" <td>08:25</td>\n",
" <td>09:25</td>\n",
" <td>10:25</td>\n",
" <td>11:25</td>\n",
" <td></td>\n",
" <td>13:25</td>\n",
" <td>13:35</td>\n",
" <td>14:00</td>\n",
" <td>14:25</td>\n",
" <td>...</td>\n",
" <td>18:23</td>\n",
" <td></td>\n",
" <td>18:58</td>\n",
" <td></td>\n",
" <td>19:23</td>\n",
" <td></td>\n",
" <td>19:58</td>\n",
" <td>20:45</td>\n",
" <td>10:25</td>\n",
" <td>12:25</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>5 rows × 24 columns</p>\n",
"</div>"
],
"text/plain": [
"Jours LMWJV LMWJVS LMWJVS LMWJVS LMWJVS W LMWJVS LMWJVS LMWJVS \\\n",
"PS • • • • • • • • • \n",
"PV • • • • • • • • \n",
"Perpignan 06:25 07:10 08:10 09:10 10:10 12:30 12:10 12:20 12:45 \n",
"Céret 07:15 07:57 08:57 09:54 10:57 12:57 13:04 13:32 \n",
"Arles-sur-Tech 08:25 09:25 10:25 11:25 13:25 13:35 14:00 \n",
"\n",
"Jours LMWJVS ... LMWJVSD LMWJV LMWJVS LMWJVS LMWJVS LMWJV LMWJVS \\\n",
"PS • ... • • • • • • • \n",
"PV • ... • • • • • \n",
"Perpignan 13:10 ... 17:10 17:30 17:45 17:50 18:10 18:30 18:45 \n",
"Céret 13:57 ... 17:52 18:20 18:27 18:32 18:52 19:20 19:27 \n",
"Arles-sur-Tech 14:25 ... 18:23 18:58 19:23 19:58 \n",
"\n",
"Jours LMWJVS D D \n",
"PS • • • \n",
"PV • • • \n",
"Perpignan 19:30 09:10 11:10 \n",
"Céret 20:17 09:57 11:57 \n",
"Arles-sur-Tech 20:45 10:25 12:25 \n",
"\n",
"[5 rows x 24 columns]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"540: 0. BANYULS SUR MER > PERPIGNAN"
]
},
{
"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>Jours</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVSD</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVSD</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVSD</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVSD</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>PS</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>PV</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Collioure</th>\n",
" <td></td>\n",
" <td>06:39</td>\n",
" <td></td>\n",
" <td>07:09</td>\n",
" <td>07:39</td>\n",
" <td>08:39</td>\n",
" <td>09:39</td>\n",
" <td>10:39</td>\n",
" <td>12:39</td>\n",
" <td></td>\n",
" <td>13:49</td>\n",
" <td>14:39</td>\n",
" <td>15:39</td>\n",
" <td>16:39</td>\n",
" <td>17:39</td>\n",
" <td>18:04</td>\n",
" <td>18:39</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Perpignan</th>\n",
" <td>07:05</td>\n",
" <td>07:40</td>\n",
" <td>07:30</td>\n",
" <td>08:15</td>\n",
" <td>08:45</td>\n",
" <td>09:45</td>\n",
" <td>10:45</td>\n",
" <td>11:45</td>\n",
" <td>13:45</td>\n",
" <td>13:30</td>\n",
" <td>14:55</td>\n",
" <td>15:45</td>\n",
" <td>16:45</td>\n",
" <td>17:45</td>\n",
" <td>18:45</td>\n",
" <td>19:10</td>\n",
" <td>19:45</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
"Jours LMWJVS LMWJVS LMWJVS LMWJVS LMWJVS LMWJVSD LMWJVS LMWJVSD LMWJVS \\\n",
"PS • • • • • • • • • \n",
"PV • • • • • • • • • \n",
"Collioure 06:39 07:09 07:39 08:39 09:39 10:39 12:39 \n",
"Perpignan 07:05 07:40 07:30 08:15 08:45 09:45 10:45 11:45 13:45 \n",
"\n",
"Jours LMWJVS LMWJVS LMWJVSD LMWJVS LMWJVSD LMWJVS LMWJVS LMWJVS \n",
"PS • • • • • • • • \n",
"PV • • • • • • • • \n",
"Collioure 13:49 14:39 15:39 16:39 17:39 18:04 18:39 \n",
"Perpignan 13:30 14:55 15:45 16:45 17:45 18:45 19:10 19:45 "
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"540: 1. PERPIGNAN > BANYULS SUR MER"
]
},
{
"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>Jours</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVSD</th>\n",
" <th>LMWJVS</th>\n",
" <th>D</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVSD</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>...</th>\n",
" <th>LMWJVS</th>\n",
" <th>D</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>PS</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>...</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>PV</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>...</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Perpignan</th>\n",
" <td>06:30</td>\n",
" <td>07:10</td>\n",
" <td>08:10</td>\n",
" <td>09:15</td>\n",
" <td>10:10</td>\n",
" <td>11:15</td>\n",
" <td>12:05</td>\n",
" <td>12:10</td>\n",
" <td>12:45</td>\n",
" <td>13:10</td>\n",
" <td>...</td>\n",
" <td>15:15</td>\n",
" <td>16:10</td>\n",
" <td>16:15</td>\n",
" <td>16:45</td>\n",
" <td>17:05</td>\n",
" <td>17:10</td>\n",
" <td>17:45</td>\n",
" <td>18:10</td>\n",
" <td>18:30</td>\n",
" <td>19:30</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Collioure</th>\n",
" <td>07:34</td>\n",
" <td>08:14</td>\n",
" <td>09:14</td>\n",
" <td>10:14</td>\n",
" <td>11:14</td>\n",
" <td>12:14</td>\n",
" <td></td>\n",
" <td>13:14</td>\n",
" <td>13:44</td>\n",
" <td>14:14</td>\n",
" <td>...</td>\n",
" <td>16:14</td>\n",
" <td>17:14</td>\n",
" <td>17:14</td>\n",
" <td>17:49</td>\n",
" <td></td>\n",
" <td>18:14</td>\n",
" <td>18:49</td>\n",
" <td></td>\n",
" <td>19:34</td>\n",
" <td>20:29</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>4 rows × 21 columns</p>\n",
"</div>"
],
"text/plain": [
"Jours LMWJVS LMWJVS LMWJVSD LMWJVS D LMWJVS LMWJVS LMWJVSD LMWJVS \\\n",
"PS • • • • • • • • • \n",
"PV • • • • • • • • • \n",
"Perpignan 06:30 07:10 08:10 09:15 10:10 11:15 12:05 12:10 12:45 \n",
"Collioure 07:34 08:14 09:14 10:14 11:14 12:14 13:14 13:44 \n",
"\n",
"Jours LMWJVS ... LMWJVS D LMWJVS LMWJVS LMWJVS LMWJVS LMWJVS LMWJVS \\\n",
"PS • ... • • • • • • • • \n",
"PV • ... • • • • • • • • \n",
"Perpignan 13:10 ... 15:15 16:10 16:15 16:45 17:05 17:10 17:45 18:10 \n",
"Collioure 14:14 ... 16:14 17:14 17:14 17:49 18:14 18:49 \n",
"\n",
"Jours LMWJVS LMWJVS \n",
"PS • • \n",
"PV • • \n",
"Perpignan 18:30 19:30 \n",
"Collioure 19:34 20:29 \n",
"\n",
"[4 rows x 21 columns]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"560: 0. PORTE PUYMORENS > PERPIGNAN"
]
},
{
"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>Jours</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>...</th>\n",
" <th>SD</th>\n",
" <th>S</th>\n",
" <th>D</th>\n",
" <th>SD</th>\n",
" <th>D</th>\n",
" <th>SD</th>\n",
" <th>D</th>\n",
" <th>SD</th>\n",
" <th>D</th>\n",
" <th>SD</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>PS</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>...</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>PV</th>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>...</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" <td>•</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Mode</th>\n",
" <td>560</td>\n",
" <td>560</td>\n",
" <td>TRAIN</td>\n",
" <td>560</td>\n",
" <td>TRAIN</td>\n",
" <td>560</td>\n",
" <td>TRAIN</td>\n",
" <td>560</td>\n",
" <td>TRAIN</td>\n",
" <td>560</td>\n",
" <td>...</td>\n",
" <td>TRAIN</td>\n",
" <td>560</td>\n",
" <td>560</td>\n",
" <td>TRAIN</td>\n",
" <td>560</td>\n",
" <td>TRAIN</td>\n",
" <td>560</td>\n",
" <td>TRAIN</td>\n",
" <td>560</td>\n",
" <td>TRAIN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Mont-Louis</th>\n",
" <td>06:25</td>\n",
" <td>06:59</td>\n",
" <td></td>\n",
" <td>08:53</td>\n",
" <td></td>\n",
" <td>10:23</td>\n",
" <td></td>\n",
" <td>12:58</td>\n",
" <td></td>\n",
" <td>14:39</td>\n",
" <td>...</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>10:00</td>\n",
" <td></td>\n",
" <td>12:00</td>\n",
" <td></td>\n",
" <td>16:00</td>\n",
" <td></td>\n",
" <td>17:45</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>Villefranche</th>\n",
" <td></td>\n",
" <td>07:44</td>\n",
" <td></td>\n",
" <td>09:38</td>\n",
" <td></td>\n",
" <td>11:08</td>\n",
" <td></td>\n",
" <td>13:43</td>\n",
" <td></td>\n",
" <td>15:24</td>\n",
" <td>...</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>10:50</td>\n",
" <td></td>\n",
" <td>12:50</td>\n",
" <td></td>\n",
" <td>16:50</td>\n",
" <td></td>\n",
" <td>18:35</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>Prades</th>\n",
" <td></td>\n",
" <td>07:54</td>\n",
" <td>08:17</td>\n",
" <td>09:48</td>\n",
" <td>10:18</td>\n",
" <td>11:18</td>\n",
" <td>12:18</td>\n",
" <td>13:53</td>\n",
" <td>14:18</td>\n",
" <td>15:34</td>\n",
" <td>...</td>\n",
" <td>19:17</td>\n",
" <td></td>\n",
" <td>11:00</td>\n",
" <td>11:18</td>\n",
" <td>13:00</td>\n",
" <td>13:18</td>\n",
" <td>17:00</td>\n",
" <td>17:18</td>\n",
" <td>18:45</td>\n",
" <td>19:17</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Perpignan</th>\n",
" <td></td>\n",
" <td>08:45</td>\n",
" <td>08:59</td>\n",
" <td>10:39</td>\n",
" <td>10:59</td>\n",
" <td></td>\n",
" <td>12:59</td>\n",
" <td></td>\n",
" <td>14:59</td>\n",
" <td></td>\n",
" <td>...</td>\n",
" <td>19:55</td>\n",
" <td></td>\n",
" <td>11:50</td>\n",
" <td>11:59</td>\n",
" <td>13:50</td>\n",
" <td>13:59</td>\n",
" <td>17:50</td>\n",
" <td>17:59</td>\n",
" <td>19:35</td>\n",
" <td>19:55</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>7 rows × 34 columns</p>\n",
"</div>"
],
"text/plain": [
"Jours LMWJVS LMWJVS LMWJVS LMWJVS LMWJV LMWJV LMWJV LMWJV LMWJV \\\n",
"PS • • • • • • • • • \n",
"PV • • • • • • • • • \n",
"Mode 560 560 TRAIN 560 TRAIN 560 TRAIN 560 TRAIN \n",
"Mont-Louis 06:25 06:59 08:53 10:23 12:58 \n",
"Villefranche 07:44 09:38 11:08 13:43 \n",
"Prades 07:54 08:17 09:48 10:18 11:18 12:18 13:53 14:18 \n",
"Perpignan 08:45 08:59 10:39 10:59 12:59 14:59 \n",
"\n",
"Jours LMWJV ... SD S D SD D SD D \\\n",
"PS • ... • • • • • • • \n",
"PV • ... • • • • • • • \n",
"Mode 560 ... TRAIN 560 560 TRAIN 560 TRAIN 560 \n",
"Mont-Louis 14:39 ... 10:00 12:00 16:00 \n",
"Villefranche 15:24 ... 10:50 12:50 16:50 \n",
"Prades 15:34 ... 19:17 11:00 11:18 13:00 13:18 17:00 \n",
"Perpignan ... 19:55 11:50 11:59 13:50 13:59 17:50 \n",
"\n",
"Jours SD D SD \n",
"PS • • • \n",
"PV • • • \n",
"Mode TRAIN 560 TRAIN \n",
"Mont-Louis 17:45 \n",
"Villefranche 18:35 \n",
"Prades 17:18 18:45 19:17 \n",
"Perpignan 17:59 19:35 19:55 \n",
"\n",
"[7 rows x 34 columns]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"560: 1. PERPIGNAN > PORTE PUYMORENS"
]
},
{
"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>Jours</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJVS</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJV</th>\n",
" <th>LMWJVS</th>\n",
" <th>...</th>\n",
" <th>SD</th>\n",
" <th>S</th>\n",
" <th>S</th>\n",
" <th>D</th>\n",
" <th>SD</th>\n",
" <th>D</th>\n",
" <th>SD</th>\n",
" <th>D</th>\n",
" <th>SD</th>\n",
" <th>D</th>\n",