This package provides four useful wrapper functions around the OpenWeatherMap API. The four functions are: distmap()
, cloudmap()
, get_weather()
, get_weather_four_days()
and cwd()
.
# load package library(weatheR) api <- "&APPID=8196eccade1594d99afd30e0924dca7d" # Calculate distance between two cities distmap(api, 'vancouver', 'toronto') # Returns a plot showing how dense clouds are in the area cloudmap(api, 'alberta', dense = 0.2 ) # Returns weather forecast for the next 24 hours for selected city get_weather(api, vancouver): # Returns 4-day weather forecast for selected city get_weather_four_days(api, 'vancouver') # Get current weather description cwd(api,"vancouver")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.