maui.samples.get_xc_data

maui.samples.get_xc_data(q, extract_path)[source]

Retrieves and downloads Xeno-canto data based on a set of query parameters.

Return type:

DataFrame

Parameters:
qdict

A dictionary of query parameters to filter recordings from Xeno-canto.

extract_pathstr

The directory where the audio files will be saved.

Returns:
pd.DataFrame

A DataFrame containing the recordings data from Xeno-canto, with additional columns for the local file paths and file download status.

Raises:
ValueError

If unexpected query parameters are provided.

Notes

  • The method first validates the query dictionary to ensure only valid keys are used.

  • After retrieving the recordings data using the _get_xc_dataset method, it downloads the audio files using the _download_xc_files method.