Forest Plot

data <- read.csv('./data/forest_plot.csv')
head(data, 5)
##   analysis group       risk      ci_lo     ci_hi
## 1       NA  2014 0.09420831 0.09144143 0.0969752
## 2       NA  2015 0.14612402 0.14305269 0.1491954
## 3       NA  2016 0.10394989 0.10122104 0.1066787
## 4       NA  2017 0.10994955 0.10711458 0.1127845
## 5       NA  2018 0.12186692 0.11883912 0.1248947
nswidgets::create_forest_plot(
  data = data,
  axis_labels = list(x = 'Risk'),
  group_label = 'year',
  x_value_domain = list(0, 0.22)
)

Stratified Forest Plot

data <- read.csv('./data/disenrollment_risk.csv')
head(data, 5)
##   analysis group       risk      ci_lo     ci_hi
## 1    Urban  2014 0.09420831 0.09144143 0.0969752
## 2    Rural  2014 0.10098599 0.09881705 0.1031549
## 3 Suburban  2014 0.10930921 0.10612173 0.1124967
## 4  Missing  2014 0.14448399 0.13148448 0.1574835
## 5    Urban  2015 0.14612402 0.14305269 0.1491954
nswidgets::create_forest_plot(
  data = data,
  axis_labels = list(x = 'Risk'),
  group_label = 'year',
  x_value_domain = list(0, 0.22)
)