View source: R/getOccurrences.R
getOccurrences | R Documentation |
Gets occurrence data from the NBN to which you have access. To get access to data
you must first register at https://data.nbn.org.uk/User/Register. You will
need your username and password when running this function for the first time.
You can specify the data to retrieve by dataset, species, time, location and/or
group.
getOccurrences(tvks = NULL, datasets = NULL, startYear = NULL, endYear = NULL, VC = NULL, group = NULL, gridRef = NULL, polygon = NULL, point = NULL, radius = 5000, latLong = TRUE, acceptTandC = FALSE, silent = FALSE, attributes = FALSE, ...)
tvks |
a list of TVKs which are strings of 16 alphanumeric characters.
You can look these up using |
datasets |
a list of dataset keys which are strings of 8 alphanumeric characters. Look up datasets here: https://data.nbn.org.uk/Datasets |
startYear |
a 4 digit integer year |
endYear |
a 4 digit integer year |
VC |
a string giving a vice-county name (see |
group |
a string giving the name of a group (see |
gridRef |
a string giving a gridreference in which to search for occurrences |
polygon |
A WKT (Well-Known Text) polygon string. Note that polygons containing many verticies (>100) are likely to create queries that exceed the NBN character limit |
point |
A vector of two numbers; latitude, longitude. Used with |
radius |
A numeric distance, in meters used with |
latLong |
logical, if TRUE latitude and longitude are returned as additional columns. The conversion to latitude and longitude is currently accurate to about about ~20 meters, greater than the vast majoring of records' precision. |
acceptTandC |
if set to |
silent |
If |
attributes |
If |
... |
Further named parameters passed on to |
a data.frame of occurence records. Details of the data providers that contributed to the data returned is given as a 'providers' attribute
Stuart Ball, JNCC stuart.ball@jncc.gov.uk and Tom August, CEH tomaug@ceh.ac.uk
getFeature
, getTVKQuery
, listVCs
,
listDatasets
, listGroups
## Not run: dt1 <- getOccurrences(tvks="NBNSYS0000002987", datasets="GA000373", startYear="1990", endYear="1991") dt2 <- getOccurrences(tvks=c("NBNSYS0000002987","NHMSYS0001688296","NHMSYS0000080210"), startYear="1990", endYear="1991") dt3 <- getOccurrences(group="quillwort", startYear="1990", endYear="2010", VC="Shetland (Zetland)") # Get the data providers information dp <- attr(dt1,'providers') ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.