timespline: 2D smoothed plots of data by year and day of year.

Description Usage Arguments Value Author(s)

View source: R/time_spline_plot.r

Description

This function produces a 2D field plot of a value, with the x-axis representing year, and the y-axis representing day of year (julian day). A raw plot, and a plot with a 2D spline smooth are produced. These plots are useful for visually examining seasonal trends and cycles in meteorological variables over long time periods.

Usage

1
timespline(data, datevar, plotvar, k = 40, hinge = F, col = div_pal(256))

Arguments

data

A data frame containing the input data.

datevar

The name of the column in the data frame containing the date of the observation. This should contain a Date-type value, as formatted by the as.Date function.

plotvar

The name of column in the data frame containing the numeric variable to plot.

k

The degree of spline smoothing to be performed. Higher values give more detailed plots, but may overfit.

hinge

True/False - should the data be hinged over the middle of the year? If false, the y-axis of the plot represents day of year from 1 to 365. If true, values range from 0 to 1 representing "winterness" and "summerness".

col

A palette specification.

Value

Outputs a plot with two panels, one with raw data, and one with 2D spline-smoothed values.

Author(s)

Grant Williamson


ozjimbob/ecbtools documentation built on Jan. 18, 2021, 7:39 p.m.