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 building portfolio recovery structure #287

Merged
merged 3 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Changed
- Update damage analysis documentations with hazard object input [#282](https://github.com/IN-CORE/incore-docs/issues/282)
- Building Portfolio Recovery analysis notebook [286](https://github.com/IN-CORE/incore-docs/issues/286)

### Fixed
- The notebook create_network_dataset.ipynb fails on nx.info [#284](https://github.com/IN-CORE/incore-docs/issues/284)
Expand Down
35 changes: 8 additions & 27 deletions notebooks/portfolio_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.recovery import BuildingPortfolioRecoveryAnalysis\n",
"from pyincore.analyses.buildingportfolio import BuildingPortfolioRecoveryAnalysis\n",
"\n",
"from pyincore import IncoreClient"
]
Expand Down Expand Up @@ -46,7 +46,8 @@
"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(\"num_cpu\", 1) Parallelization isn't implemented "
"bldg_portfolio_recovery.set_parameter(\"result_name\", \"memphis\")\n",
"# bldg_portfolio_recovery.set_parameter(\"num_cpu\", 1) Parallelization isn't implemented"
]
},
{
Expand Down Expand Up @@ -82,27 +83,7 @@
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"bldg_result = pd.read_csv('building-recovery.csv')\n",
"portfolio_result = pd.read_csv('portfolio-recovery.csv')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"bldg_result.head()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"portfolio_result.head()"
"bldg_portfolio_recovery.get_output_dataset(\"result\").get_dataframe_from_csv().head()"
]
},
{
Expand All @@ -115,7 +96,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -129,9 +110,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.5"
"version": "3.11.6"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
"nbformat_minor": 4
}
Loading