Downloads observation data from the Minka API for a specified date range. Subdivides requests by month or day automatically to avoid the 10,000 record API limit.
Arguments
- d1
start date in 'yyyy-mm-dd' format.
- d2
end date in 'yyyy-mm-dd' format.
- ...
Arguments passed on to
mnk_obsquerya generic query string for the 'q' parameter.
taxon_namea character string with the taxon name (common or scientific).
taxon_ida numeric ID for the taxon.
user_ida numeric ID for a specific user.
project_ida numeric ID for a specific project.
place_ida numeric ID for a specific place.
endemica logical value. Filters for endemic species.
introduceda logical value. Filters for introduced species.
threateneda logical value. Filters for threatened species.
qualitya character string. Must be 'casual' or 'research'.
geoa logical value. If TRUE, filters for observations with coordinates.
annotationa numeric vector of length 2 (term_id, term_value_id).
boundsa bounding box. Accepts an sf object with CRS EPSG:4326 (WGS84) or a numeric vector c(nelat, nelng, swlat, swlng).
- quiet
a logical value. If TRUE, suppresses console messages.
- limit_download
a logical value. If TRUE (default), each subdivided request is capped at 10,000 records.
Value
a tibble with one row per observation and the same columns
documented in mnk_obs. Returns an empty tibble if no
data is found.
Examples
if (FALSE) { # \dontrun{
# Download observations between two dates
obs <- mnk_obs_byday("2024-03-01", "2024-03-31",
taxon_name = "Diplodus sargus")
# Use with bounds (must be EPSG:4326)
barcelona <- c(41.5, 2.3, 41.2, 2.0)
obs_bc <- mnk_obs_byday("2024-01-01", "2024-01-07",
bounds = barcelona, quiet = TRUE)
} # }
