Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update incore docs to reflect the renaming of portfolio recovery to cluster recovery #385

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ 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
- Rename Building Portfolio Analysis to Building Cluster Recovery Analysis [#559](https://github.com/IN-CORE/pyincore/issues/559)

## [4.11.0] - 2024-04-30

### Changed
Expand Down
64 changes: 32 additions & 32 deletions manual_jb/content/analyses.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
# Analyses

1. [Bridge damage](analyses/bridge_dmg.md)
2. [Building damage](analyses/building_dmg)
3. [Building functionality](analyses/building_func)
4. [Building economic loss](analyses/building_loss)
5. [Capital shocks](analyses/capital_shocks)
6. [Combined wind wave surge building damage](analyses/combined_wind_wave_surge_building_dmg)
7. [Combined wind wave surge building loss](analyses/combined_wind_wave_surge_building_loss)
8. [Commercial building recovery](analyses/commercial_building_recovery)
9. [Cumulative building damage](analyses/cumulative_building_dmg)
10. [Electric power facility damage](analyses/epf_dmg)
11. [Electric power facility repair cost](analyses/epf_repair_cost)
12. [Electric power facility restoration](analyses/epf_restoration)
13. [Electric power network functionality](analyses/epn_functionality)
14. [Galveston Computable General Equilibrium (CGE)](analyses/galveston_cge.md)
15. [Household-level housing sequential recovery](analyses/housing_household_recovery)
16. [Housing recovery](analyses/housing_recovery)
17. [Housing unit allocation](analyses/housingunitallocation)
18. [Interdependent Network Design Problem](analyses/indp)
19. [Joplin Computable General Equilibrium (CGE)](analyses/joplin_cge)
20. [Joplin empirical building restoration](analyses/joplin_empirical_building_restoration)
21. [Machine Learning Enabled Computable General Equilibrium (CGE) - Salt Lake City](analyses/ml_slc_cge.md)
22. [Mean damage](analyses/mean_dmg)
23. [Monte Carlo failure probability](analyses/mc_failure_prob)
24. [Multi-objective retrofit optimization](analyses/multi_retrofit_optimization)
25. [Network cascading interdependency functionality](analyses/nci_functionality)
26. [Nonstructural building damage](analyses/non_structural_building_dmg)
27. [Pipeline damage](analyses/pipeline_dmg)
28. [Pipeline damage with repair rate](analyses/pipeline_dmg_w_repair_rate)
29. [Pipeline functionality](analyses/pipeline_functionality)
30. [Pipeline repair cost](analyses/pipeline_repair_cost)
31. [Pipeline restoration](analyses/pipeline_restoration)
32. [Population dislocation](analyses/populationdislocation)
33. [Portfolio recovery](analyses/portfolio_recovery)
2. [Building cluster recovery](analyses/building_cluster_recovery)
3. [Building damage](analyses/building_dmg)
4. [Building functionality](analyses/building_func)
5. [Building economic loss](analyses/building_loss)
6. [Capital shocks](analyses/capital_shocks)
7. [Combined wind wave surge building damage](analyses/combined_wind_wave_surge_building_dmg)
8. [Combined wind wave surge building loss](analyses/combined_wind_wave_surge_building_loss)
9. [Commercial building recovery](analyses/commercial_building_recovery)
10. [Cumulative building damage](analyses/cumulative_building_dmg)
11. [Electric power facility damage](analyses/epf_dmg)
12. [Electric power facility repair cost](analyses/epf_repair_cost)
13. [Electric power facility restoration](analyses/epf_restoration)
14. [Electric power network functionality](analyses/epn_functionality)
15. [Galveston Computable General Equilibrium (CGE)](analyses/galveston_cge.md)
16. [Household-level housing sequential recovery](analyses/housing_household_recovery)
17. [Housing recovery](analyses/housing_recovery)
18. [Housing unit allocation](analyses/housingunitallocation)
19. [Interdependent Network Design Problem](analyses/indp)
20. [Joplin Computable General Equilibrium (CGE)](analyses/joplin_cge)
21. [Joplin empirical building restoration](analyses/joplin_empirical_building_restoration)
22. [Machine Learning Enabled Computable General Equilibrium (CGE) - Salt Lake City](analyses/ml_slc_cge.md)
23. [Mean damage](analyses/mean_dmg)
24. [Monte Carlo failure probability](analyses/mc_failure_prob)
25. [Multi-objective retrofit optimization](analyses/multi_retrofit_optimization)
26. [Network cascading interdependency functionality](analyses/nci_functionality)
27. [Nonstructural building damage](analyses/non_structural_building_dmg)
28. [Pipeline damage](analyses/pipeline_dmg)
29. [Pipeline damage with repair rate](analyses/pipeline_dmg_w_repair_rate)
30. [Pipeline functionality](analyses/pipeline_functionality)
31. [Pipeline repair cost](analyses/pipeline_repair_cost)
32. [Pipeline restoration](analyses/pipeline_restoration)
33. [Population dislocation](analyses/populationdislocation)
34. [Residential building recovery](analyses/residential_building_recovery)
35. [Road damage](analyses/road_dmg)
36. [Salt Lake City Computable General Equilibrium (CGE)](analyses/slc_cge.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Portfolio recovery
# Cluster recovery

longshuicy marked this conversation as resolved.
Show resolved Hide resolved
**Description**

The code creates two output files *building-recovery.csv* and *portfolio-recovery.csv*
The code creates two output files *building-recovery.csv* and *cluster-recovery.csv*

**Input Parameters**

Expand All @@ -29,9 +29,9 @@ key name | type | name | description

**Output Datasets**

key name | type | name | description
--- | --- | --- | ---
`result` <sup>*</sup> | [`incore:portfolioRecovery`](https://incore.ncsa.illinois.edu/semantics/api/types/incore:portfolioRecovery) | Results | A dataset containing results (format: CSV).
key name | type | name | description
--- |--------------------------------------------------------------------------------------------------------------| --- | ---
`result` <sup>*</sup> | [`incore:clusterRecovery`](https://incore.ncsa.illinois.<br/>edu/semantics/api/types/incore:clusterRecovery) | Results | A dataset containing results (format: CSV).

<small>(* required)</small>

Expand All @@ -41,25 +41,25 @@ code snippet:

```
# Create instance
bldg_portfolio_recovery = BuildingPortfolioRecoveryAnalysis(client)
bldg_cluster_recovery = BuildingClusterRecovery(client)

# Load input datasets
bldg_portfolio_recovery.load_remote_input_dataset("building_data", bldg_data_dataset)
bldg_portfolio_recovery.load_remote_input_dataset("occupancy_mapping", occupancy_dataset)
bldg_portfolio_recovery.load_remote_input_dataset("building_damage", bldg_damage_dataset)
bldg_portfolio_recovery.load_remote_input_dataset("dmg_ratios", mean_repair_dataset)
bldg_portfolio_recovery.load_remote_input_dataset("utility", utility_dataset)
bldg_portfolio_recovery.load_remote_input_dataset("utility_partial", utility_partial_dataset)
bldg_portfolio_recovery.load_remote_input_dataset("coefFL", coefFL_dataset)
bldg_cluster_recovery.load_remote_input_dataset("building_data", bldg_data_dataset)
bldg_cluster_recovery.load_remote_input_dataset("occupancy_mapping", occupancy_dataset)
bldg_cluster_recovery.load_remote_input_dataset("building_damage", bldg_damage_dataset)
bldg_cluster_recovery.load_remote_input_dataset("dmg_ratios", mean_repair_dataset)
bldg_cluster_recovery.load_remote_input_dataset("utility", utility_dataset)
bldg_cluster_recovery.load_remote_input_dataset("utility_partial", utility_partial_dataset)
bldg_cluster_recovery.load_remote_input_dataset("coefFL", coefFL_dataset)

# Set parameters
bldg_portfolio_recovery.set_parameter("uncertainty", True)
bldg_portfolio_recovery.set_parameter("sample_size", 35) # default none. Gets size form input dataset
bldg_portfolio_recovery.set_parameter("random_sample_size", 50) # default 10000
bldg_portfolio_recovery.set_parameter("no_of_weeks", 100) # default 250
bldg_cluster_recovery.set_parameter("uncertainty", True)
bldg_cluster_recovery.set_parameter("sample_size", 35) # default none. Gets size form input dataset
bldg_cluster_recovery.set_parameter("random_sample_size", 50) # default 10000
bldg_cluster_recovery.set_parameter("no_of_weeks", 100) # default 250

# Creates two output files building-recovery.csv and portfolio-recovery.csv
bldg_portfolio_recovery.run_analysis()
# Creates two output files building-recovery.csv and cluster-recovery.csv
bldg_cluster_recovery.run_analysis()
```

full analysis: [portfolio_recovery.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/portfolio_recovery.ipynb)
full analysis: [building_cluster_recovery.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/building_cluster_recovery.ipynb)
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"metadata": {},
"outputs": [],
"source": [
"from pyincore.analyses.buildingportfolio import BuildingPortfolioRecoveryAnalysis\n",
"from pyincore.analyses.buildingclusterrecovery import BuildingClusterRecovery\n",
"\n",
"from pyincore import IncoreClient"
]
Expand Down Expand Up @@ -41,13 +41,13 @@
"metadata": {},
"outputs": [],
"source": [
"bldg_portfolio_recovery = BuildingPortfolioRecoveryAnalysis(client)\n",
"bldg_portfolio_recovery.set_parameter(\"uncertainty\", True)\n",
"bldg_portfolio_recovery.set_parameter(\"sample_size\", 35) # default none. Gets size form input dataset\n",
"bldg_portfolio_recovery.set_parameter(\"random_sample_size\", 50) # default 10000\n",
"bldg_portfolio_recovery.set_parameter(\"no_of_weeks\", 100) # default 250\n",
"bldg_portfolio_recovery.set_parameter(\"result_name\", \"memphis\")\n",
"# bldg_portfolio_recovery.set_parameter(\"num_cpu\", 1) Parallelization isn't implemented"
"bldg_cluster_recovery = BuildingClusterRecovery(client)\n",
"bldg_cluster_recovery.set_parameter(\"uncertainty\", True)\n",
"bldg_cluster_recovery.set_parameter(\"sample_size\", 35) # default none. Gets size form input dataset\n",
"bldg_cluster_recovery.set_parameter(\"random_sample_size\", 50) # default 10000\n",
"bldg_cluster_recovery.set_parameter(\"no_of_weeks\", 100) # default 250\n",
"bldg_cluster_recovery.set_parameter(\"result_name\", \"memphis\")\n",
"# bldg_cluster_recovery.set_parameter(\"num_cpu\", 1) Parallelization isn't implemented"
]
},
{
Expand All @@ -56,25 +56,22 @@
"metadata": {},
"outputs": [],
"source": [
"bldg_portfolio_recovery.load_remote_input_dataset(\"building_data\", bldg_data_dataset)\n",
"bldg_portfolio_recovery.load_remote_input_dataset(\"occupancy_mapping\", occupancy_dataset)\n",
"bldg_portfolio_recovery.load_remote_input_dataset(\"building_damage\", bldg_damage_dataset)\n",
"bldg_portfolio_recovery.load_remote_input_dataset(\"dmg_ratios\", mean_repair_dataset)\n",
"bldg_portfolio_recovery.load_remote_input_dataset(\"utility\", utility_dataset)\n",
"bldg_portfolio_recovery.load_remote_input_dataset(\"utility_partial\", utility_partial_dataset)\n",
"bldg_portfolio_recovery.load_remote_input_dataset(\"coefFL\", coefFL_dataset)"
"bldg_cluster_recovery.load_remote_input_dataset(\"building_data\", bldg_data_dataset)\n",
"bldg_cluster_recovery.load_remote_input_dataset(\"occupancy_mapping\", occupancy_dataset)\n",
"bldg_cluster_recovery.load_remote_input_dataset(\"building_damage\", bldg_damage_dataset)\n",
"bldg_cluster_recovery.load_remote_input_dataset(\"dmg_ratios\", mean_repair_dataset)\n",
"bldg_cluster_recovery.load_remote_input_dataset(\"utility\", utility_dataset)\n",
"bldg_cluster_recovery.load_remote_input_dataset(\"utility_partial\", utility_partial_dataset)\n",
"bldg_cluster_recovery.load_remote_input_dataset(\"coefFL\", coefFL_dataset)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true
},
"metadata": {},
"outputs": [],
"source": [
"# Creates two output files building-recovery.csv and portfolio-recovery.csv\n",
"bldg_portfolio_recovery.run_analysis()"
"bldg_cluster_recovery.run_analysis()"
]
},
{
Expand All @@ -83,7 +80,7 @@
"metadata": {},
"outputs": [],
"source": [
"bldg_portfolio_recovery.get_output_dataset(\"result\").get_dataframe_from_csv().head()"
"bldg_cluster_recovery.get_output_dataset(\"result\").get_dataframe_from_csv().head()"
]
},
{
Expand All @@ -110,7 +107,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
"version": "3.9.19"
}
},
"nbformat": 4,
Expand Down
Loading