View source: R/meteo_distance.R
meteo_process_geographic_data | R Documentation |
This function takes a single location and a dataset of available weather stations and calculates the distance between the location and each of the stations, using the great circle method. A new column is added to the dataset of available weather stations giving the distance between each station and the input location. The station dataset is then sorted from closest to furthest distance to the location and returned as the function output.
meteo_process_geographic_data(station_data, lat, long, units = "deg")
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:
|
The station_data
dataframe that is input, but with a
distance
column added that gives the distance to the location
(in kilometers), and re-ordered by distance between each station and
the location (closest weather stations first).
Alex Simmons a2.simmons@qut.edu.au, Brooke Anderson brooke.anderson@colostate.edu
## Not run:
station_data <- ghcnd_stations()
meteo_process_geographic_data(station_data, lat=-33, long=151)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.