dataset_suggest: Suggest datasets in GBIF.

Description Usage Arguments Value References Examples

Description

Suggest datasets in GBIF.

Usage

1
2
3
4
5
dataset_suggest(query = NULL, country = NULL, type = NULL,
  subtype = NULL, keyword = NULL, owningOrg = NULL,
  publishingOrg = NULL, hostingOrg = NULL, publishingCountry = NULL,
  decade = NULL, continent = NULL, limit = 100, start = NULL,
  pretty = FALSE, description = FALSE, curlopts = list())

Arguments

query

Query term(s) for full text search. The value for this parameter can be a simple word or a phrase. Wildcards can be added to the simple word parameters only, e.g. q=*puma*

country

NOT YET IMPLEMENTED. Filters by country as given in isocodes$gbif_name, e.g. country=CANADA

type

Type of dataset, options include occurrene, metadata, checklist, sampling_event (http://gbif.github.io/gbif-api/apidocs/org/gbif/api/vocabulary/DatasetType.html)

subtype

NOT YET IMPLEMENTED. Will allow filtering of datasets by their dataset subtypes, DC or EML.

keyword

Keyword to search by. Datasets can be tagged by keywords, which you can search on. The search is done on the merged collection of tags, the dataset keywordCollections and temporalCoverages.

owningOrg

Owning organization. DEFUNCT.

publishingOrg

Publishing organization. A uuid string. See organizations

hostingOrg

Hosting organization. A uuid string. See organizations

publishingCountry

Publishing country. See options at isocodes$gbif_name

decade

Decade, e.g., 1980. Filters datasets by their temporal coverage broken down to decades. Decades are given as a full year, e.g. 1880, 1960, 2000, etc, and will return datasets wholly contained in the decade as well as those that cover the entire decade or more. Facet by decade to get the break down, e.g. /search?facet=DECADE&facet_only=true (see example below)

continent

Not yet implemented, but will eventually allow filtering datasets by their continent(s) as given in our Continent enum.

limit

Number of records to return. Default: 100. Maximum: 1000.

start

Record number to start at. Default: 0. Use in combination with limit to page through results.

pretty

Print informative metadata using cat. Not easy to manipulate output though.

description

Return descriptions only (TRUE) or all data (FALSE, default)

curlopts

list of named curl options passed on to HttpClient. see curl_options for curl options

Value

A data.frame, list, or message printed to console (using pretty=TRUE).

References

http://www.gbif.org/developer/registry#datasetSearch

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
## Not run: 
# Suggest datasets of type "OCCURRENCE".
dataset_suggest(query="Amazon", type="OCCURRENCE")

# Suggest datasets tagged with keyword "france".
dataset_suggest(keyword="france")

# Fulltext search for all datasets having the word "amsterdam" somewhere in
# its metadata (title, description, etc).
dataset_suggest(query="amsterdam")

# Limited search
dataset_suggest(type="OCCURRENCE", limit=2)
dataset_suggest(type="OCCURRENCE", limit=2, start=10)

# Return just descriptions
dataset_suggest(type="OCCURRENCE", limit = 5, description=TRUE)

# Return metadata in a more human readable way (hard to manipulate though)
dataset_suggest(type="OCCURRENCE", limit = 5, pretty=TRUE)

# Search by country code. Lookup isocodes first, and use US for United States
isocodes[agrep("UNITED", isocodes$gbif_name),]
dataset_suggest(country="US", limit = 25)

# Search by decade
dataset_suggest(decade=1980, limit = 30)

# Some parameters accept many inputs, treated as OR
dataset_suggest(type = c("metadata", "checklist"))
dataset_suggest(keyword = c("fern", "algae"))
dataset_suggest(publishingOrg = c("e2e717bf-551a-4917-bdc9-4fa0f342c530",
  "90fd6680-349f-11d8-aa2d-b8a03c50a862"))
dataset_suggest(hostingOrg = c("c5f7ef70-e233-11d9-a4d6-b8a03c50a862",
  "c5e4331-7f2f-4a8d-aa56-81ece7014fc8"))
dataset_suggest(publishingCountry = c("DE", "NZ"))
dataset_suggest(decade = c(1910, 1930))

# curl options
dataset_suggest(type="OCCURRENCE", limit = 2, curlopts = list(verbose=TRUE))

## End(Not run)


Search within the rgbif package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.