GithubHelp home page GithubHelp logo

bluegreen-labs / geoloctools Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 185.01 MB

A Geolocation Tracking Toolbox

Home Page: https://bluegreen-labs.github.io/geoloctools/

License: Other

R 94.04% Shell 5.96%
logging geolocation geolocator ecology animal-behavior migration movement-ecology

geoloctools's Introduction

GeoLocTools

A set of functions to pre-process geolocation tracking data. This includes both light loggers, GPS loggers of all kinds, and tries to ensure interchangeability between various devices and formats for synthesis and analysis. Currently the set of functions is limited but we are sure this set will grow over time, due to personal use or user contributions.

Due to the inclusion of a high resolution geoid map the package is fairly large (97 MB). This is less than ideal, yet functional. A solution will be sought for this situation to be more CRAN compliant.

Warning: this package is made on personal request and therefore is a temporary convenience tool. Although the intention is to solidify some of this more permanently, when and how is to be seen. The package might therefore change name and function at any time. Do not rely on this code operationally in an online workflow.

Installation

development release

To install the development releases of the package run the following commands:

if(!require(devtools)){install.packages("devtools")}
devtools::install_github("bluegreen-labs/geoloctools")
library("geoloctools")

Use

Reading PathTrack position (.pos) files

The glt_read_pos() function reads in PathTrack position files into a data frame. By default the altitudes are reported as values above mean sea level (corrected from ellipsoide heights to topographic heights by compensating for egm2008 one degree geoid model). We do note that due to the bilinear interpolation instead of cubic interpolation a slight loss in accuracy is noted. However, with an error of 0.025m this value is well below the error on commercial animal loggers.

library(geoloctools)
df <- glt_read_pos("your_position_file.pos")

Converting Migrate Technology data to PAMLr formatting

If you've installed the package you can also generate activity and light logging plot (based upon the code in the PAMLr documentation) by converting Migrate Technology light logger files to the PAMLr R package format for further processing.

library(geoloctools)
library(pamlr)
library(tidyverse)

# load demo data from Migrate Technologies files
PAM <- glt_migtech_pamlr(
  system.file(
    "extdata",
    package = "geoloctools",
    mustWork = TRUE),
  drift_adj = FALSE
)

# grab one particular logger (subset main list)
PAM_data <- PAM$CC893

# plot activity and light levels as shown in the
# PAMLr documentation
par( mfrow= c(1,2), oma=c(0,2,0,6))
par(mar =  c(4,2,4,2))

plot_sensorimage(PAM_data$acceleration$date, ploty=FALSE,
                 log(PAM_data$acceleration$act+0.001), main = "Activity",
                 col=c("black",viridis::cividis(90)), cex=1.2, cex.main = 2)

plot_sensorimage(PAM_data$light$date, labely=FALSE,
                 PAM_data$light$obs,  main="Light",
                 col=c("black",viridis::cividis(90)), cex=1.2, cex.main = 2)

# loop over all available items in the list and
# plot them

lapply(PAM, function(PAM_subset){

  # plot activity and light levels as shown in the
  # PAMLr documentation
  par( mfrow= c(1,2), oma=c(0,2,0,6))
  par(mar =  c(4,2,4,2))

  plot_sensorimage(PAM_subset$acceleration$date, ploty=FALSE,
                   log(PAM_subset$acceleration$act+0.001), main = "Activity",
                   col=c("black",viridis::cividis(90)), cex=1.2, cex.main = 2)

  plot_sensorimage(PAM_subset$light$date, labely=FALSE,
                   PAM_subset$light$obs,  main="Light",
                   col=c("black",viridis::cividis(90)), cex=1.2, cex.main = 2)
})

geoloctools's People

Contributors

khufkens avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.