isd_stations_search: Search for NOAA ISD/ISH station data from NOAA FTP server.

Description Usage Arguments Details Value References See Also Examples

View source: R/isd_stations_search.R

Description

Search for NOAA ISD/ISH station data from NOAA FTP server.

Usage

1
isd_stations_search(lat = NULL, lon = NULL, radius = NULL, bbox = NULL)

Arguments

lat

(numeric) Latitude, in decimal degree

lon

(numeric) Latitude, in decimal degree

radius

(numeric) Radius (in km) to search from the lat,lon coordinates

bbox

(numeric) Bounding box, of the form: min-longitude, min-latitude, max-longitude, max-latitude

Details

We internally call isd_stations() to get the data.frame of ISD stations, which is quite fast as long as it's not the first time called since we cache the table. Before searching, we clean up the data.frame, removing stations with no lat/long coordinates, those with impossible lat/long coordinates, and those at 0,0.

When lat/lon/radius input we use meteo_distance() to search for stations, while when bbox is input, we simply use dplyr::filter()

Value

a data.frame with the columns:

References

ftp://ftp.ncdc.noaa.gov/pub/data/noaa/

See Also

Other isd: isd_read(), isd_stations(), isd()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
## lat, long, radius
isd_stations_search(lat = 38.4, lon = -123, radius = 250)

x <- isd_stations_search(lat = 60, lon = 18, radius = 200)

if (requireNamespace("leaflet")) {
  library("leaflet")
  leaflet() %>%
    addTiles() %>%
    addCircles(lng = x$lon,
               lat = x$lat,
               popup = x$station_name) %>%
    clearBounds()
}

## bounding box
bbox <- c(-125.0, 38.4, -121.8, 40.9)
isd_stations_search(bbox = bbox)

## End(Not run)

rnoaa documentation built on May 19, 2021, 9:13 a.m.