ra2ce.analysis.analysis_result package#
Submodules#
ra2ce.analysis.analysis_result.analysis_result module#
- GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Risk Assessment and Adaptation for Critical Infrastructure (RA2CE). Copyright (C) 2023 Stichting Deltares
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
- class AnalysisResult(*, analysis_result, analysis_config, output_path, _custom_name='')[source]#
Bases:
object
Dataclass to represent an analysis result (GeoDataFrame) and its related configuration.
- Parameters:
analysis_result (GeoDataFrame)
analysis_config (AnalysisSectionDamages | AnalysisSectionLosses | AnalysisSectionAdaptation | AnalysisConfigDataProtocol)
output_path (Path)
_custom_name (str)
-
analysis_config:
AnalysisSectionDamages
|AnalysisSectionLosses
|AnalysisSectionAdaptation
|AnalysisConfigDataProtocol
#
- property analysis_name: str#
Gets the analysis name from the configuration and formats it for exporting.
- Returns:
str: The formatted analysis name.
-
analysis_result:
GeoDataFrame
#
- property base_export_path: Path#
Gets the base export path to use for different formats..
- Returns:
Path: base path without extension for exporting results.
- is_valid_result()[source]#
Validates whether this analysis_result in this wrapper is valid.
- Return type:
bool
- Returns:
bool: validation of the analysis_result.
-
output_path:
Path
#
ra2ce.analysis.analysis_result.analysis_result_wrapper module#
- GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Risk Assessment and Adaptation for Critical Infrastructure (RA2CE). Copyright (C) 2023 Stichting Deltares
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
- class AnalysisResultWrapper(*, results_collection=<factory>)[source]#
Bases:
AnalysisResultWrapperProtocol
Dataclass to wrap a collection of analysis results.
- Parameters:
results_collection (list[AnalysisResult])
- get_single_result()[source]#
Returns the first declared analysis result if exists, otherwise None.
- Return type:
GeoDataFrame
|None
- Returns:
GeoDataFrame | None: First declared analysis result.
- is_valid_result()[source]#
Validates whether the “analysis results” (results_collection) in this wrapper are all valid.
- Return type:
bool
- Returns:
bool: validation of results_collection.
-
results_collection:
list
[AnalysisResult
]#
ra2ce.analysis.analysis_result.analysis_result_wrapper_exporter module#
- GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Risk Assessment and Adaptation for Critical Infrastructure (RA2CE). Copyright (C) 2023 Stichting Deltares
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
- class AnalysisResultWrapperExporter[source]#
Bases:
object
- export_result(result_wrapper)[source]#
Exports the given result into the analysis requested formats ( .gpkg and / or .csv).
- Args:
result_wrapper (AnalysisResultWrapper): The result to export.
- Parameters:
result_wrapper (AnalysisResultWrapperProtocol)
ra2ce.analysis.analysis_result.analysis_result_wrapper_protocol module#
- GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Risk Assessment and Adaptation for Critical Infrastructure (RA2CE). Copyright (C) 2023 Stichting Deltares
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
- class AnalysisResultWrapperProtocol(*args, **kwargs)[source]#
Bases:
Protocol
- is_valid_result()[source]#
Validates whether the “analysis results” (results_collection) in this wrapper are all valid.
- Return type:
bool
- Returns:
bool: validation of results_collection.
-
results_collection:
list
[AnalysisResult
]#