getMovebankData: Download data from Movebank

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

This function downloads the location data and timestamp of a study stored in Movebank

Usage

1
2
3
4
5
6
7
## S4 method for signature 'numeric,character,MovebankLogin'
getMovebankData(study, animalName, login, ...)

## S4 method for signature 'numeric,numeric,MovebankLogin'
getMovebankData(study, animalName, login, 
                removeDuplicatedTimestamps=FALSE,
                includeExtraSensors=FALSE, deploymentAsIndividuals=FALSE, ...)

Arguments

study

character or numeric. Character: full name of the study, as stored on Movebank. Numeric: Movebank ID of the study which can be obtained on the Study Details page on Movebank or with getMovebankID.

login

a MovebankLogin object, if empty you'll be asked to enter your username and password

animalName

character. Name of the individuals as stored on Movebank. A single individual or a vector of several individuals from the same study can be specified. Optional.

includeExtraSensors

logical; if TRUE data from non location sensors included in the study will be also downloaded, the data will automatically be stored in the unUsedRecords slot as they cannot produce locations. See 'Details'.

removeDuplicatedTimestamps

logical; if TRUE duplicated timestamps values will be removed. See 'Note'.

deploymentAsIndividuals

logical; if TRUE the deployments will be downloaded separately. See 'Details'.

...

Additional arguments passed on to the movebank API through getMovebank function:

timestamp_start, timestamp_end

character or POSIXct. Starting and/or ending timestamp to download the data for a specific time period. Timestamps have to be provided in format 'yyyyMMddHHmmssSSS'. If POSIXct then it is converted to character using UTC as a time zone, note that this can change the time. Optional.

Details

getMovebankData belongs to the Movebank browsing functions and returns a Move object from studies with only one animal or a MoveStack object for studies with multiple animals.
Remember that you need an account on Movebank, see movebankLogin.

Attribute names:
The definitions of the content of the columns within the @idData, @sensor, @data slots of the move or moveStack object is detailed in the Attribute Dictionary on Movebank

includeExtraSensors:
If this includeExtraSensors=TRUE the data of all non location sensors (e.g. acceleration, magnetometer, etc) available in the study will be downloaded and stored in the unUsedRecords slot. Data from a single or a set of non location sensors can be also downloaded as a data.frame with the function getMovebankNonLocationData

deploymentAsIndividuals:
If single individuals have several deployments, and these are wished to be downloaded separately, this can be done by setting deploymentAsIndividuals=TRUE. In this case the "@trackId" will contain the names of the deployments.

Value

Object of class 'Move' or 'MoveStack'

Note

See the 'browseMovebank' vignette for more information about security and how to use Movebank from within R.

removeDuplicatedTimestamps:
It is possible to set removeDuplicatedTimestamps=TRUE which allows you delete the duplicated timestamps in case your data set contains them. It is strongly advised not to use this option because there is no control over which records are removed. It's better to edit the records in movebank and mark the appropriate records as outliers. Another option is to download the data as a .csv file from Movebank, use the getDuplicatedTimestamps function to identify the duplicate timestamps, decide which one to keep and than create a move/moveStack object with the function move.

Outliers:
In Movebank outliers can be marked manually. When the move object is creates via getMovebankData these records are automatically placed in the UnusedRecords slots. If these marked outliers want to be included in the move object, download the data from Movebank (or via getMovebank), read in the data from the downloaded .csv file with read.csv, and create the move object with move providing the columns with the coordinates, timestamp, data.frame, projection, sensor and animal name. This way the marked outliers are ignored and all data are included in the move object.

Multiple sensors:
The getMovebankData function downloads the data of all location sensors available in the study. If the study contains several location sensors, the resulting move/moveStack object can be separated into a move/moveStack object per sensor type:
x[x@sensor=="z"] where "x" is a Move or a MoveStack object, and "z" is the name of the sensor e.g. "GPS", "Radio Transmitter", etc.

Author(s)

Marco Smolla & Anne Scharf

See Also

movebankLogin, getMovebankNonLocationData

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
# obtain a login
login<-movebankLogin()

# returns a MoveStack object from the specified study
getMovebankData(study="BCI Ocelot", login=login) 

# returns a Move object (there is only one individual in this study)
getMovebankData(study="BCI Agouti", login=login) 

# returns a MoveStack with two individuals
getMovebankData(study=123413, animalName=c("Mancha","Yara"), login=login) 

# Get a specific timerange, eg: all positions untill "2003-05-06 19:45:10.000"
(ocelots <- getMovebankData(study=123413, animalName=c("Mancha","Yara"), 
                            login=login, timestamp_end="20030506194510000"))

timestamps(ocelots)

## End(Not run)

move documentation built on Aug. 24, 2017, 1:04 a.m.