bioRad provides standardized methods for extracting and reporting biological signals from weather radars. It includes functionality to inspect low-level radar data, process these data into meaningful biological information on animal speeds and directions at different altitudes in the atmosphere, visualize these biological extractions, and calculate further summary statistics.
To get started, see:
- Dokter et al. (2019): a paper describing the package.
- bioRad vignette: an introduction to bioRad’s main functionalities.
- Function reference: an overview of all bioRad functions.
- Introductory exercises: a tutorial with code examples and exercises.
- Range correction: estimate spatial images of vertically integrated density corrected for range effects.
Documentation for the latest development version can be found here.
setRepositories(ind = 1:2)
Required system libraries on Linux (Ubuntu)
The following system libraries are required before installing bioRad on Linux systems. In terminal, install these with:
sudo apt install libcurl4-openssl-dev sudo apt install libssl-dev sudo apt install libgdal-dev
You can install the released version of bioRad from CRAN with:
Alternatively, you can install the latest development version from GitHub with:
# install.packages("devtools") devtools::install_github("adokter/bioRad")
Then load the package with:
library(bioRad) #> Welcome to bioRad version 0.5.2 #> Docker daemon running, Docker functionality enabled (vol2bird version 0.5.0, MistNet available)
You need to install Docker to:
- Process radar data into vertical profiles of biological targets with
- Read NEXRAD radar
data or IRIS
read_pvolfile(). Docker is not required for reading ODIM radar data.
- Convert NEXRAD radar data to ODIM format with
- Use the MistNet neural
- Go to Docker Desktop.
- Download Docker for Windows or Mac (free login required) and follow the installation instructions. Note that Docker for Windows requires Microsoft Windows 10 Professional or Enterprise 64-bit: installing Docker Toolbox for previous Windows versions will not work.
- Open the Docker application. The Docker (whale) icon will appear in your menu or task bar and indicate if it is running correctly.
- Make local drive(s) available for Docker containers:
- On Windows: right click the Docker icon >
Shared drives> Select the drive(s) where you will be processing radar files > Click
- On Mac: click the Docker icon >
File sharing> Add the drive(s) where you will be processing radar files > Click
Apply & Restart.
- On Windows: right click the Docker icon >
- In R do
- You can now use the bioRad functionality that requires Docker.
Known issues with Docker
- Hyper-V / Virtualbox conflicts on Windows. Docker requires Hyper-V enabled, but Hyper-V can not run together with Virtualbox. To use Virtualbox you will need to disable Hyper-V, which also disables Docker, and requires a reboot of the system.
- For firewall issues on Windows, see this issue
- For permission issues when running docker, specifically the error
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock, see this solution. Running
sudo usermod -a -G docker $USERin a terminal will fix this problem.
Radar data example
Here we read an example polar volume data file with
extract the scan/sweep at elevation angle 3 with
the data to a plan position indicator with
project_as_ppi() and plot
the radial velocity of detected targets with
library(tidyverse) # To pipe %>% the steps below system.file("extdata", "volume.h5", package = "bioRad") %>% read_pvolfile() %>% get_scan(3) %>% project_as_ppi() %>% plot(param = "VRADH") # VRADH = radial velocity in m/s
Radial velocities towards the radar are negative, while radial velocities away from the radar are positive, so in this plot there is movement from the top right to the bottom left.
Vertical profile data example
Weather radar data can be processed into vertical profiles of biological
calculate_vp(). This type of data is available as open
data for over 100 European
Once vertical profile data are loaded into bioRad, these can be bound
into time series using
bind_into_vpts(). Here we read an example time
series, project it on a regular time grid with
plot it with
example_vpts %>% regularize_vpts() %>% plot() #> projecting on 300 seconds interval grid...
The gray bars in the plot indicate gaps in the data.
The altitudes in the profile can be integrated with
integrate_profile() resulting in a dataframe with rows for datetimes
and columns for quantities. Here we plot the quantity migration traffic
my_vpi <- integrate_profile(example_vpts) plot(my_vpi, quantity = "mtr") # mtr = migration traffic rate
To know the total number of birds passing over the radar during the full
time series, we use the last value of the cumulative migration traffic
my_vpi %>% pull(mt) %>% # Extract column mt as a vector last() #>  173023.8
For more exercises, see this tutorial.