Description Usage Arguments Value Author(s) Examples
View source: R/meteo_distance.R
This function will identify all weather stations with a specified radius of
a location. If no radius is given, the function will return a dataframe
of all available monitors, sorted by distance to the location. The
limit
argument can be used to limit the output dataframe to the [x]
closest monitors to the location.
1 2 | meteo_distance(station_data, lat, long, units = "deg", radius = NULL,
limit = NULL)
|
station_data |
The output of |
lat |
Latitude of the location. Southern latitudes should be given as negative values. |
long |
Longitude of the location. Western longitudes should be given as negative values. |
units |
Units of the latitude and longitude values. Possible values are:
|
radius |
A numeric vector giving the radius (in kilometers) within which to search for monitors near a location. |
limit |
An integer giving the maximum number of monitors to include for each location. The [x] closest monitors will be kept. Default is NULL (pull everything available, within the radius if the radius is specified). |
A dataframe of weather stations near the location. This is the
single-location version of the return value for
meteo_nearby_stations
.
Alex Simmons a2.simmons@qut.edu.au, Brooke Anderson brooke.anderson@colostate.edu
1 2 3 4 5 6 7 8 9 | ## Not run:
station_data <- ghcnd_stations()
meteo_distance(station_data, -33, 151, radius = 10, limit = 10)
meteo_distance(station_data, -33, 151, radius = 10, limit = 3)
# FIXME - units param is ignored
#meteo_distance(station_data, -33, 151, units = 'rad', radius = 10, limit = 3)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.