| GeoClient | R Documentation |
This client connects to all Geo-related endpoints of the NBA. Each endpoint is available as a class method (see section 'Methods' below). Optionally, a custom URL pointing to a NBA server and a user Agent can be specified by the user (see section 'Fields' below).
# client <- GeoClient$new()
R6 class
basePathStores url path of the request, defaults to http://api.biodiversitydata.nl/v2
userAgentSet the user agent of the request, defaults to nbaR/0.1.0
count Get the number of geo areas matching a given condition; Conditions given as query string.
Parameters:
query_spec : Object of type QuerySpec or its JSON representation
queryParams : named list or vector with query parameters
... : additional parameters passed to httr::GET
Returns:
integer
count_distinct_values Count the distinct number of values that exist for a given field; Field given as string. See also getDistinctValues.
Parameters:
field : name of field in taxon object
... : additional parameters passed to httr::GET
Returns:
list
count_distinct_values_per_group Count the distinct number of field values that exist per the given field to group by; See also endpoint /getDistinctValues. See also getDistinctValuesPerGroup.
Parameters:
group : name of field in the geo area object to group by
field : name of field in the geo area object
... : additional parameters passed to httr::GET
Returns:
list
find Find a GEO area by id; Returns a GEO object containing a GEO json polygon.
Parameters:
id : id of geo area
... : additional parameters passed to httr::GET
Returns:
GeoArea
find_by_ids Find geo areas by ids; Given multiple ids, returns a list of geo area objects.
Parameters:
ids : ids of multiple geo areas, separated by comma
... : additional parameters passed to httr::GET
Returns:
GeoArea
get_distinct_values Get all different values that exist for a field; A list of all fields for geo area documents can be retrieved with /metadata/getFieldInfo.
Parameters:
field : name of field in geo area object
... : additional parameters passed to httr::GET
Returns:
list
get_distinct_values_per_group Get all distinct values (and their document count) for the field given divided per distinct value of the field to group by; See also endpoint /getDistinctValues.
Parameters:
group : name of field in the geo area object to group by
field : name of field in the geo area object
... : additional parameters passed to httr::GET
Returns:
list
get_field_info Returns extended information for each field of a specimen document; Info consists of whether the fields is indexed, the ElasticSearch datatype and a list of allowed operators.
Parameters:
... : additional parameters passed to httr::GET
Returns:
list
get_geo_json_for_locality Retrieve a GeoJson object for a given locality; Returns a GeoJson polygon.
Parameters:
locality :
... : additional parameters passed to httr::GET
Returns:
list
get_paths Returns the full path of all fields within a document; See also metadata/getFieldInfo for all allowed operators per field.
Parameters:
... : additional parameters passed to httr::GET
Returns:
character
get_setting Get the value of an NBA setting; All settings can be queried with /metadata/getSettings.
Parameters:
name : name of setting
... : additional parameters passed to httr::GET
Returns:
list
get_settings List all publicly available configuration settings for the NBA; The value of a specific setting can be queried with metadata/getSetting/name.
Parameters:
... : additional parameters passed to httr::GET
Returns:
list
is_operator_allowed Checks if a given operator is allowed for a given field; See also metadata/getFieldInfo.
Parameters:
field : Field in geo area document
operator : operator
... : additional parameters passed to httr::GET
Returns:
list
query Query for geo areas; Query on searchable fields to retrieve matching geo areas.
Parameters:
query_spec : Object of type QuerySpec or its JSON representation
queryParams : named list or vector with query parameters
... : additional parameters passed to httr::GET
Returns:
QueryResult
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.