# NOT RUN {
# Get data
ghcnd(stationid = "AGE00147704")
stations <- ghcnd_stations()
ghcnd(stations$id[40])
ghcnd(stations$id[4000])
ghcnd(stations$id[10000])
ghcnd(stations$id[80000])
ghcnd(stations$id[80300])
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))
library("ggplot2")
ggplot(subset(alldat$tmax, tmax >= 0), aes(date, tmax)) + geom_point()
## using dplyr
library("dplyr")
dat <- ghcnd(stationid = "AGE00147704")
dat %>%
filter(element == "PRCP", year == 1909)
# }
Run the code above in your browser using DataLab