Description Usage Arguments Details Value See Also Examples
View source: R/processMovedata.R
Transforms a movebank object into an (optionally) daily averaged simplified data frame that is a "movetrack" class object.
1 2 3 4 5 6 7 8 9 10 |
movedata |
movement data - can be a |
idcolumn |
name of the id column - depends on properties of the movebank data. The default "individual_id" is often good. Other options are "deployment_id" or maybe "individual_id" ... this is confusing! |
proj4 |
the projection (as a crs string) for input data. If it is left empty and |
projTo |
a crs string for (re)projecting input data (if |
utm |
whether to convert to UTM coordinates - using the central longitude to select the zone. This is best for data of relatively small extent. |
keepCols |
scd: to see available info to retain see the reference data for the study using getMovebank("tag"), getMovebank("individual"), getMovebank("deployment"), or IMO better to get all of it as a single table excluding unused attributes by downloading from Movebank (Download > Download Reference Data). |
dailymean |
whether or not to compute the daily mean - useful for the migration analysis. |
Regarding the idcolumn
issues, SCD has the following insights (2017-06):
Even more than confusing, this is a possible cause of error. There is a current bug in move whereby when data are accessed using getMovebankData
, the tracks will be separated by deployment rather than individual. In cases that an individual has been tracked over multiple deployments, each deployment will be incorrectly understood to be and analyzed as a separate animal. See https://gitlab.com/bartk/move/issues/2
deployment_id
is in general not an appropriate idcolumn to use, for the same reason described above. Many of our studies include individuals with multiple deployments.
idcolumn
should ideally show animalName
or individual_local_identifier
, i.e. the "animal id" in Movebank. sometimes move uses the internal database ids, e.g. individual_id
which is difficult to link back to the animal in Movebank.
Currently in some cases coords.x1
and coords.x2
are used instead of location.long
, location.lat
. See https://gitlab.com/bartk/move/issues/5 and https://gitlab.com/bartk/move/issues/3
Returns a data frame with columns:
id
time - POSIXct
lon, lat
x, y
time
any columns named in keepCols argument
TO DO - add tags:
If getVT = TRUE
, also returns:
z, z.start, z.end - complex numbers indicating locations of steps
stepLength
phi, theta - absolute and relative turning angles, respectively
t.start, t.end, t.mid - numeric time,
dT - difference in time over step,
v - velocity, default meters / hour
t.mid.POSIX - time mid point in POSIX
If dailymean = TRUE
,
day - day since Jan 1 of first year
day.time.
If returnOutliers = TRUE
and returnSPDF = FALSE
, a list of two elements containing the valid locations ($valid or list[[1]]) or outliers ($flaggedOutliers or list[[2]]).
scd: For "time", note possible issues with timezones changing when moveStacks are created: https://gitlab.com/bartk/move/issues/6
map.track, plot.track, SpatialPointsDataFrame, pointDistance
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 | ### Enter Login and Password information for Movebank
## Not run:
# login <- movebankLogin(username="xxxx", password="xxxx")
# Pull data from movebank
ge1 <- getMovebankData(study="ABoVE: HawkWatch International Golden Eagles", login=login) #multiple birds
# Estimate daily mean locations
ge1.dailymean <- processMovedata(ge1, id = "individual_id", dailymean = TRUE)
# Three convenient "movetrack" methods:
summary(ge1.dailymean)
plot(ge1.dailymean)
map(ge1.dailymean)
# one bird, three deployments
ge2 <- getMovebankData(study="Aquila chrysaetos interior west N. America, Craigs, Fuller", animalName="629-26704", login=login)
# all locations and all columns
ge2.dailymean <- processMovedata(ge2, id = "individual_id", keepCols = "all")
summary(ge2.dailymean)
plot(ge2.dailymean, id = ge2.dailymean$id[1])
map(ge2.dailymean)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.