% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/transformation.R
\name{transform_zip_to_county}
\alias{transform_zip_to_county}
\title{Transform ZIP data to County level}
\usage{
transform_zip_to_county(zip_data, hud_crosswalk, county_fips = NULL)
}
\arguments{
\item{zip_data}{Data frame with columns: zip, value}

\item{hud_crosswalk}{Data frame with columns: zip, county, tot_ratio}

\item{county_fips}{Optional FIPS code to filter to specific county}
}
\value{
Data frame with columns: county, value (allocated to county level)
}
\description{
Performs the second hop: ZIP → County using HUD TOT_RATIO allocation.
This is where the second swap occurs: further imputation via proxy.
}
\examples{
zip_data <- data.frame(zip = "00010", value = 3000)
hud <- data.frame(zip = "00010", county = "99999", tot_ratio = 1)
result <- transform_zip_to_county(zip_data, hud, county_fips = "99999")
}
