Description Usage Arguments Details Value References Examples
View source: R/plotClimateTrendChart.R
plotClimateTrendChart
Generate a trendline chart across multiple growing seasons
using aWhere weather data with standardized formatting of a prefedined set of climate indices
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | plotClimateTrendChart(
data,
variable,
season.monthDay_start = "01-01",
season.monthDay_end = "12-31",
years.LTN = seq(2006, 2020, 1),
title = NULL,
e_precip = FALSE,
e_threshold = 35,
yAxisLimits = NA,
size_font_main_title = 16,
size_font_axis_titles = 14,
size_font_axis_labels = 12,
size_font_legend_entries = 12,
line_width = 1,
annotationsWhichSide = "left",
indexSpecificValue = NULL,
offline_mode = FALSE
)
|
data |
data frame in which variables are named according to the schema output by generateaWhereDataset.R (required) |
variable |
character string denoting the variable to chart. Acceptable values are maxLenDrySpell, maxLenWetSpell, numFrostDays, numSummerDays, numIcingDays, numTropicalNights, minOfMaxTemp, maxOfMaxTemp, minOfMinTemp, maxOfMinTemp, dailyTempRange, maxSingleDayPrecip, max5ConsDayPrecip, simplePrecipIntensityIndex, precipSumExceedPercentile, warmSpellDurIndex, coldSpellDurIndex, countDaysPrecipExceedAmount, percentDaysMinTempBelowQuantile, percentDaysMaxTempBelowQuantile, percentDaysMinTempAboveQuantile, percentDaysMaxTempAboveQuantile, maxOfAccumulatedPet, sumOfGDD, sumOfPET, sumOfPrecip, sumOfSolar, averageMaxTemp, averageMinTemp, averageMaxRH, averageMinRH,averageWind, and maxWindGust |
season.monthDay_start |
Specify the start month-day combination of the "season" you want analyzed (optional) |
season.monthDay_end |
Specify the end month-day combination of the "season" you want analyzed (optional) |
years.LTN |
specify the years over which you want the LTN calculated. Defaults to 2006-2020 (optional) |
title |
character string of title to assign to the plot. (optional) |
e_precip |
logical, if set to TRUE, effective precipitation will be calculated and charted based on e_threshold. Default is set to FALSE. (optional) |
e_threshold |
numeric value (in milimeters) for the daily maximum used to calculate effective precipitation if e_precip is set to TRUE. (optional) |
yAxisLimits |
Used to set the limits of the y axis explicitly. If used, must be a two element vector of the form c(minValue, maxValue) (optional) |
size_font_main_title |
Font size of main title of graph (optional) |
size_font_axis_titles |
Font size of axes on graph (optional) |
size_font_axis_labels |
Font size of labels on axes on graph (optional) |
size_font_legend_entries |
Font size of entries in lengend on graph (optional) |
line_width |
Font size for line geometries on charts (optional) |
annotationsWhichSide |
Whether to plot annotations on left or right side of figure (optional) |
indexSpecificValue |
For the Climate Indices this tool can plot the user can override the default value of the index using this parameter (optional) |
offline_mode |
Set to TRUE to work in offline mode and not attempt to fetch data from the aWhere API (optional) |
doRoll |
apply a rolling average to the calculation. |
rolling_window |
numeric value for the number of days to use in rolling average calculations. Default value is 30. (optional) |
This function extends the aWhere charts package to plot the ETCCDI climate change indices (reference below). Most indices are implement3e with the default behavior described int he publication. Default values of the indices can be overriden using the "indexSpecificValue" parameter. Applies a summary statistic over each year/season of data and then fits trend line to that data across all LTN years
Also has helper functions including to automatically (with user permission) download missing but needed data and store in the aWhereEnv to persist it throughout a user R session.
plot object
http://etccdi.pacificclimate.org/list_27_indices.shtml
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.