From 418e430e37ba12fbcc557d960e4c5581fba92afa Mon Sep 17 00:00:00 2001 From: Philippe THOMY Date: Fri, 7 Jul 2023 00:12:49 +0200 Subject: [PATCH] Create analyse_ecarts.ipynb --- .../irve/Analyse/analyse_ecarts.ipynb | 987 ++++++++++++++++++ 1 file changed, 987 insertions(+) create mode 100644 python/Validation/irve/Analyse/analyse_ecarts.ipynb diff --git a/python/Validation/irve/Analyse/analyse_ecarts.ipynb b/python/Validation/irve/Analyse/analyse_ecarts.ipynb new file mode 100644 index 00000000..ba259d8b --- /dev/null +++ b/python/Validation/irve/Analyse/analyse_ecarts.ipynb @@ -0,0 +1,987 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "fa35256e", + "metadata": {}, + "source": [ + "## *Jeu de données IRVE*\n", + "-------------------\n", + "# Analyse des écarts entre deux versions\n", + "------------------------------\n", + "**Synthèse des écarts entre le 17/06/23 et le 04/07/23:**\n", + "- **37 821** lignes ont été supprimées qui correspondent à \n", + "- **13 128** pdc supprimés et 526 ajoutés,\n", + " - dont **11 962** suppressions et 464 ajouts de pdc ne présentant aucun écart\n", + " - et **875** suppressions et 45 ajouts de pdc présentant des écarts\n", + "- on ne retrouve le 04/07/23 aucun autre pdc avec un id de station ou bien un id de pdc ou bien une coordonnée ou bien un nom de station correspondant aux 13 128 pdc supprimés\n", + "\n", + "**Exemples de données supprimées:**\n", + "4 exemples sont fournis :\n", + "- **stations** : FRPD1PIBSCLT, FRFR1PZ8TORQXRCM, FRSPSPSHEL611, FRMAPE000024180\n", + "- **pdc** : FRPD1EIBSCLTALF22011, FRFR1EWKHE2, FRSPSESHEL611, FRMAPE000024180461\n", + "- **coordonnées** : [0.698738, 47.3358432], [5.2535804, 47.11048942], [1.633191, 48.992067], [1.1391721371977237, 42.98728553935362]\n", + "- **nom** : 'Ibis Styles Tours', 'Béziers, Route de Maureilhan', 'AIRE DE ROSNY SUR SEINE SUD', 'Val de Gasogne Gam vert Saint Girons'" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "ea5deed3", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "nombre de lignes fichier 1 récent: initiales, valides et résiduelles 46565 34069 2838\n", + "nombre de lignes fichier 2 ancien: initiales, valides et résiduelles 84386 45573 3649\n" + ] + } + ], + "source": [ + "from datetime import datetime\n", + "import json\n", + "from observation import Ilist, Analysis\n", + "import pandas as pd\n", + "\n", + "chemin = 'https://raw.githubusercontent.com/loco-philippe/Environmental-Sensing/main/python/Validation/irve/Analyse/'\n", + "dates = ['2023-03-03', '2023-04-17', '2023-05-02', '2023-05-24', '2023-06-17', '2023-07-04']\n", + "relations = ['index', 'contact_operateur', 'nom_enseigne', 'coordonneesXY', 'adresse_station', 'id_station_itinerance', \n", + " 'nom_station', 'implantation_station', 'nbre_pdc', 'condition_acces', 'horaires', 'station_deux_roues', \n", + " 'id_pdc_itinerance', 'date_maj', 'last_modified']\n", + "\n", + "date = dates[-1]\n", + "file1 = 'consolidation-etalab-schema-irve-statique-v-2.2.0-'+date[:4]+date[5:7]+date[8:]+'.csv'\n", + "valide1 = 'IRVE_itinerance_valide'+date+'.csv'\n", + "residuel1 = 'IRVE_itinerance_residuel'+date+'.csv'\n", + "irve_ini_1 = pd.read_csv(chemin + file1, sep=',', low_memory=False)\n", + "irve_val_1 = pd.read_csv(chemin + valide1, sep=',', low_memory=False)\n", + "irve_res_1 = pd.read_csv(chemin + residuel1, sep=',', low_memory=False)\n", + "irve_1 = pd.concat([irve_val_1, irve_res_1])\n", + "irve_ini_1_id = irve_ini_1['id_pdc_itinerance']\n", + "print('nombre de lignes fichier 1 récent: initiales, valides et résiduelles', len(irve_ini_1), len(irve_val_1), len(irve_res_1)) \n", + "\n", + "date = dates[-2]\n", + "file2 = 'consolidation-etalab-schema-irve-statique-v-2.2.0-'+date[:4]+date[5:7]+date[8:]+'.csv'\n", + "valide2 = 'IRVE_itinerance_valide'+date+'.csv'\n", + "residuel2 = 'IRVE_itinerance_residuel'+date+'.csv'\n", + "irve_ini_2 = pd.read_csv(chemin + file2, sep=',', low_memory=False)\n", + "irve_val_2 = pd.read_csv(chemin + valide2, sep=',', low_memory=False)\n", + "irve_res_2 = pd.read_csv(chemin + residuel2, sep=',', low_memory=False)\n", + "irve_2 = pd.concat([irve_val_2, irve_res_2])\n", + "irve_ini_2_id = irve_ini_2['id_pdc_itinerance']\n", + "print('nombre de lignes fichier 2 ancien: initiales, valides et résiduelles', len(irve_ini_2), len(irve_val_2), len(irve_res_2)) " + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "a4661fa2", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "nombre de pdc ajoutés : 526\n", + "nombre de pdc supprimés : 13128\n" + ] + } + ], + "source": [ + "irve_ini_1['new'] = ~irve_ini_1['id_pdc_itinerance'].isin(irve_ini_2_id)\n", + "print('nombre de pdc ajoutés : ', irve_ini_1['new'].sum())\n", + "\n", + "irve_ini_2['new'] = ~irve_ini_2['id_pdc_itinerance'].isin(irve_ini_1_id)\n", + "print('nombre de pdc supprimés : ', irve_ini_2['new'].sum())" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "75f4db8f", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "nombre de pdc résiduels ajoutés : 45\n", + "nombre de pdc résiduels supprimés : 875\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
indexcontact_operateurnom_enseignecoordonneesXYadresse_stationid_station_itinerancenom_stationimplantation_stationnbre_pdccondition_acceshorairesstation_deux_rouesid_pdc_itinerancedate_majlast_modified
73344589hello@powerdot.frPower Dot France[0.698738, 47.3358432]18 Rue Michael FaradayFRPD1PIBSCLTIbis Styles ToursParking privé à usage public1Accès libre24/7FalseFRPD1EIBSCLTALF220112023-04-272023-06-17T07:56:37.819000+00:00
73444593hello@powerdot.frPower Dot France[0.698738, 47.3358432]18 Rue Michael FaradayFRPD1PIBSCLTIbis Styles ToursParking privé à usage public6Accès libre24/7FalseFRPD1EIBSCLTKPC2000162023-04-272023-06-17T07:56:37.819000+00:00
73544604hello@powerdot.frPower Dot France[0.698738, 47.3358432]18 Rue Michael FaradayFRPD1PIBSCLTIbis Styles ToursParking privé à usage public6Accès libre24/7FalseFRPD1EIBSCLTKPC2000142023-04-272023-06-17T07:56:37.819000+00:00
73644608hello@powerdot.frPower Dot France[0.698738, 47.3358432]18 Rue Michael FaradayFRPD1PIBSCLTIbis Styles ToursParking privé à usage public6Accès libre24/7FalseFRPD1EIBSCLTKPC2000152023-04-272023-06-17T07:56:37.819000+00:00
73744610hello@powerdot.frPower Dot France[0.698738, 47.3358432]18 Rue Michael FaradayFRPD1PIBSCLTIbis Styles ToursParking privé à usage public6Accès libre24/7FalseFRPD1EIBSCLTKPC2000132023-04-272023-06-17T07:56:37.819000+00:00
................................................
214578538web@freshmile.comFreshmile[5.2535804, 47.11048942]Route De Maureilhan 34500 BéziersFRFR1PZ8TORQXRCMBéziers, Route de MaureilhanVoirie6Accès libre24/7falseFRFR1EWKHE22023-05-052023-06-17T07:54:02.990000+00:00
214678539web@freshmile.comFreshmile[5.2535804, 47.11048942]Route De Maureilhan 34500 BéziersFRFR1PZ8TORQXRCMBéziers, Route de MaureilhanVoirie6Accès libre24/7falseFRFR1EWQVB22023-05-052023-06-17T07:54:02.990000+00:00
214778541web@freshmile.comFreshmile[1.523894, 44.147449]rue de la chasse aux papillons 34200 SeteFRFR1PKHWFAP2ODSSete, rue de la chasse aux papillons - 3847Voirie4Accès libre24/7falseFRFR1EHVUA22022-11-092023-06-17T07:54:02.990000+00:00
214878542web@freshmile.comFreshmile[1.328399, 43.652245]rue de la chasse aux papillons 34200 SeteFRFR1PKHWFAP2ODSSete, rue de la chasse aux papillons - 3847Voirie4Accès libre24/7falseFRFR1EHVUA12022-11-092023-06-17T07:54:02.990000+00:00
214978544web@freshmile.comFreshmile[1.168065, 49.225746]Route de Montpellier 34725 Saint Andre De Sang...FRFR1PUXIVU5GSXHSaint Andre De Sangonis, Route de Montpellier ...Voirie6Accès libre24/7falseFRFR1EFRVL12022-11-092023-06-17T07:54:02.990000+00:00
\n", + "

875 rows × 15 columns

\n", + "
" + ], + "text/plain": [ + " index contact_operateur nom_enseigne coordonneesXY \\\n", + "733 44589 hello@powerdot.fr Power Dot France [0.698738, 47.3358432] \n", + "734 44593 hello@powerdot.fr Power Dot France [0.698738, 47.3358432] \n", + "735 44604 hello@powerdot.fr Power Dot France [0.698738, 47.3358432] \n", + "736 44608 hello@powerdot.fr Power Dot France [0.698738, 47.3358432] \n", + "737 44610 hello@powerdot.fr Power Dot France [0.698738, 47.3358432] \n", + "... ... ... ... ... \n", + "2145 78538 web@freshmile.com Freshmile [5.2535804, 47.11048942] \n", + "2146 78539 web@freshmile.com Freshmile [5.2535804, 47.11048942] \n", + "2147 78541 web@freshmile.com Freshmile [1.523894, 44.147449] \n", + "2148 78542 web@freshmile.com Freshmile [1.328399, 43.652245] \n", + "2149 78544 web@freshmile.com Freshmile [1.168065, 49.225746] \n", + "\n", + " adresse_station id_station_itinerance \\\n", + "733 18 Rue Michael Faraday FRPD1PIBSCLT \n", + "734 18 Rue Michael Faraday FRPD1PIBSCLT \n", + "735 18 Rue Michael Faraday FRPD1PIBSCLT \n", + "736 18 Rue Michael Faraday FRPD1PIBSCLT \n", + "737 18 Rue Michael Faraday FRPD1PIBSCLT \n", + "... ... ... \n", + "2145 Route De Maureilhan 34500 Béziers FRFR1PZ8TORQXRCM \n", + "2146 Route De Maureilhan 34500 Béziers FRFR1PZ8TORQXRCM \n", + "2147 rue de la chasse aux papillons 34200 Sete FRFR1PKHWFAP2ODS \n", + "2148 rue de la chasse aux papillons 34200 Sete FRFR1PKHWFAP2ODS \n", + "2149 Route de Montpellier 34725 Saint Andre De Sang... FRFR1PUXIVU5GSXH \n", + "\n", + " nom_station \\\n", + "733 Ibis Styles Tours \n", + "734 Ibis Styles Tours \n", + "735 Ibis Styles Tours \n", + "736 Ibis Styles Tours \n", + "737 Ibis Styles Tours \n", + "... ... \n", + "2145 Béziers, Route de Maureilhan \n", + "2146 Béziers, Route de Maureilhan \n", + "2147 Sete, rue de la chasse aux papillons - 3847 \n", + "2148 Sete, rue de la chasse aux papillons - 3847 \n", + "2149 Saint Andre De Sangonis, Route de Montpellier ... \n", + "\n", + " implantation_station nbre_pdc condition_acces horaires \\\n", + "733 Parking privé à usage public 1 Accès libre 24/7 \n", + "734 Parking privé à usage public 6 Accès libre 24/7 \n", + "735 Parking privé à usage public 6 Accès libre 24/7 \n", + "736 Parking privé à usage public 6 Accès libre 24/7 \n", + "737 Parking privé à usage public 6 Accès libre 24/7 \n", + "... ... ... ... ... \n", + "2145 Voirie 6 Accès libre 24/7 \n", + "2146 Voirie 6 Accès libre 24/7 \n", + "2147 Voirie 4 Accès libre 24/7 \n", + "2148 Voirie 4 Accès libre 24/7 \n", + "2149 Voirie 6 Accès libre 24/7 \n", + "\n", + " station_deux_roues id_pdc_itinerance date_maj \\\n", + "733 False FRPD1EIBSCLTALF22011 2023-04-27 \n", + "734 False FRPD1EIBSCLTKPC200016 2023-04-27 \n", + "735 False FRPD1EIBSCLTKPC200014 2023-04-27 \n", + "736 False FRPD1EIBSCLTKPC200015 2023-04-27 \n", + "737 False FRPD1EIBSCLTKPC200013 2023-04-27 \n", + "... ... ... ... \n", + "2145 false FRFR1EWKHE2 2023-05-05 \n", + "2146 false FRFR1EWQVB2 2023-05-05 \n", + "2147 false FRFR1EHVUA2 2022-11-09 \n", + "2148 false FRFR1EHVUA1 2022-11-09 \n", + "2149 false FRFR1EFRVL1 2022-11-09 \n", + "\n", + " last_modified \n", + "733 2023-06-17T07:56:37.819000+00:00 \n", + "734 2023-06-17T07:56:37.819000+00:00 \n", + "735 2023-06-17T07:56:37.819000+00:00 \n", + "736 2023-06-17T07:56:37.819000+00:00 \n", + "737 2023-06-17T07:56:37.819000+00:00 \n", + "... ... \n", + "2145 2023-06-17T07:54:02.990000+00:00 \n", + "2146 2023-06-17T07:54:02.990000+00:00 \n", + "2147 2023-06-17T07:54:02.990000+00:00 \n", + "2148 2023-06-17T07:54:02.990000+00:00 \n", + "2149 2023-06-17T07:54:02.990000+00:00 \n", + "\n", + "[875 rows x 15 columns]" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "irve_res_1['new'] = ~irve_res_1['id_pdc_itinerance'].isin(irve_ini_2_id)\n", + "print('nombre de pdc résiduels ajoutés : ', irve_res_1['new'].sum())\n", + "\n", + "irve_res_2['new'] = ~irve_res_2['id_pdc_itinerance'].isin(irve_ini_1_id)\n", + "print('nombre de pdc résiduels supprimés : ', irve_res_2['new'].sum())\n", + "irve_res_2[irve_res_2['new']].loc[:, relations]" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "3595040a", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "7\n", + "1\n", + "7\n", + "7 \n", + "\n", + "0\n", + "0\n", + "0\n", + "0\n" + ] + } + ], + "source": [ + "# exemple de données (avec des écarts) présentes dans le fichier du 17/06/2023 mais absentes dans le fichier du 04/07/2023 :\n", + "\n", + "# on les trouve le 17/06/2023\n", + "print(len(irve_res_2.loc[irve_res_2.id_station_itinerance == 'FRPD1PIBSCLT']))\n", + "print(len(irve_res_2.loc[irve_res_2.id_pdc_itinerance == 'FRPD1EIBSCLTALF22011']))\n", + "print(len(irve_res_2.loc[irve_res_2.coordonneesXY == '[0.698738, 47.3358432]']))\n", + "print(len(irve_res_2.loc[irve_res_2.nom_station == 'Ibis Styles Tours']), '\\n')\n", + "# on ne retrouve ni l'id_station, ni l'id_pdc, ni la coordonnée, ni le nom de la station le 04/07/2023\n", + "print(len(irve_ini_1.loc[irve_ini_1.id_station_itinerance == 'FRPD1PIBSCLT']))\n", + "print(len(irve_ini_1.loc[irve_ini_1.id_pdc_itinerance == 'FRPD1EIBSCLTALF22011']))\n", + "print(len(irve_ini_1.loc[irve_ini_1.coordonneesXY == '[0.698738, 47.3358432]']))\n", + "print(len(irve_ini_1.loc[irve_ini_1.nom_station == 'Ibis Styles Tours']))" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "720f0f91", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "6\n", + "1\n", + "8\n", + "6 \n", + "\n", + "0\n", + "0\n", + "0\n", + "0\n" + ] + } + ], + "source": [ + "# exemple de données (avec des écarts) présentes dans le fichier du 17/06/2023 mais absentes dans le fichier du 04/07/2023 :\n", + "\n", + "# on les trouve le 17/06/2023\n", + "print(len(irve_res_2.loc[irve_res_2.id_station_itinerance == 'FRFR1PZ8TORQXRCM']))\n", + "print(len(irve_res_2.loc[irve_res_2.id_pdc_itinerance == 'FRFR1EWKHE2']))\n", + "print(len(irve_res_2.loc[irve_res_2.coordonneesXY == '[5.2535804, 47.11048942]']))\n", + "print(len(irve_res_2.loc[irve_res_2.nom_station == 'Béziers, Route de Maureilhan']), '\\n')\n", + "# on ne retrouve ni l'id_station, ni l'id_pdc, ni la coordonnée, ni le nom de la station le 04/07/2023\n", + "print(len(irve_ini_1.loc[irve_ini_1.id_station_itinerance == 'FRFR1PZ8TORQXRCM']))\n", + "print(len(irve_ini_1.loc[irve_ini_1.id_pdc_itinerance == 'FRFR1EWKHE2']))\n", + "print(len(irve_ini_1.loc[irve_ini_1.coordonneesXY == '[5.2535804, 47.11048942]']))\n", + "print(len(irve_ini_1.loc[irve_ini_1.nom_station == 'Béziers, Route de Maureilhan']))" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "f86393d3", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "nombre de pdc valides ajoutés : 464\n", + "nombre de pdc valides supprimés : 11962\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
indexcontact_operateurnom_enseignecoordonneesXYadresse_stationid_station_itinerancenom_stationimplantation_stationnbre_pdccondition_acceshorairesstation_deux_rouesid_pdc_itinerancedate_majlast_modified
51545248sav@izivia.comSHELL[1.633191, 48.992067]A13 - AIRE DE ROSNY-SUR-SEINE SUDFRSPSPSHEL611AIRE DE ROSNY SUR SEINE SUDVoirie1Accès libre24/7falseFRSPSESHEL6112023-06-182023-06-18T02:54:33.907000+00:00
1122214030sav@izivia.comMOBIVE - SDEEG 33[-1.122845, 45.515106]PARKING DE LA MAIRIEFRS33PMB3314712SOULAC SUR MER - PARKING DE LA MAIRIEVoirie2Accès libre24/7falseFRS33EMB33147122022-12-292023-06-17T07:58:16.960000+00:00
1122314031sav@izivia.comMOBIVE - SDEEG 33[-1.122845, 45.515106]PARKING DE LA MAIRIEFRS33PMB3314711SOULAC SUR MER - PARKING DE LA MAIRIEVoirie2Accès libre24/7falseFRS33EMB33147112022-12-292023-06-17T07:58:16.960000+00:00
1910944588hello@powerdot.frPower Dot France[2.068855, 49.031243]avenue des Grouettes 28FRPD1PIBSCRGIbis Cergy Le PortParking privé à usage public3Accès libre24/7FalseFRPD1EIBSCRGEKAE1200112023-04-272023-06-17T07:56:37.819000+00:00
1911044590hello@powerdot.frPower Dot France[-1.6718967523925787, 47.24326668039245]6 Imp. des ArtisansFRPD1PIBSCOUIbis Hotel CoueronParking privé à usage public5Accès libre24/7FalseFRPD1EIBSCOUKPS2000112023-04-272023-06-17T07:56:37.819000+00:00
................................................
4312678987web@freshmile.comFreshmile[0.6019298, 47.3276243]Rue Du Sirocco 37510 Ballan-MiréFRFR1PXNYAC5TPKKPuteaux, ParkingVoirie12Accès libre24/7falseFRFR1EBYEW12023-06-112023-06-17T07:54:02.990000+00:00
4325580702support@electromaps.comElectromaps[1.1391721371977237, 42.98728553935362]17ter Allée Pierre Semard 09200 Saint-Girons F...FRMAPE000024180Val de Gasogne Gam vert Saint GironsParking privé à usage public4Accès libre24/7falseFRMAPE0000241804602023-06-152023-06-17T07:53:37.125000+00:00
4325680703support@electromaps.comElectromaps[1.1391721371977237, 42.98728553935362]17ter Allée Pierre Semard 09200 Saint-Girons F...FRMAPE000024180Val de Gasogne Gam vert Saint GironsParking privé à usage public4Accès libre24/7falseFRMAPE0000241804582023-06-152023-06-17T07:53:37.125000+00:00
4325780704support@electromaps.comElectromaps[1.1391721371977237, 42.98728553935362]17ter Allée Pierre Semard 09200 Saint-Girons F...FRMAPE000024180Val de Gasogne Gam vert Saint GironsParking privé à usage public4Accès libre24/7falseFRMAPE0000241804592023-06-152023-06-17T07:53:37.125000+00:00
4325880705support@electromaps.comElectromaps[1.1391721371977237, 42.98728553935362]17ter Allée Pierre Semard 09200 Saint-Girons F...FRMAPE000024180Val de Gasogne Gam vert Saint GironsParking privé à usage public4Accès libre24/7falseFRMAPE0000241804612023-06-152023-06-17T07:53:37.125000+00:00
\n", + "

11962 rows × 15 columns

\n", + "
" + ], + "text/plain": [ + " index contact_operateur nom_enseigne \\\n", + "5154 5248 sav@izivia.com SHELL \n", + "11222 14030 sav@izivia.com MOBIVE - SDEEG 33 \n", + "11223 14031 sav@izivia.com MOBIVE - SDEEG 33 \n", + "19109 44588 hello@powerdot.fr Power Dot France \n", + "19110 44590 hello@powerdot.fr Power Dot France \n", + "... ... ... ... \n", + "43126 78987 web@freshmile.com Freshmile \n", + "43255 80702 support@electromaps.com Electromaps \n", + "43256 80703 support@electromaps.com Electromaps \n", + "43257 80704 support@electromaps.com Electromaps \n", + "43258 80705 support@electromaps.com Electromaps \n", + "\n", + " coordonneesXY \\\n", + "5154 [1.633191, 48.992067] \n", + "11222 [-1.122845, 45.515106] \n", + "11223 [-1.122845, 45.515106] \n", + "19109 [2.068855, 49.031243] \n", + "19110 [-1.6718967523925787, 47.24326668039245] \n", + "... ... \n", + "43126 [0.6019298, 47.3276243] \n", + "43255 [1.1391721371977237, 42.98728553935362] \n", + "43256 [1.1391721371977237, 42.98728553935362] \n", + "43257 [1.1391721371977237, 42.98728553935362] \n", + "43258 [1.1391721371977237, 42.98728553935362] \n", + "\n", + " adresse_station \\\n", + "5154 A13 - AIRE DE ROSNY-SUR-SEINE SUD \n", + "11222 PARKING DE LA MAIRIE \n", + "11223 PARKING DE LA MAIRIE \n", + "19109 avenue des Grouettes 28 \n", + "19110 6 Imp. des Artisans \n", + "... ... \n", + "43126 Rue Du Sirocco 37510 Ballan-Miré \n", + "43255 17ter Allée Pierre Semard 09200 Saint-Girons F... \n", + "43256 17ter Allée Pierre Semard 09200 Saint-Girons F... \n", + "43257 17ter Allée Pierre Semard 09200 Saint-Girons F... \n", + "43258 17ter Allée Pierre Semard 09200 Saint-Girons F... \n", + "\n", + " id_station_itinerance nom_station \\\n", + "5154 FRSPSPSHEL611 AIRE DE ROSNY SUR SEINE SUD \n", + "11222 FRS33PMB3314712 SOULAC SUR MER - PARKING DE LA MAIRIE \n", + "11223 FRS33PMB3314711 SOULAC SUR MER - PARKING DE LA MAIRIE \n", + "19109 FRPD1PIBSCRG Ibis Cergy Le Port \n", + "19110 FRPD1PIBSCOU Ibis Hotel Coueron \n", + "... ... ... \n", + "43126 FRFR1PXNYAC5TPKK Puteaux, Parking \n", + "43255 FRMAPE000024180 Val de Gasogne Gam vert Saint Girons \n", + "43256 FRMAPE000024180 Val de Gasogne Gam vert Saint Girons \n", + "43257 FRMAPE000024180 Val de Gasogne Gam vert Saint Girons \n", + "43258 FRMAPE000024180 Val de Gasogne Gam vert Saint Girons \n", + "\n", + " implantation_station nbre_pdc condition_acces horaires \\\n", + "5154 Voirie 1 Accès libre 24/7 \n", + "11222 Voirie 2 Accès libre 24/7 \n", + "11223 Voirie 2 Accès libre 24/7 \n", + "19109 Parking privé à usage public 3 Accès libre 24/7 \n", + "19110 Parking privé à usage public 5 Accès libre 24/7 \n", + "... ... ... ... ... \n", + "43126 Voirie 12 Accès libre 24/7 \n", + "43255 Parking privé à usage public 4 Accès libre 24/7 \n", + "43256 Parking privé à usage public 4 Accès libre 24/7 \n", + "43257 Parking privé à usage public 4 Accès libre 24/7 \n", + "43258 Parking privé à usage public 4 Accès libre 24/7 \n", + "\n", + " station_deux_roues id_pdc_itinerance date_maj \\\n", + "5154 false FRSPSESHEL611 2023-06-18 \n", + "11222 false FRS33EMB3314712 2022-12-29 \n", + "11223 false FRS33EMB3314711 2022-12-29 \n", + "19109 False FRPD1EIBSCRGEKAE120011 2023-04-27 \n", + "19110 False FRPD1EIBSCOUKPS200011 2023-04-27 \n", + "... ... ... ... \n", + "43126 false FRFR1EBYEW1 2023-06-11 \n", + "43255 false FRMAPE000024180460 2023-06-15 \n", + "43256 false FRMAPE000024180458 2023-06-15 \n", + "43257 false FRMAPE000024180459 2023-06-15 \n", + "43258 false FRMAPE000024180461 2023-06-15 \n", + "\n", + " last_modified \n", + "5154 2023-06-18T02:54:33.907000+00:00 \n", + "11222 2023-06-17T07:58:16.960000+00:00 \n", + "11223 2023-06-17T07:58:16.960000+00:00 \n", + "19109 2023-06-17T07:56:37.819000+00:00 \n", + "19110 2023-06-17T07:56:37.819000+00:00 \n", + "... ... \n", + "43126 2023-06-17T07:54:02.990000+00:00 \n", + "43255 2023-06-17T07:53:37.125000+00:00 \n", + "43256 2023-06-17T07:53:37.125000+00:00 \n", + "43257 2023-06-17T07:53:37.125000+00:00 \n", + "43258 2023-06-17T07:53:37.125000+00:00 \n", + "\n", + "[11962 rows x 15 columns]" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "irve_val_1['new'] = ~irve_val_1['id_pdc_itinerance'].isin(irve_ini_2_id)\n", + "print('nombre de pdc valides ajoutés : ', irve_val_1['new'].sum())\n", + "\n", + "irve_val_2['new'] = ~irve_val_2['id_pdc_itinerance'].isin(irve_ini_1_id)\n", + "print('nombre de pdc valides supprimés : ', irve_val_2['new'].sum())\n", + "irve_val_2[irve_val_2['new']].loc[:, relations]" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "73d7a9cf", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1\n", + "1\n", + "1\n", + "1 \n", + "\n", + "0\n", + "0\n", + "0\n", + "0\n" + ] + } + ], + "source": [ + "# exemple de données (sans écart) présentes dans le fichier du 17/06/2023 mais absentes dans le fichier du 04/07/2023 :\n", + "\n", + "# on les trouve le 17/06/2023\n", + "print(len(irve_val_2.loc[irve_val_2.id_station_itinerance == 'FRSPSPSHEL611']))\n", + "print(len(irve_val_2.loc[irve_val_2.id_pdc_itinerance == 'FRSPSESHEL611']))\n", + "print(len(irve_val_2.loc[irve_val_2.coordonneesXY == '[1.633191, 48.992067]']))\n", + "print(len(irve_val_2.loc[irve_val_2.nom_station == 'AIRE DE ROSNY SUR SEINE SUD']), '\\n')\n", + "# on ne retrouve ni l'id_station, ni l'id_pdc, ni la coordonnée, ni le nom de la station le 04/07/2023\n", + "print(len(irve_ini_1.loc[irve_ini_1.id_station_itinerance == 'FRSPSPSHEL611']))\n", + "print(len(irve_ini_1.loc[irve_ini_1.id_pdc_itinerance == 'FRSPSESHEL611']))\n", + "print(len(irve_ini_1.loc[irve_ini_1.coordonneesXY == '[1.633191, 48.992067]']))\n", + "print(len(irve_ini_1.loc[irve_ini_1.nom_station == 'AIRE DE ROSNY SUR SEINE SUD']))" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "f0a77a06", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "4\n", + "1\n", + "4\n", + "4 \n", + "\n", + "0\n", + "0\n", + "0\n", + "0\n" + ] + } + ], + "source": [ + "# exemple de données (sans écart) présentes dans le fichier du 17/06/2023 mais absentes dans le fichier du 04/07/2023 :\n", + "\n", + "# on les trouve le 17/06/2023\n", + "print(len(irve_val_2.loc[irve_val_2.id_station_itinerance == 'FRMAPE000024180']))\n", + "print(len(irve_val_2.loc[irve_val_2.id_pdc_itinerance == 'FRMAPE000024180461']))\n", + "print(len(irve_val_2.loc[irve_val_2.coordonneesXY == '[1.1391721371977237, 42.98728553935362]']))\n", + "print(len(irve_val_2.loc[irve_val_2.nom_station == 'Val de Gasogne Gam vert Saint Girons']), '\\n')\n", + "# on ne retrouve ni l'id_station, ni l'id_pdc, ni la coordonnée, ni le nom de la station le 04/07/2023\n", + "print(len(irve_ini_1.loc[irve_ini_1.id_station_itinerance == 'FRMAPE000024180']))\n", + "print(len(irve_ini_1.loc[irve_ini_1.id_pdc_itinerance == 'FRMAPE000024180461']))\n", + "print(len(irve_ini_1.loc[irve_ini_1.coordonneesXY == '[1.1391721371977237, 42.98728553935362]']))\n", + "print(len(irve_ini_1.loc[irve_ini_1.nom_station == 'Val de Gasogne Gam vert Saint Girons']))" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.9" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}