Passer au contenu

Plots total number of detections across all tags, and total number of tags detected per day for a specified site. Depends on siteSumDaily().

Utilisation

plotDailySiteSum(data, recvDeployName)

Arguments

data

a selected table from .motus data, eg. "alltagsGPS", or a data.frame of detection data including at a minimum variables for motusTagID, sig, recvDeployName, ts

recvDeployName

name of site to plot

Exemples

# You can use either a selected tbl from .motus eg. "alltagsGPS", or a
# data.frame, instructions to convert a .motus file to all formats are below.

# download and access data from project 176 in sql format
# usename and password are both "motus.sample"
if (FALSE) sql.motus <- tagme(176, new = TRUE, update = TRUE)

# use example sql file included in `motus`
sql.motus <- tagme(176, update = FALSE, 
                   dir = system.file("extdata", package = "motus"))

# convert sql file "sql.motus" to a tbl called "tbl.alltags"
library(dplyr)
tbl.alltags <- tbl(sql.motus, "alltagsGPS") 

# convert the tbl "tbl.alltags" to a data.frame called "df.alltags"
df.alltags <- tbl.alltags %>% 
  collect() %>% 
  as.data.frame() 

# Plot of all tag detections at site Longridge using dataframe df.alltags
plotDailySiteSum(df.alltags, recvDeployName = "Longridge")


# Plot of all tag detections at site Niapiskau using tbl file tbl.alltags
plotDailySiteSum(df.alltags, recvDeployName = "Niapiskau")