Skip to contents

Rename a city data.frame onto the canonical audit schema

Usage

morie_fairness_apply_profile(df, profile)

Arguments

df

A data.frame in the city's native column names.

profile

A morie_city_profile or the name (character) of a registered profile.

Value

A new data.frame with the profile's columns renamed to the canonical names, retaining only those canonical columns.

Examples

df <- data.frame(beat = c("A", "B"), score = c(0.1, 0.9))
p <- morie_fairness_city_profile(
  "demo", area_col = "beat", risk_col = "score"
)
morie_fairness_apply_profile(df, p)
#>   area risk
#> 1    A  0.1
#> 2    B  0.9