diff --git a/bloom.ipynb b/bloom.ipynb new file mode 100644 index 00000000..2dea4057 --- /dev/null +++ b/bloom.ipynb @@ -0,0 +1,30474 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "a470918d-70ac-49b5-8700-afea5209728e", + "metadata": {}, + "outputs": [], + "source": [ + "# Projet de data sciences, reconnaître les évènements de pêche\n", + "# Trajectoire de bateaux en time series \n", + "# 4 à 5 types de pêches: évènements à caractériser par une réduction de la vitesse et des déplacements spécifiques et dans le même secteur\n", + "# Ajouter une appli qui présente les trajectoires potentiellement de pêche et qui permet de cliquer sur un oui ou non afin de labeller \n", + "# pour un apprentissage supervisé (garder la trajectoire en entier, détecter début et fin de trajectoire, colorer avec vitesse les portion de trajectoire potentiellement de pêche)" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "428d600a-2a49-4c72-9a17-251ba86f5da9", + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "d513c704-b6c7-4d49-86d0-171350f8d806", + "metadata": {}, + "outputs": [], + "source": [ + "path = '/Users/sarahlenet/Desktop/Bloom/spire_ais_data_13042024/'" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "3d6110e3-1581-4a9b-8f77-1e40ee2ba8aa", + "metadata": {}, + "outputs": [], + "source": [ + "df = pd.read_csv(path + 'spire_ais_data_FR_13042024.csv', sep = ';')" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "5a615a96-fe9d-403e-abbd-bebb18df7f98", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + " | id | \n", + "spire_update_statement | \n", + "vessel_ais_class | \n", + "vessel_flag | \n", + "vessel_name | \n", + "vessel_callsign | \n", + "vessel_timestamp | \n", + "vessel_update_timestamp | \n", + "vessel_ship_type | \n", + "vessel_sub_ship_type | \n", + "... | \n", + "position_rot | \n", + "position_speed | \n", + "position_timestamp | \n", + "position_update_timestamp | \n", + "voyage_destination | \n", + "voyage_draught | \n", + "voyage_eta | \n", + "voyage_timestamp | \n", + "voyage_update_timestamp | \n", + "created_at | \n", + "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", + "880345 | \n", + "2024-04-01 22:39:20.172+00 | \n", + "A | \n", + "FR | \n", + "F/V TH0MAS NICOLAS 2 | \n", + "FKDT | \n", + "2024-04-01 07:11:28+00 | \n", + "2024-04-01 07:23:22.164+00 | \n", + "FISHING | \n", + "NaN | \n", + "... | \n", + "NaN | \n", + "10.2 | \n", + "2024-04-01 22:21:53+00 | \n", + "2024-04-01 22:39:20.172+00 | \n", + "LE HAVRE | \n", + "4.0 | \n", + "NaN | \n", + "2024-04-01 07:11:28+00 | \n", + "2024-04-01 07:23:22.164+00 | \n", + "2024-04-11 19:20:02.512986+00 | \n", + "
1 | \n", + "880354 | \n", + "2024-04-11 19:08:38.909+00 | \n", + "A | \n", + "FR | \n", + "F/V EMERAUDE | \n", + "FJVO | \n", + "2024-04-11 03:51:45+00 | \n", + "2024-04-11 04:05:59.937+00 | \n", + "FISHING | \n", + "FISHING | \n", + "... | \n", + "0.000000 | \n", + "14.5 | \n", + "2024-04-11 19:06:55+00 | \n", + "2024-04-11 19:08:38.909+00 | \n", + "ALESUND (NOAES) | \n", + "7.5 | \n", + "2024-04-13 14:00:00+00 | \n", + "2024-04-11 17:01:12+00 | \n", + "2024-04-11 17:01:23.54+00 | \n", + "2024-04-11 19:20:02.512986+00 | \n", + "
2 | \n", + "880361 | \n", + "2024-04-11 19:15:44.77+00 | \n", + "A | \n", + "FR | \n", + "F/V LE MARMOUSET 3 | \n", + "FJZH | \n", + "2024-04-11 05:45:46+00 | \n", + "2024-04-11 05:45:56.461+00 | \n", + "FISHING | \n", + "NaN | \n", + "... | \n", + "0.000000 | \n", + "0.0 | \n", + "2024-04-11 19:15:35+00 | \n", + "2024-04-11 19:15:44.77+00 | \n", + "NaN | \n", + "3.6 | \n", + "NaN | \n", + "2024-04-11 13:40:07+00 | \n", + "2024-04-11 13:40:17.582+00 | \n", + "2024-04-11 19:20:02.512986+00 | \n", + "
3 | \n", + "880392 | \n", + "2024-04-11 17:51:47.037+00 | \n", + "A | \n", + "FR | \n", + "F/V RADOCHE TERCERO | \n", + "FIDH | \n", + "2024-04-11 02:25:02+00 | \n", + "2024-04-11 02:25:21.662+00 | \n", + "FISHING | \n", + "NaN | \n", + "... | \n", + "0.000000 | \n", + "3.0 | \n", + "2024-04-11 17:21:44+00 | \n", + "2024-04-11 17:51:47.037+00 | \n", + "CORUNA | \n", + "4.5 | \n", + "2024-06-07 00:00:00+00 | \n", + "2024-04-10 23:55:01+00 | \n", + "2024-04-10 23:55:21.412+00 | \n", + "2024-04-11 19:20:02.512986+00 | \n", + "
4 | \n", + "880395 | \n", + "2024-04-11 19:13:05.443+00 | \n", + "A | \n", + "FR | \n", + "F/V LA TRINITE | \n", + "FAE9935 | \n", + "2024-04-11 06:05:38+00 | \n", + "2024-04-11 06:15:02.681+00 | \n", + "FISHING | \n", + "NaN | \n", + "... | \n", + "17.856115 | \n", + "4.3 | \n", + "2024-04-11 19:03:46+00 | \n", + "2024-04-11 19:13:05.443+00 | \n", + "BOULOGNE/MER | \n", + "3.5 | \n", + "NaN | \n", + "2024-04-11 06:05:38+00 | \n", + "2024-04-11 06:15:02.681+00 | \n", + "2024-04-11 19:20:02.512986+00 | \n", + "
... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "
21723 | \n", + "1171270 | \n", + "2024-04-13 19:08:13.705+00 | \n", + "A | \n", + "FR | \n", + "F/V CAP BOJADOR | \n", + "FGPI | \n", + "2024-04-13 04:11:12+00 | \n", + "2024-04-13 04:11:22.206+00 | \n", + "FISHING | \n", + "NaN | \n", + "... | \n", + "0.000000 | \n", + "9.5 | \n", + "2024-04-13 18:57:38+00 | \n", + "2024-04-13 19:08:13.705+00 | \n", + "ABIDJAN | \n", + "6.7 | \n", + "2024-02-27 07:00:00+00 | \n", + "2024-04-12 21:11:12+00 | \n", + "2024-04-12 21:13:36.064+00 | \n", + "2024-04-13 19:20:03.221582+00 | \n", + "
21724 | \n", + "1171274 | \n", + "2024-04-13 19:20:12.416+00 | \n", + "A | \n", + "FR | \n", + "F/V JULIEN COLEOU | \n", + "FHEV | \n", + "2024-04-13 01:17:52+00 | \n", + "2024-04-13 01:18:08.788+00 | \n", + "FISHING | \n", + "NaN | \n", + "... | \n", + "0.000000 | \n", + "0.0 | \n", + "2024-04-13 19:20:02+00 | \n", + "2024-04-13 19:20:12.416+00 | \n", + "LORIENT | \n", + "4.5 | \n", + "2024-04-12 06:00:00+00 | \n", + "2024-04-13 00:59:53+00 | \n", + "2024-04-13 01:00:06.017+00 | \n", + "2024-04-13 19:20:03.221582+00 | \n", + "
21725 | \n", + "1171280 | \n", + "2024-04-13 18:55:35.736+00 | \n", + "A | \n", + "FR | \n", + "F/V MELODIE | \n", + "FPSR | \n", + "2024-04-11 01:45:05+00 | \n", + "2024-04-11 01:45:23.209+00 | \n", + "FISHING | \n", + "NaN | \n", + "... | \n", + "0.000000 | \n", + "1.2 | \n", + "2024-04-13 17:26:50.581+00 | \n", + "2024-04-13 18:55:35.736+00 | \n", + "VHF CH 16/77 | \n", + "NaN | \n", + "NaN | \n", + "2024-04-11 01:45:05+00 | \n", + "2024-04-11 01:45:23.209+00 | \n", + "2024-04-13 19:20:03.221582+00 | \n", + "
21726 | \n", + "1171319 | \n", + "2024-03-16 06:35:50.753+00 | \n", + "A | \n", + "FR | \n", + "F/V GLENAN | \n", + "FMHD | \n", + "2024-03-15 07:27:13+00 | \n", + "2024-03-15 10:06:44.513+00 | \n", + "FISHING | \n", + "NaN | \n", + "... | \n", + "0.000000 | \n", + "0.0 | \n", + "2024-03-16 02:20:40+00 | \n", + "2024-03-16 06:35:50.753+00 | \n", + "MAHE | \n", + "7.5 | \n", + "2024-03-03 00:00:00+00 | \n", + "2024-03-15 07:27:13+00 | \n", + "2024-03-15 10:06:44.513+00 | \n", + "2024-04-13 19:20:03.221582+00 | \n", + "
21727 | \n", + "1171321 | \n", + "2024-04-13 19:06:05.586+00 | \n", + "A | \n", + "FR | \n", + "F/V AGORRETA | \n", + "FGOO | \n", + "2024-04-13 06:12:02+00 | \n", + "2024-04-13 06:18:13.931+00 | \n", + "FISHING | \n", + "NaN | \n", + "... | \n", + "0.000000 | \n", + "10.1 | \n", + "2024-04-13 19:03:02+00 | \n", + "2024-04-13 19:06:05.586+00 | \n", + "CH13-CH77 NETS | \n", + "25.5 | \n", + "NaN | \n", + "2024-04-12 21:36:06+00 | \n", + "2024-04-12 21:40:23.446+00 | \n", + "2024-04-13 19:20:03.221582+00 | \n", + "
21728 rows × 32 columns
\n", + "\n", + " | id | \n", + "spire_update_statement | \n", + "vessel_ais_class | \n", + "vessel_flag | \n", + "vessel_name | \n", + "vessel_callsign | \n", + "vessel_timestamp | \n", + "vessel_update_timestamp | \n", + "vessel_ship_type | \n", + "vessel_sub_ship_type | \n", + "... | \n", + "position_rot | \n", + "position_speed | \n", + "position_timestamp | \n", + "position_update_timestamp | \n", + "voyage_destination | \n", + "voyage_draught | \n", + "voyage_eta | \n", + "voyage_timestamp | \n", + "voyage_update_timestamp | \n", + "created_at | \n", + "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9765 | \n", + "1011112 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "A | \n", + "FR | \n", + "PUNTA VIXIA | \n", + "FIKF | \n", + "2024-04-09 13:23:19+00 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "FISHING | \n", + "NaN | \n", + "... | \n", + "0.0 | \n", + "0.2 | \n", + "2024-04-09 13:20:41+00 | \n", + "2024-04-09 13:20:51.463+00 | \n", + "CASTLETOWNBERE | \n", + "6.7 | \n", + "2023-08-10 16:00:00+00 | \n", + "2024-04-09 13:23:19+00 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "2024-04-12 16:50:03.129973+00 | \n", + "
2485 | \n", + "913612 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "A | \n", + "FR | \n", + "PUNTA VIXIA | \n", + "FIKF | \n", + "2024-04-09 13:23:19+00 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "FISHING | \n", + "NaN | \n", + "... | \n", + "0.0 | \n", + "0.2 | \n", + "2024-04-09 13:20:41+00 | \n", + "2024-04-09 13:20:51.463+00 | \n", + "CASTLETOWNBERE | \n", + "6.7 | \n", + "2023-08-10 16:00:00+00 | \n", + "2024-04-09 13:23:19+00 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "2024-04-12 00:35:03.596138+00 | \n", + "
4613 | \n", + "942112 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "A | \n", + "FR | \n", + "PUNTA VIXIA | \n", + "FIKF | \n", + "2024-04-09 13:23:19+00 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "FISHING | \n", + "NaN | \n", + "... | \n", + "0.0 | \n", + "0.2 | \n", + "2024-04-09 13:20:41+00 | \n", + "2024-04-09 13:20:51.463+00 | \n", + "CASTLETOWNBERE | \n", + "6.7 | \n", + "2023-08-10 16:00:00+00 | \n", + "2024-04-09 13:23:19+00 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "2024-04-12 05:20:02.779057+00 | \n", + "
18165 | \n", + "1123612 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "A | \n", + "FR | \n", + "PUNTA VIXIA | \n", + "FIKF | \n", + "2024-04-09 13:23:19+00 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "FISHING | \n", + "NaN | \n", + "... | \n", + "0.0 | \n", + "0.2 | \n", + "2024-04-09 13:20:41+00 | \n", + "2024-04-09 13:20:51.463+00 | \n", + "CASTLETOWNBERE | \n", + "6.7 | \n", + "2023-08-10 16:00:00+00 | \n", + "2024-04-09 13:23:19+00 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "2024-04-13 11:35:02.760209+00 | \n", + "
15701 | \n", + "1090612 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "A | \n", + "FR | \n", + "PUNTA VIXIA | \n", + "FIKF | \n", + "2024-04-09 13:23:19+00 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "FISHING | \n", + "NaN | \n", + "... | \n", + "0.0 | \n", + "0.2 | \n", + "2024-04-09 13:20:41+00 | \n", + "2024-04-09 13:20:51.463+00 | \n", + "CASTLETOWNBERE | \n", + "6.7 | \n", + "2023-08-10 16:00:00+00 | \n", + "2024-04-09 13:23:19+00 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "2024-04-13 06:05:03.071115+00 | \n", + "
... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "
1141 | \n", + "895612 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "A | \n", + "FR | \n", + "PUNTA VIXIA | \n", + "FIKF | \n", + "2024-04-09 13:23:19+00 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "FISHING | \n", + "NaN | \n", + "... | \n", + "0.0 | \n", + "0.2 | \n", + "2024-04-09 13:20:41+00 | \n", + "2024-04-09 13:20:51.463+00 | \n", + "CASTLETOWNBERE | \n", + "6.7 | \n", + "2023-08-10 16:00:00+00 | \n", + "2024-04-09 13:23:19+00 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "2024-04-11 21:35:02.77779+00 | \n", + "
17493 | \n", + "1114612 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "A | \n", + "FR | \n", + "PUNTA VIXIA | \n", + "FIKF | \n", + "2024-04-09 13:23:19+00 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "FISHING | \n", + "NaN | \n", + "... | \n", + "0.0 | \n", + "0.2 | \n", + "2024-04-09 13:20:41+00 | \n", + "2024-04-09 13:20:51.463+00 | \n", + "CASTLETOWNBERE | \n", + "6.7 | \n", + "2023-08-10 16:00:00+00 | \n", + "2024-04-09 13:23:19+00 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "2024-04-13 10:05:03.322049+00 | \n", + "
21 | \n", + "880622 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "A | \n", + "FR | \n", + "PUNTA VIXIA | \n", + "FIKF | \n", + "2024-04-09 13:23:19+00 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "FISHING | \n", + "NaN | \n", + "... | \n", + "0.0 | \n", + "0.2 | \n", + "2024-04-09 13:20:41+00 | \n", + "2024-04-09 13:20:51.463+00 | \n", + "CASTLETOWNBERE | \n", + "6.7 | \n", + "2023-08-10 16:00:00+00 | \n", + "2024-04-09 13:23:19+00 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "2024-04-11 19:20:02.512986+00 | \n", + "
1365 | \n", + "898612 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "A | \n", + "FR | \n", + "PUNTA VIXIA | \n", + "FIKF | \n", + "2024-04-09 13:23:19+00 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "FISHING | \n", + "NaN | \n", + "... | \n", + "0.0 | \n", + "0.2 | \n", + "2024-04-09 13:20:41+00 | \n", + "2024-04-09 13:20:51.463+00 | \n", + "CASTLETOWNBERE | \n", + "6.7 | \n", + "2023-08-10 16:00:00+00 | \n", + "2024-04-09 13:23:19+00 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "2024-04-11 22:05:02.907096+00 | \n", + "
11557 | \n", + "1035112 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "A | \n", + "FR | \n", + "PUNTA VIXIA | \n", + "FIKF | \n", + "2024-04-09 13:23:19+00 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "FISHING | \n", + "NaN | \n", + "... | \n", + "0.0 | \n", + "0.2 | \n", + "2024-04-09 13:20:41+00 | \n", + "2024-04-09 13:20:51.463+00 | \n", + "CASTLETOWNBERE | \n", + "6.7 | \n", + "2023-08-10 16:00:00+00 | \n", + "2024-04-09 13:23:19+00 | \n", + "2024-04-09 13:38:33.29+00 | \n", + "2024-04-12 20:50:03.049059+00 | \n", + "
194 rows × 32 columns
\n", + "