find_closest_site: Find the closest forecast or observations site to an...

Description Usage Arguments Examples

View source: R/find_closest_site.R

Description

Calls either forecast_list_sites() or observations_list_sites() and returns the closest site to any lat long point.

Usage

1
2
find_closest_site(lat, long, observations = FALSE, site_count = 1,
  cached_sites = NULL)

Arguments

lat

Decimal latitude

long

Decimal longitude

observations

Boolean. FALSE (default) returns a forecast location. TRUE returns a past 24 hour observations location.

site_count

Number of sites to return. Defaults to 1 but may be increased if data from the closest site presents problems.

cached_sites

Optionally pass output from a forecast_list_sites() call or observations_list_sites() to the function. If not included, a site list will be requested from the api.

Examples

1
find_closest_site(lat = 53.8059821, long = -1.6057714, observations = TRUE, site_count = 5)

neilcharles/meteoR documentation built on May 17, 2020, 3:27 p.m.