src.dynamic_boundary_conditions.tide.sea_level_rise_data

This script handles the downloading and reading of sea level rise data from the NZ Sea level rise datasets, storing the data in the database, and retrieving the closest sea level rise data from the database for all locations in the provided tide data.

Attributes

log

Functions

modify_slr_data_from_takiwa(→ geopandas.GeoDataFrame)

Modify sea level rise data stored under dictionary to a GeoDataFrame and return.

get_slr_data_from_takiwa(→ geopandas.GeoDataFrame)

Fetch sea level rise data from the NZ SeaRise Takiwa website.

store_slr_data_to_db(→ None)

Store sea level rise data to the database.

get_closest_slr_data(→ geopandas.GeoDataFrame)

Retrieve the closest sea level rise data for a single query location from the database.

get_slr_data_from_db(→ geopandas.GeoDataFrame)

Retrieve the closest sea level rise data from the database for all locations in the provided tide data.

Module Contents

src.dynamic_boundary_conditions.tide.sea_level_rise_data.log
src.dynamic_boundary_conditions.tide.sea_level_rise_data.modify_slr_data_from_takiwa(slr_nz_dict: Dict[str, pandas.DataFrame]) geopandas.GeoDataFrame

Modify sea level rise data stored under dictionary to a GeoDataFrame and return.

Parameters:

slr_nz_dict (Dict[str, pd.DataFrame]) – A dictionary containing the sea level rise data from the NZ Sea level rise datasets.

Returns:

A GeoDataFrame containing the sea level rise data from the NZ Sea level rise datasets.

Return type:

gpd.GeoDataFrame

src.dynamic_boundary_conditions.tide.sea_level_rise_data.get_slr_data_from_takiwa() geopandas.GeoDataFrame

Fetch sea level rise data from the NZ SeaRise Takiwa website.

Returns:

A GeoDataFrame containing the sea level rise data from the NZ Sea level rise datasets.

Return type:

gpd.GeoDataFrame

src.dynamic_boundary_conditions.tide.sea_level_rise_data.store_slr_data_to_db(engine: sqlalchemy.engine.Engine) None

Store sea level rise data to the database.

Parameters:

engine (Engine) – The engine used to connect to the database.

src.dynamic_boundary_conditions.tide.sea_level_rise_data.get_closest_slr_data(engine: sqlalchemy.engine.Engine, single_query_loc: pandas.Series) geopandas.GeoDataFrame

Retrieve the closest sea level rise data for a single query location from the database.

Parameters:
  • engine (Engine) – The engine used to connect to the database.

  • single_query_loc (pd.Series) – Pandas Series containing the location coordinate and additional information used for retrieval.

Returns:

A GeoDataFrame containing the closest sea level rise data for the query location from the database.

Return type:

gpd.GeoDataFrame

src.dynamic_boundary_conditions.tide.sea_level_rise_data.get_slr_data_from_db(engine: sqlalchemy.engine.Engine, tide_data: geopandas.GeoDataFrame) geopandas.GeoDataFrame

Retrieve the closest sea level rise data from the database for all locations in the provided tide data.

Parameters:
  • engine (Engine) – The engine used to connect to the database.

  • tide_data (gpd.GeoDataFrame) – A GeoDataFrame containing tide data with added time information (seconds, minutes, hours) and location details.

Returns:

A GeoDataFrame containing the closest sea level rise data for all locations in the tide data.

Return type:

gpd.GeoDataFrame