Funnel

This is just an instance of our custom NSFunnel React widget lightly wrapped in htmlwidgets and rendered in an R Markdown document.

funnelData <- data.frame(
  "label" = c("Total Population", "Heart Failure Code", "Diagnosis Time", "1st Non-Urgent Visit", "Age",
    "Continuous Enrollment", "Heart Transplant", "Heart Assist"),
  "value" = c(887180, 687180, 429416, 364016, 363288, 242172, 41673, 1291),
  "info" = c(
    "",
    "Has inpatient or outpatient heart failure code (inclusion)",
    "First diagnosis of systolic heart failure between 1/1/08 and 12/31/16 (inclusion)",
    "First outpatient non-urgent office visit, on or following the first diagnosis of systolic heart failure, no later than 12/31/16 (inclusion)",
    "Age 18 years or older as of the outpatient non-urgent office visit (inclusion)",
    "Continuously enrolled for 1 year prior to the outpatient non-urgent office visit plus 1 day, gaps no longer than 30 days (inclusion)",
    "History of heart transplant using all available history (exclusion)",
    "History of ventricular assist device using all available history (exclusion)"
  )
)

nswidgets::create_funnel(data = funnelData, graphWidth = 560, labelWidth = 235, curvature = T, nonlinear = T)