Description

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().

Example

# 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")


UBC-MDS/weatheR documentation built on May 21, 2019, 12:03 p.m.