Skip to content

Commit

Permalink
Merge pull request #382 from IN-CORE/release-4.11.0
Browse files Browse the repository at this point in the history
Release 4.11.0
  • Loading branch information
longshuicy authored Apr 30, 2024
2 parents 5aeccc5 + 6a1f905 commit b6c6945
Show file tree
Hide file tree
Showing 15 changed files with 50 additions and 33 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ 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/).

## [4.11.0] - 2024-04-30

### Changed
- The analysis name from Joplin Empirical Restoration to Joplin Empirical Building Restoration analysis [#367](https://github.com/IN-CORE/incore-docs/issues/367)
- Version of Jupyter Book to 0.15.1 [#380](https://github.com/IN-CORE/incore-docs/issues/380)
- Replace IN-CORE logo [#377](https://github.com/IN-CORE/incore-docs/issues/377)
- Population dislocation input parameters [#525] (https://github.com/IN-CORE/pyincore/issues/525)

## [4.10.0] - 2024-04-12

### Added
Expand Down
Binary file added home/img/favicon.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion manual_jb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Compiling documentation
# ----------------------------------------------------------------------

FROM python:3.7-slim AS builder
FROM python:3.9-slim AS builder

RUN apt-get -y update

Expand Down
4 changes: 2 additions & 2 deletions manual_jb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ Clone the code from INCORE docs [GitHub](https://github.com/IN-CORE/incore-docs.

1. Install `jupyter-book` package.

2. We recommend using virtual environment `conda` with Python 3.6-3.8. The package management and deployment tool
2. We recommend using virtual environment `conda` with Python version 3.9 or later. The package management and deployment tool
is called `miniconda` or `anaconda`. Create the environment from the terminal at the project
folder (called `incore_docs` here) and activate it:

```
conda create -n incore_docs python=3.8 anaconda
conda create -n incore_docs python=3.9 anaconda
source activate incore_docs
```

Expand Down
3 changes: 2 additions & 1 deletion manual_jb/content/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ project: "IN-CORE Manual"
author: IN-CORE Community
copyright: "2023" # Copyright year to be placed in the footer
logo: images/resilience-logo.png
version: "4.10.0" # Version is not part of JB config, we use it for autobuild of incore-docs
version: "4.11.0" # Version is not part of JB config, we use it for autobuild of incore-docs
exclude_patterns: [_build, .DS_Store, "**.ipynb_checkpoints"]

repository:
path_to_book: "content"

html:
home_page_in_navbar: true # Whether to include your home page in the left Navigation Bar
favicon : "images/favicon.ico"

parse:
myst_enable_extensions:
Expand Down
2 changes: 1 addition & 1 deletion manual_jb/content/analyses.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
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 restoration](analyses/joplin_empirical_restoration)
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)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Joplin empirical restoration model
# Joplin empirical building restoration model

**Description**

Expand Down Expand Up @@ -50,23 +50,23 @@ key name | type | parent key | name | description
code snippet:

```
# Create Joplin empirical restoration analysis instance
restoration = `JoplinEmpiricalRestoration`(client)
# Create Joplin empirical building restoration analysis instance
restoration = `JoplinEmpiricalBuildingRestoration`(client)
# Load input dataset
restoration.load_remote_input_dataset("buildings", buildings)
restoration.load_remote_input_dataset("building_dmg", building_damage)
# Specify the result name
result_name = "IN-CORE_Joplin_empirical_restoration"
result_name = "IN-CORE_Joplin_empirical_building_restoration"
# Set analysis parameters
restoration.set_parameter("result_name", result_name)
restoration.set_parameter("target_functionality_level", 0)
restoration.set_parameter("seed", 1234)
# Run Joplin empirical restoration analysis
# Run Joplin empirical building restoration analysis
restoration.run_analysis()
```

full analysis: [joplin_empirical_restoration.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/joplin_empirical_restoration.ipynb) <br />
full analysis: [joplin_empirical_building_restoration.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/joplin_empirical_building_restoration.ipynb) <br />
27 changes: 17 additions & 10 deletions manual_jb/content/analyses/populationdislocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,26 @@ Retrieved from [hrrc.arch.tamu.edu/publications/research reports/08-05R Dislocat

**Input Parameters**

key name | type | name | description
--- | --- | --- | ---
`result_name` | `str` | Result name | Name of the result dataset.
`seed` <sup>*</sup> | `int` | Seed | Initial value to seed the random number generator.
key name | type | name | description
--- |---------|---------------------------------| ---
`result_name` | `str` | Result name | Name of the result dataset.
`seed` <sup>*</sup> | `int` | Seed | Initial value to seed the random number generator.
`choice_dislocation`| `bool` | Choice Dislocation Flag | Flag to calculate choice dislocation.
`choice_dislocation_cutoff`| `float` | Choice Dislocation cutoff | Damage state Probability cutoff for choice dislocation.
`choice_dislocation_ds`| `str` | Choice Dislocation Damage State | Damage state for choice dislocation.
`unsafe_occupancy` | `bool` | Unsafe Occupancy Flag | Flag to calculate unsafe occupancy.
`unsafe_occupancy_cutoff` | `float` | Unsafe Occupancy cutoff | Damage state Probability cutoff for unsafe occupancy.
`unsafe_occupancy_ds` | `str` | Unsafe Occupancy Damage State | Damage state for unsafe occupancy.


**Input Datasets**

key name | type | name | description
--- | --- | --- | ---
`building_dmg` <sup>*</sup> | [`ergo:buildingDamageVer4`](https://incore.ncsa.illinois.edu/semantics/api/types/ergo:buildingDamageVer4)<br>[`ergo:buildingDamageVer5`](https://incore.ncsa.illinois.edu/semantics/api/types/ergo:buildingDamageVer5) | Building damage | A building damage dataset.
`housing_unit_allocation` <sup>*</sup> | [`incore:housingUnitAllocation`](https://incore.ncsa.illinois.edu/semantics/api/types/incore:housingUnitAllocation) | Housing allocation | A housing unit allocation dataset.
`block_group_data` <sup>*</sup> | [`incore:blockGroupData`](https://incore.ncsa.illinois.edu/semantics/api/types/incore:blockGroupData) | Block group data | A block group racial distribution dataset.
`value_loss_param` <sup>*</sup> | [`incore:valueLossParam`](https://incore.ncsa.illinois.edu/semantics/api/types/incore:valueLossParam) | Loss parameters | A table with value loss beta distribution parameters.
key name | type | name | description
--- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| --- | ---
`building_dmg` <sup>*</sup> | [`ergo:buildingDamageVer4`](https://incore.ncsa.illinois.edu/semantics/api/types/ergo:buildingDamageVer4)<br>[`ergo:buildingDamageVer5`](https://incore.ncsa.illinois.edu/semantics/api/types/ergo:buildingDamageVer5)<br>[`ergo:buildingDamageVer6`](https://incore.ncsa.illinois.edu/semantics/api/types/ergo:buildingDamageVer6)<br>[`ergo:buildingDamageVer7`](https://incore.ncsa.illinois.edu/semantics/api/types/ergo:buildingDamageVer7) | Building damage | A building damage dataset.
`housing_unit_allocation` <sup>*</sup> | [`incore:housingUnitAllocation`](https://incore.ncsa.illinois.edu/semantics/api/types/incore:housingUnitAllocation) | Housing allocation | A housing unit allocation dataset.
`block_group_data` <sup>*</sup> | [`incore:blockGroupData`](https://incore.ncsa.illinois.edu/semantics/api/types/incore:blockGroupData) | Block group data | A block group racial distribution dataset.
`value_loss_param` <sup>*</sup> | [`incore:valueLossParam`](https://incore.ncsa.illinois.edu/semantics/api/types/incore:valueLossParam) | Loss parameters | A table with value loss beta distribution parameters.

**Output Datasets**

Expand Down
Binary file added manual_jb/content/images/favicon.ico
Binary file not shown.
Binary file removed manual_jb/content/images/incore_logo.jpg
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified manual_jb/content/images/resilience-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion manual_jb/content/notebooks_other.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Note that some Notebooks might not work with the latest version of pyIncore.
[housingunitallocation.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/housingunitallocation.ipynb) <br />
[joplin_cge.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/joplin_cge.ipynb) <br />
[joplin_community_app.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/joplin_community_app.ipynb) <br />
[joplin_empirical_restoration.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/joplin_empirical_restoration.ipynb) <br />
[joplin_empirical_building_restoration.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/joplin_empirical_building_restoration.ipynb) <br />
[mc_failure_prob.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/mc_failure_prob.ipynb) <br />
[ml_enabled_slc_cge.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/ml_enabled_slc_cge.ipynb) <br />
[mean_dmg.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/mean_dmg.ipynb) <br />
Expand Down
3 changes: 1 addition & 2 deletions manual_jb/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
jupyter-book==0.13.2
jupyter-book==0.15.1
sphinx-book-theme>=0.1.4
lxml-html-clean>=0.1.0
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"source": [
"from pyincore import IncoreClient, FragilityService, MappingSet\n",
"from pyincore.analyses.buildingdamage import BuildingDamage\n",
"from pyincore.analyses.joplinempiricalrestoration import JoplinEmpiricalRestoration\n",
"from pyincore.analyses.joplinempiricalbuildingrestoration import (\n",
" JoplinEmpiricalBuildingRestoration,\n",
")\n",
"import pyincore.globals as pyglobals"
]
},
Expand All @@ -25,7 +27,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Start with Joplin building damage analysis"
"### Start with Joplin building damage analysis\n"
]
},
{
Expand Down Expand Up @@ -107,14 +109,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Start with Joplin restoration model"
"### Start with Joplin restoration model\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The example inventory is for Joplin, MO, after 2011 tornado."
"The example inventory is for Joplin, MO, after 2011 tornado.\n"
]
},
{
Expand All @@ -123,7 +125,7 @@
"metadata": {},
"outputs": [],
"source": [
"restoration = JoplinEmpiricalRestoration(client)"
"restoration = JoplinEmpiricalBuildingRestoration(client)"
]
},
{
Expand Down Expand Up @@ -161,8 +163,8 @@
"metadata": {},
"outputs": [],
"source": [
"# Target functionality level is set to FL0, full restoration in the example above. A user has an option \n",
"# to set target functionality level for each building by creating a csv file with two columns; \n",
"# Target functionality level is set to FL0, full restoration in the example above. A user has an option\n",
"# to set target functionality level for each building by creating a csv file with two columns;\n",
"# guid of a building and target level from (integer) 0 to 3. The file must be uploaded to IN-CORE data service.\n",
"# The dataset id is then used in the notebook:\n",
"#\n",
Expand Down Expand Up @@ -207,9 +209,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.12"
"version": "3.11.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
}

0 comments on commit b6c6945

Please sign in to comment.