search_hub: Search vbdhub.org

View source: R/search_hub.R

search_hubR Documentation

Search vbdhub.org

Description

Retrieve the IDs for any datasets matching the given search parameters.

Usage

search_hub(
  query = "",
  db = c("vt", "vd", "gbif", "px"),
  fromdate = NULL,
  todate = NULL,
  locationpoly = NULL,
  taxonomy = NULL,
  exact = FALSE,
  withoutpublished = TRUE,
  returnlist = FALSE,
  simplify = TRUE,
  connections = 8,
  base_url = "https://api.vbdhub.org"
)

Arguments

query

a search string.

db

the databases to search.

fromdate

the date from which to search (ISO format: yyyy-mm-dd).

todate

the date up to which to search (ISO format: yyyy-mm-dd).

locationpoly

a polygon or set of polygons in terra::SpatVector or WKT MULTIPOLYGON format within which to search. Easily generated using match_countries()

taxonomy

a numeric vector containing the gbif ids of taxa to search for (found using match_species() or similar functions).

exact

whether to return exact matches only.

withoutpublished

whether to return results without a publishing date when filtering by date.

returnlist

return the raw output list rather than a formatted dataframe.

simplify

if only a single database was searched, return an ohvbd.ids object instead (defaults to TRUE).

connections

the number of connections to use to parallelise queries.

base_url

the api URL for vbdhub.org (mostly just for QA testing).

Value

an ohvbd.hub.search dataframe, an ohvbd.ids vector (if returnlist=TRUE and length(db) == 1) a list (if returnlist=TRUE) containing the search results.

Author(s)

Francis Windram

Examples


search_hub("Ixodes ricinus")


ohvbd documentation built on March 10, 2026, 1:07 a.m.