if (FALSE) {
station_data <- ghcnd_stations() # Takes a while to run
lat_lon_df <- data.frame(id = c("sydney", "brisbane"),
latitude = c(-33.8675, -27.4710),
longitude = c(151.2070, 153.0234))
nearby_stations <- meteo_nearby_stations(lat_lon_df = lat_lon_df,
station_data = station_data, radius = 10)
miami <- data.frame(id = "miami", latitude = 25.7617, longitude = -80.1918)
# Get all stations within 50 kilometers
meteo_nearby_stations(lat_lon_df = miami, station_data = station_data,
radius = 50, var = c("PRCP", "TMAX"),
year_min = 1992, year_max = 1992)
# Get the closest 10 monitors
meteo_nearby_stations(lat_lon_df = miami, station_data = station_data,
limit = 10, var = c("PRCP", "TMAX"),
year_min = 1992, year_max = 1992)
}
Run the code above in your browser using DataLab