City-agnostic data profiles for the predictive-policing audit
Source:R/fairness_cityprofile.R
fairness_cityprofile.RdR port of the Python module morie.fairness.cityprofile.
The disparity audit operates on a canonical per-area schema:
area, risk, outcome, population,
group. A morie_city_profile records which columns
of one city's open-data export carry those five canonical fields,
and morie_fairness_apply_profile renames an arbitrary
city data.frame onto the canonical schema so the audit code
never needs to know which city the data came from.
Details
Functions
morie_fairness_city_profile: constructor for a city profile object.morie_fairness_register_city: register a profile in the process-local registry.morie_fairness_get_city: look up a registered profile by case-insensitive name.morie_fairness_list_cities: list registered profile names.morie_fairness_apply_profile: rename adata.frameonto the canonical schema.