Make a dygraph of recent daily maximum temperature data from Buffalo, NY.
First use the following code to download the daily weather data.
library(rnoaa)
library(xts)
library(dygraphs)
d=meteo_tidy_ghcnd("USW00014733",
date_min = "2016-01-01",
var = c("TMAX"),
keep_flags=T)
d$date=as.Date(d$date)
Remaining steps:
d into an xts time series object using xts(). You will need to specifify which column has the data (d$tmax) and order.by=d$date. See ?xts for help.dygraph() to draw the plotmain="Daily Maximum Temperature in Buffalo, NY"dyRangeSelector() with a dateWindow of c("2017-01-01", "2017-12-31")Your final graph should look something like this: