Learn R Programming

warbleR (version 1.1.2)

querxc: Access Xeno-Canto recordings and metadata

Description

querxc downloads recordings and metadata from Xeno-Canto (http://www.xeno-canto.org/).

Usage

querxc(qword, download = FALSE, X = NULL, parallel = 1)

Arguments

qword
Character vector of length one indicating the genus, or genus and species, to query Xeno-Canto database. For example, Phaethornis or Phaethornis longirostris. (http://www.xeno-canto.org/).
download
Logical argument. Downloads recording file names and associated metadata if FALSE. If TRUE, recordings are also downloaded to working directory as .mp3 files. Default is FALSE. Note that if the recording is already in the working directory (as when the downloading process has been interrupted) it will be skipped. Hence, resuming downloading processes will not start from scratch.
X
Data frame with the same columns as the output of the function, or at least the following columns: Genus, Specific_epithet and Recording_ID. Only the recordings listed in the data frame will be download (download argument is automatically set to TRUE). This can be used to select the recordings to be downloaded based on their attributes.
parallel
Numeric. Controls whether parallel computing is applied. It specifies the number of cores to be used. Default is 1 (i.e. no parallel computing). Not available in Windows OS.

Value

If X is not provided the function returns a data frame with the following recording information: recording ID, Genus, Specific epithet, Subspecies, English name, Recordist, Country, Locality, Latitude, Longitude, Vocalization type, Audio file, License, URL, Quality,Time, Date. Sound files in .mp3 format are downloaded into the working directory if download = TRUE or if X is provided.

Details

This function queries for avian vocalization recordings in the open-access online repository Xeno-Canto (http://www.xeno-canto.org/). It can return recordings metadata or can also download the associated sound files.

Examples

Run this code
## Not run: 
# # First create empty folder
# setwd(tempdir())
# df1 <- querxc("Phaethornis anthophilus", download = FALSE)
# View(df1)
# 
# #downloading files
# querxc("Phaethornis anthophilus", download = TRUE)
# #check this folder!!
# getwd()
# ## End(Not run)

Run the code above in your browser using DataLab