Shiny web app for ctmm package
Clone or download

README.md

Introduction

This is a web app package for analyzing animal tracking data as a continuous-time stochastic processes.

It's a shiny app built upon ctmm R package. This is also a R package so you can reuse some functionalities in your own R analysis.

Suggested citation for the app/package:

Dong, X., C.H. Fleming, and J.M. Calabrese. 2018. ctmmweb: A Shiny web app for the ctmm movement analysis package.
https://github.com/ctmm-initiative/ctmmweb

Running the app

Bundled with package

  1. Install the latest R.

    Note R 3.4 bring some big changes, so it's better to upgrade all the existing packages if you have earlier version installed. ggplot2 3.0 also have some breaking changes and more warnings, please upgrade ggplot2 to 3.0 as the app can only be compatible with the latest stable release.

    RStudio is not required but recommended.

  2. Start R or RStudio, run these in console to install dependency packages. Sometimes you may need to restart R in the process.

    # install using devtools
    if (!require("devtools")) install.packages("devtools")
    devtools::install_github("ctmm-initiative/ctmmweb")
    # sometimes you may want to use a certain version, for example the format of saved data may evolve with new versions
    # devtools::install_github("ctmm-initiative/ctmmweb", ref = "commit or tag name")
    
    # Alternatively, if you met problem with devtools, sometimes it's easier to work with remotes, which have similar syntax and less dependency
    if (!require("remotes")) install.packages("remotes")
    remotes::install_github("ctmm-initiative/ctmmweb")
    # remotes::install_github("ctmm-initiative/ctmmweb", ref = "commit or tag name")
  3. Run the app in one of following methods:

    library(ctmmweb)
    # run app
    app()
    # run app with path to movebank format csv file
    app("path_to_movebank_format_csv")
    # run app with existing telemetry object or list in R environment
    library(ctmm)
    data(buffalo)
    app(buffalo)

    This will launch the app locally with system default browser. Chrome is recommended for compatibility reasons. You can copy the url into Chrome if it was not launched by Chrome. After the browser windows was closed, you may need to stop the R session in R console manually (Esc or Ctrl+C) to quit the app.

More details about installation and compatibility problems can be found here.

Hosted app

Just open the hosted app (short url: http://tiny.cc/ctmmweb) with browser (Chrome recommended).

This is more intended for demonstration purposes because

  • R is single threaded, so any computation heavy operations like loading large datasets, fitting models could block other users in same thread. We do have mutiple workers avaialble in the host but the resources are still limited.
  • The active hours per month is limited.