View source: R/weatherHelper.R
stationTrend | R Documentation |
Plot a comparison of weather stations returned by
stationCompare
stationTrend(weather, var = "aveTemp", days = 60, type = "actual")
weather |
a weather dataset returned by read.ghcn |
var |
The variable to plot. Optional, defaults to "aveTemp". Can
also be "tmin" or "tmax". See |
days |
The number of days for the rolling average. Optional, defaults to 14. |
type |
The type of view, can be "actual" or "relative". "actual" will plot the recorded temperatures, while "relative" will plot the temperatures with reference to the mean temperature. "relative" tends to be more useful in visualizing the differences between stations. This argument is optional and defaults to "relative". |
a list containing "data" the dataset w/ additional smoothed variable(s) and "plot", the ggplot object
stationSearch
stationComp
plot.stationComp
read.ghcn
# Look at the last 5 years from Ted Stevens Intl Airport in Alaska anc <- read.ghcn("GHCND:USW00026451", "2010-01-01", "2015-04-15") ancTrend <- stationTrend(anc) ancTrend$plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.