bp_scatter: Blood Pressure Stage Scatter Plot

View source: R/bp_visuals_scatter.R

bp_scatterR Documentation

Blood Pressure Stage Scatter Plot

Description

Display all SBP and DBP readings on a scatterplot with deliniation of BP according to the 8 mutually exclusive levels of Hypertension as in Lee et al (2020) (the default), or the levels set by the American Heart Association (AHA).

Usage

bp_scatter(
  data,
  plot_type = c("stages2020", "AHA"),
  subj = NULL,
  group_var = NULL,
  wrap_var = NULL,
  inc_crisis = TRUE,
  inc_low = TRUE,
  bp_cutoffs = list(c(100, 120, 130, 140, 180), c(60, 80, 80, 90, 120)),
  bp_type = c("hbpm", "abpm", "ap")
)

Arguments

data

A processed dataframe resulting from the process_data function that contains the SBP, and DBP columns, as well as (potentially) other information that can be used for grouping.

plot_type

String corresponding to the particular type of plot to be displayed. Default plot ("stages2020") sets the BP stages according to Lee et al (2020) with 8 mutually exclusive categories. Two additional categories, "Low" or "Crisis", can be determined through the inc_low or inc_crisis function arguments, respectively. Setting plot_type = "AHA" will use the stages according to the guidelines set forth by the American Heart Association (reference: https://www.heart.org/en/health-topics/high-blood-pressure/understanding-blood-pressure-readings)

subj

Optional argument. Allows the user to specify and subset specific subjects from the ID column of the supplied data set. The subj argument can be a single value or a vector of elements. The input type should be character, but the function will comply with integers so long as they are all present in the ID column of the data.

group_var

A categorical column of the input data set that the individual points are to be grouped / separated by for a given plot. Cannot contain more than 10 levels (to avoid overcrowding the plot). This is different from the wrap_var argument which segments plots by category. The default value is NULL (no grouping).

wrap_var

A categorical column of the input data set that the plots are to be segmented by. If there are multiple levels such as time of day, or visit number, the output will include a matrix with each plot corresponding to an individual level. This differs from the group_var argument which separates data within the same plot. The default value is NULL (no wrapping).

inc_crisis

A TRUE / FALSE indicator of whether or not to include the "Crisis" (Hypertensive) category to the scatter plot. This is only activated in conjunction with "stages2020" plot type, and if TRUE is defined as SBP > 180 or DBP > 120. If FALSE, those values are displayed as either "ISH - S2", "S2" or "IDH - S2" stages (see details). This argument is ignored with plot type "AHA", where the "Crisis" stage (SBP > 180 or DBP > 120) is always displayed.

inc_low

A TRUE / FALSE indicator of whether or not to include the "Low" (Hypotension) category to the scatter plot. This is only activated in conjunction with "stages2020" plot type, and if TRUE is defined as SBP < 100 and DBP > 60. If FALSE, those values are displayed as "Normal". This argument is ignored with plot type "AHA", where the "Low" stage (SBP < 100 and DBP < 60) is always displayed.

bp_cutoffs

A list containing two vectors corresponding to SBP and DBP cutoffs, respectively. Each vector contains 5 values.

The SBP vector (100, 120, 130, 140, 180) corresponds to the upper limits for the following stages: Low (0-100), Normal (100-120), Elevated (120-130), Stage 1 Hypertension (130-140), Stage 2 Hypertension (140-180). When utilizing Lee et al (2020) guidelines, additional stages are included: Isolated Systolic Hypertension for Stage 1 (ISH - S1) (130-140), Isolated Diastolic Hypertension for Stage 1 (IDH - S1) (0-130), ISH - S2 (140-180), and IDH - S2 (0-140).

The DBP vector (60, 80, 80, 90, 120) corresponds to the upper limits for the following stages: Low (0-60), Normal (60-80), Elevated (0-80), Stage 1 Hypertension (80-90), Stage 2 Hypertension (90-120). The upper limit of the "Elevated" category repeats in the DBP vector and matches that of Normal. This because according to most guidelines, there is no distinction between DBP cutoffs for Normal and Elevated - these stages are discerned by SBP, not DBP. When utilizing Lee et al (2020) guidelines, additional stages are included: Isolated Diastolic Hypertension for Stage 1 (ISH - S1) (0-80), Isolated Diastolic Hypertension for Stage 1 (IDH - S1) (80-90), ISH - S2 (0-90), and IDH - S2 (90-120).

Any SBP reading below 100 or DBP reading below 60 is considered Hypotension ("Low"). Any SBP reading above 180 or DBP reading above 120 is considered a Crisis.

When guidelines = "AHA", the cutoffs are automatically adjusted to match BP type without user input, For bp_type = "hbpm", SBP = (100, 120, 130, 135, 160), DBP = (60, 80, 80, 85, 110). Forbp_type = "abpm", SBP = (100, 115, 125, 130, 160), DBP = (60, 75, 75, 80, 105). An adjustment of default cutoffs by the user These choices can be overwritten by directly changing bp_cutoffs, in which case the guidelines are ignored and automatically treated as "Custom".

If inc_low = FALSE, although an upper limit value is still required in the SBP vector, the "Low" stage will be omitted in the final output. Similarly, if inc_crisis = FALSE, then the "Crisis" category will be omitted from the final output.

bp_type

Required argument specifying which of the three BP data types ("HBPM", "ABPM", or "AP") the input data is. Default bp_type set to "HBPM". This argument determines which processing steps are necessary to yield sensible output.

HBPM - Home Blood Pressure Monitor | ABPM - Ambulatory Blood Pressure | AP - Arterial Pressure

NOTE: bp_type impacts blood pressure staging in bp_stages if guidelines = "AHA", for which the cutoffs for each blood pressure stage are automatically adjusted according to bp_type.

Details

There are eight total stages according to Lee et al (2020) with the options to include two additional categories for "Low" (Hypotension) and Hypertensive "Crisis". The categories are as follows:

  • Low - (Optional) Legacy category for consistency with AHA stages. According to the AHA, low blood pressure is any reading with SBP < 100 and DBP < 60, and is depicted in light blue in the scatter plot. This is always displayed in "AHA" plot, and can be displayed in "stages2020" plot by setting inc_low = TRUE.

  • Normal - SBP readings less than 120 and DBP readings less than 80. Reading within this range that either have SBP > 100 or DBP > 60 are also considered Normal by AHA. Normal BP is depicted in green in the scatter plot.

  • Elevated - SBP readings between 120 - 129 and DBP readings less than 80. Coincides with Elevated stage as defined by AHA. Without intervention to control the condition, individuals are likely to develop Hypertension. Elevated BP is depicted in yellow in the scatter plot.

  • Stage 1 - All (SDH) - SBP readings between 130 - 139 and DBP readings between 80 - 89. Stage 1 Hypertension will typically result in doctors prescribing medication or lifestyle changes. Stage 1 BP is depicted in dark orange in the scatter plot. These readings correspond to Stage 1 as defined by AHA.

  • Stage 1 - Isolated Diastolic Hypertension (IDH) - SBP readings less than 130, but DBP readings between 80 - 89. This alternative stage 1 level accounts for unusually high diastolic readings, but fairly normal systolic readings and is depicted in orange in the plot. These readings correspond to Stage 1 as defined by AHA.

  • Stage 1 - Isolated Systolic Hypertension (ISH) - SBP readings between 130 - 139, but DBP readings less than 80. This alternative stage 1 level accounts for unusually high systolic readings, but fairly normal diastolic readings and is depicted in orange in the plot. These readings correspond to Stage 1 as defined by AHA.

  • Stage 2 - All (SDH) - SBP readings between 140 - 180 and DBP readings between 90 - 120. Stage 2 Hypertension will typically result in doctors prescribing both medication and lifestyle changes. Stage 2 BP is depicted in bright red in the scatter plot. These readings correspond to Stage 2 as defined by AHA.

  • Stage 2 - Isolated Diastolic Hypertension (IDH) - SBP readings less than or equal to 140, but DBP readings greater than or equal to 90. This alternative stage 2 level accounts for unusually high diastolic readings, but fairly normal systolic readings and is depicted in red. These readings correspond to Stage 2 as defined by AHA.

  • Stage 2 - Isolated Systolic Hypertension (IDH) - SBP readings greater than or equal to 140, but DBP readings less or equal to 90. This alternative stage 2 level accounts for unusually high systolic readings, but fairly normal diastolic readings and is depicted in red. These readings correspond to Stage 2 as defined by AHA.

  • Crisis - (Optional) Legacy category for consistency with AHA stages. According to the AHA, hypertensive crisis is defined as a SBP reading exceeding 180 or a DBP reading exceeding 120. This stage requires medical attention immediately. Crisis is depicted in red in the scatter plot. This is always displayed in "AHA" plot, and can be displayed in "stages2020" plot by setting inc_crisis = TRUE.

Value

A scatter plot graphic using the ggplot2 package overlaying each reading (represented as points) onto a background that contains each stage

References

Lee H, Yano Y, Cho SMJ, Park JH, Park S, Lloyd-Jones DM, Kim HC. Cardiovascular risk of isolated systolic or diastolic hypertension in young adults. Circulation. 2020; 141:1778–1786. doi: 10.1161/CIRCULATIONAHA.119.044838

Unger, T., Borghi, C., Charchar, F., Khan, N. A., Poulter, N. R., Prabhakaran, D., ... & Schutte, A. E. (2020). 2020 International Society of Hypertension global hypertension practice guidelines. Hypertension, 75(6), 1334-1357. doi: 10.1161/HYPERTENSIONAHA.120.15026

Examples

data("bp_jhs")
data("bp_hypnos")
data("bp_ghana")
hypnos_proc <- process_data(bp_hypnos,
                         bp_type = 'abpm',
                         sbp = "syst",
                         dbp = "DIAST",
                         date_time = "date.time",
                         id = "id",
                         wake = "wake",
                         visit = "visit",
                         hr = "hr",
                         map = "map",
                         rpp = "rpp",
                         pp = "pp",
                         ToD_int = c(5, 13, 18, 23))

jhs_proc <- process_data(bp_jhs,
                         sbp = "Sys.mmHg.",
                         dbp = "Dias.mmHg.",
                         date_time = "DateTime",
                         hr = "pulse.bpm.")
rm(bp_hypnos, bp_jhs)

# HYPNOS Data
bp_scatter(hypnos_proc,
           inc_crisis = TRUE,
           inc_low = TRUE,
           group_var = "wake",
           wrap_var = "day_of_week")

# JHS Data
bp_scatter(jhs_proc,
           plot_type = "AHA",
           group_var = "time_of_day")

# Ghana Data Set
#(Note that column names are of proper naming convention so no processing needed)
bp_scatter(bp::bp_ghana, inc_crisis = TRUE, inc_low = FALSE, group_var = "TIME_ELAPSED")

johnschwenck/bp documentation built on Aug. 18, 2022, 11:30 a.m.