A command line application that processes performance data to make assertions about performer attributes.
An animated SVG screen cast demonstration is in the screen cast directory.
The application expects a spek, tabular input data, and annotation functions.
JSON-LD description of project. It includes: - any apriori assertions about performers. - description of performance data column names and uses. - descriptions of performance measures and comparators.
Tabular data (csv) with performance data. These usually include: performer, timepoint, and performance value or counts.
An R file containing functions which provide situation specific interpretation of the performance values. Specified by collaborator or domain expert. Format and use of annotations is convention instead of configuration.
annotate_X
functions need to return a table with the id column and one column per annotation.package_constants.R
setup_cache
function.Snippet of an annotation.r that assesses the positive gap annotation. The setup_cache has been omitted for brevity.
library(dplyr, warn.conflicts = FALSE)
library(rlang, warn.conflicts = FALSE)
library(tidyr, warn.conflicts = FALSE)
annotate_positive_gap <- function(data, spek){
rate <- cache$rate_col_sym
time <- cache$time_col_sym
id <- cache$id_col_sym
data %>%
dplyr::filter(!!time == max(!!time)) %>%
group_by(!!id) %>%
summarize(positive_gap = (!!rate > cache$comparator))
}
Functions to process input data and determine if attribute is present or not. Each function is called with the performance data and a column spec as args. It is expected to return a table of the id and boolean value of the attribute. Returned table must be grouped by id. e.g the result of annotate_capability_barier:
id | positive_gap | ---|--------------------| Alice | TRUE | Bob | FALSE | Carol | FALSE |
The IRI is substituted for the attribute short name.
id | http://purl.obolibrary.org/obo/psdo_0000104
|
---|--------------------|
Alice | TRUE |
The performer and attribute is emitted as part of the output JSON-LD.
{
"@id": "_:pAlice",
"http://purl.obolibrary.org/obo/RO_0000091": [
{
"@type": "http://purl.obolibrary.org/obo/psdo_0000104",
"http://example.com/slowmo#RegardingMeasure": {
"@id": "_:m1"
}
}
],
"@type": "http://purl.obolibrary.org/obo/psdo_0000085"
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.