-
Notifications
You must be signed in to change notification settings - Fork 1
Data Specifications
This dataset contains the output of the KRI analysis. For each group (typically site) the dataset provides the KRI metric, its score, and the flagging of the score given the defined thresholds. This dataset applies to these modules:
- scatter plot
- bar chart
Data must be filtered on a single workflow ID prior to initializing a chart. For example:
const results = results_summary
.filter(result => result.workflowid === 'kri0001');
-
arraywith one item/record per:- workflow ID
- group ID
| Property | Type | Description |
|---|---|---|
| studyid | string | Unique study identifier |
| workflowid | string | Unique workflow identifier |
| groupid | string | Unique group identifier |
| numerator | number | Numerator in KRI calculation |
| denominator | number | Denominator in KRI calculation |
| metric | number | KRI value |
| score | number | Group score given KRI value |
| flag | number | Flag assigned to group given score and defined thresholds |
This dataset contains the metadata associated with each KRI. This dataset applies to these modules:
- scatter plot
- bar chart
- time series
- sparkline of score/metric
- sparkline of flag counts by KRI
Data must be filtered on a single workflow ID prior to initializing a chart. For example:
const metadata = results_summary
.filter(workflow => workflow.workflowid === 'kri0001');
-
objectrepresenting a single workflow ID
| Property | Type | Description |
|---|---|---|
| workflowid | string | Unique workflow identifier |
| gsm_version | string | {gsm} version |
| group | string | Analysis stratification (site, country, etc.) |
| metric | string | KRI definition |
| numerator | string | Numerator in KRI calculation |
| denominator | string | Denominator in KRI calculation |
| outcome | string | KRI type (rate, percent, etc.) |
| model | string | Statistical method |
| score | string | Analysis output measure with which to score KRI value |
| data_inputs | string | Input data domains required to evaluate KRI |
| data_filters | string | KRI-specific subset applied to input data |
This dataset contains the calculated bounds associated with the score returned by the KRI analysis. This dataset applies to these modules:
- scatter plot
Data must be filtered on a single workflow ID prior to initializing a chart. For example:
const bounds = results_bounds
.filter(bound => bound.workflowid === 'kri0001');
-
arraywith one item/record per:- workflow ID
- threshold
- x-value
| Property | Type | Description |
|---|---|---|
| studyid | string | Unique study identifier |
| workflowid | string | Unique workflow identifier |
| threshold | number | KRI score threshold |
| denominator | number | X-value |
| numerator | number | Y-value |
This dataset contains the parameters of the KRI analysis, including thresholds. This dataset applies to these modules:
- bar chart of score
- time series of score
- sparkline of score
Data must be filtered on a single workflow ID prior to initializing a chart and custom parameters take precedence over default parameters. For example:
const parameters_default = meta_param
.filter(parameter_default => (
parameter_default.workflowid === 'kri0001'
));
const parameters_custom = status_param
.filter(parameter_custom => (
parameter_custom.workflowid === 'kri0001'
));
// TODO: use a join here
const parameters = parameters_default.map(parameter_default => {
const parameter_custom = parameters_custom
.find(parameter_custom => (
parameter_custom.param === parameter_default.param &&
parameter_custom.index === parameter_default.index
));
return parameter_custom === undefined ? parameter_default : parameter_custom;
});
-
arraywith one item/record per:- workflow ID
- parameter
- parameter index
| Property | Type | Description |
|---|---|---|
| workflowid | string | Unique workflow identifier |
| gsm_version | string | version of {gsm} used to generate output |
| param | string | KRI parameter |
| index | number | index of KRI parameter |
| default | string | default KRI parameter value |
| configurable | boolean | configurable by user? |
This dataset contains KRI results for each snapshot. The only difference is an
additional variable, snapshot_date, that identifies the date of the analysis. This dataset applies
to these modules:
- time series of score/metric
- sparkline of score/metric
Data must be filtered on a single workflow ID prior to initializing a chart. For example:
const results_over_time = results_summary_over_time
.filter(d => d.workflowid === 'kri0001');
-
arraywith one item/record per:- snapshot date
- workflow ID
- group ID
| Property | Type | Description |
|---|---|---|
| studyid | string | Unique study identifier |
| workflowid | string | Unique workflow identifier |
| groupid | string | Unique group identifier |
| numerator | number | Numerator in KRI calculation |
| denominator | number | Denominator in KRI calculation |
| metric | number | KRI value |
| score | number | Group score given KRI value |
| flag | number | Flag assigned to group given score and defined thresholds |
| snapshot_date | string | date of analysis (yyyy-mm-dd) |
This dataset contains the number of at risk and flagged groups at each snapshot by KRI. This dataset applies to these modules:
- sparkline of flag counts by KRI
Longitudinal data must be aggregated by workflowid and snapshot_date prior to initializing the
sparkline. For example:
const n = new Set(
results_summary_over_time.map(d => d.groupid)
).size;
const flag_counts_by_kri = d3.flatRollup(
results_summary_over_time,
workflowid => {
const n_at_risk = workflowid
.filter(d => Math.abs(+d.flag) === 1)
.length;
const n_flagged = workflowid
.filter(d => Math.abs(+d.flag) === 2)
.length;
return {
n,
n_at_risk,
n_flagged
};
},
d => d.snapshot_date,
d => d.workflowid
);
-
arraywith one item/record per:- snapshot date
- workflow ID
| Property | Type | Description |
|---|---|---|
| studyid | string | Unique study identifier |
| workflowid | string | Unique KRI identifier |
| snapshot_date | string | date of analysis (yyyy-mm-dd) |
| n | number | Number of groups |
| n_at_risk | number | Number of groups where flag is -1 or 1
|
| n_flagged | number | Number of groups where flag is -2 or 2
|
This dataset contains the number of at risk and flagged KRIs at each snapshot by group. This dataset applies to these modules:
- sparkline of flag counts by group
Longtiduinal data must be aggregated by groupid and snapshot_date prior to initializing the
sparkline. For example:
const n = new Set(
results_summary_over_time.map(d => d.groupid)
).size;
const flag_counts_by_group = d3.flatRollup(
results_summary_over_time,
groupid => {
const n_at_risk = groupid
.filter(d => Math.abs(+d.flag) === 1)
.length;
const n_flagged = groupid
.filter(d => Math.abs(+d.flag) === 2)
.length;
return {
n,
n_at_risk,
n_flagged
};
},
d => d.snapshot_date,
d => d.groupid
);
-
arraywith one item/record per:- snapshot date
- group ID
| Property | Type | Description |
|---|---|---|
| studyid | string | Unique study identifier |
| groupid | string | Unique group identifier |
| snapshot_date | string | date of analysis (yyyy-mm-dd) |
| n | number | Number of groups |
| n_at_risk | number | Number of groups where flag is -1 or 1
|
| n_flagged | number | Number of groups where flag is -2 or 2
|