rvertnet (version 0.7.0)

bigsearch: Request to download a large number of VertNet records.

Description

Specifies a term-wise search (like searchbyterm) and requests that all available records be made available for download as a tab-delimited text file.

Usage

bigsearch(specificepithet = NULL, genus = NULL, family = NULL,
  order = NULL, class = NULL, compact = FALSE, year = NULL,
  date = NULL, mappable = NULL, error = NULL, continent = NULL,
  cntry = NULL, stateprovince = NULL, county = NULL, island = NULL,
  igroup = NULL, inst = NULL, id = NULL, catalognumber = NULL,
  collector = NULL, type = NULL, hastypestatus = NULL, media = NULL,
  rank = NULL, tissue = NULL, resource = NULL, rfile, email,
  messages = TRUE, ...)

Arguments

specificepithet

(character) Taxonomic specific epithet, e.g. (sapiens in Homo sapiens)

genus

(character) Taxonomic genus

family

(character) Taxonomic family

order

(character) Taxonomic order

class

(character) Taxonomic class

compact

Return a compact data frame (logical)

year

(numeric) Year or range of years designated by comparison operators "<", ">", "<=" or ">=". You can pass in more than one of these queries, in a vector. See example below

date

Event date associated with this occurrence record; yyyy-mm-dd or the range yyyy-mm-dd/yyyy-mm-dd (character)

mappable

Record includes valid coordinates in decimal latitude and decimal longitude (logical)

error

Coordinate uncertainty in meters (numeric) or range of uncertainty values designated by comparison operators "<", ">", "<=" or ">=" (character)

continent

Continent to search for occurrence (character)

cntry

Country to search for occurrence (character)

stateprovince

State or province to search for occurrence (character)

county

County to search for occurrence (character)

island

Island to search for occurrence (character)

igroup

Island group to search for occurrence (character)

inst

Code name for the provider/institution of record (character)

id

Provider's unique identifier for this occurrence record (character)

catalognumber

Provider's catalog number or other ID for this record (character)

collector

Collector name (character)

type

Type of record; "specimen" or "observation" (character)

hastypestatus

Specimen associated with this record is identified as a holotype, paratype, neotype, etc. (character)

media

Record also references associated media, such as a film or video (logical)

rank

TBD (numeric)

tissue

Record is likely to reference tissues (logical)

resource

Identifier for the resource/dataset from which the record was indexed (character)

rfile

A name for the results file that you will download (character). Required.

email

An email address where you can be contacted when your records are ready for download (character). Required.

messages

Print progress and information messages. Default: TRUE

...

Curl arguments passed on to HttpClient

Value

Prints messages on progress, but returns NULL

Reading data

We suggest reading data in with fread() from the package data.table - as it's very fast for the sometimes large datasets you will get from using this function, and is usually robust to formatting issues.

Details

bigsearch allows you to request records as a tab-delimited text file. This is the best way to access a large number of records, such as when your search results indicate that >1000 records are available. You will be notified by email when your records are ready for download.

References

https://github.com/VertNet/webapp/wiki/The-API-search-function

Examples

Run this code
# NOT RUN {
# replace "big@search.luv" with your own email address
bigsearch(genus = "ochotona", rf = "pikaRecords", email = "big@search.luv")

# Pass in curl options for curl debugging
bigsearch(genus = "ochotona", rfile = "pikaRecords",
  email = "big@search.luv", verbose = TRUE)

# Use more than one year query
bigsearch(class = "aves", year = c(">=1976", "<=1986"),
          rfile = "test-bigsearch1", email = "big@search.luv")
# }

Run the code above in your browser using DataCamp Workspace