---
title: "proportionality-considerations"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Proportionality considerations}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---


```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```


## Why Crosswalks Create Delta

Much like antigen or diagnostic formulation, where sensitivity and specificity must be balanced, geographic transformations operate within a similar trade-off space. A method that maximizes coverage may reduce geographic precision, while a method that preserves tight geographic alignment may shed or distort counts.

Crosswalks, allocation rules, and lookup tables implicitly select a point along this trade-off. This audit makes that selection visible.

## Proportional Allocation Is an Assumption

This is verbatim from "How to Apply Proportional Allocation"

1. **Identify the Split:** If a Census tract is split by two different ZIP codes (e.g., 30% in ZIP A, 70% in ZIP B), the RES_RATIO will be 0.30 and 0.70.
2. **Calculate Allocation:** If a Census tract has 100 housing units, 30 units (100 * 0.30) are allocated to ZIP A, and 70 units (100 * 0.70) are allocated to ZIP B.
3. **Handle Multiple Records:** A single tract or ZIP code may appear multiple times if it overlaps with multiple, opposing boundaries. 

## Direction Matters (ZCTA $\rightarrow$ ZIP $\neq$ ZIP $\rightarrow$ ZCTA)

This construction (crosswalks in general) does not imply bidirectionality (it is not a valid inverse crosswalk) and does not encode proportional allocation. It is used solely to quantify how a typical boundary-translation workflow can alter aggregate estimates under an explicit allocation rule.


## What geoDeltaAudit Measures

We quantify $\Delta(\text{VAR})$, defined as the change in the value of a variable induced solely by geographic transformation and allocation choices, holding the underlying data source constant:

$$\Delta(\text{VAR}) = \text{VAR}_1 - \text{VAR}_0$$

where $\text{VAR}_0$ is the baseline value at geography A and $\text{VAR}_1$ the post-transformation value at the same geography. The pipeline is a composition of hops:

$$T = T_2 \circ T_1 \circ \dots \quad \text{(e.g., ZCTA } \rightarrow \text{ ZIP } \rightarrow \text{ County)}$$

Transformation composition is not commutative: in general, $T_2 \circ T_1 \neq T_1 \circ T_2$. $\Delta$ therefore depends on the pathway of transformation, not only its endpoints (pathway dependence); on the choices made at each decision point—membership definition, crosswalk selection, allocation ratio (sensitivity); and on the data itself.

In this example, $\Delta_x(\text{population})$ for Hennepin County under a ZCTA $\rightarrow$ ZIP $\rightarrow$ County transformation using HUD TOT_RATIO allocation is $-12.6\%$ relative to the relationship-based baseline.

$\Delta(\text{VAR})$ does not imply:

* Which representation is "correct,"
* Which direction of allocation recovers the "true" value, or
* That a zero delta is desirable.

$\Delta(\text{VAR})$ states only that the variable is not invariant under this transformation.



