| inmet_stations | R Documentation |
Returns automatic weather stations published by INMET. By default, the function uses a cached copy of the official API response and refreshes stale caches periodically. If the service is unavailable, it falls back to an older cache or to the smaller catalogue bundled with the package.
inmet_stations(
region = NULL,
state = NULL,
search = NULL,
status = NULL,
entity = NULL,
source = c("auto", "remote", "bundled"),
refresh = FALSE,
max_age = 30,
cache_dir = tools::R_user_dir("rmet", "cache"),
quiet = FALSE
)
region, state |
Optional region or state abbreviations. |
search |
Optional literal text contained in the station name or code. |
status |
Optional operational status, such as |
entity |
Optional station owner/provider, such as |
source |
One of |
refresh |
Force a fresh request to the official API. |
max_age |
Maximum cache age in days before an automatic refresh. |
cache_dir |
Directory used for the catalogue cache. |
quiet |
Suppress informational messages. |
A data frame with station code, name, region, state, coordinates,
altitude, operational dates and status, and provider metadata. The legacy
start_year column is retained for compatibility.
inmet_get(), inmet_read()
# Offline, reproducible example using the bundled fallback
inmet_stations(state = "RS", source = "bundled")
# Current official catalogue (downloaded once and then cached)
inmet_stations(state = "RS", refresh = TRUE, cache_dir = tempdir())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.