Deagg_to_MR_Hazd: A function to convert deaggregation to magnitude and/or...

Deagg_to_MR_HazdR Documentation

A function to convert deaggregation to magnitude and/or distance hazard distribution

Description

This function takes the deaggregation results (could be multiple sites, multiple intensity measures, and multiple return period or intensity measure level) and converts them to magntiude and/or distance hazard distribution

Usage

Deagg_to_MR_Hazd(
  Deagg_df,
  Deagg_level = "ReturnPeriod",
  IM_type = "IM_type",
  IM_level = "IM_level",
  SiteName = "SiteName",
  Magnitude = "Magnitude",
  R_distance = "R_distance",
  HazdContrition = "HazardContribution",
  AERate = "AnnualExceedanceRate",
  distribution = "cdf"
)

Arguments

Deagg_df

A dataframe contains the deaggregation results. It must contain at least six or seven (if both magnitude and distance hazard distributions are interested) columns: intensity measure type, intensity measure level, site name, magnitude and/or distance bins for deaggregation, hazard contribution from each magnitude or distance bin, and the hazard annual exceedance rate. Note for the intensity measure type, it could be PGA, PGV or PSA at any oscillator periods. If PSA is interested, please input the numeric oscillator periods (e.g., 0.01 and 0.5 for PSA at 0.01 sec and 0.5 sec, respectively)

Deagg_level

The variable (column) name in Deagg_df that is corresponding to the variable at which the deaggreation was conducted. Usually deaggregation is conducted based on return periods (e.g., 2475 years), then Deagg_level should be set by the associated column name in Deagg_df. For example, the default is "ReturnPeriod", which is based on an example deaggregation result from this webpage: https://raw.githubusercontent.com/wltcwpf/Dataset/main/RPSHA/Y_Deagg.csv. Sometimes the deaggregation is conducted based on different intensity measure levels (e.g., PGA = 0.01 g), then Deagg_level should be set as "IM_level" instead based on the example deaggregation result from this webpage: https://raw.githubusercontent.com/wltcwpf/Dataset/main/RPSHA/Y_Deagg.csv.

IM_type

The variable (column) name in Deagg_df that is corresponding to intensity measure types. The default is "IM_type" based on the example result from this webpage: https://raw.githubusercontent.com/wltcwpf/Dataset/main/RPSHA/Y_Deagg.csv.

IM_level

The variable (column) name in Deagg_df that is corresponding to intensity measure level. The default is "IM_level" based on the example result from this webpage: https://raw.githubusercontent.com/wltcwpf/Dataset/main/RPSHA/Y_Deagg.csv.

SiteName

The variable (column) name in Deagg_df that is corresponding to site IDs. The default is "SiteName" based on the example result from this webpage: https://raw.githubusercontent.com/wltcwpf/Dataset/main/RPSHA/Y_Deagg.csv.

Magnitude

The variable (column) name in Deagg_df that is corresponding to magnitude. The default is "Magnitude" based on the example result from this webpage: https://raw.githubusercontent.com/wltcwpf/Dataset/main/RPSHA/Y_Deagg.csv. If R_distance is not NULL, then Magnitude could be NULL if only magnitude hazard distribution is not interested.

R_distance

The variable (column) name in Deagg_df that is corresponding to distance. The default is "R_distance" (for distance hazard distribution) based on the example result from this webpage: https://raw.githubusercontent.com/wltcwpf/Dataset/main/RPSHA/Y_Deagg.csv. If Magnitude is not NULL, then R_distance could be NULL if only distance hazard distribution is not interested.

HazdContrition

The variable (column) name in Deagg_df that is corresponding to hazard contribution. The default is "HazardContribution" based on the example result from this webpage: https://raw.githubusercontent.com/wltcwpf/Dataset/main/RPSHA/Y_Deagg.csv.

AERate

The variable (column) name in Deagg_df that is corresponding to annual exceedance rate. The default is "AnnualExceedanceRate" based on the example result from this webpage: https://raw.githubusercontent.com/wltcwpf/Dataset/main/RPSHA/Y_Deagg.csv.

distribution

The distribution representation. "cdf" stands for cumulative hazard and "pdf" stands for discrete bin hazard.

Value

A dataframe with six or seven (if both magnitude and distance hazard distributions are interested) columns is returned, the columns inlcude IM_type, Deagg_level, SiteName, IM_level, Hazd, Magnitude/R_distance (or MagRType and MagR)


wltcwpf/RPSHA documentation built on July 6, 2023, 1:02 a.m.