Skip to content

Commit

Permalink
566 update flood input to non structural damage for combined wind wav…
Browse files Browse the repository at this point in the history
…e surge building damage docs (#394)

* markdowns

* update incore docs

* changelog

* result instead of result_ds

* update code snippet in markdowns
  • Loading branch information
longshuicy authored May 24, 2024
1 parent df50d56 commit 19c1050
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 19 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to the INCORE documents generated by Sphinx package will be
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Changed
- Update flood input to nonstructural damage output for combined wind-wave-surge building damage [#566](https://github.com/IN-CORE/incore-docs/issues/566)

## [4.11.0] - 2024-04-30

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ key name | type | name | description
--- | --- | --- | ---
`wind_damage` <sup>*</sup> | [`ergo:buildingDamageVer6`](https://incore.ncsa.illinois.edu/semantics/api/types/ergo:buildingDamageVer6) | Building wind damage | A building wind damage dataset.
`surge_wave_damage` <sup>*</sup> | [`ergo:buildingDamageVer6`](https://incore.ncsa.illinois.edu/semantics/api/types/ergo:buildingDamageVer6) | Building surge-wave damage | A building surge-wave damage dataset.
`flood_damage` <sup>*</sup> | [`ergo:buildingDamageVer6`](https://incore.ncsa.illinois.edu/semantics/api/types/ergo:buildingDamageVer6) | Building flood damage | A building flood damage dataset.
`flood_damage` <sup>*</sup> | [`ergo:nsBuildingInventoryDamageVer4`](https://incore.ncsa.illinois.edu/semantics/api/types/ergo:nsBuildingInventoryDamageVer4) | Building flood damage | A building flood damage dataset.

**Output datasets**

Expand Down Expand Up @@ -46,7 +46,7 @@ code snippet:
w_bldg_dmg.run_analysis()
# Create flood building damage
f_bldg_dmg = BuildingDamage(client)
f_bldg_dmg = NonStructBuildingDamage(client)
# Run building damage analysis
f_bldg_dmg.run_analysis()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ key name | type | name | description
`buildings` <sup>*</sup> | [`ergo:buildingInventoryVer4`](https://incore.ncsa.illinois.edu/semantics/api/types/ergo:buildingInventoryVer4)<br>[`ergo:buildingInventoryVer5`](https://incore.ncsa.illinois.edu/semantics/api/types/ergo:buildingInventoryVer5)<br>[`ergo:buildingInventoryVer6`](https://incore.ncsa.illinois.edu/semantics/api/types/ergo:buildingInventoryVer6)<br>[`ergo:buildingInventoryVer7`](https://incore.ncsa.illinois.edu/semantics/api/types/ergo:buildingInventoryVer7) | Building dataset | A building dataset.
`wind_damage` <sup>*</sup> | [`ergo:buildingDamageVer6`](https://incore.ncsa.illinois.edu/semantics/api/types/ergo:buildingDamageVer6) | Building wind damage | A building wind damage dataset.
`surge_wave_damage` <sup>*</sup> | [`ergo:buildingDamageVer6`](https://incore.ncsa.illinois.edu/semantics/api/types/ergo:buildingDamageVer6) | Building surge-wave damage | A building surge-wave damage dataset.
`flood_damage` <sup>*</sup> | [`ergo:buildingDamageVer6`](https://incore.ncsa.illinois.edu/semantics/api/types/ergo:buildingDamageVer6) | Building flood damage | A building flood damage dataset.
`flood_damage` <sup>*</sup> | [`ergo:nsBuildingInventoryDamageVer4`](https://incore.ncsa.illinois.edu/semantics/api/types/ergo:nsBuildingInventoryDamageVer4) | Building flood damage | A building flood damage dataset.
`structural_cost` <sup>*</sup> | [`incore:structuralCostRatio`](https://incore.ncsa.illinois.edu/semantics/api/types/incore:structuralCostRatio) | Building structural cost ratios | A dataset with building structural cost ratios for each archetype.
`content_cost` <sup>*</sup> | [`incore:contentCostRatio`](https://incore.ncsa.illinois.edu/semantics/api/types/incore:contentCostRatio) | Building content cost ratios | A dataset with building content cost ratios for each damage state.

Expand Down Expand Up @@ -49,7 +49,7 @@ code snippet:
w_bldg_dmg.run_analysis()
# Create flood building damage
f_bldg_dmg = BuildingDamage(client)
f_bldg_dmg = NonStructBuildingDamage(client)
# Run building damage analysis
f_bldg_dmg.run_analysis()
Expand Down
12 changes: 7 additions & 5 deletions notebooks/combined_wind_wave_surge_building_dmg.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"source": [
"from pyincore import IncoreClient, FragilityService, MappingSet, Dataset\n",
"from pyincore.analyses.combinedwindwavesurgebuildingdamage import CombinedWindWaveSurgeBuildingDamage\n",
"from pyincore.analyses.buildingdamage import BuildingDamage"
"from pyincore.analyses.buildingdamage import BuildingDamage\n",
"from pyincore.analyses.nonstructbuildingdamage import NonStructBuildingDamage"
]
},
{
Expand Down Expand Up @@ -184,10 +185,11 @@
"outputs": [],
"source": [
"# flood building damage\n",
"f_bldg_dmg = BuildingDamage(client)\n",
"f_bldg_dmg = NonStructBuildingDamage(client)\n",
"f_bldg_dmg.load_remote_input_dataset(\"buildings\", bldg_dataset_id)\n",
"f_bldg_dmg.set_input_dataset('dfr3_mapping_set', mapping_set)\n",
"f_bldg_dmg.set_parameter(\"result_name\", \"Galveston-flood-dmg\")\n",
"f_bldg_dmg.set_parameter(\"fragility_key\", \"Non-Retrofit Fragility ID Code\")\n",
"f_bldg_dmg.set_parameter(\"hazard_type\", hazard_type)\n",
"f_bldg_dmg.set_parameter(\"hazard_id\", hazard_id)\n",
"f_bldg_dmg.set_parameter(\"num_cpu\", 8)\n",
Expand Down Expand Up @@ -219,7 +221,7 @@
"source": [
"surge_wave_damage = sw_bldg_dmg.get_output_dataset(\"ds_result\")\n",
"wind_damage = w_bldg_dmg.get_output_dataset(\"ds_result\")\n",
"flood_damage = f_bldg_dmg.get_output_dataset(\"ds_result\")"
"flood_damage = f_bldg_dmg.get_output_dataset(\"result\")"
]
},
{
Expand Down Expand Up @@ -279,9 +281,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.16"
"version": "3.9.19"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
}
10 changes: 6 additions & 4 deletions notebooks/combined_wind_wave_surge_building_loss.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"source": [
"from pyincore import IncoreClient, FragilityService, MappingSet, Dataset\n",
"from pyincore.analyses.combinedwindwavesurgebuildingloss import CombinedWindWaveSurgeBuildingLoss\n",
"from pyincore.analyses.buildingdamage import BuildingDamage"
"from pyincore.analyses.buildingdamage import BuildingDamage\n",
"from pyincore.analyses.nonstructbuildingdamage import NonStructBuildingDamage"
]
},
{
Expand Down Expand Up @@ -184,10 +185,11 @@
"outputs": [],
"source": [
"# flood building damage\n",
"f_bldg_dmg = BuildingDamage(client)\n",
"f_bldg_dmg = NonStructBuildingDamage(client)\n",
"f_bldg_dmg.load_remote_input_dataset(\"buildings\", bldg_dataset_id)\n",
"f_bldg_dmg.set_input_dataset('dfr3_mapping_set', mapping_set)\n",
"f_bldg_dmg.set_parameter(\"result_name\", \"Galveston-flood-dmg\")\n",
"f_bldg_dmg.set_parameter(\"fragility_key\", \"Non-Retrofit Fragility ID Code\")\n",
"f_bldg_dmg.set_parameter(\"hazard_type\", hazard_type)\n",
"f_bldg_dmg.set_parameter(\"hazard_id\", hazard_id)\n",
"f_bldg_dmg.set_parameter(\"num_cpu\", 8)\n",
Expand Down Expand Up @@ -219,7 +221,7 @@
"source": [
"surge_wave_damage = sw_bldg_dmg.get_output_dataset(\"ds_result\")\n",
"wind_damage = w_bldg_dmg.get_output_dataset(\"ds_result\")\n",
"flood_damage = f_bldg_dmg.get_output_dataset(\"ds_result\")"
"flood_damage = f_bldg_dmg.get_output_dataset(\"result\")"
]
},
{
Expand Down Expand Up @@ -295,7 +297,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
"version": "3.9.19"
}
},
"nbformat": 4,
Expand Down
8 changes: 5 additions & 3 deletions notebooks/galveston_community_app.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"\n",
"# importing pyIncone analyses:\n",
"from pyincore.analyses.buildingdamage import BuildingDamage\n",
"from pyincore.analyses.nonstructbuildingdamage import NonStructBuildingDamage\n",
"from pyincore.analyses.buildingfunctionality import BuildingFunctionality\n",
"from pyincore.analyses.combinedwindwavesurgebuildingdamage import (\n",
" CombinedWindWaveSurgeBuildingDamage,\n",
Expand Down Expand Up @@ -192,10 +193,11 @@
"outputs": [],
"source": [
"# flood building damage\n",
"f_bldg_dmg = BuildingDamage(client)\n",
"f_bldg_dmg = NonStructBuildingDamage(client)\n",
"f_bldg_dmg.load_remote_input_dataset(\"buildings\", bldg_dataset_id)\n",
"f_bldg_dmg.set_input_dataset(\"dfr3_mapping_set\", mapping_set)\n",
"f_bldg_dmg.set_parameter(\"result_name\", \"Galveston-flood-dmg\")\n",
"f_bldg_dmg.set_parameter(\"fragility_key\", \"Non-Retrofit Fragility ID Code\")\n",
"f_bldg_dmg.set_parameter(\"hazard_type\", hazard_type)\n",
"f_bldg_dmg.set_parameter(\"hazard_id\", hazard_id)\n",
"f_bldg_dmg.set_parameter(\"num_cpu\", 8)\n",
Expand All @@ -219,7 +221,7 @@
"source": [
"surge_wave_damage = sw_bldg_dmg.get_output_dataset(\"ds_result\")\n",
"wind_damage = w_bldg_dmg.get_output_dataset(\"ds_result\")\n",
"flood_damage = f_bldg_dmg.get_output_dataset(\"ds_result\")"
"flood_damage = f_bldg_dmg.get_output_dataset(\"result\")"
]
},
{
Expand Down Expand Up @@ -793,7 +795,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.2"
"version": "3.9.19"
}
},
"nbformat": 4,
Expand Down
8 changes: 5 additions & 3 deletions notebooks/galveston_community_app_retrofit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"\n",
"# importing pyIncone analyses:\n",
"from pyincore.analyses.buildingdamage import BuildingDamage\n",
"from pyincore.analyses.nonstructbuildingdamage import NonStructBuildingDamage\n",
"from pyincore.analyses.buildingfunctionality import BuildingFunctionality\n",
"from pyincore.analyses.combinedwindwavesurgebuildingdamage import (\n",
" CombinedWindWaveSurgeBuildingDamage,\n",
Expand Down Expand Up @@ -188,7 +189,7 @@
"outputs": [],
"source": [
"# flood building damage\n",
"f_bldg_dmg_retrofit = BuildingDamage(client)\n",
"f_bldg_dmg_retrofit = NonStructBuildingDamage(client)\n",
"f_bldg_dmg_retrofit.load_remote_input_dataset(\"buildings\", bldg_dataset_id)\n",
"\n",
"# Flood mapping\n",
Expand All @@ -198,6 +199,7 @@
"f_bldg_dmg_retrofit.load_remote_input_dataset(\"retrofit_strategy\", retrofit_plan)\n",
"f_bldg_dmg_retrofit.set_input_dataset('dfr3_mapping_set', mapping_set)\n",
"f_bldg_dmg_retrofit.set_parameter(\"result_name\", \"Galveston-w-retrofit-flood-dmg\")\n",
"f_bldg_dmg_retrofit.set_parameter(\"fragility_key\", \"Non-Retrofit Fragility ID Code\")\n",
"f_bldg_dmg_retrofit.set_parameter(\"hazard_type\", hazard_type)\n",
"f_bldg_dmg_retrofit.set_parameter(\"hazard_id\", hazard_id)\n",
"f_bldg_dmg_retrofit.set_parameter(\"num_cpu\", 8)\n",
Expand All @@ -221,7 +223,7 @@
"source": [
"surge_wave_damage_r = sw_bldg_dmg_retrofit.get_output_dataset(\"ds_result\")\n",
"wind_damage = w_bldg_dmg.get_output_dataset(\"ds_result\") # no change\n",
"flood_damage_r = f_bldg_dmg_retrofit.get_output_dataset(\"ds_result\")"
"flood_damage_r = f_bldg_dmg_retrofit.get_output_dataset(\"result\")"
]
},
{
Expand Down Expand Up @@ -800,7 +802,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
"version": "3.9.19"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 19c1050

Please sign in to comment.