
Import station inventory for the Global Historical Climatology Network
Source:R/import_ghcn_stations.R
import_ghcn_inventory.RdThis function accesses a data inventory of GHCN stations available through
either the GHCNh or GHCNd. The returned data.frame contains data which
reveals the earliest and latest years of data available for each station from
the NOAA database.
Usage
import_ghcn_inventory(
database = c("hourly", "daily"),
pivot = c("wide", "long"),
progress = rlang::is_interactive()
)Arguments
- database
One of
"hourly"or"daily", which defines whether to import the GHCNh or GHCNd inventory. The way in which these files is formatted is different.- pivot
One of
"wide"or"long". The GHCNh inventory can be returned in a"wide"format (withid,yearand twelve month columns) or a"long"format (withid,year,month, andcountcolumns). Does not apply to the GHCNd inventory.- progress
The inventory file is large and can be slow to download. Show a progress indicator when accessing the inventory? Defaults to
TRUEin interactive R sessions. Passed toprogressinreadr::read_fwf()and/orpurrr::pmap().
Value
a tibble
See also
Other GHCN functions:
import_ghcn_countries(),
import_ghcn_daily(),
import_ghcn_hourly(),
import_ghcn_monthly_temp(),
import_ghcn_stations()