get_closest_noaa_station: Find the closest NOAA station

Description Usage Arguments Value Examples

View source: R/helpers.R

Description

Finds the closest NOAA station based on a given latitude, longitude. Only considers NOAA stations that contain temperature, precipitation, and wind speed for the provided dates and are within +/- 1 degree.

Usage

1
get_closest_noaa_station(.date_start, .date_end, lat, long)

Arguments

.date_start

the starting date that the NOAA station should contain data for

.date_end

the ending date that the NOAA station should contain data for

lat

a double representing latitude

long

a double representing longitude

Value

string containing the NOAA station ID

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
set_api_key_noaa('<token>')
date_start <- '2021-09-10'
date_end <- '2021-09-22'
lat <- 40.7812
long <- -73.9665
get_closest_noaa_station(date_start, date_end, lat, long)

## End(Not run)

joemarlo/simpleweather documentation built on Dec. 21, 2021, 1:19 a.m.