Skip to content

Highlighting for points that are both improvement and concern #200

@andrjohns

Description

@andrjohns

I had a query about the approach to highlighting in the SPC visual, and I want to make sure that the final implementation is consistent with the NHSRplotthedots approach.

In the case where a given observation is part of both a special cause improvement and special cause concern pattern, how should it be highlighted?

The following toy example has two special cause concern patterns which overlap with a special cause improvement pattern:

yvals <- c(0:7,6:1)

test_data <- data.frame(y = yvals, obs=as.Date(Sys.Date() + seq_len(length(yvals))))

NHSRplotthedots::ptd_spc(test_data, value_field = y, date_field = obs)

Created on 2023-12-17 with reprex v2.0.2

Based on this, it looks like the current logic is that:

  • Astronomical point takes preference in highlighting
  • Patterns are highlighted in full before starting the highlighting of the next pattern
  • No preference in how improvement vs deterioration is highlighted

Is this the preferred logic to implement, or is there a particular decision tree that I should be following in highlighting?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions