ver_map {SeaVal}R Documentation

Plot a verification map of percentiles

Description

For each location, the map shows whether the observed value was normal, below, or above. This makes it possible to visually compare to the usual tercile forecsst

Usage

ver_map(
  dt,
  o = obs_cols(dt),
  yy = dt[, max(year)],
  climatology_period = unique(dt[, year]),
  out_file = NULL
)

Arguments

dt

input data table. This has to contain the observations for the year to plot, as well as for many other years (which are used to calculate the climatological reference). The data table should have coumns named lon, lat, year, and an observation column, the name of which is passed as value of o to the function, see below. For each level of lon, lat, and year, the table should only contain one row (this is checked by the function).

o

name of the column containing the observation.

yy

The year for which to show the verification map. Defaults to the last year available in dt

climatology_period

which years should the climatology be calculated on? Defaults to all years (except yy) in dt

out_file

optional path and file name (including valid filetype, like .pdf or .png) for saving the file. If not provided, the function just shows the plot in the running R session.

Value

a gg object

Examples


# takes some time:
pp = ver_map(chirps_monthly[month == 11],yy = 2018)
if(interactive()) plot(pp)


[Package SeaVal version 1.2.0 Index]