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):
library(warbleR)
pl <- query_xc(qword = 'Parus major', download = FALSE)
## 6633 recording(s) found!
Keep only song vocalizations:
song_pl <- pl[grep("song", ignore.case = TRUE, pl$Vocalization_type), ]
Map locations using map_xc()
:
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:
query_xc(song_pl, download = TRUE path = "DIRECTORY WHERE YOU WANT TO SAVE THE FILES")
Session information
## R version 4.1.1 (2021-08-10)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 20.04.2 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.27 NatureSounds_1.0.4 knitr_1.37 seewave_2.2.0
## [5] tuneR_1.3.3.1
##
## loaded via a namespace (and not attached):
## [1] Rcpp_1.0.8 rstudioapi_0.13 magrittr_2.0.2 maps_3.3.0
## [5] MASS_7.3-54 rjson_0.2.21 R6_2.5.1 rlang_1.0.2
## [9] fastmap_1.1.0 pbapply_1.5-0 stringr_1.4.0 tools_4.1.1
## [13] parallel_4.1.1 xfun_0.30 dtw_1.22-3 cli_3.2.0
## [17] jquerylib_0.1.4 crosstalk_1.1.1 htmltools_0.5.2 leaflet_2.0.4.1
## [21] yaml_2.3.5 digest_0.6.29 htmlwidgets_1.5.3 sass_0.4.0
## [25] bitops_1.0-7 RCurl_1.98-1.6 signal_0.7-7 evaluate_0.15
## [29] rmarkdown_2.10 proxy_0.4-26 stringi_1.7.6 compiler_4.1.1
## [33] bslib_0.2.5.1 jsonlite_1.7.2 fftw_1.0-6.1