oasislmf.preparation.correlations

This file defines the functions that maps the supported perils with the correlation settings. This data is usually obtained from the model_settings.

Module Contents

Functions

map_data(→ Optional[pandas.DataFrame])

Maps data from the model settings to to have Peril ID, peril_correlation_group, and damage_correlation_value.

get_correlation_input_items(→ pandas.DataFrame)

Gets the correlation values with the peril ID from the model_settings.

oasislmf.preparation.correlations.map_data(data: dict | None, logger) pandas.DataFrame | None[source]

Maps data from the model settings to to have Peril ID, peril_correlation_group, and damage_correlation_value.

Args:

data: (dict) the data loaded from the model settings

Returns: (pd.DataFrame) the mapped data

oasislmf.preparation.correlations.get_correlation_input_items(gul_inputs_df: pandas.DataFrame, correlation_map_df: pandas.DataFrame) pandas.DataFrame[source]

Gets the correlation values with the peril ID from the model_settings.

Args:
correlation_map_df: (pd.DataFrame) data from the model settings to to have Peril ID, peril_correlation_group,

and damage_correlation_value

gul_inputs_df: (pd.DataFrame) the data of the gul inputs to be mapped

Returns: (pd.DataFrame) the mapped data of correlations