knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

beastr

Better Environment/Animal Sensor Telemetry Repository

"Better" as in "better than nothing". There are many other solutions that are more developed than this, most notably Movebank. Also I'm just really bad at naming things.

The goal of beastr is to provide a framework for storing, accessing, and processing wildlife telemetry data.

Installation

You can install the package using the devtools package

devtools::install_github('rgzn/beastr')

Details

For more details see the articles/vignettes on this package. In particular, the Introduction will explain what data this deals with and why.

Example

Build your database:

library(beastr, quietly = TRUE)
library(sf, quietly = TRUE)

# Use example source data
fix_file = system.file("lotek/PinPoint33452.txt", package = "beastr")
device_file = system.file("devices/collars.csv", package = "beastr")
animal_file = system.file("animals/critters.csv", package = "beastr")
deploy_file = system.file("deployments/deployments.csv", package = "beastr")
myDB = paste0(tempdir(check = TRUE), "/", "example.gpkg")

# Build a database
build_database(fix_files = fix_file,
               device_files = device_file,
               animal_files = animal_file,
               deployment_files = deploy_file,
               dsn = myDB,
               tz = "US/Pacific")

# What layers are in there?
sf::st_layers(myDB)

View data linked to animals, rather than sensors:

library(dplyr, quietly = TRUE)
library(ggplot2, quietly = TRUE)

points = sf::st_read(myDB, layer = "animal_fixes")

points %>% 
  ggplot2::ggplot() + 
  ggplot2::geom_sf(ggplot2::aes(fill = animal_id))

Related Projects

TODO



rgzn/beastr documentation built on June 7, 2022, 2:43 a.m.