read_noaa: Get NOAA Weather Forcast URL for a Location

View source: R/noaa.R

noaa_urlR Documentation

Get NOAA Weather Forcast URL for a Location

Description

Get NOAA Weather Forcast URL for a Location

Get NOAA Weather Forcast for a Location

Usage

noaa_url(lat, lon, format = c("xml", "html"))

read_noaa(url, tz = timezone())

Arguments

lat, lon

(numeric) A lattitude and the longitude.

format

(character) Should an XML or an HTML document be retrieved?

url

(character) A NOAA URL to download and parse.

tz

(character) The timezone for all retrieved timestamps.

Value

'noaa_url()' returns a URL (character).

'read_noaa()' returns a [tibble::tibble] [base::data.frame] with forecasted weather data.

Examples

coord <- c(lat=37.475400, lon=-121.861300)
url <- noaa_url(coord)
print(url)
wx <- read_noaa(url)
print(wx)


BHGC/bhgc.wx documentation built on April 7, 2022, 3:47 a.m.