Marking time series data in R
markr provides a visual interface for rapid anomaly detection in time series data. It can be used as part of an analysis work flow or stand alone.
The package fits a machine learning algorithm (support vector machine) to automatically suggest anomalies. The user can keep those flags or mark new sections of the data and add flag names and comments. Marked data and flag metadata can be saved for future use. The fitted model objects can be saved locally for training future data sets as well.
Add a magic marker to your work flow
The package can be installed with this R command:
devtools::install_github("berdaniera/markr")
markr can easily be integrated into your existing analysis:
library(markr)
# set working directory for output
setwd(".")
# load example data
data(markeg)
# match required data format for marking
data = tidyr::spread(markeg, variable, value)
# mark it up
mark(data)
The interface can also be used without any pre-loaded data. You can open the UI and upload a new file by calling:
mark()
The data that you enter must meet the formatting requirements:
Flagged data can be stored for future use in three ways:
.csv
files in your current working directory.markOut
) to your current R workspace that includes the flagged data (data
), flag metadata (flags
), and the model object (model
).This package requires the following additional packages to work correctly: dplyr, e1071, ggplot2, readr, shiny, tidyr.
Aaron Berdanier – @berdaniera – aaron.berdanier@gmail.com
Distributed under the GNU General Public license. See LICENSE
for more information.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.