this function creates a data frame to be used for caterpillar plots where each row is a site name. The df includes a numerator, denominator, and rate for the variable of interest, as well as a 95% CI (bounded by 0 and 1) for the rate.

create_caterpillar_df(df, num_var, denom_var, group_var = site_name)

Arguments

df

Data frame -- usually this is obi_cohort

num_var

Numerator variable

denom_var

Denominator variable

group_var

Grouping variable; by default, this is site_name