NatureSounds contains a collection of animal sounds for bioacoustic analysis. The main goal is to provide example acoustic data to faciliate the development of bioacoustic tools in the R environment. At the same time, this data can be used as case studies for showing the functionality of tools already available in R. This tutorial offers a quick glance over the acoustic data sets included in the package.
Most data sets are provided as extended selection tables. These are R
objects that contain both the annotations (locations of signals in time
and frequency) and the corresponding acoustic data as wave objects (see
a full description here). Therefore, these are
self-contained objects since the original sound files
are no longer needed to perform acoustic analyses. These objects are
created by the function selection_table()
from warbleR.
Check out the packages warbleR, tuneR and seewave for sound file manipulation and analysis in R.
The example data ‘lbh.est’ is an extended selection table containing long-billed hermit (Phaethornis longirostris) songs. The data contains the annotations and wave objects of 50 long-billed hermit songs from 10 different song types (5 per song type, ‘lek.song.type’ column) recorded at 8 leks (‘lek’ column) in the Caribbean slope of Costa Rica. This data set was used in Araya-Salas et al 2019 to show lek (social group) level signatures in song structure.
The spectrograms of the song types can be displayed using the
catalog()
function from warbleR:
library(warbleR)
# create a color palette
trc <- function(n) terrain.colors(n = n, alpha = 0.3)
# set global options for catalogs
warbleR_options(same.time.scale = TRUE, mar = 0.001, res = 100, spec.mar = 1, max.group.cols = 5, ovlp = 95,
width = 23, height = 12.5, tag.pal = list(trc), hatching = 0, cex = 1.3, rm.axes = TRUE, path = "~/Dropbox/R_package_testing/NatureSounds/", box = FALSE)
# load data
data("lbh.est")
# plot catalog
catalog(X = lbh.est, flim = c(1.5, 10.5), nrow = 10, ncol = 5, group.tag = "lek.song.type", height = 25, cex = 2,
title = "Long billed hermits", img.prefix = "lbh.est", wl = 100)
Song types are labeled by color groups of consecutive spectrograms.
‘monk.parakeet.est’ contains annotations and wave objects of 52 monk
parakeet calls from four different social scales (individual, flock,
pair, site; ‘scale’ column). The ‘ID’ column refers to selections
belonging to the same individual when scale == "Individual
.
See Smith-Vidaurre, Araya-Salas & Wright
(2019) for more details.
# load data
data("monk.parakeet.est")
# monk parakeets
catalog(X = monk.parakeet.est, flim = c(1, 11), nrow = 7, ncol = 8, group.tag = "scale",
title = "Monk parakeets", img.prefix = "monk.parakeet.est", wl = 300)
In this case color groups refer to the different social scales in the data.
The package also includes 5 wave objects that were originally included as example data in warbleR. These are 4 wave objects with long-billed hermit song bouts and 1 with 2 songs from a little tinamou (Crypturellus soui).
# load data
data("Phae.long1", "Phae.long2", "Phae.long3", "Phae.long4", "Cryp.soui")
# spectrogram
seewave::spectro(Phae.long1, wl = 100, scale = FALSE, ovlp = 90, grid = FALSE, palette = seewave::reverse.gray.colors.1, collevels = seq(-50, 0, 5))
# spectrogram
seewave::spectro(Phae.long2, wl = 100, scale = FALSE, ovlp = 90, grid = FALSE, palette = seewave::reverse.gray.colors.1, collevels = seq(-50, 0, 5))
# spectrogram
seewave::spectro(Phae.long3, wl = 100, scale = FALSE, ovlp = 90, grid = FALSE, palette = seewave::reverse.gray.colors.1, collevels = seq(-50, 0, 5))
# spectrogram
seewave::spectro(Phae.long4, wl = 100, scale = FALSE, ovlp = 90, grid = FALSE, palette = seewave::reverse.gray.colors.1, collevels = seq(-50, 0, 5))
# spectrogram
seewave::spectro(Cryp.soui, wl = 1200, scale = FALSE, ovlp = 90, grid = FALSE, palette = seewave::reverse.gray.colors.1, collevels = seq(-35, 0, 2), flim = c(1.4, 2.4))
Araya-Salas M, G Smith-Vidaurre. 2017. warbleR: An R package to streamline analysis of animal acoustic signals. Methods Ecol Evol 8:184–191.
Araya-Salas M, G Smith-vidaurre, D Mennill, P Gonzalez-Gomez, J Cahill & T Wright. 2019. Social group signatures in hummingbird displays provide evidence of co-occurrence of vocal and visual learning. Proceedings of the Royal Society B. 286: 20190666
Smith-Vidaurre G, M Araya-Salas, & T Wright. 2019. Individual signatures outweigh social group identity in contact calls of a communally nesting parrot. Behavioral Ecology.
Araya-Salas M, A Hernandez-Pinson, N Rojas & G Chaverri. 2020. Ontogeny of an interactive call-and-response system in Spix’s disc-winged bats. Animal Behaviour.
Session information
## R version 4.4.2 (2024-10-31)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 22.04.5 LTS
##
## Matrix products: default
## BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=es_CR.UTF-8 LC_COLLATE=C
## [5] LC_MONETARY=es_CR.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=es_CR.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=es_CR.UTF-8 LC_IDENTIFICATION=C
##
## time zone: America/Costa_Rica
## tzcode source: system (glibc)
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## loaded via a namespace (and not attached):
## [1] digest_0.6.37 R6_2.5.1 fastmap_1.2.0 xfun_0.50
## [5] cachem_1.1.0 knitr_1.49 htmltools_0.5.8.1 rmarkdown_2.28
## [9] lifecycle_1.0.4 cli_3.6.3 sass_0.4.9 jquerylib_0.1.4
## [13] compiler_4.4.2 rstudioapi_0.16.0 tools_4.4.2 evaluate_1.0.1
## [17] bslib_0.8.0 yaml_2.3.10 rlang_1.1.4 jsonlite_1.8.9