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 social vulnerability branch with main before continuing the work #67

Merged
merged 47 commits into from
Apr 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
e30b0a6
Hazard reading functionalities
Mares2022 Mar 8, 2023
3214272
Update vulnerability.py
luisrodriguezgalvez Mar 8, 2023
3c6e00f
Merge branch 'main' into vulnerability_method
luisrodriguezgalvez Mar 8, 2023
046bd5a
set test
luisrodriguezgalvez Mar 8, 2023
fc8c429
Update hazard functionalities
Mares2022 Mar 9, 2023
a27a823
Test runs for me, but a lot needs to be changed and added to vulnerab…
frederique-hub Mar 9, 2023
32727e8
Added new script for AggregationLabels
frederique-hub Mar 9, 2023
9ae159b
Updated the docs.yml
frederique-hub Mar 9, 2023
b3bbf84
Update formatting with black, tryout testing the writer.
frederique-hub Mar 9, 2023
14bd3b4
Hazard first functionality
Mares2022 Mar 9, 2023
79e2f68
Added test_exposure, added framework of the exposure workflow
frederique-hub Mar 10, 2023
63cb9e8
Update ExposureVector class - working on setup_from_single_source
frederique-hub Mar 10, 2023
c3a1018
Testing dataset
Mares2022 Mar 10, 2023
cf7dee8
Update hazard
Mares2022 Mar 13, 2023
d409a68
manual input user csv
luisrodriguezgalvez Mar 13, 2023
baac82c
Removed unused variables
frederique-hub Mar 13, 2023
4039f65
generate vulnerability.csv
luisrodriguezgalvez Mar 13, 2023
07afd3d
first changes to read data from ini file
luisrodriguezgalvez Mar 15, 2023
5458fe2
create dictionary and read values from ini file
luisrodriguezgalvez Mar 15, 2023
e3af03d
Update to HydroMT workflows and update of exposure workflow. Now only…
frederique-hub Mar 15, 2023
c3629e8
it works
luisrodriguezgalvez Mar 15, 2023
b4975da
Remove jupyter notebook codes for testing
Mares2022 Mar 16, 2023
796c7c2
Updating from main
Mares2022 Mar 16, 2023
a61d373
Added the updated vulnerability_test_file_input.csv in examples
frederique-hub Mar 16, 2023
1f091cc
Merge pull request #49 from Deltares/social_vulnerability
Mares2022 Mar 16, 2023
6071781
Merge branch 'main' into exposure_vector
Mares2022 Mar 16, 2023
a98d7ff
Merge pull request #50 from Deltares/exposure_vector
Mares2022 Mar 16, 2023
dfb6248
Update according to review: split large function into multiple.
frederique-hub Mar 16, 2023
05ccbf3
Merge branch 'main' of https://github.com/Deltares/hydromt_fiat into …
frederique-hub Mar 16, 2023
943c4aa
Small fix in merging branches
frederique-hub Mar 16, 2023
b74e94e
Merge pull request #48 from Deltares/vulnerability_method_csv_input
frederique-hub Mar 16, 2023
974d30c
Added the local_test_database folder to gitignore
frederique-hub Mar 16, 2023
4346df0
Updating branch
frederique-hub Mar 16, 2023
ab3ccc4
Merge branch 'main' of https://github.com/Deltares/hydromt_fiat
frederique-hub Mar 16, 2023
895fb57
Merge branch 'main' into hazard
frederique-hub Mar 16, 2023
f6896da
Merge pull request #54 from Deltares/hazard
frederique-hub Mar 16, 2023
f0d5626
Linking for NSI works, updated the vulnerability_test_file_input.csv,…
frederique-hub Mar 16, 2023
868002c
Small change
frederique-hub Mar 17, 2023
30f9930
Merge pull request #55 from Deltares/exposure_vulnerability_linking
Mares2022 Mar 17, 2023
14efb9e
Updated tests and implemented writing out tables
frederique-hub Mar 17, 2023
6a520c5
Merge branch 'exposure_linking_vulnerability' into hazard
frederique-hub Mar 17, 2023
6d34b1b
Merge pull request #56 from Deltares/hazard
frederique-hub Mar 17, 2023
c6e49ae
Removed commented lines
frederique-hub Mar 17, 2023
135ece3
Updated tests and Hazard is now working for one event map from the da…
frederique-hub Mar 17, 2023
7e8cb89
Merge branch 'exposure_linking_vulnerability' of https://github.com/D…
frederique-hub Mar 17, 2023
af92ac0
Merge branch 'main' into exposure_vulnerability_linking
frederique-hub Mar 17, 2023
b6adf26
Merge pull request #58 from Deltares/exposure_vulnerability_linking
Mares2022 Mar 17, 2023
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
5 changes: 2 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@ jobs:
pushd docs
make html
popd

# This overrides the version "dev" with the proper version if we're building off a
# branch that's not master (which is confined to n.nn.x above) or on a tag.
# branch that's not main (which is confined to n.nn.x above) or on a tag.
- name: Set doc version
if: ${{ github.event_name != 'push' || !contains(github.ref, 'master') }}
if: ${{ github.event_name != 'push' || !contains(github.ref, 'main') }}
run: echo "DOC_VERSION=$(python -c 'from hydromt_fiat import __version__ as v; print("dev" if "dev" in v else "v"+v.replace(".dev",""))')" >> $GITHUB_ENV

- name: Upload to GitHub Pages
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,5 @@ venv.bak/
.mypy_cache/

# dask
dask-worker-space/
/local_test_database

38 changes: 38 additions & 0 deletions examples/data/vulnerability_test_file_input.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Name,Link,BldgDmgFnID,Occupancy,Source,Description
AGR1,AGR1,616,AGR1 ,USACE - Galveston,"Average Agriculture, structure"
COM1,COM1,217,COM1 ,USACE - Galveston,"Average Retail, Structure"
COM10,COM10,543,COM10,USACE - Galveston,"Garage, structure"
COM2,COM2,341,COM2 ,USACE - Galveston,"Average wholesale, Structure"
COM3,COM3,375,COM3 ,USACE - Galveston,"Average Personal & Repair Services, Structure"
COM4,COM4,431,COM4 ,USACE - Galveston,"Average Prof/Tech Services, Structure"
COM5,COM5,467,COM5 ,USACE - Galveston,"Bank, Structure"
COM6,COM6,474,COM6 ,USACE - Galveston,"Hospital, Structure"
COM7,COM7,475,COM7 ,USACE - Galveston,"Average Medical Office, Structure"
COM8,COM8,493,COM8 ,USACE - Galveston,"Average Entertainment/Recreation, Structure"
COM9,COM9,532,COM9 ,USACE - Galveston,"Average theatre, Structure"
EDU1,EDU1,643,EDU1 ,USACE - Galveston,"Average school, structure"
GOV1,GOV1,631,GOV1 ,USACE - Galveston,"Average government services, structure"
GOV2,GOV2,640,GOV2 ,USACE - Galveston,"Average emergency response, Structure"
IND1,IND1,545,IND1 ,USACE - Galveston,"Average heavy industrial, Structure"
IND2,IND2,559,IND2 ,USACE - Galveston,"Average light industrial, structure"
IND3,IND3,575,IND3 ,USACE - Galveston,"Average Food/Drug/Chem, Structure"
IND4,IND4,586,IND4 ,USACE - Galveston,"Average Metals/Minerals processing, structure"
IND5,IND5,591,IND5 ,USACE - Galveston,"Average High Technology, structure"
IND6,IND6,592,IND6 ,USACE - Galveston,"Average Construction, structure"
REL1,REL1,624,REL1 ,USACE - Galveston,"Church, structure"
RES1-1SNB,RES1-1SNB,105,RES1 ,FIA,"one floor, no basement, Structure, A-Zone"
RES1-1SWB,RES1-1SWB,106,RES1 ,FIA (MOD.),"one floor, w/ basement, Structure, A-Zone"
RES1-2SNB,RES1-2SNB,107,RES1 ,FIA,"two floors, no basement, Structure, A-Zone"
RES1-2SWB,RES1-2SWB,108,RES1 ,FIA (MOD.),"two floors, w/ basement, Structure, A-Zone"
RES1-3SNB,RES1-3SNB,109,RES1 ,FIA,"three or more floors, no basement, Structure, A-Zone"
RES1-3SWB,RES1-3SWB,110,RES1 ,FIA (MOD.),"three or more floors, w/ basement, Structure, A-Zone"
RES2,RES2,189,RES2 ,FIA,"Mobile home, structure, A-Zone"
RES3A,RES3A,659,RES3A,BCAR - Jan 2011,"1to2 Stories, slab - no basement, Coastal A or V Zone"
RES3B,RES3B,660,RES3B,BCAR - Jan 2011,"1to2 Stories, slab - no basement, Coastal A or V Zone"
RES3C,RES3C,660,RES3B,BCAR - Jan 2011,"1to2 Stories, slab - no basement, Coastal A or V Zone"
RES3D,RES3D,660,RES3B,BCAR - Jan 2011,"1to2 Stories, slab - no basement, Coastal A or V Zone"
RES3E,RES3E,660,RES3B,BCAR - Jan 2011,"1to2 Stories, slab - no basement, Coastal A or V Zone"
RES3F,RES3F,660,RES3B,BCAR - Jan 2011,"1to2 Stories, slab - no basement, Coastal A or V Zone"
RES4,RES4,209,RES4 ,USACE - Galveston,"Average Hotel & Motel, structure"
RES5,RES5,214,RES5 ,USACE - Galveston,"Average institutional dormitory, structure"
RES6,RES6,215,RES6 ,USACE - Galveston,"Nursing Home, structure"
36 changes: 5 additions & 31 deletions examples/fiat_flood.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[global]
artifact_data = True # use latest artifact data
artifact_data = False # use latest artifact data

[setup_config]
case = baseline # name of case
case = test_exposure # name of case
strategy = base # name of strategy (optional)
scenario = base # name of scenario (optional)
year = 2021 # case year (optional)
Expand All @@ -16,36 +16,10 @@ risk_output = True # indicator that specifies whether a risk calculation
map_output = True # indicator that specifies whether the result maps should be included in the output (default is True)

[setup_hazard1]
map_fn = data/flood_hand/hand_050cm_rp02.tif # absolute or relative (with respect to the configuration.ini) path to the hazard file
map_fn = max_depth # absolute or relative (with respect to the configuration.ini) path to the hazard file
map_type = water_depth # description of the hazard file type
rp = 2 # hazard return period in years, required for a risk calculation (optional)
crs = 3452 # coordinate reference system of the hazard file (optional)
rp = None # hazard return period in years, required for a risk calculation (optional)
crs = 4326 # coordinate reference system of the hazard file (optional)
nodata = -9999 # value that is assigned as nodata (optional)
var = None # hazard variable name in NetCDF input files (optional)
chunks = 100 # chunk sizes along each dimension used to load the hazard file into a dask array (default is 'auto') (optional)

[setup_hazard2]
map_fn = data/flood_hand/hand_150cm_rp50.tif # absolute or relative (with respect to the configuration.ini) path to the hazard file
map_type = water_depth # description of the hazard file type
rp = 50 # hazard return period in years, required for a risk calculation (optional)
crs = 3452 # coordinate reference system of the hazard file (optional)
nodata = -9999 # value that is assigned as nodata (optional)
var = None # hazard variable name in NetCDF input files (optional)
chunks = 100 # chunk sizes along each dimension used to load the hazard file into a dask array (default is 'auto') (optional)

[setup_buildings_value]
bld_fn = guf_bld_2012 # name tag of or absolute or relative (with respect to the configuration file) path to the building footprint file (default is 'wsf_bld_2015')
pop_fn = ghs_pop_2015_54009 # name tag of or absolute or relative (with respect to the configuration file) path to the population count file (default is 'ghs_pop_2015')
chunks = 100 # chunk sizes along each dimension used to load the building footprint and population count files into a dask arrays (default is 'auto') (optional)
function_fn = None # absolute or relative (with respect to the configuration file or susceptibility_dp) path to the susceptibility file (default is the JCR continental susceptibilty function (https://publications.jrc.ec.europa.eu/repository/handle/JRC105688) related to the country parameter) (optional)
scale_factor = 1 # scaling factor of the exposure values (default is 1) (optional)
weight_factor = 1 # weight factor of the exposure values in the total damage and risk results (default is 1) (optional)

# Alternatives to conduct a risk calculation (triggered by a multiple hazard input):
# [setup_hazard]
# map_fn = [hazard/RP_2.tif, hazard/RP_100.tif] # TODO: Not properly working yet, input is '[.., ..]' instead of ['..', '..']
# rp = [2, 100] # TODO: Not properly working yet, input is not parseble.

# Alternative to derive rp from filename:
# [setup_hazard1]
# map_fn = hazard/RP_*.tif
Binary file added hydromt_fiat/data/AllDDF.xlsx
Binary file not shown.
Loading