Objetive

  • Demonstrate how to obtain acoustic data from online repositories

 

1 Getting recordings from Xeno-Canto

The warbleR function query_xc() queries for avian vocalization recordings in the open-access online repository Xeno-Canto. It can return recordings metadata or download the associated sound files.

Example on how to get recording’s metadata (no downloading):

Code
library(warbleR)

pl <- query_xc(qword = 'Parus major', download = FALSE)

Keep only song vocalizations:

Code
song_pl <- pl[grep("song", ignore.case = TRUE, pl$Vocalization_type), ]

Map locations using map_xc():

Code
map_xc(song_pl, leaflet.map = TRUE)

Once you feel fine with the subset of data you can go ahead and download it as follows:

Code
query_xc(X = song_pl, download = TRUE, path = "DIRECTORY WHERE YOU WANT TO SAVE THE FILES")

Session information

R version 4.2.2 Patched (2022-11-10 r83330)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.5 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=es_ES.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=es_CR.UTF-8        LC_COLLATE=es_ES.UTF-8    
 [5] LC_MONETARY=es_CR.UTF-8    LC_MESSAGES=es_ES.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       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] warbleR_1.1.28     NatureSounds_1.0.4 knitr_1.42         seewave_2.2.0     
[5] tuneR_1.4.4       

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.10       rstudioapi_0.14   magrittr_2.0.3    maps_3.4.1       
 [5] MASS_7.3-58.2     R6_2.5.1          rjson_0.2.21      rlang_1.1.1      
 [9] fastmap_1.1.1     pbapply_1.7-0     tools_4.2.2       parallel_4.2.2   
[13] xfun_0.39         dtw_1.23-1        cli_3.6.1         crosstalk_1.2.0  
[17] htmltools_0.5.5   leaflet_2.1.1     yaml_2.3.7        digest_0.6.31    
[21] brio_1.1.3        htmlwidgets_1.5.4 bitops_1.0-7      testthat_3.1.8   
[25] RCurl_1.98-1.12   signal_0.7-7      evaluate_0.21     rmarkdown_2.21   
[29] proxy_0.4-27      compiler_4.2.2    jsonlite_1.8.4    fftw_1.0-7