digivet-consortium / movenet

Generating network representations for livestock movement (and associated) data
https://digivet-consortium.github.io/movenet/
GNU General Public License v3.0
2 stars 3 forks source link

movenet

The goal of movenet is to simplify the effective use of livestock movement data in veterinary public health. It facilitates the dataflow from livestock movement data to social network analysis, while addressing common data issues such as the diversity of data formats and privacy preservation.

Flow chart showing the workflows of the movenet package, as well as how movenet addresses some common data challenges.

movenet is being developed in the context of the NordForsk Digitalisation of livestock data to improve veterinary public health (DigiVet) project.

Disclaimer: movenet is under active development. The way functions are called, and the internal methods, may still change without prior warning.

Workflows

movenet includes a range of workflows for the processing and analysis of livestock movement data and (optional) holding data:

For more detail on each of these workflows, including sample code, see the vignettes.

Shiny app

In addition to the basic functions in the movenet package, we are developing an accompanying Shiny app to cater to users who prefer a graphical user interface. For further information on the movenet app, see its GitHub repository.

Installation

You can install the development version of movenet from GitHub with:

# install.packages("devtools")
devtools::install_github("digivet-consortium/movenet")

Usage

To get started with movenet, first load a config file to tell movenet how to read your data, and then read in a data file:

library(movenet)

# Load an example movement config file:
load_config(system.file("configurations", "ScotEID.yml", package = "movenet"))
#> Successfully loaded config file: C:/Users/cboga/OneDrive - University of Glasgow/Documents/R/win-library/4.1/movenet/configurations/ScotEID.yml
# Read in and reformat an example movement data file:
movement_data <- 
  reformat_data(system.file("extdata", "example_movement_data.csv", package = "movenet"),
                type = "movement")

# Load an example holding config file:
load_config(system.file("configurations", "fakeScotEID_holding.yml", package = "movenet")) 
#> Successfully loaded config file: C:/Users/cboga/OneDrive - University of Glasgow/Documents/R/win-library/4.1/movenet/configurations/fakeScotEID_holding.yml
# Read in and reformat an example holding data file:
holding_data <- 
  reformat_data(system.file("extdata", "example_holding_data.csv", package = "movenet"),
                type = "holding")

The movement and holding data are now in the right format (movenet-format data tibbles) to be plugged into pseudonymisation, network analysis, and transmission modelling workflows. See vignette("movenet") for more details on these data reading/reformatting steps, and the other vignettes for more information on the various workflows.