https://github.com/cran/FedData
Raw File
Tip revision: ec6fb1cf6e009ff2cbdea0287158d33821578667 authored by R. Kyle Bocinsky on 17 March 2024, 00:40:03 UTC
version 4.0.1
Tip revision: ec6fb1c
get_ghcn_inventory.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GHCN_FUNCTIONS.R
\name{get_ghcn_inventory}
\alias{get_ghcn_inventory}
\title{Download and crop the inventory of GHCN stations.}
\usage{
get_ghcn_inventory(template = NULL, elements = NULL, raw.dir)
}
\arguments{
\item{template}{An \code{\link[sf:sf]{Simple Feature}}
or \code{\link[terra:SpatRaster-class]{SpatRaster}} object to serve as a template for cropping.}

\item{elements}{A character vector of elements to extract.
Common elements include 'tmin', 'tmax', and 'prcp'.}

\item{raw.dir}{A character string indicating where raw downloaded files should be put.
The directory will be created if missing.}
}
\value{
A \code{\link[sf:sf]{Simple Feature}} of the GHCN stations within
the specified \code{template}
}
\description{
\code{get_ghcn_inventory} returns a \code{SpatialPolygonsDataFrame} of the GHCN stations within
the specified \code{template}. If template is not provided, returns the entire GHCN inventory.
}
\details{
Stations with multiple elements will have multiple points. This allows for easy mapping of stations
by element availability.
}
\keyword{internal}
back to top