# NOT RUN {
# Get data
ghcnd(stationid = "AGE00147704")
stations <- ghcnd_stations()
ghcnd(stations$id[40])
library("dplyr")
ghcnd(stations$id[80300]) %>% select(id, element) %>% slice(1:3)
# manipulate data
## using built in fxns
dat <- ghcnd(stationid = "AGE00147704")
(alldat <- ghcnd_splitvars(dat))
## using dplyr
library("dplyr")
dat <- ghcnd(stationid = "AGE00147704")
dat %>%
filter(element == "PRCP", year == 1909)
# refresh the cached file
ghcnd(stationid = "AGE00147704", refresh = TRUE)
# Read in a .dly file you've already downloaded
path <- system.file("examples/AGE00147704.dly", package = "rnoaa")
ghcnd_read(path)
# }
Run the code above in your browser using DataLab