tide package
Subpackages
- tide.stations package
- Submodules
- tide.stations.cache_wrapper module
- tide.stations.exception_stations module
- tide.stations.factory_stations module
- tide.stations.stations_abc module
StationsHandlerABCStationsHandlerABC._create_geometry()StationsHandlerABC._create_index_map()StationsHandlerABC._filter_stations()StationsHandlerABC._get_event_date()StationsHandlerABC._get_qc_flag()StationsHandlerABC._get_time_series()StationsHandlerABC.filter_wlo_qc_flag()StationsHandlerABC._create_attributes()StationsHandlerABC._fetch_is_tidal_station()StationsHandlerABC._get_stations_geodataframe()StationsHandlerABC._get_stations_tidal_info()StationsHandlerABC.create_data_list()StationsHandlerABC.get_station_id_by_code()StationsHandlerABC.get_stations_geodataframe()StationsHandlerABC.get_stations_geodataframe_from_codes()StationsHandlerABC.get_time_series_dataframe()StationsHandlerABC.stations
- tide.stations.stations_models module
- tide.stations.stations_private module
StationsHandlerPrivateStationsHandlerPrivate._filter_stations()StationsHandlerPrivate._get_event_date()StationsHandlerPrivate._get_qc_flag()StationsHandlerPrivate._get_time_series()StationsHandlerPrivate._fetch_time_series()StationsHandlerPrivate._get_stations_time_series()StationsHandlerPrivate._get_stations_with_metadata()StationsHandlerPrivate.get_stations_geodataframe()
- tide.stations.stations_public module
- Module contents
StationsErrorEndpointTypeProtocolIWLSapiProtocolStationsHandlerABCStationsHandlerABC._create_geometry()StationsHandlerABC._create_index_map()StationsHandlerABC._filter_stations()StationsHandlerABC._get_event_date()StationsHandlerABC._get_qc_flag()StationsHandlerABC._get_time_series()StationsHandlerABC.filter_wlo_qc_flag()StationsHandlerABC._create_attributes()StationsHandlerABC._fetch_is_tidal_station()StationsHandlerABC._get_stations_geodataframe()StationsHandlerABC._get_stations_tidal_info()StationsHandlerABC.create_data_list()StationsHandlerABC.get_station_id_by_code()StationsHandlerABC.get_stations_geodataframe()StationsHandlerABC.get_stations_geodataframe_from_codes()StationsHandlerABC.get_time_series_dataframe()StationsHandlerABC.stations
StationsHandlerPrivateStationsHandlerPrivate._filter_stations()StationsHandlerPrivate._get_event_date()StationsHandlerPrivate._get_qc_flag()StationsHandlerPrivate._get_time_series()StationsHandlerPrivate._fetch_time_series()StationsHandlerPrivate._get_stations_time_series()StationsHandlerPrivate._get_stations_with_metadata()StationsHandlerPrivate.get_stations_geodataframe()
StationsHandlerPublicTimeSeriesProtocolget_stations_factory()
- tide.time_serie package
- Submodules
- tide.time_serie.exception_time_serie module
- tide.time_serie.time_serie_dataframe module
add_metadata_to_time_serie_dataframe()add_nan_date_row()check_for_missing_values_for_interpolation()clean_time_series_data()combine_water_level_data()create_nan_date_row()cubic_spline_interpolation()extend_non_nan_dataframe()extend_rows_to_deltatime()fill_data_gaps()finalize_time_serie_dataframe()get_buffered_time()get_datetime_from_iso8601()get_empty_dataframe()get_first_and_last_rows()get_gaps_dataframe_list()get_iso8601_from_datetime()get_row_by_index()get_station_position()get_threshold_interpolation_filling_value()get_water_level_data()get_water_level_data_for_stations()get_water_level_data_retrieval_message()get_water_level_time_serie()identify_data_gaps()identify_interpolation_and_fill_gaps()interpolate_data_gaps()merge_dataframes()process_gaps_to_fill()process_gaps_to_interpolate()resample_data()reset_and_sort_index()NanDateRow
- tide.time_serie.time_serie_models module
- tide.time_serie.time_serie_retry module
- Module contents
- tide.voronoi package
- Submodules
- tide.voronoi.voronoi_algorithm module
- tide.voronoi.voronoi_geodataframe module
create_voronoi_gdf()from_shapely_object_to_geodataframe()get_code_by_station_id()get_concave_hull()get_name_by_station_id()get_polygon_by_geometry()get_polygon_by_station_id()get_station_position_by_station_id()get_station_title()get_time_series_by_station_id()get_voronoi_geodataframe()join_stations_voronoi()merge_attributes()WGS84
- tide.voronoi.voronoi_models module
- Module contents
StationsHandlerProtocolTimeSeriesProtocolfrom_shapely_object_to_geodataframe()get_code_by_station_id()get_concave_hull()get_name_by_station_id()get_polygon_by_geometry()get_polygon_by_station_id()get_station_position_by_station_id()get_station_title()get_time_series_by_station_id()get_voronoi_geodataframe()
Submodules
tide.plot module
Module qui contient les fonctions pour afficher les série temporelle.
Ce module contient les fonctions pour afficher un graphique de la série temporelle.
- tide.plot.add_traces(fig, dataframes)[source]
Ajoute les traces Scatter pour chaque série temporelle dans la figure.
- Parameters:
fig (go.Figure) – La figure Plotly.
dataframes (Collection[pd.DataFrame]) – La collection de DataFrames.
- Return type:
None
- tide.plot.create_annotations()[source]
Crée une liste d’annotations pour le graphique.
- Returns:
La liste des annotations.
- Return type:
list[dict]
- tide.plot.create_buttons(fig, dataframes, titles, x_label, y_label)[source]
Crée une liste de boutons pour le menu déroulant.
- Parameters:
fig (go.Figure) – La figure Plotly.
dataframes (Collection[pd.DataFrame]) – La collection de DataFrames.
titles (Collection[str]) – Les titres des graphiques.
x_label (str) – Le titre de l’axe des x.
y_label (str) – Le titre de l’axe des y.
- Returns:
La liste des boutons.
- Return type:
list[dict]
- tide.plot.create_scatter_traces(dataframe)[source]
Crée une liste de traces de type Scatter pour chaque série temporelle.
- Parameters:
dataframe (pd.DataFrame) – Le DataFrame de la série temporelle.
- Returns:
La liste des traces Scatter.
- Return type:
list[go.Scatter]
- tide.plot.plot_time_series_dataframe(dataframes, titles, x_label='Event Date', y_label='Water Level (m)', template='plotly', output_path=None, show_plot=False)[source]
Fonction qui affiche un graphique de la série temporelle avec un menu déroulant.
- Parameters:
dataframes (Collection[pd.DataFrame]) – Le DataFrame de la série temporelle.
titles (Sequence[str]) – Le titre du graphique.
x_label (str) – Le titre de l’axe des x.
y_label (str) – Le titre de l’axe des y.
output_path (Optional[Path]) – Le chemin du fichier de sortie.
show_plot (bool) – Afficher le graphique.
template (str) – Le template du graphique.
- Return type:
None
- tide.plot.set_initial_visibility(fig, dataframes)[source]
Définit la visibilité initiale des traces pour chaque série temporelle.
- Parameters:
fig (go.Figure) – La figure Plotly.
dataframes (Collection[pd.DataFrame]) – La collection de DataFrames.
- Returns:
La liste de visibilité initiale.
- Return type:
list[bool]
- tide.plot.update_layout(fig, buttons, x_label, y_label, title, template)[source]
Met à jour la mise en page de la figure.
- Parameters:
fig (go.Figure) – La figure Plotly.
buttons (list[dict]) – La liste des boutons.
x_label (str) – Le titre de l’axe des x.
y_label (str) – Le titre de l’axe des y.
title (str) – Le titre du graphique.
template (str) – Le template du graphique.
- Return type:
None
Module contents
Ce package contient les classes et fonctions permettant de gérer les marées et leurs zones d’influences.
- class tide.IterationResult(data, wl_combineds, wl_exceptions)[source]
Bases:
objectRésultat d’une itération de réduction marégraphique.
- Parameters:
data (gpd.GeoDataFrame) – Données géoréférencées (ou avec zone de marée si pas de niveaux d’eau).
wl_combineds (dict) – Séries temporelles de niveaux d’eau par station.
wl_exceptions (dict) – Stations en erreur lors de la récupération.
- data: GeoDataFrame
- wl_combineds: dict
- wl_exceptions: dict
- tide.run_water_level_reduction(data, stations_handler, iwls_api_config, waterline, sounder, georeference_config, decimal_precision, apply_water_level, processing_context, water_level_stations, excluded_stations, max_iterations, export_tide_path)[source]
Orchestre la boucle de réduction marégraphique IWLS.
À chaque itération, reconstruit le Voronoi sans les stations défaillantes, récupère les niveaux d’eau et géoréférence les sondes sans résultat. S’arrête dès que
DEPTH_PROCESSED_METERne contient plus de NaN ou quemax_iterationsest atteint.- Parameters:
data (gpd.GeoDataFrame[schema.DataLoggerWithTideZoneSchema]) – Données brutes à réduire.
stations_handler – Gestionnaire des stations marégraphiques.
iwls_api_config – Configuration IWLS.
waterline – Configuration de la ligne d’eau.
sounder – Configuration du sondeur.
georeference_config – Configuration du géoréférencement.
decimal_precision (int) – Précision décimale pour l’arrondi.
apply_water_level (bool) – Toujours
Truedans ce chemin d’exécution.processing_context (Optional[ProcessingContext]) – Contexte de traitement.
water_level_stations (Optional[Collection[str]]) – Stations forcées (
None→ diagramme de Voronoi).excluded_stations (list[str]) – Stations à exclure (mutée à chaque itération).
max_iterations (int) – Nombre maximum d’itérations.
export_tide_path (Path) – Répertoire d’export des artefacts marégraphiques.
- Returns:
(data, wl_combineds_dict, iteration)— données réduites, séries temporelles accumulées par station, numéro de la dernière itération.- Return type:
tuple[gpd.GeoDataFrame, dict, int]