get.weather: OpenWeatherMapR

Description Usage Arguments Value Author(s) Examples

View source: R/get.weather_function.R

Description

Returns weather metrics for specified Location and Date Range from the Open Weather Map API

Usage

1
get.weather(key, lat, lon, daterange)

Arguments

key

string Your Open Weather Map API key.

location

Latitude, Longitude

date

Date range: "2021-07-01" or list of dates example - list("2021-07,01","2021-07-02")

Value

Table containing weather information.

Author(s)

Chloe Morgan

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 

Example One

apikey <- '222e546c9302a140b65a4aa0ab9566a2'
date <- "2021-09-11"
lat <- 53.480759
lon <- -2.242631

df <- get.weather(apikey,lat,lon,date)


Example Two

apikey <- '222e546c9302a140b65a4aa0ab9566a2'
date <- list("2021-09-11", "2021-09-10","2021-09-09")
lat <- 53.480759
lon <- -2.242631

df <- get.weather(apikey,lat,lon,date)


## End(Not run)

chloeanalyst/openweatherr documentation built on Dec. 19, 2021, 3:58 p.m.