Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201919

How can we extract London weather in 2000 via Darksky API?

$
0
0
#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


Viewing all articles
Browse latest Browse all 201919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>