Skip to content

Instantly share code, notes, and snippets.

@BernardOng
Created August 4, 2016 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BernardOng/0600b0c12d0855eaad947e911014d006 to your computer and use it in GitHub Desktop.
Save BernardOng/0600b0c12d0855eaad947e911014d006 to your computer and use it in GitHub Desktop.
# ----- load the localized weather info from CSV file
wdf <- read.csv("NYCW2.csv")
wdf1 <- xts(wdf[,-1],order.by=as.Date(wdf$EST))
colnames(wdf1) = c("MaxTemp","MeanTemp","MinTemp","MaxDew","MeanDew","MinDew","MaxHum",
"MeanHum","MinHum","MaxSeaP","MeanSeaP","MinSeaP","MaxVis","MeanVis","MinVis",
"MaxWind","MeanWind","MaxGust","Rain","Cloud","WindDeg")
# ----- get weather info and convert to time series and filter on dates
wdf2 <- getWeatherXts(input$wparm,wdf1)
wdf2 <- wdf2[paste0(input$drange[1],'/',input$drange[2])]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment