Learn R Programming

GSODR (version 1.0.0)

nearest_stations: Find Nearest GSOD Stations to Specified Latitude and Longitude

Description

Given a latitude and longitude value entered as decimal degrees (DD), this function returns a list of STNID values, which can be used in the get_GSOD function to query for specific stations as an argument in the station parameter of that function.

Usage

nearest_stations(LAT, LON, distance)

Arguments

LAT
Latitude expressed as decimal degrees (DD) [WGS84]
LON
Longitude expressed as decimal degrees (DD) [WGS84]
distance
Distance in kilometres from point for which stations are to be returned.

Value

vector object of station identification numbers

Examples

Run this code
## Not run: 
# # Find stations within a 100km radius of Toowoomba, QLD, AUS
# 
# n <- nearest_stations(LAT = -27.5598, LON = 151.9507, distance = 100)
# ## End(Not run)

Run the code above in your browser using DataLab