Description Usage Arguments Value Note
View source: R/processHeatwaves.R
This function takes a dataframe with identified heat waves and returns a dataframe that lists and characterizes all of the heat waves. If no heat waves were identified in a city, it returns a data frame with the same columns but no observations, to allow the empty dataframe to be joined without error to the dataframes for cities that do have heat waves under the definition.
1 | createHwDataframe(city, threshold, heatwaves, ensembleSeries, i, global, custom)
|
city |
A character vector with the identification of the city being processed. |
threshold |
Numeric string with threshold temperature used in the heat wave definition, in degrees Fahrenheit. |
heatwaves |
A dataframe with the following columns:
This is the format of the output of |
ensembleSeries |
A list object giving the projection time series as
well as a variety of other information for a single ensemble member.
This is the output of |
i |
An index specifying which city is being processed. This corresponds
to the order of the cities in the |
global |
An list object created by |
custom |
An list object created by |
A dataframe of identified and characterized heat waves for a single city and single ensemble member. Each row of this dataframe represents a heat wave, with the following columns:
hw.number: A sequential number identifying each heat wave in a city;
mean.temp: Average daily temperature across all days in the heat wave, in degrees Fahrenheit;
max.temp: Highest daily temperature across days in the heat wave, in degrees Fahrenheit;
min.temp: Lowest daily temperature across days in the heat wave, in degrees Fahrenheit
length: Number of days in the heat wave;
start.date: Date of the first day of the heat wave;
end.date: Date of the last day of the heat wave;
start.doy: Day of the year of the first day of the heat wave (1 = Jan. 1, etc.);
start.month: Month in which the heat wave started (1 = January, etc.);
days.above.80: Number of days in the heat wave above 80 degrees Fahrenheit;
days.above.85: Number of days in the heat wave above 85 degrees Fahrenheit;
days.above.90: Number of days in the heat wave above 90 degrees Fahrenheit;
days.above.95: Number of days in the heat wave above 90 degrees Fahrenheit;
days.above.99th: Number of days in the heat wave above the 99th
percentile temperature for the city, using the period specified
by the user with the referenceBoundaries
argument in
gen_hw_set
as a reference for determining these
percentiles;
days.above.99.5th: Number of days in the heat wave above the 99.5th
percentile temperature for the city, using the period specified
by the user with the referenceBoundaries
argument in
gen_hw_set
as a reference for determining these
percentiles;
first.in.season: Whether the heat wave was the first to occur in its calendar year (Note: this characteristic is likely not useful in southern hemisphere studies.);
threshold.temp: The temperature used as the threshold for the heat wave definition in the city;
mean.temp.quantile: The percentile of the average daily mean
temperature during the heat wave compared to the city's year-round
temperature distribution, based on the temperatures for the city
during the period specified by the referenceBoundaries
argument in gen_hw_set
;
max.temp.quantile: The percentile of the highest daily mean temperature during the heat wave compared to the city's year-round temperature distribution;
min.temp.quantile: The percentile of the lowest daily mean temperature during the heat wave compared to the city's year-round temperature distribution;
mean.temp.1: The city's average year-round temperature, based
on the temperatures for the city during the period specified by
the referenceBoundaries
argument in
gen_hw_set
;
mean.summer.temp: The city's average May–September
temperature, based on the temperatures for the city during the
period specified by the referenceBoundaries
argument
in gen_hw_set
; and
city: The identifier for the city, as given in the file
specified in the citycsv
argument of
gen_hw_set
.
When calculating relative characteristics of heat waves, like the
relative value of the heat wave's mean temperature, this function uses a
time series from the date ranges specified by the user using the
referenceBoundaries
option in gen_hw_set
. By
default, these references are based on projection data from 2070 to
2079.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.