Calculate performance gap between charter and district sectors
Source:R/percentile_rank.R
sector_gap.RdCalculates the difference in performance between the charter sector aggregate and traditional district for host cities. Positive values indicate charter sector outperforms district.
Value
Dataframe with one row per city-year containing:
charter_value: Charter sector metric valuedistrict_value: Traditional district metric valuesector_gap: charter_value - district_valuesector_leader: "charter", "district", or "tie"
Examples
if (FALSE) { # \dontrun{
# Get sector gaps for all host cities
grate_with_aggs %>%
sector_gap(metric_col = "grad_rate")
} # }