% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/audit.R
\name{audit_transformation}
\alias{audit_transformation}
\title{Audit geographic transformation}
\usage{
audit_transformation(
  baseline_data,
  zip_zcta_map,
  hud_crosswalk,
  county_fips,
  variable_name = "value",
  value_col = "estimate"
)
}
\arguments{
\item{baseline_data}{Data frame with baseline data at source geography}

\item{zip_zcta_map}{ZIP-ZCTA association crosswalk}

\item{hud_crosswalk}{HUD ZIP-County crosswalk}

\item{county_fips}{Target county FIPS code}

\item{variable_name}{Name of the variable being tracked (for reporting)}

\item{value_col}{Name of the value column in baseline_data}
}
\value{
An object of class "shellgame_audit" with audit results
}
\description{
Main function to audit a complete geographic transformation pipeline.
Quantifies the perturbation introduced at each hop and reveals the shell game.
}
\examples{
baseline <- data.frame(zcta = c("00001", "00002"), estimate = c(1000, 2000))
zip_zcta <- data.frame(zcta = c("00001", "00002"), zip = c("00010", "00010"))
hud <- data.frame(zip = "00010", county = "99999", tot_ratio = 1)
result <- audit_transformation(
    baseline_data = baseline,
    zip_zcta_map = zip_zcta,
    hud_crosswalk = hud,
    county_fips = "99999",
    variable_name = "population"
)
summary(result)
}
