seasonalShift: Plot seasonal shifts in GSOD temperature data

View source: R/seasonalShift.R

seasonalShiftR Documentation

Plot seasonal shifts in GSOD temperature data

Description

This function aims at visualizing seasonal shifts in GSOD data aggregated on a monthly level. The seasonal shifts are derived from a harmonic trend model fitted to the desired start and end range of a measurement series.

Usage

seasonalShift(
  fls,
  start = c("1973-01-01", "1977-12-31"),
  end = c("2008-01-01", "2012-12-31"),
  prm = "TEMP",
  stations,
  ...
)

Arguments

fls

Character vector containing filepath(s) to the GSOD data set(s) to visualize, or list containing data.frame objects holding the data, or a single data.frame in case only one GSOD station shall be visualized.

start

Character. A vector containing the temporal range of the start interval to fit a harmonic trend model to.

end

Character. A vector containing the temporal range of the end interval to fit a harmonic trend model to.

prm

Character, default is "TEMP". Determines which parameter to visualize.

stations

Character. Name(s) of the station(s) corresponding to fls that will be displayed above each facet.

...

Additional arguments passed to element_text.

Value

An object of class ggplot.

Author(s)

Florian Detsch

Examples

# visualize seasonal shifts in monthly averaged air temperature
cleansed_data = subset(
  eastafrica
  , Status == "cleansed"
)

cleansed_list = split(
  cleansed_data
  , f = cleansed_data$PlotId
)

seasonalShift(
  cleansed_list
  , start = c("1980-01-01", "1983-12-31")
  , end = c("1998-01-01", "2000-12-31")
  , stations = c("Kilimanjaro Intl. Airport", "Jomo Kenyatta Intl. Airport")
  , prm = "MAX"
)


environmentalinformatics-marburg/GSODTools documentation built on Jan. 5, 2024, 12:19 a.m.