Skip to content

Instantly share code, notes, and snippets.

@ellisvalentiner
Last active September 21, 2016 02:11
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 ellisvalentiner/183657b640fc49305164b9a867c7724b to your computer and use it in GitHub Desktop.
Save ellisvalentiner/183657b640fc49305164b9a867c7724b to your computer and use it in GitHub Desktop.
library(httr)
baseurl = "https://api.darksky.net/forecast"
url = sprintf("%1$s/%2$s/%3$s/%4$s", baseurl, Sys.getenv("DARKSKY_API_KEY"), lat, lng)
resp = GET(url)
content(resp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment