Description Usage Arguments Output Details See Also Examples
View source: R/autoplot_climatology_map.R
This function calls the function calc_index
and plots the mean, median, min, max or standard deviation of the index values over the whole time series in a map. It can be used for either gridded or station data or a combination of both.
To see some example outputs of this function, look at the vignette "autoplot-functions" accesible through the package help main page or by typing
vignette("autoplot-functions",package="ClimIndVis") into the console.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
dat_grid |
Climindvis-object with type = "grid" generated by |
dat_p |
Climindvis-object with type = "p" generated by |
index |
Name of index to be calculated., e.g. index = "dd" or index = "tnn". For list of indices see |
index_args |
List of arguments for index. See |
plot_value |
Climatological value to plot. One of the following character strings: "mean", "median", "min", "max", "sd" (=standard deviation), or "relsd" (sd/abs(mean)) and "percentile". For percentile, the parameter perc has to be defined, also see parameter perc. Default = "mean". |
perc |
Integer value between 0 and 100 for percentile to be calculated. Only if plot_value="percentile". |
selyears |
Integer array of years to be selected from data. For indices with quantiles, years as defined in index_args are used for quantile calculation, but only selected years are plotted. For functions using seasonal forecast data, selyears is only applied to hindcasts. |
NAmaxClim |
Integer [0,100]. Maximum percentage of years with missing values for calculation of climatology. If exceeded value for respective grid point/station is set to NA. Default = 20 ( = 20"%"). |
col |
Array of colors for plotting of length 3 or longer (must be a valid arguments to |
title |
Optional. Character string. If provided added above the plot in addition to default information from the respective function (e.g. index name/aggregation/time period/...). Default = "", no additional title is written. |
plot_title |
Logical. Add plot title to graphic. Default = TRUE. |
plot_args |
Optional. List of arguments passed to plotting function, see |
output |
Format of image to be plotted ("png", "jpeg", "tiff", "pdf","dev.new"). Default = NULL, output to null device (getOption("device") will show you the null device. If you are not using RStudio, NULL and dev.new will give the same output). |
plotdir |
Character string of path of directory for saving plots. Ignored if output is NULL or "dev.new". |
plotname |
Optional. Character string. First part of plot name followed by character string containing index name/aggregation/time period/... depending on the autoplot function. Default = "". |
This function returns one plot per temporal aggregation whch is covered by the data( e.g. if aggt="seasonal" it would return 4 graphics, one for each season).
If output is not NULL or "dev.new" the graphics are directly saved in the user specified directory (plotdir) with the following filename structure:
plotname // index name // plot_value // aggregation // years // output
e.g.:
plotname"_dry_days_mean_MAM_1981-2010.png
Please note that calculating the mean does not make sense for indices based on the number of days above/below a quantile threshold (e.g. tn10p,tn90p)
When using ensemble data, the plot value is calculated over the whole ensemble (i.e. ensemble mean/min/max/... over all ensemble members and the whole time period).
Other autoplot_functions:
autoplot_anomaly_map()
,
autoplot_anomaly_ts()
,
autoplot_forecast_map()
,
autoplot_forecast_spi()
,
autoplot_forecast_stations()
,
autoplot_overview_stations()
,
autoplot_trend_map()
,
autoplot_ts_stations()
,
autoplot_verification_map()
1 2 3 4 5 6 7 8 9 10 11 12 | data(object_st, object_grid)
autoplot_climatology_map(
dat_grid = object_grid, dat_p = object_st,
index = "tnn", index_args = list(aggt = "seasonal", selagg = "JJA"),
plot_value = "min" , selyears = c(2000:2010))
data(object_hc_grid)
index_args=list(aggt = "dates", start_days = "0000-01-15", end_days = "0000-04-15")
autoplot_climatology_map(
dat_grid = object_hc_grid,
index = "dd", index_args = index_args,
plot_value = "min" , selyears = c(2000:2010))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.