maad.util.xc_download
- maad.util.xc_download(df, rootdir, dataset_name='dataset', overwrite=False, save_csv=False, verbose=False)[source]
Download the audio files from Xeno-Canto based on the input dataframe It will create directories for each species if needed
- Parameters:
- dfpandas DataFrame
Dataframe containing the selected recordings metadata
- rootdirstring
Path to the directory where the whole dataset will be saved
- dataset_namestring, optional
Name of the dataset that will be created as a parent directory . The default is ‘dataset’.
- overwriteboolean, optional
Test if the directory where the audio files will be downloaded already exists. if True, it will download the data in the directory anyway. Otherwise, if False, it will not download audio files.
- save_csvboolean, optional
if True, the csv corresponding to the species will be saved in the directory of the species. The default is False.
- verboseboolean, optional
Print messages during the execution of the function. The default is False.
- Returns:
- dfpandas DataFrame
Dataframe similar to df but without the rows of the audio recordings that were not downloaded. Add a new column “fullfilename” with the paths to the newly downloaded audio files