Skip to content

Commit

Permalink
Concat for damage fractions, too
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-fred committed Feb 16, 2024
1 parent 49c6144 commit f5180d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ wildcard_constraints:
STORM_MODEL_FUTURE="CMCC-CM2-VHR4|CNRM-CM6-1-HR|EC-Earth3P-HR|HadGEM3-GC31-HM",
STORM_SET="(?:IBTrACS|STORM|IRIS)[^\/]*",
EVENTS_OR_FIXED="events|fixed",
COST_OR_FRACTION="cost|fraction",
DIRECT_DAMAGE_TYPES="fraction_per_RP|cost_per_RP|EAD|EAD_and_cost_per_RP",
SAMPLE="\d+",
# may be upper or lower, one 'f' or two
Expand Down
4 changes: 2 additions & 2 deletions workflow/transport-flood/flood_damages.smk
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ rule concat_event_set_direct_damages:
"direct_damages",
"{DATASET}_{FILTER_SLUG}",
"{HAZARD_SLUG}",
"cost",
"{COST_OR_FRACTION}",
"slice-{i}.gpq",
),
**wildcards,
i=range(config["slice_count"])
),
output:
damage_cost = "{OUTPUT_DIR}/direct_damages/{DATASET}_{FILTER_SLUG}/{HAZARD_SLUG}/cost.gpq",
damage_cost = "{OUTPUT_DIR}/direct_damages/{DATASET}_{FILTER_SLUG}/{HAZARD_SLUG}/{COST_OR_FRACTION}.gpq",
run:
import geopandas as gpd
import pandas as pd
Expand Down

0 comments on commit f5180d3

Please sign in to comment.