In addition to text data describing individual occurrences and their
attributes, ALA stores images, sounds and videos associated with a given
record. atlas_media
displays metadata for any and all of the media types.
Usage
atlas_media(
request = NULL,
identify = NULL,
filter = NULL,
select = NULL,
geolocate = NULL,
data_profile = NULL
)
Arguments
- request
optional
data_request
object: generated by a call togalah_call()
.- identify
data.frame
: generated by a call togalah_identify()
.- filter
data.frame
: generated by a call togalah_filter()
- select
list
: generated by a call togalah_select()
- geolocate
string
: generated by a call togalah_geolocate()
- data_profile
string
: generated by a call togalah_apply_profile()
Details
atlas_media()
works by first finding all occurrence records
matching the filter which contain media, then downloading the metadata for the
media. To actually download the files themselves, use collect_media()
.
It may be beneficial when requesting a large number of records to show a progress
bar by setting verbose = TRUE
in galah_config()
.
See also
atlas_counts()
to find the number of records with media; but note this
is not necessarily the same as the number of media files, as each record can have
more than one media file associated with it (see examples section for how to do this).
Examples
if (FALSE) {
# Download Regent Honeyeater records with multimedia attached
galah_call() |>
galah_identify("Regent Honeyeater") |>
galah_filter(year == 2011) |>
atlas_media()
# Download multimedia
galah_call() |>
galah_identify("Regent Honeyeater") |>
galah_filter(year == 2011) |>
atlas_media() |>
collect_media(path = "folder/your-directory")
# Specify a single media type to download
galah_call() |>
galah_identify("Eolophus Roseicapilla") |>
galah_filter(multimedia == "Sound") |>
atlas_media()
# It's good to check how many records have media files before downloading
galah_call() |>
galah_filter(multimedia == c("Image", "Sound", "Video")) |>
galah_group_by(multimedia) |>
atlas_counts()
# post version 2.0, it is possible to run all steps in sequence
# first, get occurrences, making sure to include media fields:
occurrences_df <- request_data() |>
identify("Regent Honeyeater") |>
filter(!is.na(images), year == 2011) |>
select(group = "media") |>
collect()
# second, get media metadata
media_info <- request_metadata() |>
filter(media == occurrences_df) |>
collect()
# the two steps above + `right_join()` are synonmous with `atlas_media()`
# third, get images
request_files() |>
filter(media == media_df) |>
collect(thumbnail = TRUE)
# step three is synonymous with `collect_media()`
}