#install.packages("darksky")
library(darksky)
library(tidyverse)
# current verison
packageVersion("darksky")
Sys.setenv("DARKSKY_API_KEY" = # Secret API Key
)
Sys.getenv("DARKSKY_API_KEY")
#This coordinates works
now <- get_current_forecast(43.2672, -70.8617)
print(now)
Trying to extract temperature info for London ...
seq(as.Date("2000-01-01"), as.Date("2001-01-01"), "day") %>%
map(~get_forecast_for(51.5074, 0.1278, .x)) %>%
map_df("daily") %>%
ggplot(aes(x=time, y=temperature)) +
geom_line()´
But got access forbidden HTTP 403 error