mywx_forecast: Retrieve forecast data for a location

Description Usage Arguments Details Note References

Description

This is a WIP. The data returned is in a sub-optimal format that requires conversion of some data frame column values to numeric to use.

Usage

1
2
3
mywx_forecast(location_id, start_date = Sys.Date(), end_date = Sys.Date(),
  dataset_id = "FORECAST", data_category_id = "GENERAL",
  mywx_api_token = Sys.getenv("MYWX_TOKEN"))

Arguments

location_id

valid location id retrieved from one of the location helpers

start_date, end_date

either character vectors in ISO 8601 format or Date-like objects. They both default to "today" if not specified

dataset_id

the current only valid default, FORECAST, is pre-populated

data_category_id

the current only valid default, GENERAL is pre-populated

mywx_api_token

MET API token

Details

You need a valid token either passed in to mywx_api_token or stored in the MYWX_TOKEN environment variable, preferably in ~/.Renviron.

Note

Maximum burst requests is 10 per minute and maximum sustained requests is 1,000 per day.

References

https://api.met.gov.my/dashboard/docs


hrbrmstr/mywx documentation built on May 31, 2019, 3:54 a.m.