inmet_stations: Search the INMET automatic-station catalogue

View source: R/stations.R

inmet_stationsR Documentation

Search the INMET automatic-station catalogue

Description

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.

Usage

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
)

Arguments

region, state

Optional region or state abbreviations.

search

Optional literal text contained in the station name or code.

status

Optional operational status, such as "Operante" or "Pane".

entity

Optional station owner/provider, such as "INMET".

source

One of "auto", "remote", or "bundled". "auto" uses the cache, then the official API, then the bundled fallback.

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.

Value

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.

See Also

inmet_get(), inmet_read()

Examples

# 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())


rmet documentation built on Sept. 21, 2026, 5:08 p.m.