kNStations: Get the k-nearest weather stations to a city

Description Usage Arguments Value Examples

Description

Using either an individual city or a list of cities, this will find a reference point for each location and return the k-nearest weather stations to that reference point.

Usage

1
kNStations(city.list, station.list, k = 5)

Arguments

city.list

List of cities. Format should be: "City, State", or "City, Country"

station.list

Full list of ISD stations included in the package

k

The number of stations to return

Value

Returns the k-nearest weather stations in the full ISD station.list

Examples

1
2
3
4
5
6
## Not run: 
data(stations)
cities <- c("Nairobi, Kenya", "Tema, Ghana", "Accra, Ghana", "Abidjan, Ivory Coast")
k.n.stations <- kNStations(cities, station.list, 5)

## End(Not run)

mpiccirilli/weatheR documentation built on May 23, 2019, 6:28 a.m.