Skip to contents

Retrieve statistics about GBIF occurrence downloads. Filters for downloads matching the provided criteria, then provides counts by year, month and dataset of the total number of downloads, and the total number of records included in those downloads.

Usage

occ_download_stats(
  from = NULL,
  to = NULL,
  publishingCountry = NULL,
  datasetKey = NULL,
  publishingOrgKey = NULL,
  limit = NULL,
  offset = NULL,
  curlopts = list(http_version = 2)
)

Arguments

from

(character) Start date in format YYYY-MM. Optional.

to

(character) End date in format YYYY-MM. Optional.

publishingCountry

(character) ISO 2-letter country code. Optional.

datasetKey

(character) Dataset UUID. Optional.

publishingOrgKey

(character) Publishing organization UUID. Optional.

limit

(integer) Number of results to return. Optional.

offset

(integer) Offset for pagination. Optional.

curlopts

list of named curl options passed on to crul::HttpClient. See curl::curl_options for curl options

Value

A list with two slots:

  • meta: a single row data.frame with columns: offset, limit, endofrecords, count

  • results: a tibble with the results containing columns: datasetKey, totalRecords, numberDownloads, year, month

Note

see downloads for an overview of GBIF downloads methods

Examples

if (FALSE) { # \dontrun{
# Get summarized download statistics
occ_download_stats()

# Filter by date range and country
occ_download_stats(from = "2023-01", to = "2023-12", publishingCountry = "US")

# Filter by publishing organization iNaturalist
occ_download_stats(publishingOrgKey = "28eb1a3f-1c15-4a95-931a-4af90ecb574d")
} # }