| Title: | Download Radar Data for Biological Research |
|---|---|
| Description: | Load polar volume and vertical profile data for aeroecological research directly into R. With 'getRad' you can access data from several sources in Europe and the US and standardize it to facilitate further exploration in tools such as 'bioRad'. |
| Authors: | Bart Kranstauber [aut, cre] (ORCID: <https://orcid.org/0000-0001-8303-780X>, affiliation: University of Amsterdam), Pieter Huybrechts [aut] (ORCID: <https://orcid.org/0000-0002-6658-6062>, affiliation: Research Institute for Nature and Forest (INBO)), Peter Desmet [aut] (ORCID: <https://orcid.org/0000-0002-8442-8025>, affiliation: Research Institute for Nature and Forest (INBO)), Cecilia Nilsson [ctb] (ORCID: <https://orcid.org/0000-0001-8957-4411>, affiliation: Lund University), Alexander Tedeschi [ctb] (ORCID: <https://orcid.org/0000-0003-0772-6931>, affiliation: Cornell Lab of Ornithology), Hidde Leijnse [ctb] (ORCID: <https://orcid.org/0000-0001-7835-4480>, affiliation: Royal Netherlands Meteorological Institute), Bart Hoekstra [ctb] (ORCID: <https://orcid.org/0000-0002-7085-3805>, affiliation: University of Amsterdam), University of Amsterdam [cph] (ROR: <https://ror.org/04dkp9463>), Biodiversa+ [fnd] (https://hirad.science/) |
| Maintainer: | Bart Kranstauber <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.2.4.9000 |
| Built: | 2026-06-09 13:49:23 UTC |
| Source: | https://github.com/aloftdata/getrad |
Gets polar volume data from supported sources and returns it as a (list of)
polar volume objects. The source is automatically
detected based on the provided radar.
get_pvol(radar = NULL, datetime = NULL, ...)get_pvol(radar = NULL, datetime = NULL, ...)
radar |
Name of the radar (odim code) as a character string (e.g.
|
datetime |
Either:
|
... |
Additional arguments passed on to reading functions, for example
|
For more details on supported sources, see vignette("supported_sources"). Within
supported countries there might also be temporal restrictions on the radars that
are operational. For example, radars with the status 0 in get_weather_radars("opera")
are currently not operational.
Not all radars in the nexrad archive can be read successfully. Radars associated
with the Terminal Doppler Weather Radar (TDWR) program can not be read. These can
be identified using the stntype column in get_weather_radars("nexrad").
Either a polar volume or a list of polar volumes. See
bioRad::summary.pvol() for details.
# Get PVOL data for a single radar and datetime get_pvol("deess", as.POSIXct(Sys.Date())) # Get PVOL data for multiple radars and a single datetime get_pvol( c("deess", "dehnr", "fianj", "czska", "KABR"), as.POSIXct(Sys.Date()) )# Get PVOL data for a single radar and datetime get_pvol("deess", as.POSIXct(Sys.Date())) # Get PVOL data for multiple radars and a single datetime get_pvol( c("deess", "dehnr", "fianj", "czska", "KABR"), as.POSIXct(Sys.Date()) )
Gets vertical profile time series data from supported sources and returns it
as a (list of) of vpts objects or a
dplyr::tibble().
get_vpts( radar, datetime, source = c("baltrad", "uva", "ecog-04003", "rmi", "birdcast"), return_type = c("vpts", "tibble") )get_vpts( radar, datetime, source = c("baltrad", "uva", "ecog-04003", "rmi", "birdcast"), return_type = c("vpts", "tibble") )
radar |
Name of the radar (odim code) as a character string (e.g.
|
datetime |
Either:
|
source |
Source of the data. One of |
return_type |
Type of object that should be returned. Either:
|
For more details on supported sources, see vignette("supported_sources").
In that case data is read from the directory, file in the directory
should be structures like they are in the monthly folders of the aloft
repository. To specify an alternative structure the
"getRad.vpts_local_path_format" option can be used. This can, for
example, be used to read daily data. Some example options for the glue
formatters are:
"{radar}/{year}/{radar}_vpts_{year}{month}.csv.gz": The default format,
the same structure as the monthly directories in the aloft repository. Or as
contained in the tgz files in the aloft zenodo repository.
"{substr(radar, 1,2)}/{radar}/{year}/{radar}_vpts_{year}{month}.csv.gz":
The format as in the files in the zenodo aloft repository
"{radar}/{year}/{radar}_vpts_{year}{month}{day}.csv": The format as daily
data is stored in aloft data
Besides the examples above there is a date object available for formatting.
Either a vpts object, a list of vpts objects or a tibble. See bioRad::summary.vpts for details.
# Get VPTS data for a single radar and date get_vpts(radar = "bejab", datetime = "2023-01-01", source = "baltrad") get_vpts(radar = "bejab", datetime = "2020-01-19", source = "rmi") # Get VPTS data for multiple radars and a single date get_vpts( radar = c("dehnr", "deflg"), datetime = lubridate::ymd("20171015"), source = "baltrad" ) # Get VPTS data for a single radar and a date range get_vpts( radar = "bejab", datetime = lubridate::interval( lubridate::ymd_hms("2023-01-01 00:00:00"), lubridate::ymd_hms("2023-01-02 00:14:00") ), source = "baltrad" ) get_vpts("bejab", lubridate::interval("20210101", "20210301")) # Get VPTS data for a single radar, date range and non-default source get_vpts(radar = "bejab", datetime = "2016-09-29", source = "ecog-04003") # Return a tibble instead of a vpts object get_vpts( radar = "chlem", datetime = "2023-03-10", source = "baltrad", return_type = "tibble" ) #' Get VPTS data from the public BirdCast NEXRAD archive get_vpts(radar = "KABR", datetime = "2023-01-01", source = "birdcast")# Get VPTS data for a single radar and date get_vpts(radar = "bejab", datetime = "2023-01-01", source = "baltrad") get_vpts(radar = "bejab", datetime = "2020-01-19", source = "rmi") # Get VPTS data for multiple radars and a single date get_vpts( radar = c("dehnr", "deflg"), datetime = lubridate::ymd("20171015"), source = "baltrad" ) # Get VPTS data for a single radar and a date range get_vpts( radar = "bejab", datetime = lubridate::interval( lubridate::ymd_hms("2023-01-01 00:00:00"), lubridate::ymd_hms("2023-01-02 00:14:00") ), source = "baltrad" ) get_vpts("bejab", lubridate::interval("20210101", "20210301")) # Get VPTS data for a single radar, date range and non-default source get_vpts(radar = "bejab", datetime = "2016-09-29", source = "ecog-04003") # Return a tibble instead of a vpts object get_vpts( radar = "chlem", datetime = "2023-03-10", source = "baltrad", return_type = "tibble" ) #' Get VPTS data from the public BirdCast NEXRAD archive get_vpts(radar = "KABR", datetime = "2023-01-01", source = "birdcast")
Gets the VPTS file coverage from supported sources per radar and date.
get_vpts_coverage( source = c("baltrad", "uva", "ecog-04003", "rmi", "birdcast"), ... )get_vpts_coverage( source = c("baltrad", "uva", "ecog-04003", "rmi", "birdcast"), ... )
source |
Source of the data. One or more of |
... |
Arguments passed on to internal functions. |
A data.frame or tibble with at least three columns, source,
radar and date to indicate the combination for which data exists.
get_vpts_coverage()get_vpts_coverage()
Gets weather radar metadata from OPERA and/or NEXRAD.
get_weather_radars(source = c("opera", "nexrad"), use_cache = TRUE, ...)get_weather_radars(source = c("opera", "nexrad"), use_cache = TRUE, ...)
source |
Source of the metadata. |
use_cache |
Logical indicating whether to use the cache. Default is
|
... |
Additional arguments passed on to reading functions per source, currently not used. |
The source files for this function are:
For opera: OPERA_RADARS_DB.json (main/current)
and OPERA_RADARS_ARH_DB.json (archive).
A column origin is added to indicate which file the metadata were derived
from.
For nexrad: nexrad-stations.txt.
A sf or tibble with weather radar metadata. In all cases the column source is
added to indicate the source of the data and radar to show the radar identifiers
used in other functions like get_pvol() and get_vpts().
# Get radar metadata from OPERA get_weather_radars(source = "opera") # Get radar metadata from NEXRAD get_weather_radars(source = "nexrad")# Get radar metadata from OPERA get_weather_radars(source = "opera") # Get radar metadata from NEXRAD get_weather_radars(source = "nexrad")
Some services require credentials to access data. This function uses keyring to safely store those credentials on your computer.
set_secret(name, secret = NULL) get_secret(name)set_secret(name, secret = NULL) get_secret(name)
name |
Name of the secret to set or get as a character (e.g.
|
secret |
Optionally a character string with the secret, alternatively the system will prompt the user. |
When working with a cluster it might be advantageous to use a specific
keyring, this can be done by setting the keyring_backend option in R.
The package uses the option getRad.key_prefix as a prefix to all keys
stored. If you want to use multiple keys for the same api you can manipulate
this option.
set_secret() returns TRUE when a secret has successfully been
set. get_secret() returns the secret as a character string.