From 5907a720647c5c498ec0322aa83e9b5a43dabda5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Juaristi?= <127882282+juaristi22@users.noreply.github.com> Date: Tue, 29 Sep 2026 13:13:02 +0100 Subject: [PATCH 01/17] UK was_lisa runtime: Lifetime ISA holdings from the WAS round-8 person tab (#1003) The stage module (not yet on the roster): the WAS round-8 person tab joined to the cleaned household tab on CASER8, with the released DVFLISAvR8 pinned to the household aggregate DVFLISAVR8_aggr (refused otherwise), response classes kept as evidence (observed, banded, ONS-imputed), and the declared credibility rule (holders in an age band starting at 45 or above recoded to non-holders; holders above the balance ceiling kept as owners but left out of the balance fit). Ownership is a weighted ridge logistic (unpenalised intercept, so the donor's weighted ownership share is reproduced in-sample) drawn with person-keyed uniforms; the balance is the holders-only regime-gated QRF drawn at a second keyed quantile via predict_positive_from_uniforms. A household's LISA total is capped pro rata at its gross_financial_wealth, which WAS counts LISAs in. read_pinned_tab gains an optional columns= selection: a full read of the 4,079-column person tab peaks at 6 GB resident. The fixture tool gains the synthetic WAS person donor (and CASER8 / DVFLISAVR8_aggr on the household donor); the H2 fixture is regenerated when the stage joins the roster. Co-Authored-By: Claude Opus 5.5 --- .../src/microcosm/build/source_manifest.py | 4 + .../microcosm/build/uk_runtime/frs_spine.py | 34 +- .../microcosm/build/uk_runtime/was_lisa.py | 1518 +++++++++++++++++ .../tests/engine_free/uk/test_uk_frs_spine.py | 29 + .../tests/engine_free/uk/test_uk_was_lisa.py | 567 ++++++ tools/graph_uk_spine_fixture.py | 69 + 6 files changed, 2218 insertions(+), 3 deletions(-) create mode 100644 packages/microcosm-build/src/microcosm/build/uk_runtime/was_lisa.py create mode 100644 packages/microcosm-build/tests/engine_free/uk/test_uk_was_lisa.py diff --git a/packages/microcosm-build/src/microcosm/build/source_manifest.py b/packages/microcosm-build/src/microcosm/build/source_manifest.py index 2acd8caf7..1f787c140 100644 --- a/packages/microcosm-build/src/microcosm/build/source_manifest.py +++ b/packages/microcosm-build/src/microcosm/build/source_manifest.py @@ -64,12 +64,14 @@ "assemble_group_entities", "attribute_self_employed_health_premiums", "calibrate_binary_assignment", + "cap_lifetime_isa_to_financial_wealth", "calibrate_binary_assignment_joint_targets", "classify_cgt_asset_type_facts_with_reviewed_fence", "classify_cgt_band_facts_with_reviewed_fence", "classify_hmrc_income_facts_with_reviewed_fences", "clone_records", "clean_nts_travel_tables", + "clean_was_lisa_donor", "convert_donors_to_target_stock", "convert_interest_to_structural_mortgage_inputs", "compute_ratio", @@ -119,6 +121,8 @@ "gate_zero_weight_strata", "head_carry", "impute_bus_use_band", + "impute_lifetime_isa_balance", + "impute_lifetime_isa_ownership", "join", "impute_retirement_contributions_to_puf_support", "impute_childcare_to_puf_support", diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/frs_spine.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/frs_spine.py index a0f403059..f2c2f4d39 100644 --- a/packages/microcosm-build/src/microcosm/build/uk_runtime/frs_spine.py +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/frs_spine.py @@ -2,7 +2,7 @@ from __future__ import annotations -from collections.abc import Mapping +from collections.abc import Collection, Mapping from pathlib import Path from typing import Any @@ -353,7 +353,20 @@ def _artifact_by_table(stage: SourceStageSpec) -> dict[str, Mapping[str, Any]]: return by_table -def _read_pinned_tab(path: Path, artifact: Mapping[str, Any]) -> pd.DataFrame: +def _read_pinned_tab( + path: Path, + artifact: Mapping[str, Any], + *, + columns: Collection[str] | None = None, +) -> pd.DataFrame: + """Read a size- and sha256-pinned tab with lower-cased column names. + + ``columns`` (matched case-insensitively) reads only those columns, for wide + tabs where a full read costs gigabytes (the WAS round-8 person tab has + 4,079 columns); every one must be present, and the pins are checked on the + whole file first either way. + """ + if not path.exists(): raise FileNotFoundError(f"FRS spine tab is missing: {path}.") expected_size = int(artifact["size_bytes"]) @@ -370,8 +383,23 @@ def _read_pinned_tab(path: Path, artifact: Mapping[str, Any]) -> pd.DataFrame: f"FRS spine tab {path.name} hashes to {actual_sha}, " f"not the pinned {expected_sha}." ) - raw = pd.read_csv(path, sep="\t") + if columns is None: + raw = pd.read_csv(path, sep="\t") + else: + wanted = {str(column).lower() for column in columns} + raw = pd.read_csv( + path, sep="\t", usecols=lambda column: str(column).lower() in wanted + ) raw.columns = raw.columns.str.lower() + if columns is not None: + if raw.columns.duplicated().any(): + duplicates = sorted(set(raw.columns[raw.columns.duplicated()])) + raise ValueError( + f"{path.name} has duplicate column(s) after lower-casing: {duplicates}." + ) + missing = sorted(wanted - set(raw.columns)) + if missing: + raise ValueError(f"{path.name} is missing required column(s): {missing}.") converted = raw.apply(pd.to_numeric, errors="coerce") if path.stem == "job" and "salsac" in raw.columns: converted["salsac_raw"] = raw["salsac"].astype(str) diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/was_lisa.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/was_lisa.py new file mode 100644 index 000000000..32ff40ab7 --- /dev/null +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/was_lisa.py @@ -0,0 +1,1518 @@ +"""Lifetime ISA holdings imputed onto the UK spine from the Wealth and Assets Survey. + +The ``was_lisa`` stage (microcosm#1003) reads the WAS round-8 person and +household tabs (UKDS SN 7215, End User Licence; interviews April 2020 to March +2022, Great Britain) and imputes, for every adult of the FRS spine, whether the +person holds a Lifetime ISA (LISA) and the current value across their LISAs. +The household total is the sum over the household's persons. + +WAS asks each adult which ISA types they hold (``FISA``, code 3 = Lifetime ISA) +and the current value (``FLISAV``, or the band ``FLISAB`` when the exact value is +unknown). ONS imputes item non-response and the value within a reported band +and releases the completed value as ``DVFLISAvR8`` (``= FLISAVR8_i``), which sums +exactly to the household aggregate ``DVFLISAVR8_aggr``; the stage refuses a tab +where it does not. Each donor keeps its response class (observed, banded, +imputed) as evidence, so missing answers stay distinct from observed +non-ownership. + +Two parts, both drawn from uniforms keyed on ``person_id`` so that adding or +reordering rows never moves a draw: + +* Who holds: a weighted logistic regression with a light ridge penalty on age + group, the log of the person's earnings and of household net income, gross + financial wealth, cash ISA, stocks-and-shares ISA and savings, private + renting, sex and the number of children. The intercept is unpenalised, so the + model's weighted mean probability on the donor equals the donor's weighted + ownership share. A person holds when their uniform falls below their + probability. The house regime gate (a gradient-boosting classifier) is + miscalibrated for an outcome held by under one per cent of adults with about + 120 donor holders, which is why this part is a logistic. +* How much: the regime-gated QRF fitted on the holders alone and drawn at the + owner's keyed quantile (``predict_positive_from_uniforms``), so a balance is + positive exactly when the person holds. + +A declared credibility rule treats donor records the product rules make +impossible. LISAs have been opened only by people aged 18 to 39 since 6 April +2017, so no holder was older than 44 by March 2022: holders recorded in an age +band starting at 45 or above are read as a misreported ISA type and recoded to +non-holders (the value stays inside the household's gross financial wealth). +Holders above a declared balance ceiling stay holders but leave the balance +fit. Under-18s never hold; no upper age limit is imposed on recipients. + +WAS counts LISAs inside gross financial wealth, so a household's LISA total +never exceeds its ``gross_financial_wealth``: a household over it has its +persons' balances scaled down pro rata, with a receipt. WAS records holdings, +not annual contributions; nothing here derives a contribution or a bonus from a +balance. +""" + +from __future__ import annotations + +from collections.abc import Mapping, Sequence +from dataclasses import dataclass, field +from pathlib import Path +from typing import Any + +import numpy as np +import pandas as pd + +from microcosm.build.gates import EXPLICIT_KIND, FitWeightRecord +from microcosm.build.source_manifest import SourceStageSpec +from microcosm.build.stochastic_assignment import stable_identity_uniforms +from microcosm.build.uk_runtime.frs_spine import read_pinned_tab +from microcosm.build.uk_runtime.national_frame import ( + uk_household_mass_conservation_receipt, + uk_household_weight_kind, + uk_national_frame, + uk_time_period, + validate_uk_national_frame, +) +from microcosm.build.uk_runtime.support_clip import ( + UKSupportClipReceipt, + support_clip_to_donor_with_receipt, +) +from microcosm.build.uk_runtime.was_wealth import ( + clean_was_household_table, +) +from microcosm.build.uk_runtime.was_wealth import ( + recipient_predictors as was_household_predictors, +) +from microcosm.frame import Frame +from microcosm.frame.rules import assert_rules_engine_country + +__all__ = [ + "UK_WAS_LISA_MASS_CONSERVATION_REASON", + "UK_WAS_LISA_OUTPUT_COLUMNS", + "UK_WAS_LISA_STAGE_NAME", + "BalanceModelSpec", + "OwnershipModelSpec", + "UKWASLISAStageTransform", + "WASLISAColumns", + "WASLISAError", + "cap_lifetime_isa_to_financial_wealth", + "clean_was_lisa_donor", + "fit_ownership_model", + "impute_lifetime_isa_balance", + "impute_lifetime_isa_ownership", + "ownership_design", + "recipient_predictors", + "was_lisa_support_ranges", +] + +UK_WAS_LISA_STAGE_NAME = "was_lisa" +#: The household-mass receipt this stage records (the manifest's +#: ``record_mass_conservation_receipt`` operation repeats it): the terminal +#: family gate requires exactly this reason on a valid mass-conserving record. +UK_WAS_LISA_MASS_CONSERVATION_REASON = ( + "WAS Lifetime ISA imputation on the source spine: household weights pass " + "through unchanged and total household mass is conserved." +) +#: The household tab is the ``was_wealth`` donor (same pins); the person tab is +#: this stage's own. +UK_WAS_HOUSEHOLD_TAB_ROLE = "was_qrf_donor" +UK_WAS_PERSON_TAB_ROLE = "was_person_tab" + +CLEAN_WAS_LISA_DONOR_KIND = "clean_was_lisa_donor" +IMPUTE_LIFETIME_ISA_OWNERSHIP_KIND = "impute_lifetime_isa_ownership" +IMPUTE_LIFETIME_ISA_BALANCE_KIND = "impute_lifetime_isa_balance" +CAP_LIFETIME_ISA_TO_FINANCIAL_WEALTH_KIND = "cap_lifetime_isa_to_financial_wealth" + +OWNERSHIP_COLUMN = "has_lifetime_isa" +BALANCE_COLUMN = "lifetime_isa_balance" +HOUSEHOLD_BALANCE_COLUMN = "household_lifetime_isa_balance" +FINANCIAL_WEALTH_COLUMN = "gross_financial_wealth" +UK_WAS_LISA_PERSON_OUTPUT_COLUMNS: tuple[str, ...] = ( + OWNERSHIP_COLUMN, + BALANCE_COLUMN, +) +UK_WAS_LISA_HOUSEHOLD_OUTPUT_COLUMNS: tuple[str, ...] = (HOUSEHOLD_BALANCE_COLUMN,) +UK_WAS_LISA_OUTPUT_COLUMNS: tuple[str, ...] = ( + *UK_WAS_LISA_PERSON_OUTPUT_COLUMNS, + *UK_WAS_LISA_HOUSEHOLD_OUTPUT_COLUMNS, +) +UK_WAS_LISA_NONNEGATIVE_OUTPUT_COLUMNS: tuple[str, ...] = ( + BALANCE_COLUMN, + HOUSEHOLD_BALANCE_COLUMN, +) +UK_WAS_LISA_SUPPORT_CLIP_COLUMNS: tuple[str, ...] = (BALANCE_COLUMN,) +UK_WAS_LISA_FIT_NAME = "uk_was_round_8_lifetime_isa" + +#: The household columns of the cleaned WAS household tab that condition the +#: person imputation (``clean_was_household_table`` names; ``is_renting`` there +#: is the private-renter flag ``DVPriRntR8 == 1``). +HOUSEHOLD_PREDICTORS: tuple[str, ...] = ( + "household_net_income", + "num_adults", + "num_children", + "gross_financial_wealth", + "savings", + "cash_isa", + "stocks_and_shares_isa", +) +PRIVATE_RENTER_COLUMN = "is_private_renter" +#: Engine inputs read at person grain on the recipients. +PERSON_ENGINE_PREDICTORS: tuple[str, ...] = ( + "employment_income", + "self_employment_income", +) +PRIVATE_RENTER_TENURE = "RENT_PRIVATELY" + +#: Donor response classes (evidence only; never predictors). +OBSERVED_NON_HOLDER = "observed_non_holder" +IMPUTED_NON_HOLDER = "imputed_non_holder" +OBSERVED_HOLDER_EXACT_VALUE = "observed_holder_exact_value" +HOLDER_BANDED_VALUE = "holder_banded_value" +HOLDER_IMPUTED_VALUE = "holder_imputed_value" +IMPUTED_HOLDER = "imputed_holder" +RULE_IMPOSSIBLE_HOLDER = "rule_impossible_holder" +RESPONSE_CLASSES: tuple[str, ...] = ( + OBSERVED_NON_HOLDER, + IMPUTED_NON_HOLDER, + OBSERVED_HOLDER_EXACT_VALUE, + HOLDER_BANDED_VALUE, + HOLDER_IMPUTED_VALUE, + IMPUTED_HOLDER, + RULE_IMPOSSIBLE_HOLDER, +) + + +class WASLISAError(ValueError): + """Raised when the WAS tabs or the declaration do not carry what the stage needs.""" + + +# -------------------------------------------------------------------------- +# Declaration readers +# -------------------------------------------------------------------------- + + +def _artifact(stage: SourceStageSpec, role: str) -> Mapping[str, Any]: + for artifact in stage.artifacts: + if artifact.get("role") == role: + return artifact + raise WASLISAError(f"{stage.stage} declares no {role!r} artifact.") + + +def _operation(stage: SourceStageSpec, kind: str) -> Mapping[str, Any]: + for operation in stage.operations: + if operation.kind == kind: + return dict(operation.parameters) + raise WASLISAError(f"{stage.stage} declares no {kind!r} operation.") + + +def _mapping(value: object, label: str) -> Mapping[str, Any]: + if not isinstance(value, Mapping): + raise WASLISAError(f"{label} must be a mapping.") + return value + + +def _strings(value: object, label: str) -> tuple[str, ...]: + if isinstance(value, str) or not isinstance(value, Sequence): + raise WASLISAError(f"{label} must be a list of names.") + return tuple(str(item) for item in value) + + +@dataclass(frozen=True) +class WASLISAColumns: + """The declared WAS column names and codes (one place to correct the codebook).""" + + household_key: str + person_number: str + is_dependent_child: str + age_band: str + sex: str + employment_income: str + self_employment_income: str + holds_lifetime_isa: str + holding_imputed: str + reported_value: str + value_imputed: str + reported_band: str + band_imputed: str + lifetime_isa_balance: str + household_aggregate: str + aggregate_tolerance_gbp: float + non_dependent_code: int + female_code: int + age_band_edges: tuple[int, ...] + sentinel_codes: frozenset[float] + sentinel_recode_columns: tuple[str, ...] + household_predictors: tuple[str, ...] + maximum_holder_age_band_lower: int + balance_ceiling_gbp: float + + _PERSON_KEYS = ( + "person_number", + "is_dependent_child", + "age_band", + "sex", + "employment_income", + "self_employment_income", + "holds_lifetime_isa", + "holding_imputed", + "reported_value", + "value_imputed", + "reported_band", + "band_imputed", + "lifetime_isa_balance", + ) + + @classmethod + def from_parameters(cls, parameters: Mapping[str, Any]) -> WASLISAColumns: + person = _mapping(parameters.get("person_columns"), "person_columns") + missing = [key for key in cls._PERSON_KEYS if key not in person] + if missing: + raise WASLISAError(f"person_columns lacks {missing}.") + rule = _mapping(parameters.get("credibility_rule"), "credibility_rule") + edges = tuple(int(edge) for edge in parameters["age_band_edges"]) + if list(edges) != sorted(set(edges)) or not edges or edges[0] != 0: + raise WASLISAError( + "age_band_edges must be strictly increasing from 0 (the lower edge " + "of each coded band, in code order)." + ) + predictors = _strings( + parameters.get("household_predictors", ()), "household_predictors" + ) + if tuple(predictors) != HOUSEHOLD_PREDICTORS: + raise WASLISAError( + f"household_predictors drifted: manifest declares {predictors!r}, " + f"runtime uses {HOUSEHOLD_PREDICTORS!r}." + ) + recode = _strings( + parameters.get("sentinel_recode_columns", ()), "sentinel_recode_columns" + ) + unknown = sorted(set(recode) - set(PERSON_ENGINE_PREDICTORS)) + if unknown: + raise WASLISAError( + f"sentinel_recode_columns {unknown} are not person income predictors." + ) + return cls( + household_key=str(parameters["household_key"]), + person_number=str(person["person_number"]), + is_dependent_child=str(person["is_dependent_child"]), + age_band=str(person["age_band"]), + sex=str(person["sex"]), + employment_income=str(person["employment_income"]), + self_employment_income=str(person["self_employment_income"]), + holds_lifetime_isa=str(person["holds_lifetime_isa"]), + holding_imputed=str(person["holding_imputed"]), + reported_value=str(person["reported_value"]), + value_imputed=str(person["value_imputed"]), + reported_band=str(person["reported_band"]), + band_imputed=str(person["band_imputed"]), + lifetime_isa_balance=str(person["lifetime_isa_balance"]), + household_aggregate=str(parameters["household_aggregate"]), + aggregate_tolerance_gbp=float(parameters["aggregate_tolerance_gbp"]), + non_dependent_code=int(parameters["non_dependent_code"]), + female_code=int(parameters["female_code"]), + age_band_edges=edges, + sentinel_codes=frozenset( + float(code) for code in parameters["sentinel_codes"] + ), + sentinel_recode_columns=recode, + household_predictors=predictors, + maximum_holder_age_band_lower=int(rule["maximum_holder_age_band_lower"]), + balance_ceiling_gbp=float(rule["balance_ceiling_gbp"]), + ) + + def person_raw_columns(self) -> tuple[str, ...]: + """Every raw person-tab column the stage reads (the selective read).""" + + return ( + self.household_key, + *(getattr(self, key) for key in self._PERSON_KEYS), + ) + + +@dataclass(frozen=True) +class OwnershipModelSpec: + """The declared ownership model (``impute_lifetime_isa_ownership``).""" + + output: str + seed: int + salt: str + penalty_c: float + solver: str + max_iter: int + age_group_lower_bounds: tuple[int, ...] + log1p_predictors: tuple[str, ...] + indicator_predictors: tuple[str, ...] + count_predictors: tuple[str, ...] + minimum_age: int + + @classmethod + def from_parameters(cls, parameters: Mapping[str, Any]) -> OwnershipModelSpec: + if parameters.get("output") != OWNERSHIP_COLUMN: + raise WASLISAError( + f"impute_lifetime_isa_ownership must write {OWNERSHIP_COLUMN!r}." + ) + if parameters.get("model") != "weighted_ridge_logistic": + raise WASLISAError("the ownership model must be weighted_ridge_logistic.") + if parameters.get("standardise") != "donor_unweighted_mean_sd": + raise WASLISAError("ownership predictors standardise on the donor.") + bounds = tuple(int(b) for b in parameters["age_group_lower_bounds"]) + if list(bounds) != sorted(set(bounds)) or not bounds or bounds[0] != 0: + raise WASLISAError( + "age_group_lower_bounds must be strictly increasing from 0." + ) + population = _mapping(parameters.get("population"), "population") + penalty_c = float(parameters["penalty_c"]) + if not np.isfinite(penalty_c) or penalty_c <= 0: + raise WASLISAError("penalty_c must be a positive finite number.") + return cls( + output=OWNERSHIP_COLUMN, + seed=int(parameters["seed"]), + salt=str(parameters["salt"]), + penalty_c=penalty_c, + solver=str(parameters["solver"]), + max_iter=int(parameters["max_iter"]), + age_group_lower_bounds=bounds, + log1p_predictors=_strings( + parameters.get("log1p_predictors", ()), "log1p_predictors" + ), + indicator_predictors=_strings( + parameters.get("indicator_predictors", ()), "indicator_predictors" + ), + count_predictors=_strings( + parameters.get("count_predictors", ()), "count_predictors" + ), + minimum_age=int(population["minimum_age"]), + ) + + def feature_names(self) -> tuple[str, ...]: + return ( + *(f"age_group_{lower}" for lower in self.age_group_lower_bounds), + *(f"log1p_{column}" for column in self.log1p_predictors), + *self.indicator_predictors, + *self.count_predictors, + ) + + def group_labels(self) -> tuple[str, ...]: + """Recipient-facing labels (the first group starts at the minimum age).""" + + labels = [] + bounds = self.age_group_lower_bounds + for index, lower in enumerate(bounds): + start = max(lower, self.minimum_age) if index == 0 else lower + if index + 1 < len(bounds): + labels.append(f"{start}-{bounds[index + 1] - 1}") + else: + labels.append(f"{start}+") + return tuple(labels) + + +@dataclass(frozen=True) +class BalanceModelSpec: + """The declared balance model (``impute_lifetime_isa_balance``).""" + + output: str + seed: int + salt: str + n_estimators: int + predictors: tuple[str, ...] + expected_regime: str + + @classmethod + def from_parameters(cls, parameters: Mapping[str, Any]) -> BalanceModelSpec: + if parameters.get("output") != BALANCE_COLUMN: + raise WASLISAError( + f"impute_lifetime_isa_balance must write {BALANCE_COLUMN!r}." + ) + if parameters.get("model") != "regime_gated_qrf": + raise WASLISAError("the balance model must be regime_gated_qrf.") + if parameters.get("training_rows") != "credible_holders": + raise WASLISAError("the balance model trains on the credible holders.") + n_estimators = int(parameters.get("n_estimators", 100)) + if n_estimators < 1: + raise WASLISAError("n_estimators must be positive.") + return cls( + output=BALANCE_COLUMN, + seed=int(parameters["seed"]), + salt=str(parameters["salt"]), + n_estimators=n_estimators, + predictors=_strings(parameters.get("predictors", ()), "predictors"), + expected_regime=str(parameters["expected_regime"]), + ) + + +# -------------------------------------------------------------------------- +# Donor +# -------------------------------------------------------------------------- + + +def _lower_lookup(table: pd.DataFrame, label: str) -> dict[str, str]: + lowered: dict[str, str] = {} + for column in table.columns: + key = str(column).lower() + if key in lowered: + raise WASLISAError(f"the WAS {label} tab has duplicate column {key!r}.") + lowered[key] = column + return lowered + + +def _column( + table: pd.DataFrame, lowered: Mapping[str, str], name: str, label: str +) -> pd.Series: + actual = lowered.get(name.lower()) + if actual is None: + raise WASLISAError(f"the WAS {label} tab lacks the declared column {name!r}.") + return pd.to_numeric(table[actual], errors="coerce") + + +def _age_band_index(values: np.ndarray, edges: Sequence[int]) -> np.ndarray: + """The 0-based band of each age (the ``nts_bus_travel`` age-band convention).""" + + bounds = np.asarray(list(edges)[1:], dtype=float) + return np.searchsorted(bounds, np.asarray(values, dtype=float), side="right") + + +def _age_group_index(values: np.ndarray, bounds: Sequence[int]) -> np.ndarray: + return np.searchsorted( + np.asarray(list(bounds)[1:], dtype=float), + np.asarray(values, dtype=float), + side="right", + ) + + +def _weighted_share(mask: np.ndarray, weights: np.ndarray) -> float | None: + total = float(weights.sum()) + if total <= 0: + return None + return float(weights[mask].sum() / total) + + +def _weighted_quantiles( + values: np.ndarray, weights: np.ndarray, quantiles: Sequence[float] +) -> dict[str, float | None]: + values = np.asarray(values, dtype=float) + weights = np.asarray(weights, dtype=float) + keep = np.isfinite(values) & (weights > 0) + values, weights = values[keep], weights[keep] + if values.size == 0: + return {f"p{int(round(q * 100))}": None for q in quantiles} + order = np.argsort(values, kind="stable") + cumulative = np.cumsum(weights[order]) + return { + f"p{int(round(q * 100))}": float( + values[order][ + min( + int(np.searchsorted(cumulative, q * cumulative[-1])), + values.size - 1, + ) + ] + ) + for q in quantiles + } + + +@dataclass(frozen=True) +class WASLISADonor: + """The cleaned donor adults and the cleaning receipt.""" + + person: pd.DataFrame + receipt: Mapping[str, Any] + + +def clean_was_lisa_donor( + person_raw: pd.DataFrame, + household_raw: pd.DataFrame, + *, + columns: WASLISAColumns, +) -> WASLISADonor: + """Join WAS persons to their cleaned household and apply the declared rules. + + Returns one row per non-dependent adult with the person and household + predictors, the design weight (the household cross-sectional weight each + person carries), ``holds`` after the credibility rule, the credible balance + (0 for non-holders, NaN for holders above the declared ceiling, which leave + the balance fit) and the response class. Refuses an orphan person, a + missing or negative released value, an age band outside the declared codes, + and a person total that does not reproduce the household aggregate. + """ + + person_lower = _lower_lookup(person_raw, "person") + household_lower = _lower_lookup(household_raw, "household") + household = clean_was_household_table(household_raw) + if not household.index.equals(household_raw.index): + raise WASLISAError("the cleaned WAS household table lost its row alignment.") + household = household.assign( + household_key=_column( + household_raw, household_lower, columns.household_key, "household" + ).to_numpy(), + household_aggregate=_column( + household_raw, household_lower, columns.household_aggregate, "household" + ).to_numpy(), + ) + if household["household_key"].isna().any(): + raise WASLISAError("the WAS household tab has a missing case number.") + if household["household_key"].duplicated().any(): + raise WASLISAError("the WAS household tab repeats a case number.") + raw = pd.DataFrame( + { + "household_key": _column( + person_raw, person_lower, columns.household_key, "person" + ), + **{ + key: _column(person_raw, person_lower, getattr(columns, key), "person") + for key in WASLISAColumns._PERSON_KEYS + }, + } + ) + if raw["household_key"].isna().any(): + raise WASLISAError("the WAS person tab has a missing case number.") + if raw.duplicated(["household_key", "person_number"]).any(): + raise WASLISAError("the WAS person tab repeats a (case, person) pair.") + orphans = ~raw["household_key"].isin(household["household_key"]) + if orphans.any(): + raise WASLISAError( + f"{int(orphans.sum())} WAS persons have no household row; the person and " + "household tabs are not the same deposit." + ) + released = raw["lifetime_isa_balance"] + # The pin check: the released person values reproduce the household + # aggregate on every household (the ONS aggregate is the sum of the person + # values), which also proves the column is the one the aggregate sums. + person_totals = ( + released.clip(lower=0.0) + .fillna(0.0) + .groupby(raw["household_key"].to_numpy()) + .sum() + ) + aggregate = household.set_index("household_key")["household_aggregate"].fillna(0.0) + difference = (aggregate - person_totals.reindex(aggregate.index).fillna(0.0)).abs() + if float(difference.max()) > columns.aggregate_tolerance_gbp: + raise WASLISAError( + f"person {columns.lifetime_isa_balance} does not sum to the household " + f"{columns.household_aggregate} on {int((difference > columns.aggregate_tolerance_gbp).sum())} " + f"households (max difference {float(difference.max()):.2f})." + ) + joined = raw.merge( + household[ + [ + "household_key", + "weight", + "is_renting", + *HOUSEHOLD_PREDICTORS, + ] + ], + on="household_key", + how="left", + validate="many_to_one", + ) + dependent = joined["is_dependent_child"] != columns.non_dependent_code + dependent_holders = int((dependent & (joined["lifetime_isa_balance"] > 0)).sum()) + adults = joined.loc[~dependent].reset_index(drop=True) + value = adults["lifetime_isa_balance"] + if value.isna().any() or (value < 0).any(): + raise WASLISAError( + f"{columns.lifetime_isa_balance} is missing or negative for " + f"{int((value.isna() | (value < 0)).sum())} donor adults; a missing value " + "is never read as a zero balance." + ) + band_code = adults["age_band"] + valid_band = band_code.between(1, len(columns.age_band_edges)) + if not valid_band.all(): + raise WASLISAError( + f"{int((~valid_band).sum())} donor adults carry an age band outside codes " + f"1..{len(columns.age_band_edges)}." + ) + band = band_code.astype(np.int64).to_numpy() - 1 + band_lower = np.asarray(columns.age_band_edges, dtype=float)[band] + weight = adults["weight"].to_numpy(dtype=float) + if not np.isfinite(weight).all() or (weight <= 0).any(): + raise WASLISAError("donor adults must carry a positive finite weight.") + sentinel_recodes: dict[str, int] = {} + incomes: dict[str, np.ndarray] = {} + for column in PERSON_ENGINE_PREDICTORS: + values = adults[column].astype(float) + if column in columns.sentinel_recode_columns: + is_sentinel = values.isin(sorted(columns.sentinel_codes)) + sentinel_recodes[column] = int(is_sentinel.sum()) + values = values.where(~is_sentinel, 0.0) + incomes[column] = values.fillna(0.0).to_numpy(dtype=float) + holds_released = value.to_numpy(dtype=float) > 0.0 + flag = adults["holds_lifetime_isa"].to_numpy(dtype=float) == 1.0 + rule_impossible = holds_released & ( + band_lower >= columns.maximum_holder_age_band_lower + ) + holds = holds_released & ~rule_impossible + above_ceiling = holds & (value.to_numpy(dtype=float) > columns.balance_ceiling_gbp) + balance = np.where(holds, value.to_numpy(dtype=float), 0.0) + balance[above_ceiling] = np.nan + response = np.full(len(adults), OBSERVED_NON_HOLDER, dtype=object) + holding_imputed = adults["holding_imputed"].to_numpy(dtype=float) == 1.0 + response[~holds_released & holding_imputed] = IMPUTED_NON_HOLDER + reported = adults["reported_value"].to_numpy(dtype=float) + value_imputed = adults["value_imputed"].to_numpy(dtype=float) == 1.0 + banded = adults["reported_band"].between(1, 8).to_numpy() | ( + adults["band_imputed"].to_numpy(dtype=float) == 1.0 + ) + holder = holds_released & ~rule_impossible + response[holder & ~holding_imputed & (reported > 0) & ~value_imputed] = ( + OBSERVED_HOLDER_EXACT_VALUE + ) + response[ + holder & ~holding_imputed & ~((reported > 0) & ~value_imputed) & banded + ] = HOLDER_BANDED_VALUE + response[ + holder & ~holding_imputed & ~((reported > 0) & ~value_imputed) & ~banded + ] = HOLDER_IMPUTED_VALUE + response[holder & holding_imputed] = IMPUTED_HOLDER + response[rule_impossible] = RULE_IMPOSSIBLE_HOLDER + person = pd.DataFrame( + { + "household_key": adults["household_key"].to_numpy(), + "person_number": adults["person_number"].to_numpy(), + "age_band": band.astype(np.int64), + "age_floor": band_lower, + "is_female": ( + adults["sex"].to_numpy(dtype=float) == columns.female_code + ).astype(float), + "employment_income": incomes["employment_income"], + "self_employment_income": incomes["self_employment_income"], + **{ + column: adults[column].astype(float).to_numpy() + for column in HOUSEHOLD_PREDICTORS + }, + PRIVATE_RENTER_COLUMN: adults["is_renting"].astype(float).to_numpy(), + "weight": weight, + "holds": holds.astype(np.int64), + BALANCE_COLUMN: balance, + "lisa_response_class": response, + } + ) + released_values = value.to_numpy(dtype=float) + mass = released_values * weight + total_mass = float(mass[holds_released].sum()) + holder_weight = float(weight[holds_released].sum()) + classes = { + name: { + "persons": int((response == name).sum()), + "weight": float(weight[response == name].sum()), + } + for name in RESPONSE_CLASSES + } + receipt = { + "persons_read": int(len(raw)), + "households": int(len(household)), + "donor_adults": int(len(adults)), + "dependent_children_excluded": int(dependent.sum()), + "dependent_children_with_a_value": dependent_holders, + "holders_released": int(holds_released.sum()), + "holders_after_rule": int(holds.sum()), + "credible_holders_in_balance_fit": int((holds & ~above_ceiling).sum()), + "released_flag_value_disagreements": int((flag != holds_released).sum()), + "response_classes": classes, + "sentinel_recodes": sentinel_recodes, + "aggregate_check": { + "households_checked": int(len(aggregate)), + "max_abs_difference_gbp": float(difference.max()), + "tolerance_gbp": columns.aggregate_tolerance_gbp, + }, + "credibility_rule": { + "maximum_holder_age_band_lower": columns.maximum_holder_age_band_lower, + "balance_ceiling_gbp": columns.balance_ceiling_gbp, + "holders_recoded_for_age": int(rule_impossible.sum()), + "recoded_weighted_share_of_holders": ( + float(weight[rule_impossible].sum() / holder_weight) + if holder_weight > 0 + else None + ), + "recoded_weighted_share_of_lisa_mass": ( + float(mass[rule_impossible].sum() / total_mass) + if total_mass > 0 + else None + ), + "holders_above_ceiling": int(above_ceiling.sum()), + "above_ceiling_weighted_share_of_holders": ( + float(weight[above_ceiling].sum() / holder_weight) + if holder_weight > 0 + else None + ), + "above_ceiling_weighted_share_of_lisa_mass": ( + float(mass[above_ceiling].sum() / total_mass) + if total_mass > 0 + else None + ), + }, + "weighted_adult_ownership_share": _weighted_share(holds, weight), + "weighted_adult_ownership_share_released": _weighted_share( + holds_released, weight + ), + "credible_holder_balance_quantiles": _weighted_quantiles( + balance[holds & ~above_ceiling], + weight[holds & ~above_ceiling], + (0.1, 0.25, 0.5, 0.75, 0.9), + ), + "credible_holder_weighted_mean_balance": ( + float( + np.average( + balance[holds & ~above_ceiling], + weights=weight[holds & ~above_ceiling], + ) + ) + if (holds & ~above_ceiling).any() + else None + ), + } + return WASLISADonor(person=person, receipt=receipt) + + +def was_lisa_support_ranges(donor: pd.DataFrame) -> dict[str, tuple[float, float]]: + """Exact donor ranges of the clipped columns (in-run clip and bounds tool).""" + + ranges: dict[str, tuple[float, float]] = {} + for column in UK_WAS_LISA_SUPPORT_CLIP_COLUMNS: + values = pd.to_numeric(donor[column], errors="coerce") + finite = values[np.isfinite(values)] + if not finite.empty: + ranges[column] = (float(finite.min()), float(finite.max())) + return ranges + + +# -------------------------------------------------------------------------- +# Recipients +# -------------------------------------------------------------------------- + + +def _enum_name(value: object) -> str: + name = getattr(value, "name", None) + return str(name if name is not None else value) + + +def recipient_predictors( + frame: Frame, + engine: object, + *, + age_band_edges: Sequence[int], +) -> pd.DataFrame: + """Person-grain predictors of the FRS spine in the donor's vocabulary. + + Household predictors reuse ``was_wealth.recipient_predictors`` (the same + definitions the WAS household donor is read with); earnings are the engine's + person inputs; tenure is the private-renter flag; the financial columns are + the household's ``was_wealth`` draws. Rows align with the person table. + """ + + person = frame.table("person") + household = frame.table("household") + for column in ("person_id", "person_household_id", "age", "gender"): + if column not in person: + raise WASLISAError(f"recipient person table lacks {column!r}.") + for column in ( + "household_id", + "tenure_type", + "gross_financial_wealth", + "savings", + "cash_isa", + "stocks_and_shares_isa", + ): + if column not in household: + raise WASLISAError( + f"recipient household table lacks {column!r} (the was_wealth draw " + "runs first)." + ) + household_predictors = was_household_predictors(frame, engine) + by_household = pd.DataFrame( + { + "household_net_income": household_predictors[ + "household_net_income" + ].to_numpy(dtype=float), + "num_adults": household_predictors["num_adults"].to_numpy(dtype=float), + "num_children": household_predictors["num_children"].to_numpy(dtype=float), + **{ + column: pd.to_numeric(household[column], errors="coerce") + .fillna(0.0) + .to_numpy(dtype=float) + for column in ( + "gross_financial_wealth", + "savings", + "cash_isa", + "stocks_and_shares_isa", + ) + }, + PRIVATE_RENTER_COLUMN: ( + household["tenure_type"].map(_enum_name) == PRIVATE_RENTER_TENURE + ) + .astype(float) + .to_numpy(), + }, + index=pd.Index(household["household_id"].to_numpy()), + ) + materialized = engine.materialize( + frame, PERSON_ENGINE_PREDICTORS, uk_time_period(frame) + ) + for column in PERSON_ENGINE_PREDICTORS: + declared = str(engine.variable_metadata(column).entity) + if declared != "person": + raise WASLISAError( + f"engine declares {column!r} at entity {declared!r}; the LISA stage " + "reads it per person." + ) + earnings = {} + for column in PERSON_ENGINE_PREDICTORS: + values = np.asarray(materialized[column], dtype=float) + if values.shape != (len(person),): + raise WASLISAError( + f"materialized {column!r} has shape {values.shape}; expected " + f"({len(person)},)." + ) + earnings[column] = values + household_ids = person["person_household_id"].to_numpy() + mapped = by_household.reindex(household_ids) + if mapped.isna().any().any(): + raise WASLISAError("every recipient person must map to a household row.") + age = ( + pd.to_numeric(person["age"], errors="coerce").fillna(0.0).to_numpy(dtype=float) + ) + result = pd.DataFrame( + { + "person_id": person["person_id"].to_numpy(), + "person_household_id": household_ids, + "age": age, + "age_floor": age, + "age_band": _age_band_index(age, age_band_edges).astype(np.int64), + "is_female": person["gender"] + .map(_enum_name) + .str.upper() + .isin(("FEMALE", "F", "2")) + .astype(float) + .to_numpy(), + **earnings, + }, + index=person.index, + ) + for column in mapped.columns: + result[column] = mapped[column].to_numpy(dtype=float) + return result + + +# -------------------------------------------------------------------------- +# Ownership: weighted ridge logistic, identity-keyed draw +# -------------------------------------------------------------------------- + + +def ownership_design(frame: pd.DataFrame, spec: OwnershipModelSpec) -> pd.DataFrame: + """The ownership features of donor or recipient rows, in declared order.""" + + groups = _age_group_index( + frame["age_floor"].to_numpy(dtype=float), spec.age_group_lower_bounds + ) + features: dict[str, np.ndarray] = {} + for index, lower in enumerate(spec.age_group_lower_bounds): + features[f"age_group_{lower}"] = (groups == index).astype(float) + for column in spec.log1p_predictors: + features[f"log1p_{column}"] = np.log1p( + np.clip(frame[column].to_numpy(dtype=float), 0.0, None) + ) + for column in (*spec.indicator_predictors, *spec.count_predictors): + features[column] = frame[column].to_numpy(dtype=float) + design = pd.DataFrame(features, index=frame.index) + if not np.isfinite(design.to_numpy()).all(): + raise WASLISAError("ownership predictors must be finite.") + return design + + +@dataclass(frozen=True) +class FittedOwnershipModel: + spec: OwnershipModelSpec + mean: np.ndarray + scale: np.ndarray + model: Any + + def probabilities(self, frame: pd.DataFrame) -> np.ndarray: + design = ownership_design(frame, self.spec).to_numpy(dtype=float) + standardised = (design - self.mean) / self.scale + return np.asarray(self.model.predict_proba(standardised)[:, 1], dtype=float) + + +def fit_ownership_model( + donor: pd.DataFrame, spec: OwnershipModelSpec +) -> tuple[FittedOwnershipModel, dict[str, Any]]: + """Fit the weighted ridge logistic on the donor adults.""" + + from sklearn.linear_model import LogisticRegression + + design = ownership_design(donor, spec) + target = donor["holds"].to_numpy(dtype=np.int64) + if target.sum() == 0 or target.sum() == len(target): + raise WASLISAError("the ownership model needs both holders and non-holders.") + weights = donor["weight"].to_numpy(dtype=float) + values = design.to_numpy(dtype=float) + mean = values.mean(axis=0) + scale = values.std(axis=0, ddof=1) if len(values) > 1 else np.ones(values.shape[1]) + scale = np.where(np.isfinite(scale) & (scale > 0), scale, 1.0) + model = LogisticRegression( + C=spec.penalty_c, solver=spec.solver, max_iter=spec.max_iter + ) + model.fit((values - mean) / scale, target, sample_weight=weights / weights.mean()) + iterations = int(np.max(model.n_iter_)) + if iterations >= spec.max_iter: + raise WASLISAError( + f"the ownership logistic did not converge in {spec.max_iter} iterations." + ) + fitted = FittedOwnershipModel(spec=spec, mean=mean, scale=scale, model=model) + probability = fitted.probabilities(donor) + groups = _age_group_index( + donor["age_floor"].to_numpy(dtype=float), spec.age_group_lower_bounds + ) + by_group = {} + for index, lower in enumerate(spec.age_group_lower_bounds): + mask = groups == index + if mask.any(): + by_group[str(lower)] = { + "donor_share": _weighted_share(target[mask] == 1, weights[mask]), + "model_mean_probability": float( + np.average(probability[mask], weights=weights[mask]) + ), + "donor_adults": int(mask.sum()), + } + receipt = { + "model": "weighted_ridge_logistic", + "penalty_c": spec.penalty_c, + "solver": spec.solver, + "iterations": iterations, + "features": list(spec.feature_names()), + "standardisation": { + "basis": "donor_unweighted_mean_sd", + "mean": { + n: float(m) for n, m in zip(spec.feature_names(), mean, strict=True) + }, + "scale": { + n: float(s) for n, s in zip(spec.feature_names(), scale, strict=True) + }, + }, + "intercept": float(model.intercept_[0]), + "coefficients": { + n: float(c) + for n, c in zip(spec.feature_names(), model.coef_[0], strict=True) + }, + "donor_weighted_ownership_share": _weighted_share(target == 1, weights), + "donor_weighted_mean_probability": float( + np.average(probability, weights=weights) + ), + "by_age_group": by_group, + "donor_adults": int(len(donor)), + "donor_holders": int(target.sum()), + } + return fitted, receipt + + +@dataclass(frozen=True) +class OwnershipImputation: + holds: np.ndarray + probability: np.ndarray + receipt: Mapping[str, Any] + fit_weight_records: tuple[FitWeightRecord, ...] + + +def impute_lifetime_isa_ownership( + donor: pd.DataFrame, + recipient: pd.DataFrame, + *, + spec: OwnershipModelSpec, +) -> OwnershipImputation: + """Draw ownership for recipient adults from the donor-fitted logistic.""" + + fitted, receipt = fit_ownership_model(donor, spec) + probability = fitted.probabilities(recipient) + uniforms = stable_identity_uniforms( + recipient["person_id"].to_numpy(), seed=spec.seed, salt=spec.salt + ) + adult = recipient["age"].to_numpy(dtype=float) >= spec.minimum_age + holds = adult & (uniforms < probability) + probability = np.where(adult, probability, 0.0) + receipt = { + **receipt, + "seed": spec.seed, + "salt": spec.salt, + "draw": "holds when the person-keyed uniform falls below the probability", + "minimum_age": spec.minimum_age, + } + records = ( + FitWeightRecord(f"{UK_WAS_LISA_FIT_NAME}:{OWNERSHIP_COLUMN}", EXPLICIT_KIND), + ) + return OwnershipImputation( + holds=holds, + probability=probability, + receipt=receipt, + fit_weight_records=records, + ) + + +# -------------------------------------------------------------------------- +# Balance: holders-only QRF at the owner's keyed quantile +# -------------------------------------------------------------------------- + + +@dataclass(frozen=True) +class BalanceImputation: + balance: np.ndarray + receipt: Mapping[str, Any] + fit_weight_records: tuple[FitWeightRecord, ...] + + +def impute_lifetime_isa_balance( + donor: pd.DataFrame, + recipient: pd.DataFrame, + *, + holds: np.ndarray, + spec: BalanceModelSpec, +) -> BalanceImputation: + """Draw each owner's balance from the QRF fitted on the credible holders.""" + + from microcosm.fit.qrf import RegimeGatedQRF + + predictors = list(spec.predictors) + missing = sorted({c for c in predictors if c not in donor or c not in recipient}) + if missing: + raise WASLISAError(f"balance predictors {missing} are not on both sides.") + value = donor[BALANCE_COLUMN].to_numpy(dtype=float) + credible = (donor["holds"].to_numpy() == 1) & np.isfinite(value) & (value > 0) + if not credible.any(): + raise WASLISAError("the balance model has no credible donor holders.") + train = donor.loc[credible, [*predictors, BALANCE_COLUMN, "weight"]].astype(float) + train = train.reset_index(drop=True) + fitted = RegimeGatedQRF(n_estimators=spec.n_estimators, seed=spec.seed).fit( + train, predictors, [BALANCE_COLUMN], weights="weight" + ) + regime = str(fitted.regimes().get(BALANCE_COLUMN, "")) + if regime != spec.expected_regime: + raise WASLISAError( + f"the balance model fitted regime {regime!r}, not the declared " + f"{spec.expected_regime!r}." + ) + holds = np.asarray(holds, dtype=bool) + balance = np.zeros(len(recipient), dtype=float) + if holds.any(): + owners = recipient.loc[holds, predictors].astype(float).reset_index(drop=True) + quantiles = stable_identity_uniforms( + recipient.loc[holds, "person_id"].to_numpy(), seed=spec.seed, salt=spec.salt + ) + drawn = fitted.predict_positive_from_uniforms( + owners, quantiles={BALANCE_COLUMN: quantiles} + )[BALANCE_COLUMN].to_numpy(dtype=float) + balance[holds] = drawn + receipt = { + "model": "regime_gated_qrf", + "regime": regime, + "training_rows": int(credible.sum()), + "distinct_training_values": int(np.unique(value[credible]).size), + "n_estimators": spec.n_estimators, + "predictors": predictors, + "seed": spec.seed, + "salt": spec.salt, + "draw": "predict_positive_from_uniforms at the owner-keyed quantile", + "owners_drawn": int(holds.sum()), + } + records = ( + FitWeightRecord(f"{UK_WAS_LISA_FIT_NAME}:{BALANCE_COLUMN}", fitted.weight_kind), + ) + return BalanceImputation( + balance=balance, receipt=receipt, fit_weight_records=records + ) + + +# -------------------------------------------------------------------------- +# Coherence with gross financial wealth, household totals +# -------------------------------------------------------------------------- + + +def cap_lifetime_isa_to_financial_wealth( + *, + person_household_ids: np.ndarray, + balances: np.ndarray, + household_ids: np.ndarray, + household_financial_wealth: np.ndarray, + household_weights: np.ndarray, +) -> tuple[np.ndarray, dict[str, Any]]: + """Scale a household's balances down pro rata to its gross financial wealth. + + WAS counts LISAs inside gross financial wealth, so a household total above + the household's ``gross_financial_wealth`` draw is incoherent; its persons' + balances are multiplied by ``wealth / total`` (zero when the wealth is not + positive). ``was_wealth`` columns are never rewritten. + """ + + balances = np.asarray(balances, dtype=float) + frame = pd.DataFrame( + {"household": np.asarray(person_household_ids), "balance": balances} + ) + totals = frame.groupby("household")["balance"].sum() + wealth = pd.Series( + np.asarray(household_financial_wealth, dtype=float), + index=pd.Index(np.asarray(household_ids)), + ) + weight = pd.Series( + np.asarray(household_weights, dtype=float), + index=pd.Index(np.asarray(household_ids)), + ) + wealth_at = wealth.reindex(totals.index) + if wealth_at.isna().any(): + raise WASLISAError("every person must map to a household's financial wealth.") + over = totals > wealth_at.clip(lower=0.0) + 1e-9 + factor = pd.Series(1.0, index=totals.index) + positive = over & (wealth_at > 0) + factor[positive] = wealth_at[positive] / totals[positive] + factor[over & ~(wealth_at > 0)] = 0.0 + person_factor = factor.reindex(frame["household"]).to_numpy(dtype=float) + capped = balances * person_factor + person_weight = weight.reindex(frame["household"]).to_numpy(dtype=float) + removed = balances - capped + total_mass = float((balances * person_weight).sum()) + receipt = { + "households_over_financial_wealth": int(over.sum()), + "households_over_with_zero_financial_wealth": int( + (over & ~(wealth_at > 0)).sum() + ), + "persons_scaled": int(((removed > 0) & (capped > 0)).sum()), + "owners_cleared": int(((balances > 0) & (capped <= 0)).sum()), + "gbp_removed_unweighted": float(removed.sum()), + "gbp_removed_weighted": float((removed * person_weight).sum()), + "share_of_weighted_lisa_mass_removed": ( + float((removed * person_weight).sum() / total_mass) + if total_mass > 0 + else None + ), + "rule": "household LISA total <= household gross_financial_wealth (pro rata)", + } + return capped, receipt + + +def _household_totals( + person_household_ids: np.ndarray, values: np.ndarray, household_ids: np.ndarray +) -> np.ndarray: + totals = ( + pd.Series( + np.asarray(values, dtype=float), index=np.asarray(person_household_ids) + ) + .groupby(level=0) + .sum() + ) + return totals.reindex(np.asarray(household_ids)).fillna(0.0).to_numpy(dtype=float) + + +# -------------------------------------------------------------------------- +# Evidence of the realised draw +# -------------------------------------------------------------------------- + + +def _tertiles(values: np.ndarray, weights: np.ndarray) -> np.ndarray: + order = np.argsort(values, kind="stable") + cumulative = np.cumsum(weights[order]) + if cumulative.size == 0 or cumulative[-1] <= 0: + return np.zeros(len(values), dtype=np.int64) + cuts = np.interp([1 / 3, 2 / 3], cumulative / cumulative[-1], values[order]) + return np.digitize(values, cuts).astype(np.int64) + + +def _profile( + frame: pd.DataFrame, + holds: np.ndarray, + weights: np.ndarray, + spec: OwnershipModelSpec, + *, + channel: np.ndarray | None = None, +) -> dict[str, Any]: + groups = _age_group_index( + frame["age_floor"].to_numpy(dtype=float), spec.age_group_lower_bounds + ) + labels = spec.group_labels() + female = frame["is_female"].to_numpy(dtype=float) == 1.0 + renter = frame[PRIVATE_RENTER_COLUMN].to_numpy(dtype=float) == 1.0 + tertile = _tertiles(frame["household_net_income"].to_numpy(dtype=float), weights) + + def share(mask: np.ndarray) -> float | None: + return _weighted_share(holds[mask], weights[mask]) if mask.any() else None + + profile: dict[str, Any] = { + "all_adults": _weighted_share(holds, weights), + "by_age_group": { + labels[index]: share(groups == index) for index in range(len(labels)) + }, + "by_sex": {"female": share(female), "male": share(~female)}, + "by_private_renting": { + "private_renter": share(renter), + "other": share(~renter), + }, + "by_household_net_income_tertile": { + str(index + 1): share(tertile == index) for index in range(3) + }, + "adults": int(len(frame)), + "holders": int(np.asarray(holds, dtype=bool).sum()), + } + if channel is not None: + profile["by_channel"] = { + str(value): share(channel == value) for value in sorted(set(channel)) + } + return profile + + +def _co_holding_share( + household_ids: np.ndarray, holds: np.ndarray, weights: np.ndarray +) -> float | None: + table = pd.DataFrame( + {"household": household_ids, "holds": holds.astype(int), "weight": weights} + ) + owners = ( + table[table["holds"] == 1] + .groupby("household") + .agg(owners=("holds", "sum"), weight=("weight", "first")) + ) + if owners.empty: + return None + return float( + owners.loc[owners["owners"] > 1, "weight"].sum() / owners["weight"].sum() + ) + + +@dataclass +class UKWASLISAResult: + frame: Frame + support_clip: UKSupportClipReceipt + donor: Mapping[str, Any] + ownership_model: Mapping[str, Any] + balance_model: Mapping[str, Any] + realised: Mapping[str, Any] + financial_wealth_coherence: Mapping[str, Any] + population: Mapping[str, Any] + + def evidence(self) -> dict[str, object]: + return { + "stage": UK_WAS_LISA_STAGE_NAME, + "support_clip": self.support_clip.evidence(), + "donor": dict(self.donor), + "ownership_model": dict(self.ownership_model), + "balance_model": dict(self.balance_model), + "realised": dict(self.realised), + "financial_wealth_coherence": dict(self.financial_wealth_coherence), + "population": dict(self.population), + } + + +# -------------------------------------------------------------------------- +# Stage transform +# -------------------------------------------------------------------------- + + +@dataclass +class UKWASLISAStageTransform: + """Whole-stage callable for the WAS Lifetime ISA imputation.""" + + stage: SourceStageSpec + engine: object + was_tab_path: str | Path | None = None + was_person_tab_path: str | Path | None = None + #: Raw tabs as read (tests and the synthetic fixture); column matching is + #: case-insensitive either way. + donor_household: pd.DataFrame | None = None + donor_person: pd.DataFrame | None = None + last_result: UKWASLISAResult | None = field(default=None, init=False) + last_fit_weight_records: tuple[FitWeightRecord, ...] | None = field( + default=None, init=False, repr=False + ) + + @property + def fit_weight_records(self) -> tuple[FitWeightRecord, ...]: + if self.last_fit_weight_records is None: + return () + return tuple(self.last_fit_weight_records) + + def _table( + self, + supplied: pd.DataFrame | None, + path: str | Path | None, + role: str, + *, + columns: Sequence[str] | None = None, + ) -> pd.DataFrame: + if supplied is not None: + return supplied + if path is None: + raise WASLISAError( + f"{UK_WAS_LISA_STAGE_NAME} requires the caller-supplied {role} tab." + ) + return read_pinned_tab( + Path(path).expanduser().resolve(), + _artifact(self.stage, role), + columns=columns, + ) + + def __call__(self, frame: Frame) -> Frame: + assert_rules_engine_country(self.engine, "uk") + columns = WASLISAColumns.from_parameters( + _operation(self.stage, CLEAN_WAS_LISA_DONOR_KIND) + ) + ownership_spec = OwnershipModelSpec.from_parameters( + _operation(self.stage, IMPUTE_LIFETIME_ISA_OWNERSHIP_KIND) + ) + balance_spec = BalanceModelSpec.from_parameters( + _operation(self.stage, IMPUTE_LIFETIME_ISA_BALANCE_KIND) + ) + cap = _operation(self.stage, CAP_LIFETIME_ISA_TO_FINANCIAL_WEALTH_KIND) + if ( + cap.get("column") != BALANCE_COLUMN + or cap.get("cap_column") != FINANCIAL_WEALTH_COLUMN + ): + raise WASLISAError( + "cap_lifetime_isa_to_financial_wealth must cap " + f"{BALANCE_COLUMN!r} at {FINANCIAL_WEALTH_COLUMN!r}." + ) + donor = clean_was_lisa_donor( + self._table( + self.donor_person, + self.was_person_tab_path, + UK_WAS_PERSON_TAB_ROLE, + columns=columns.person_raw_columns(), + ), + self._table( + self.donor_household, self.was_tab_path, UK_WAS_HOUSEHOLD_TAB_ROLE + ), + columns=columns, + ) + recipient = recipient_predictors( + frame, self.engine, age_band_edges=columns.age_band_edges + ) + ownership = impute_lifetime_isa_ownership( + donor.person, recipient, spec=ownership_spec + ) + balance = impute_lifetime_isa_balance( + donor.person, recipient, holds=ownership.holds, spec=balance_spec + ) + clip = support_clip_to_donor_with_receipt( + pd.DataFrame({BALANCE_COLUMN: balance.balance}, index=recipient.index), + donor.person[[BALANCE_COLUMN]], + columns=UK_WAS_LISA_SUPPORT_CLIP_COLUMNS, + stage=UK_WAS_LISA_STAGE_NAME, + ) + household_table = frame.table("household") + household_weights = np.asarray( + frame.weights_for("household").values, dtype=float + ) + household_ids = household_table["household_id"].to_numpy() + capped, coherence = cap_lifetime_isa_to_financial_wealth( + person_household_ids=recipient["person_household_id"].to_numpy(), + balances=clip.clipped[BALANCE_COLUMN].to_numpy(dtype=float), + household_ids=household_ids, + household_financial_wealth=pd.to_numeric( + household_table[FINANCIAL_WEALTH_COLUMN], errors="coerce" + ) + .fillna(0.0) + .to_numpy(dtype=float), + household_weights=household_weights, + ) + holds = capped > 0.0 + person = frame.table("person").copy() + # Declared output order (the graph's cell order). + person[OWNERSHIP_COLUMN] = holds + person[BALANCE_COLUMN] = capped + household = household_table.copy() + household[HOUSEHOLD_BALANCE_COLUMN] = _household_totals( + recipient["person_household_id"].to_numpy(), capped, household_ids + ) + # Evidence. + weight_by_household = pd.Series(household_weights, index=household_ids) + person_weights = weight_by_household.reindex( + recipient["person_household_id"].to_numpy() + ).to_numpy(dtype=float) + adult = recipient["age"].to_numpy(dtype=float) >= ownership_spec.minimum_age + channel = None + if "household_support_channel" in household_table: + channel = ( + household_table.set_index("household_id")["household_support_channel"] + .map(_enum_name) + .reindex(recipient["person_household_id"].to_numpy()) + .astype(str) + .to_numpy() + ) + owner_weights = person_weights[holds] + realised = { + "recipient": _profile( + recipient.loc[adult], + holds[adult], + person_weights[adult], + ownership_spec, + channel=None if channel is None else channel[adult], + ), + "donor": _profile( + donor.person, + donor.person["holds"].to_numpy() == 1, + donor.person["weight"].to_numpy(dtype=float), + ownership_spec, + ), + "owner_balance_quantiles": _weighted_quantiles( + capped[holds], owner_weights, (0.1, 0.25, 0.5, 0.75, 0.9) + ), + "owner_weighted_mean_balance": ( + float(np.average(capped[holds], weights=owner_weights)) + if holds.any() and owner_weights.sum() > 0 + else None + ), + "weighted_total_gbp": float((capped * person_weights).sum()), + "donor_credible_holder_balance_quantiles": donor.receipt[ + "credible_holder_balance_quantiles" + ], + "co_holding_share_of_owner_households": { + "recipient": _co_holding_share( + recipient["person_household_id"].to_numpy(), holds, person_weights + ), + "donor": _co_holding_share( + donor.person["household_key"].to_numpy(), + donor.person["holds"].to_numpy() == 1, + donor.person["weight"].to_numpy(dtype=float), + ), + }, + "model_expected_adult_ownership_share": _weighted_expectation( + ownership.probability[adult], person_weights[adult] + ), + } + population = { + "persons": int(len(recipient)), + "adults": int(adult.sum()), + "under_minimum_age_zeroed": int((~adult).sum()), + "minimum_age": ownership_spec.minimum_age, + } + result = uk_national_frame( + person=person, + benunit=frame.table("benunit").copy(), + household=household, + time_period=uk_time_period(frame), + weight_kind=uk_household_weight_kind(frame), + household_weights=household_weights, + mass_log=( + *frame.mass_log, + uk_household_mass_conservation_receipt( + frame, UK_WAS_LISA_MASS_CONSERVATION_REASON + ), + ), + ) + validate_uk_national_frame(result) + self.last_fit_weight_records = ( + *ownership.fit_weight_records, + *balance.fit_weight_records, + ) + self.last_result = UKWASLISAResult( + frame=result, + support_clip=clip.receipt, + donor=donor.receipt, + ownership_model=ownership.receipt, + balance_model=balance.receipt, + realised=realised, + financial_wealth_coherence=coherence, + population=population, + ) + return result + + @staticmethod + def output_columns() -> tuple[str, ...]: + return UK_WAS_LISA_OUTPUT_COLUMNS + + def checkpoint_metadata(self) -> dict[str, object]: + if self.last_result is None: + return {} + return {"evidence": self.last_result.evidence()} + + +def _weighted_expectation(values: np.ndarray, weights: np.ndarray) -> float | None: + if len(values) == 0 or float(np.sum(weights)) <= 0: + return None + return float(np.average(values, weights=weights)) diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_frs_spine.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_frs_spine.py index 68c42019d..b35f9ce0a 100644 --- a/packages/microcosm-build/tests/engine_free/uk/test_uk_frs_spine.py +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_frs_spine.py @@ -2221,6 +2221,35 @@ def test_read_pinned_tab_refuses_a_zero_placeholder_pin(tmp_path) -> None: read_pinned_tab(tab, placeholder) +def test_read_pinned_tab_reads_only_the_declared_columns(tmp_path) -> None: + """A wide tab reads selectively after the whole file's pins are checked.""" + + import hashlib + + from microcosm.build.uk_runtime.frs_spine import read_pinned_tab + + tab = tmp_path / "was_round_8_person.tab" + tab.write_text( + "CASER8\tPersonR8\tDVFLISAvR8\tunused\n1\t1\t500\tx\n1\t2\t0\ty\n", + encoding="utf-8", + ) + pins = { + "sha256": hashlib.sha256(tab.read_bytes()).hexdigest(), + "size_bytes": tab.stat().st_size, + } + + table = read_pinned_tab(tab, pins, columns=("caser8", "PERSONR8", "DVFLISAvR8")) + + assert list(table.columns) == ["caser8", "personr8", "dvflisavr8"] + assert table["dvflisavr8"].tolist() == [500, 0] + with pytest.raises( + ValueError, match=r"missing required column\(s\): \['flisavr8'\]" + ): + read_pinned_tab(tab, pins, columns=("CASER8", "FLISAVR8")) + with pytest.raises(ValueError, match="not the pinned"): + read_pinned_tab(tab, {**pins, "sha256": "f" * 64}, columns=("CASER8",)) + + def test_refuses_nan_in_produced_weight_column(tmp_path: Path) -> None: tables = _fixture_tables() tables["househol"][0]["GROSS4"] = "" diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_was_lisa.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_was_lisa.py new file mode 100644 index 000000000..23b061274 --- /dev/null +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_was_lisa.py @@ -0,0 +1,567 @@ +"""Engine-free tests for the WAS Lifetime ISA stage (microcosm#1003).""" + +from __future__ import annotations + +from types import SimpleNamespace + +import numpy as np +import pandas as pd +import pytest + +from microcosm.build.source_manifest import SourceStageSpec +from microcosm.build.uk_runtime.national_frame import uk_national_frame +from microcosm.build.uk_runtime.stage_health import uk_stage_health_gate +from microcosm.build.uk_runtime.was_lisa import ( + BALANCE_COLUMN, + HOUSEHOLD_BALANCE_COLUMN, + OWNERSHIP_COLUMN, + RULE_IMPOSSIBLE_HOLDER, + UK_WAS_LISA_MASS_CONSERVATION_REASON, + UK_WAS_LISA_OUTPUT_COLUMNS, + UK_WAS_LISA_STAGE_NAME, + BalanceModelSpec, + OwnershipModelSpec, + UKWASLISAStageTransform, + WASLISAColumns, + WASLISAError, + cap_lifetime_isa_to_financial_wealth, + clean_was_lisa_donor, + fit_ownership_model, + impute_lifetime_isa_balance, + impute_lifetime_isa_ownership, + recipient_predictors, +) +from microcosm.build.uk_runtime.was_wealth import UK_WAS_ENGINE_PREDICTOR_ENTITIES +from tools.graph_uk_spine_fixture import _was_donor, _was_person_donor + +#: The declared operation parameters (the committed manifest carries these). +CLEAN = { + "household_key": "CASER8", + "person_columns": { + "person_number": "PersonR8", + "is_dependent_child": "IsDepR8", + "age_band": "DVAge17R8", + "sex": "SexR8", + "employment_income": "DVGIEmpR8", + "self_employment_income": "DVGISER8", + "holds_lifetime_isa": "fisa_binary3r8_i", + "holding_imputed": "fisa_binary3r8_iflag", + "reported_value": "FLISAVR8", + "value_imputed": "flisavr8_iflag", + "reported_band": "FLISABR8", + "band_imputed": "flisabr8_iflag", + "lifetime_isa_balance": "DVFLISAvR8", + }, + "household_aggregate": "DVFLISAVR8_aggr", + "aggregate_tolerance_gbp": 1.0, + "non_dependent_code": 2, + "female_code": 2, + "age_band_edges": list(range(0, 85, 5)), + "sentinel_codes": [-9, -8, -7, -6], + "sentinel_recode_columns": ["employment_income", "self_employment_income"], + "household_predictors": [ + "household_net_income", + "num_adults", + "num_children", + "gross_financial_wealth", + "savings", + "cash_isa", + "stocks_and_shares_isa", + ], + "credibility_rule": { + "maximum_holder_age_band_lower": 45, + "balance_ceiling_gbp": 40000, + }, +} +OWNERSHIP = { + "output": "has_lifetime_isa", + "seed": 0, + "salt": "was_lisa:has_lifetime_isa", + "model": "weighted_ridge_logistic", + "penalty_c": 1.0, + "solver": "lbfgs", + "max_iter": 5000, + "standardise": "donor_unweighted_mean_sd", + "age_group_lower_bounds": [0, 25, 35, 45, 55], + "log1p_predictors": [ + "employment_income", + "household_net_income", + "gross_financial_wealth", + "cash_isa", + "stocks_and_shares_isa", + "savings", + ], + "indicator_predictors": ["is_private_renter", "is_female"], + "count_predictors": ["num_children"], + "population": {"minimum_age": 18}, +} +BALANCE = { + "output": "lifetime_isa_balance", + "seed": 0, + "salt": "was_lisa:lifetime_isa_balance", + "model": "regime_gated_qrf", + "n_estimators": 4, + "training_rows": "credible_holders", + "expected_regime": "positive_only", + "predictors": [ + "age_band", + "is_female", + "employment_income", + "household_net_income", + "gross_financial_wealth", + "savings", + "cash_isa", + "stocks_and_shares_isa", + "is_private_renter", + "num_children", + ], +} +CAP = { + "column": "lifetime_isa_balance", + "cap_column": "gross_financial_wealth", + "method": "pro_rata_within_household", +} + + +class _FakeEngine: + """Returns engine variables at their native entity, like the real adapter.""" + + country = "uk" + + def variable_metadata(self, name): + return SimpleNamespace(entity=UK_WAS_ENGINE_PREDICTOR_ENTITIES[name]) + + def materialize(self, frame, variables, period): + assert period == "2023" + tables = { + entity: frame.table(entity) for entity in ("person", "benunit", "household") + } + return { + variable: tables[UK_WAS_ENGINE_PREDICTOR_ENTITIES[variable]][ + variable + ].to_numpy() + for variable in variables + } + + +def _stage() -> SourceStageSpec: + return SourceStageSpec.from_mapping( + { + "stage": UK_WAS_LISA_STAGE_NAME, + "survey": "test", + "source": "test", + "grain": "person", + "artifacts": [], + "operations": [ + {"kind": "clean_was_lisa_donor", **CLEAN}, + {"kind": "impute_lifetime_isa_ownership", **OWNERSHIP}, + {"kind": "impute_lifetime_isa_balance", **BALANCE}, + {"kind": "cap_lifetime_isa_to_financial_wealth", **CAP}, + ], + "outputs": list(UK_WAS_LISA_OUTPUT_COLUMNS), + "nonnegative_outputs": [BALANCE_COLUMN, HOUSEHOLD_BALANCE_COLUMN], + } + ) + + +def _columns() -> WASLISAColumns: + return WASLISAColumns.from_parameters(CLEAN) + + +def _donor(): + return clean_was_lisa_donor(_was_person_donor(), _was_donor(), columns=_columns()) + + +def _recipient_frame(households: int = 64): + """FRS-like recipients in the synthetic donor's ranges (the fixture's scale).""" + + persons: list[dict[str, object]] = [] + benunits: list[dict[str, object]] = [] + homes: list[dict[str, object]] = [] + person_id = 1 + tenures = [ + "RENT_PRIVATELY", + "OWNED_WITH_MORTGAGE", + "OWNED_OUTRIGHT", + "RENT_FROM_HA", + ] + for household in range(1, households + 1): + adults = 1 + household % 2 + children = household % 3 + benunit = household * 10 + for index in range(adults + children): + adult = index < adults + persons.append( + { + "person_id": person_id, + "person_benunit_id": benunit, + "person_household_id": household, + "age": (18 + (household * 7 + index * 11) % 60) + if adult + else (3 + household % 14), + "gender": "FEMALE" if (household + index) % 2 else "MALE", + "employment_income": 15_000.0 + 1_000.0 * ((household + index) % 40) + if adult + else 0.0, + "self_employment_income": 0.0, + "private_pension_income": 0.0, + "capital_income": 0.0, + } + ) + person_id += 1 + benunits.append( + {"benunit_id": benunit, "num_adults": adults, "num_children": children} + ) + wealth = 30.0 + household % 64 + if household == 2: + wealth = 0.0 + if household == 3: + wealth = 5.0 + homes.append( + { + "household_id": household, + "household_weight": 1.0 + household % 5, + "region": "LONDON" if household % 2 else "WALES", + "num_bedrooms": 1 + household % 4, + "council_tax": 1_000.0 + 10.0 * household, + "household_net_income": 20_000.0 + 1_000.0 * (household % 60), + "is_renting": bool(household % 4 == 0), + "tenure_type": tenures[household % 4], + "gross_financial_wealth": wealth, + "savings": 500.0 + 20.0 * (household % 60), + "cash_isa": 7.0 + household % 60, + "stocks_and_shares_isa": 5.0 + household % 60, + } + ) + return uk_national_frame( + person=pd.DataFrame(persons), + benunit=pd.DataFrame(benunits), + household=pd.DataFrame(homes), + time_period="2023", + ) + + +# -------------------------------------------------------------------------- +# Donor cleaning +# -------------------------------------------------------------------------- + + +def test_clean_joins_persons_to_households_and_applies_the_credibility_rule() -> None: + donor = _donor() + receipt = donor.receipt + + assert receipt["persons_read"] == 190 + assert receipt["donor_adults"] == 127 + assert receipt["dependent_children_excluded"] == 63 + assert receipt["holders_released"] == 15 + # The household-6 holder is recorded in the 60-64 band: no LISA holder can + # be that old, so the rule recodes them to a non-holder. + assert receipt["holders_after_rule"] == 14 + assert receipt["credible_holders_in_balance_fit"] == 14 + assert receipt["credibility_rule"]["holders_recoded_for_age"] == 1 + assert receipt["aggregate_check"]["max_abs_difference_gbp"] == 0.0 + assert receipt["sentinel_recodes"] == { + "employment_income": 0, + "self_employment_income": 1, + } + assert receipt["released_flag_value_disagreements"] == 0 + classes = {k: v["persons"] for k, v in receipt["response_classes"].items()} + assert classes[RULE_IMPOSSIBLE_HOLDER] == 1 + assert classes["holder_banded_value"] == 1 + assert classes["imputed_holder"] == 1 + assert classes["observed_holder_exact_value"] == 12 + assert classes["imputed_non_holder"] > 0 + assert sum(classes.values()) == receipt["donor_adults"] + recoded = donor.person.loc[donor.person["household_key"] == 6].iloc[0] + assert recoded["holds"] == 0 + assert recoded[BALANCE_COLUMN] == 0.0 + assert recoded["lisa_response_class"] == RULE_IMPOSSIBLE_HOLDER + # A missing answer never becomes a zero: holders keep their released value. + holders = donor.person["holds"] == 1 + assert (donor.person.loc[holders, BALANCE_COLUMN] > 0).all() + assert (donor.person.loc[~holders, BALANCE_COLUMN] == 0).all() + + +def test_clean_keeps_holders_above_the_ceiling_as_owners_outside_the_balance_fit() -> ( + None +): + person = _was_person_donor() + household = _was_donor() + row = person.index[(person["CASER8"] == 1) & (person["PersonR8"] == 1)][0] + person.loc[row, "DVFLISAvR8"] = 60_000.0 + household.loc[household["CASER8"] == 1, "DVFLISAVR8_aggr"] = 60_000.0 + + donor = clean_was_lisa_donor(person, household, columns=_columns()) + + above = donor.person.loc[donor.person["household_key"] == 1].iloc[0] + assert above["holds"] == 1 + assert np.isnan(above[BALANCE_COLUMN]) + assert donor.receipt["credibility_rule"]["holders_above_ceiling"] == 1 + assert donor.receipt["credible_holders_in_balance_fit"] == 13 + + +def test_clean_refuses_a_person_total_that_misses_the_household_aggregate() -> None: + household = _was_donor() + household.loc[0, "DVFLISAVR8_aggr"] += 50.0 + + with pytest.raises(WASLISAError, match="does not sum to the household"): + clean_was_lisa_donor(_was_person_donor(), household, columns=_columns()) + + +def test_clean_refuses_persons_without_a_household() -> None: + person = _was_person_donor() + person.loc[0, "CASER8"] = 9_999.0 + + with pytest.raises(WASLISAError, match="have no household row"): + clean_was_lisa_donor(person, _was_donor(), columns=_columns()) + + +def test_clean_refuses_a_missing_released_value_instead_of_reading_a_zero() -> None: + person = _was_person_donor() + adult = person.index[person["IsDepR8"] == 2][3] + person.loc[adult, "DVFLISAvR8"] = np.nan + + with pytest.raises(WASLISAError, match="never read as a zero balance"): + clean_was_lisa_donor(person, _was_donor(), columns=_columns()) + + +def test_clean_refuses_a_repeated_person() -> None: + person = pd.concat([_was_person_donor(), _was_person_donor().iloc[:1]]) + + with pytest.raises(WASLISAError, match=r"repeats a \(case, person\) pair"): + clean_was_lisa_donor(person, _was_donor(), columns=_columns()) + + +def test_clean_refuses_an_undeclared_column() -> None: + person = _was_person_donor().drop(columns=["FLISABR8"]) + + with pytest.raises(WASLISAError, match="FLISABR8"): + clean_was_lisa_donor(person, _was_donor(), columns=_columns()) + + +def test_declaration_drift_is_refused() -> None: + with pytest.raises(WASLISAError, match="household_predictors drifted"): + WASLISAColumns.from_parameters( + {**CLEAN, "household_predictors": ["household_net_income"]} + ) + with pytest.raises(WASLISAError, match="weighted_ridge_logistic"): + OwnershipModelSpec.from_parameters( + {**OWNERSHIP, "model": "hist_gradient_boosting"} + ) + with pytest.raises(WASLISAError, match="credible holders"): + BalanceModelSpec.from_parameters({**BALANCE, "training_rows": "all_adults"}) + donor = _donor() + recipient = recipient_predictors( + _recipient_frame(), _FakeEngine(), age_band_edges=CLEAN["age_band_edges"] + ) + with pytest.raises(WASLISAError, match="regime"): + impute_lifetime_isa_balance( + donor.person, + recipient, + holds=np.zeros(len(recipient), dtype=bool), + spec=BalanceModelSpec.from_parameters( + {**BALANCE, "expected_regime": "zero_inflated_positive"} + ), + ) + + +# -------------------------------------------------------------------------- +# Ownership +# -------------------------------------------------------------------------- + + +def test_ownership_logistic_reproduces_the_weighted_donor_share() -> None: + donor = _donor() + spec = OwnershipModelSpec.from_parameters(OWNERSHIP) + + _, receipt = fit_ownership_model(donor.person, spec) + + # The unpenalised intercept's score equation: the model's weighted mean + # probability on the donor is the donor's weighted ownership share. + assert receipt["donor_weighted_mean_probability"] == pytest.approx( + receipt["donor_weighted_ownership_share"], rel=1e-3 + ) + assert list(receipt["coefficients"]) == list(spec.feature_names()) + assert receipt["iterations"] < spec.max_iter + assert receipt["donor_holders"] == 14 + + +def test_ownership_draw_is_keyed_on_person_id_and_skips_minors() -> None: + donor = _donor() + spec = OwnershipModelSpec.from_parameters(OWNERSHIP) + recipient = recipient_predictors( + _recipient_frame(), _FakeEngine(), age_band_edges=CLEAN["age_band_edges"] + ) + shuffled = recipient.sample(frac=1.0, random_state=3) + + forward = impute_lifetime_isa_ownership(donor.person, recipient, spec=spec) + backward = impute_lifetime_isa_ownership(donor.person, shuffled, spec=spec) + + by_id = pd.Series(backward.holds, index=shuffled["person_id"].to_numpy()) + assert np.array_equal( + forward.holds, by_id.reindex(recipient["person_id"].to_numpy()).to_numpy() + ) + minors = recipient["age"].to_numpy() < 18 + assert minors.any() + assert not forward.holds[minors].any() + assert (forward.probability[minors] == 0.0).all() + assert forward.holds.any() + + +# -------------------------------------------------------------------------- +# Balance +# -------------------------------------------------------------------------- + + +def test_balance_is_positive_exactly_for_owners_and_inside_credible_support() -> None: + donor = _donor() + recipient = recipient_predictors( + _recipient_frame(), _FakeEngine(), age_band_edges=CLEAN["age_band_edges"] + ) + holds = impute_lifetime_isa_ownership( + donor.person, recipient, spec=OwnershipModelSpec.from_parameters(OWNERSHIP) + ).holds + spec = BalanceModelSpec.from_parameters(BALANCE) + + drawn = impute_lifetime_isa_balance(donor.person, recipient, holds=holds, spec=spec) + + assert np.array_equal(drawn.balance > 0, holds) + credible = donor.person.loc[donor.person["holds"] == 1, BALANCE_COLUMN].dropna() + assert drawn.balance[holds].min() >= credible.min() + assert drawn.balance[holds].max() <= credible.max() + assert drawn.receipt["regime"] == "positive_only" + assert drawn.receipt["training_rows"] == 14 + + shuffled = recipient.sample(frac=1.0, random_state=5) + order = shuffled.index + again = impute_lifetime_isa_balance( + donor.person, + shuffled, + holds=pd.Series(holds, index=recipient.index).reindex(order).to_numpy(), + spec=spec, + ) + by_id = pd.Series(again.balance, index=shuffled["person_id"].to_numpy()) + assert np.array_equal( + drawn.balance, by_id.reindex(recipient["person_id"].to_numpy()).to_numpy() + ) + + +# -------------------------------------------------------------------------- +# Coherence cap +# -------------------------------------------------------------------------- + + +def test_cap_scales_a_household_over_its_financial_wealth_pro_rata() -> None: + capped, receipt = cap_lifetime_isa_to_financial_wealth( + person_household_ids=np.asarray([1, 1, 2, 3, 3]), + balances=np.asarray([60.0, 60.0, 10.0, 10.0, 0.0]), + household_ids=np.asarray([1, 2, 3]), + household_financial_wealth=np.asarray([100.0, 0.0, 1_000.0]), + household_weights=np.asarray([2.0, 1.0, 1.0]), + ) + + assert capped.tolist() == [50.0, 50.0, 0.0, 10.0, 0.0] + assert receipt["households_over_financial_wealth"] == 2 + assert receipt["households_over_with_zero_financial_wealth"] == 1 + assert receipt["persons_scaled"] == 2 + assert receipt["owners_cleared"] == 1 + assert receipt["gbp_removed_unweighted"] == pytest.approx(30.0) + assert receipt["gbp_removed_weighted"] == pytest.approx(2 * 20.0 + 10.0) + + +# -------------------------------------------------------------------------- +# Stage transform +# -------------------------------------------------------------------------- + + +def _transform() -> UKWASLISAStageTransform: + return UKWASLISAStageTransform( + stage=_stage(), + engine=_FakeEngine(), + donor_household=_was_donor(), + donor_person=_was_person_donor(), + ) + + +def test_stage_writes_the_declared_outputs_with_receipts() -> None: + frame = _recipient_frame() + transform = _transform() + + result = transform(frame) + + person = result.table("person") + household = result.table("household") + assert list(person.columns[-2:]) == [OWNERSHIP_COLUMN, BALANCE_COLUMN] + assert person[OWNERSHIP_COLUMN].dtype == bool + assert np.array_equal( + person[OWNERSHIP_COLUMN].to_numpy(), person[BALANCE_COLUMN].to_numpy() > 0 + ) + assert not person.loc[person["age"] < 18, OWNERSHIP_COLUMN].any() + totals = person.groupby("person_household_id")[BALANCE_COLUMN].sum() + np.testing.assert_allclose( + household[HOUSEHOLD_BALANCE_COLUMN].to_numpy(), + totals.reindex(household["household_id"]).fillna(0.0).to_numpy(), + ) + assert ( + household[HOUSEHOLD_BALANCE_COLUMN].to_numpy() + <= household["gross_financial_wealth"].to_numpy() + 1e-9 + ).all() + assert person[OWNERSHIP_COLUMN].any() + receipt = result.mass_log[-1] + assert receipt.reason == UK_WAS_LISA_MASS_CONSERVATION_REASON + assert receipt.entity == "household" + assert receipt.old_total == receipt.new_total > 0 + assert receipt.declared_factor == 1.0 + np.testing.assert_array_equal( + result.weights_for("household").values, frame.weights_for("household").values + ) + + evidence = transform.checkpoint_metadata()["evidence"] + assert evidence["stage"] == UK_WAS_LISA_STAGE_NAME + assert set(evidence) == { + "stage", + "support_clip", + "donor", + "ownership_model", + "balance_model", + "realised", + "financial_wealth_coherence", + "population", + } + assert evidence["support_clip"]["columns"][BALANCE_COLUMN]["clipped_high_rows"] == 0 + assert ( + evidence["financial_wealth_coherence"]["households_over_financial_wealth"] >= 0 + ) + gate = uk_stage_health_gate( + evidence=evidence, + stage=UK_WAS_LISA_STAGE_NAME, + check="support_clip", + parameters={ + "columns": [BALANCE_COLUMN], + "max_clipped_low_rows_by_column": {BALANCE_COLUMN: 0}, + "max_clipped_high_rows_by_column": {BALANCE_COLUMN: 0}, + }, + ) + assert gate.passed, gate.failures + assert [record.fit_name for record in transform.fit_weight_records] == [ + "uk_was_round_8_lifetime_isa:has_lifetime_isa", + "uk_was_round_8_lifetime_isa:lifetime_isa_balance", + ] + assert {record.weight_kind for record in transform.fit_weight_records} == { + "explicit" + } + + +def test_stage_is_deterministic() -> None: + first = _transform()(_recipient_frame()).table("person") + second = _transform()(_recipient_frame()).table("person") + + pd.testing.assert_series_equal(first[BALANCE_COLUMN], second[BALANCE_COLUMN]) + pd.testing.assert_series_equal(first[OWNERSHIP_COLUMN], second[OWNERSHIP_COLUMN]) + + +def test_stage_requires_its_tabs() -> None: + transform = UKWASLISAStageTransform(stage=_stage(), engine=_FakeEngine()) + + with pytest.raises(WASLISAError, match="was_person_tab"): + transform(_recipient_frame()) diff --git a/tools/graph_uk_spine_fixture.py b/tools/graph_uk_spine_fixture.py index db248178f..d9ba82784 100644 --- a/tools/graph_uk_spine_fixture.py +++ b/tools/graph_uk_spine_fixture.py @@ -582,10 +582,79 @@ def _write_frs_raw(root: Path) -> dict[str, dict[str, object]]: return artifacts +def _was_person_donor() -> pd.DataFrame: + """Synthetic WAS round-8 persons of the 64 synthetic WAS households. + + Mixed-case raw names as in the deposit. Adults and dependent children per + household follow the household tab's NumAdultR8/NumCh18R8; Lifetime ISA + holders are younger adults with small values (below the households' gross + financial wealth, which WAS counts them in), one banded value, one + ONS-imputed holder, one ONS-imputed non-holder, one self-employment + sentinel and one holder in an age band the product rules exclude (recoded + by the stage's credibility rule). + """ + + rows: list[dict[str, float]] = [] + for household in range(_DONOR_ROWS): + adults = 1 + household % 3 + children = household % 3 + for person in range(adults + children): + adult = person < adults + band = ( + 4 + (household * 3 + person * 5) % 14 + if adult + else 1 + (household + person) % 3 + ) + holder = adult and person == 0 and household % 2 == 0 and 4 <= band <= 9 + impossible = adult and person == 0 and household == 5 + if impossible: + band = 13 + value = float(5 + household % 20) if (holder or impossible) else 0.0 + banded = holder and household == 10 + rows.append( + { + "CASER8": float(household + 1), + "PersonR8": float(person + 1), + "IsDepR8": 2.0 if adult else 1.0, + "DVAge17R8": float(band), + "SexR8": float(1 + (household + person) % 2), + "DVGIEmpR8": ( + 15_000.0 + 1_000.0 * ((household * 7 + person) % 40) + if adult + else -9.0 + ), + "DVGISER8": ( + (-8.0 if household == 3 else 5_000.0 * (household % 5 == 0)) + if adult and person == 0 + else (0.0 if adult else -9.0) + ), + "fisa_binary3r8_i": 1.0 if value > 0 else (0.0 if adult else -9.0), + "fisa_binary3r8_iflag": ( + 1.0 if (holder and household == 14) or household == 7 else 0.0 + ), + "FLISAVR8": (-8.0 if banded else value) if value > 0 else -9.0, + "flisavr8_iflag": 1.0 if banded else 0.0, + "FLISABR8": 1.0 if banded else -9.0, + "flisabr8_iflag": 0.0, + "DVFLISAvR8": value, + } + ) + return pd.DataFrame(rows) + + def _was_donor() -> pd.DataFrame: rows = np.arange(_DONOR_ROWS, dtype=float) + lisa_totals = ( + _was_person_donor() + .groupby("CASER8")["DVFLISAvR8"] + .sum() + .reindex(rows + 1.0, fill_value=0.0) + .to_numpy() + ) return pd.DataFrame( { + "CASER8": rows + 1.0, + "DVFLISAVR8_aggr": lisa_totals, "R8xshhwgt": 1.0 + rows % 7 / 10.0, "DVLUKValR8_sum": 10.0 + rows, "DVPropertyR8": 20_000.0 + rows * 500.0, From 014f4bc26bf6388290a1a49e286eb1356564a022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Juaristi?= <127882282+juaristi22@users.noreply.github.com> Date: Tue, 29 Sep 2026 13:43:22 +0100 Subject: [PATCH 02/17] UK was_lisa joins the spine after was_wealth (#1003) The stage is declared in uk/spec/sources.yaml right after was_wealth (35 stages) with its two pinned private tabs (the was_wealth household donor, same pins, and the WAS round-8 person tab), and the packaged source_stages.json carries the typed projection of the entry. Four new operation kinds get closed schema branches (clean_was_lisa_donor, impute_lifetime_isa_ownership, impute_lifetime_isa_balance, cap_lifetime_isa_to_financial_wealth), and aggregate_person_to_household, already an allowed kind, gets the schema record it lacked. The graph binds the stage to the was and was_person sources as an open surface (it materialises the was_wealth engine predictors) and types its three cells; the kernels bind was_wealth as a helper module, because the stage reuses its donor cleaning and recipient predictors. The spine builder takes --was-person-tab (required with --was-tab when the stage is scheduled; refused with the synthetic fixture), and the full build reaches it through --spine-request. Declared seeds harvest as {has_lifetime_isa: 0, lifetime_isa_balance: 0}. Derived surfaces regenerated with their tools: the H2 parity fixture (35 stages, sources/was_person.csv, the WAS household donor gains CASER8 and DVFLISAVR8_aggr) and the release-input coverage manifest (was_lisa family). Roster pins move 34 -> 35; the SPI-first slices take was_lisa inside the E5 block. Co-Authored-By: Claude Opus 5.5 --- docs/uk-full-build-graph.md | 3 +- .../spec_engine/schema/sources.schema.json | 341 ++++++++++++++++++ .../uk/release_input_coverage_manifest.json | 50 ++- .../src/microcosm/build/uk/source_stages.json | 210 +++++++++++ .../src/microcosm/build/uk/spec/sources.yaml | 144 ++++++++ .../src/microcosm/build/uk_runtime/graph.py | 11 + .../build/uk_runtime/graph_kernels.py | 20 +- .../microcosm/build/uk_runtime/spine_build.py | 38 +- .../microcosm/build/uk_runtime/was_lisa.py | 6 +- .../uk/test_uk_release_input_coverage.py | 1 + .../engine_free/shared/test_country_spec.py | 10 +- .../tests/engine_free/uk/test_uk_frs_spine.py | 3 + .../tests/engine_free/uk/test_uk_graph.py | 15 +- .../engine_free/uk/test_uk_source_stages.py | 26 ++ .../uk/test_uk_spine_acceptance_receipt.py | 4 + .../tests/engine_free/uk/test_uk_was_lisa.py | 72 +++- .../parity/uk_spine/sources/fixture.json | 214 ++++++++++- .../fixtures/parity/uk_spine/sources/was.csv | 130 +++---- .../parity/uk_spine/sources/was_person.csv | 191 ++++++++++ .../fixtures/parity/uk_spine/uk_spine.json | 2 +- ...uild_uk_release_input_coverage_manifest.py | 4 + tools/graph_uk_spine_fixture.py | 22 +- 22 files changed, 1415 insertions(+), 102 deletions(-) create mode 100644 packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/was_person.csv diff --git a/docs/uk-full-build-graph.md b/docs/uk-full-build-graph.md index 0786f8f39..7d9de42ee 100644 --- a/docs/uk-full-build-graph.md +++ b/docs/uk-full-build-graph.md @@ -36,6 +36,7 @@ To include raw spine construction in the same execution, pass `--spine-request / "--spi-tab", "/data/spi/put2223uk.tab", "--hmrc-ods", "/data/hmrc/collated.ods", "--was-tab", "/data/was/household.tab", + "--was-person-tab", "/data/was/person.tab", "--nts-household-tab", "/data/nts/household.tab", "--nts-individual-tab", "/data/nts/individual.tab", "--nts-trip-tab", "/data/nts/trip.tab", @@ -59,7 +60,7 @@ For smaller outputs, add `--dataset-households 100000` to use the common informe ## Graph owners and shared contracts -The spine graph is the 33-stage source roster declared by the UK spec, built by `uk_runtime.spine_build` (the spine tool moved into the package; `tools/build_uk_frs_spine.py` is a six-line shim over it). The superseded `frs_hmrc_retained_leaves` and `hmrc_spi_income` stages and the `UK_SPINE_EXCLUSIONS` list that hid them are removed; the active HMRC path is `frs_hmrc_spine_leaves`, `spi_support_channel`, `spi_income_band_donors` and `hmrc_spi_income_spine`, and the FRS HMRC leaf columns come from `uk_runtime.frs_hmrc_source`. The spine's assembled and transferred gate batteries are graph nodes (`uk_runtime.graph_evidence`); stage evidence and fit-weight records are read back from the content store through the shared `stage_evidence` artifact rather than from in-memory collectors; the HMRC replay sidecar is rebuilt from the SPI stage's checkpoint metadata; the spine sidecar records the operation inventory and the graph manifest, and the graph manifest is saved as `spine.graph.json` under the checkpoint root. +The spine graph is the 35-stage source roster declared by the UK spec, built by `uk_runtime.spine_build` (the spine tool moved into the package; `tools/build_uk_frs_spine.py` is a six-line shim over it). The superseded `frs_hmrc_retained_leaves` and `hmrc_spi_income` stages and the `UK_SPINE_EXCLUSIONS` list that hid them are removed; the active HMRC path is `frs_hmrc_spine_leaves`, `spi_support_channel`, `spi_income_band_donors` and `hmrc_spi_income_spine`, and the FRS HMRC leaf columns come from `uk_runtime.frs_hmrc_source`. The spine's assembled and transferred gate batteries are graph nodes (`uk_runtime.graph_evidence`); stage evidence and fit-weight records are read back from the content store through the shared `stage_evidence` artifact rather than from in-memory collectors; the HMRC replay sidecar is rebuilt from the SPI stage's checkpoint metadata; the spine sidecar records the operation inventory and the graph manifest, and the graph manifest is saved as `spine.graph.json` under the checkpoint root. | Operation | Graph owner | | --- | --- | diff --git a/packages/microcosm-build/src/microcosm/build/spec_engine/schema/sources.schema.json b/packages/microcosm-build/src/microcosm/build/spec_engine/schema/sources.schema.json index 0a49e53b5..b14c887f1 100644 --- a/packages/microcosm-build/src/microcosm/build/spec_engine/schema/sources.schema.json +++ b/packages/microcosm-build/src/microcosm/build/spec_engine/schema/sources.schema.json @@ -6686,6 +6686,33 @@ } } }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "method", + "aggregates" + ], + "properties": { + "kind": { + "const": "aggregate_person_to_household" + }, + "method": { + "type": "string" + }, + "consumed_only": { + "type": "boolean" + }, + "aggregates": { + "type": "object", + "minProperties": 1, + "additionalProperties": { + "type": "string" + } + } + } + }, { "type": "object", "additionalProperties": false, @@ -9530,6 +9557,320 @@ } } }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "household_key", + "person_columns", + "household_aggregate", + "aggregate_tolerance_gbp", + "non_dependent_code", + "female_code", + "age_band_edges", + "sentinel_codes", + "sentinel_recode_columns", + "household_predictors", + "credibility_rule" + ], + "properties": { + "kind": { + "const": "clean_was_lisa_donor" + }, + "scope": { + "type": "string" + }, + "household_key": { + "type": "string" + }, + "person_columns": { + "type": "object", + "additionalProperties": false, + "required": [ + "person_number", + "is_dependent_child", + "age_band", + "sex", + "employment_income", + "self_employment_income", + "holds_lifetime_isa", + "holding_imputed", + "reported_value", + "value_imputed", + "reported_band", + "band_imputed", + "lifetime_isa_balance" + ], + "properties": { + "person_number": { + "type": "string" + }, + "is_dependent_child": { + "type": "string" + }, + "age_band": { + "type": "string" + }, + "sex": { + "type": "string" + }, + "employment_income": { + "type": "string" + }, + "self_employment_income": { + "type": "string" + }, + "holds_lifetime_isa": { + "type": "string" + }, + "holding_imputed": { + "type": "string" + }, + "reported_value": { + "type": "string" + }, + "value_imputed": { + "type": "string" + }, + "reported_band": { + "type": "string" + }, + "band_imputed": { + "type": "string" + }, + "lifetime_isa_balance": { + "type": "string" + } + } + }, + "household_aggregate": { + "type": "string" + }, + "aggregate_tolerance_gbp": { + "type": "number" + }, + "non_dependent_code": { + "type": "integer" + }, + "female_code": { + "type": "integer" + }, + "age_band_edges": { + "type": "array", + "items": { + "type": "integer" + } + }, + "sentinel_codes": { + "type": "array", + "items": { + "type": "number" + } + }, + "sentinel_recode_columns": { + "type": "array", + "items": { + "type": "string" + } + }, + "household_predictors": { + "type": "array", + "items": { + "type": "string" + } + }, + "credibility_rule": { + "type": "object", + "additionalProperties": false, + "required": [ + "maximum_holder_age_band_lower", + "balance_ceiling_gbp" + ], + "properties": { + "maximum_holder_age_band_lower": { + "type": "integer" + }, + "balance_ceiling_gbp": { + "type": "number" + }, + "basis": { + "type": "string" + } + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "output", + "seed", + "salt", + "model", + "penalty_c", + "solver", + "max_iter", + "standardise", + "age_group_lower_bounds", + "log1p_predictors", + "indicator_predictors", + "count_predictors", + "population" + ], + "properties": { + "kind": { + "const": "impute_lifetime_isa_ownership" + }, + "output": { + "type": "string" + }, + "seed": { + "type": "integer" + }, + "salt": { + "type": "string" + }, + "model": { + "enum": [ + "weighted_ridge_logistic" + ] + }, + "penalty_c": { + "type": "number" + }, + "solver": { + "type": "string" + }, + "max_iter": { + "type": "integer" + }, + "standardise": { + "enum": [ + "donor_unweighted_mean_sd" + ] + }, + "age_group_lower_bounds": { + "type": "array", + "items": { + "type": "integer" + } + }, + "log1p_predictors": { + "type": "array", + "items": { + "type": "string" + } + }, + "indicator_predictors": { + "type": "array", + "items": { + "type": "string" + } + }, + "count_predictors": { + "type": "array", + "items": { + "type": "string" + } + }, + "population": { + "type": "object", + "additionalProperties": false, + "required": [ + "minimum_age" + ], + "properties": { + "minimum_age": { + "type": "integer" + } + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "output", + "seed", + "salt", + "model", + "n_estimators", + "training_rows", + "expected_regime", + "predictors" + ], + "properties": { + "kind": { + "const": "impute_lifetime_isa_balance" + }, + "output": { + "type": "string" + }, + "seed": { + "type": "integer" + }, + "salt": { + "type": "string" + }, + "model": { + "enum": [ + "regime_gated_qrf" + ] + }, + "n_estimators": { + "type": "integer" + }, + "training_rows": { + "enum": [ + "credible_holders" + ] + }, + "expected_regime": { + "type": "string" + }, + "predictors": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "column", + "cap_column", + "method", + "ownership_output" + ], + "properties": { + "kind": { + "const": "cap_lifetime_isa_to_financial_wealth" + }, + "column": { + "type": "string" + }, + "cap_column": { + "type": "string" + }, + "method": { + "enum": [ + "pro_rata_within_household" + ] + }, + "ownership_output": { + "type": "string" + } + } + }, { "type": "object", "additionalProperties": false, diff --git a/packages/microcosm-build/src/microcosm/build/uk/release_input_coverage_manifest.json b/packages/microcosm-build/src/microcosm/build/uk/release_input_coverage_manifest.json index 09b0e4ab5..b26970b4b 100644 --- a/packages/microcosm-build/src/microcosm/build/uk/release_input_coverage_manifest.json +++ b/packages/microcosm-build/src/microcosm/build/uk/release_input_coverage_manifest.json @@ -468,7 +468,7 @@ "required_mass_change_reason": "Capital-gains incidence anchor moves the mass of non-liable clone households back to their paired originals until the sub-exempt and loss-making clone mass match the Advani-Summers reporter composition at the redrawn liable mass; every pair's mass and the total household mass are conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "439828c10c2cf1632acb31c2350e1eedbe11985a84c6b384da623060826927d4", + "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", "source_vintages": { "source": "Advani and Summers (2020), Capital Gains and UK Inequality, CAGE Working Paper 465", "survey": "Family Resources Survey 2024-25, SPI synthetic support, the HMRC Table 3 redrawn gains on the spine and Advani-Summers capital-gains incidence" @@ -491,7 +491,7 @@ "capital_gains" ], "source_manifest": "source_stages.json", - "source_manifest_sha256": "439828c10c2cf1632acb31c2350e1eedbe11985a84c6b384da623060826927d4", + "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", "source_vintages": { "source": "Advani and Summers (2020), Capital Gains and UK Inequality, CAGE Working Paper 465", "survey": "Family Resources Survey 2024-25, SPI synthetic support, and Advani-Summers capital-gains incidence" @@ -513,7 +513,7 @@ "required_mass_change_reason": "Capital-gains support split divides the wealthiest households of each HMRC Table 3 income band into light copies at equal weight; every household's mass and the total household mass are conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "439828c10c2cf1632acb31c2350e1eedbe11985a84c6b384da623060826927d4", + "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", "source_vintages": { "source": "HMRC Capital Gains Tax statistics, July 2026 release, Table 3 for 2024-25, via the vendored conditioning facts", "survey": "Family Resources Survey 2024-25, SPI synthetic support and HMRC Capital Gains Tax statistics Table 3 (2024-25 individuals by size of gain and taxable income)" @@ -542,7 +542,7 @@ "required_mass_change_reason": "ETB public-services imputation on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "439828c10c2cf1632acb31c2350e1eedbe11985a84c6b384da623060826927d4", + "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", "source_vintages": { "source": "UK Data Service SN 8856 Effects of Taxes and Benefits household tab, DfT rail fare index, and public NHS activity/cost table.", "survey": "Effects of Taxes and Benefits 1977-2024 and NHS age-gender public table" @@ -562,7 +562,7 @@ "required_mass_change_reason": "ETB VAT expenditure-rate imputation on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "439828c10c2cf1632acb31c2350e1eedbe11985a84c6b384da623060826927d4", + "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", "source_vintages": { "source": "UK Data Service SN 8856 Effects of Taxes and Benefits household tab and cited VAT anchor resource.", "survey": "Effects of Taxes and Benefits 1977-2024" @@ -584,7 +584,7 @@ "required_mass_change_reason": "CGT asset-type assignment on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "439828c10c2cf1632acb31c2350e1eedbe11985a84c6b384da623060826927d4", + "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", "source_vintages": { "source": "https://www.gov.uk/government/statistics/capital-gains-tax-statistics", "survey": "HMRC Capital Gains Tax statistics 2026 release, Table 8 (UK residential property disposals, 2024-25, administrative), Table 4.1 (individuals claiming Business Asset Disposal Relief or Investors' Relief by band of qualifying gain, 2024-25, administrative) and Table 7 (disposals, proceeds and gains by asset type, 2023-24, sample-based), vendored from the pinned Chronicle feed" @@ -608,7 +608,7 @@ "capital_gains" ], "source_manifest": "source_stages.json", - "source_manifest_sha256": "439828c10c2cf1632acb31c2350e1eedbe11985a84c6b384da623060826927d4", + "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", "source_vintages": { "conditioning_resource": "hmrc_cgt_conditioning_facts.json", "conditioning_resource_sha256": "24a9440421f9c80ecf3f5ad7035b5b08626e02898f50e4a8ae9c0aad02821bfe", @@ -697,7 +697,7 @@ "full_frs_tei_band_unavailable" ], "source_manifest": "source_stages.json", - "source_manifest_sha256": "439828c10c2cf1632acb31c2350e1eedbe11985a84c6b384da623060826927d4", + "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", "source_vintages": { "hmrc_surface": "2023-24", "mapped_build_period": "2024", @@ -738,7 +738,7 @@ "required_mass_change_reason": "LCFS consumption imputation on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "439828c10c2cf1632acb31c2350e1eedbe11985a84c6b384da623060826927d4", + "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", "source_vintages": { "source": "UK Data Service SN 9468 Living Costs and Food Survey 2023-24 household/person tabs and the vendored Chronicle facts for NEED 2023 mean kWh, the FY2024-25 Ofgem cap levels, road-fuel outturn (DESNZ, HMRC, ONS), the DfT VEH1103 licensed-car stock, NTS bus use and the DfT and devolved bus finance tables.", "survey": "Living Costs and Food Survey 2023-24" @@ -764,7 +764,7 @@ "required_mass_change_reason": "NTS bus-travel imputation on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "439828c10c2cf1632acb31c2350e1eedbe11985a84c6b384da623060826927d4", + "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", "source_vintages": { "source": "Department for Transport National Travel Survey, UK Data Service SN 5340 (End User Licence, 19th edition, November 2025), DOI 10.5255/UKDA-SN-5340-19; local licensed tab files (household, individual, trip); England residents only from 2013.", "survey": "National Travel Survey 2002-2024" @@ -785,7 +785,7 @@ "property_wealth" ], "source_manifest": "source_stages.json", - "source_manifest_sha256": "439828c10c2cf1632acb31c2350e1eedbe11985a84c6b384da623060826927d4", + "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", "source_vintages": { "source": "MHCLG dwellings and ONS UK House Price Index December 2025 regional average prices.", "survey": "Public regional property reference" @@ -809,7 +809,7 @@ "employee_pension_contributions" ], "source_manifest": "source_stages.json", - "source_manifest_sha256": "439828c10c2cf1632acb31c2350e1eedbe11985a84c6b384da623060826927d4", + "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", "source_vintages": { "source": "HMRC, Salary sacrifice reform for pension contributions effective from 6 April 2029", "survey": "Family Resources Survey 2024-25 salary-sacrifice respondents and HMRC salary-sacrifice reform analysis" @@ -831,7 +831,7 @@ "student_loan_plan" ], "source_manifest": "source_stages.json", - "source_manifest_sha256": "439828c10c2cf1632acb31c2350e1eedbe11985a84c6b384da623060826927d4", + "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", "source_vintages": { "source": "Explore Education Statistics Table 6a, Higher education total", "survey": "Family Resources Survey 2024-25 and Student Loans Company borrower forecasts for England" @@ -839,6 +839,28 @@ "stage": "student_loans", "status": "required_at_build" }, + "was_lisa": { + "base_candidate_sha256": "f17306ccb2aad7ff0130be3589b560afb2e2a12a943570911cd0c77f07934833", + "base_candidate_tier": "frs", + "effective_mass_requirements": {}, + "mass_change_semantics": "mass_conserving", + "output_weight_kind": "importance", + "outputs": [ + "has_lifetime_isa", + "lifetime_isa_balance", + "household_lifetime_isa_balance" + ], + "required_mass_change_reason": "WAS Lifetime ISA imputation on the source spine: household weights pass through unchanged and total household mass is conserved.", + "rewrites": [], + "source_manifest": "source_stages.json", + "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", + "source_vintages": { + "source": "Office for National Statistics Wealth and Assets Survey, UK Data Service SN 7215, DOI 10.5255/UKDA-SN-7215-20; local licensed round-8 person and household tabs (interviews April 2020 to March 2022, Great Britain).", + "survey": "Wealth and Assets Survey round 8" + }, + "stage": "was_lisa", + "status": "required_at_build" + }, "was_wealth": { "base_candidate_sha256": "f17306ccb2aad7ff0130be3589b560afb2e2a12a943570911cd0c77f07934833", "base_candidate_tier": "frs", @@ -866,7 +888,7 @@ "required_mass_change_reason": "WAS wealth imputation on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "439828c10c2cf1632acb31c2350e1eedbe11985a84c6b384da623060826927d4", + "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", "source_vintages": { "source": "Office for National Statistics Wealth and Assets Survey, UK Data Service SN 7215, DOI 10.5255/UKDA-SN-7215-20; local licensed 2006-22 household tab.", "survey": "Wealth and Assets Survey round 8" diff --git a/packages/microcosm-build/src/microcosm/build/uk/source_stages.json b/packages/microcosm-build/src/microcosm/build/uk/source_stages.json index 35a82ab2e..2f58fea22 100644 --- a/packages/microcosm-build/src/microcosm/build/uk/source_stages.json +++ b/packages/microcosm-build/src/microcosm/build/uk/source_stages.json @@ -2497,6 +2497,216 @@ ], "notes": "Ports incumbent WAS round-8 wealth imputation with signed E5 differences: exact lower-case column matching replaces the fuzzy r/w fallback; cash ISA uses DVCISAVR8_aggr and stocks-and-shares ISA uses DVIISAVR8_aggr; private pension wealth (WAS total private pension wealth less the current defined-benefit component; DB-type components at the SCAPE rate, money-purchase components at reported fund values) is drawn as its own output private_pension_wealth and no longer folded into corporate_wealth, which keeps only the share-like holdings - pension rights are disregarded capital in every means test (UC Regs 2013 Sch 10 para 10 and the HB/JSA/ESA/IS/SPC parallels; uk-data#452) - and the downstream chain segment conditions on both components; each chain segment starts its own fit and draw RNG streams from a child seed derived deterministically from the declared seed (start_chain respawns from the model seed on every call, so one shared model coupled the k-th target of every segment); corporate_wealth folds stocks-and-shares ISA after drawing corporate_wealth_excl_isa; recipient Northern Ireland regions are mapped to Wales for prediction only; student_loan_balance is allocated by household id rather than the incumbent positional off-by-one. The debt segment (fourth chain segment, fourth child seed) reads WAS round-8 derived variables HMortGR8 (total outstanding mortgage debt), HFINWNTR8_exSLC_Sum (net financial wealth excluding student loans; gross less it is the non-student-loan financial liabilities) and Ten1R8 (tenure; codes 2 and 3 are buying with a mortgage and part own/part rent, confirmed by the I1 audit of the pinned tab); UKDS SN 7215 documentation is the codebook. Engine predictors materialize at their native entity and person/benunit values are summed to household, reproducing the incumbent map_to=household semantics; region is one-hot encoded jointly across donor and recipient (the incumbent's dummy encoding), with unmapped donor GOR codes becoming all-zero dummy rows. The WAS and FRS predictor definitions are not fully like-for-like and are ported as-is; raw WAS missing values are blanket-filled with zero; UKDS negative sentinel codes (-9/-8/-7/-6) are recoded to zero for the nonnegative-domain columns the licensed audit found carrying them (vcarnr8: 2 rows; HBedRmR8: 95.8 percent - the bedrooms question is effectively unasked in the WAS household file, predictor-quality revisit registered on microcosm#145) - a signed difference vs the incumbent, which trains on raw sentinels; DVPriRntR8's -9 is structural not-applicable so the is_renting mapping is unchanged; genuinely negative domains are never recoded." }, + { + "stage": "was_lisa", + "survey": "Wealth and Assets Survey round 8", + "source": "Office for National Statistics Wealth and Assets Survey, UK Data Service SN 7215, DOI 10.5255/UKDA-SN-7215-20; local licensed round-8 person and household tabs (interviews April 2020 to March 2022, Great Britain).", + "grain": "person", + "artifacts": [ + { + "role": "was_qrf_donor", + "kind": "private_microdata", + "ukds_study_number": 7215, + "doi": "10.5255/UKDA-SN-7215-20", + "filename": "was_round_8_hhold_eul_may_2025_230525.tab", + "sha256": "18b3eb980c02c99f3d8a3254af859bee31682b2bdc11703877677292b3ce9374", + "size_bytes": 39073613, + "access": "private_local_input", + "locator": "caller-supplied local input", + "runtime_sha256_required": true + }, + { + "role": "was_person_tab", + "kind": "private_microdata", + "ukds_study_number": 7215, + "doi": "10.5255/UKDA-SN-7215-20", + "filename": "was_round_8_person_eul_may_2025_230525.tab", + "format": "tab", + "vintage": "round_8", + "sha256": "1ca6fd37d9c677242112e0d7839df8b406eb1611db8322b20771f054e329d71a", + "size_bytes": 356930989, + "access": "private_local_input", + "locator": "caller-supplied local input", + "runtime_sha256_required": true + } + ], + "operations": [ + { + "kind": "clean_was_lisa_donor", + "scope": "WAS round-8 person tab joined many-to-one to the cleaned household tab on the anonymised case number; exact lower-case column matching; the released person LISA value must sum to the household aggregate", + "household_key": "CASER8", + "person_columns": { + "person_number": "PersonR8", + "is_dependent_child": "IsDepR8", + "age_band": "DVAge17R8", + "sex": "SexR8", + "employment_income": "DVGIEmpR8", + "self_employment_income": "DVGISER8", + "holds_lifetime_isa": "fisa_binary3r8_i", + "holding_imputed": "fisa_binary3r8_iflag", + "reported_value": "FLISAVR8", + "value_imputed": "flisavr8_iflag", + "reported_band": "FLISABR8", + "band_imputed": "flisabr8_iflag", + "lifetime_isa_balance": "DVFLISAvR8" + }, + "household_aggregate": "DVFLISAVR8_aggr", + "aggregate_tolerance_gbp": 1, + "non_dependent_code": 2, + "female_code": 2, + "age_band_edges": [ + 0, + 5, + 10, + 15, + 20, + 25, + 30, + 35, + 40, + 45, + 50, + 55, + 60, + 65, + 70, + 75, + 80 + ], + "sentinel_codes": [ + -9, + -8, + -7, + -6 + ], + "sentinel_recode_columns": [ + "employment_income", + "self_employment_income" + ], + "household_predictors": [ + "household_net_income", + "num_adults", + "num_children", + "gross_financial_wealth", + "savings", + "cash_isa", + "stocks_and_shares_isa" + ], + "credibility_rule": { + "maximum_holder_age_band_lower": 45, + "balance_ceiling_gbp": 40000, + "basis": "LISAs have been opened only by people aged 18 to 39 since 6 April 2017, so no holder was older than 44 by the end of round-8 fieldwork (March 2022); a holder recorded in an age band starting at 45 or above is a misreported ISA type and is recoded to a non-holder. About GBP 30,500 of contributions, government bonus and the one-off 2017-18 Help to Buy ISA transfer was attainable before returns, so a holder above GBP 40,000 stays a holder but leaves the balance fit." + } + }, + { + "kind": "materialize_rules_engine_predictors", + "predictors": [ + "household_net_income", + "num_adults", + "num_children", + "private_pension_income", + "employment_income", + "self_employment_income", + "capital_income", + "is_renting" + ], + "consumed_only": true + }, + { + "kind": "impute_lifetime_isa_ownership", + "output": "has_lifetime_isa", + "seed": 0, + "salt": "was_lisa:has_lifetime_isa", + "model": "weighted_ridge_logistic", + "penalty_c": 1, + "solver": "lbfgs", + "max_iter": 5000, + "standardise": "donor_unweighted_mean_sd", + "age_group_lower_bounds": [ + 0, + 25, + 35, + 45, + 55 + ], + "log1p_predictors": [ + "employment_income", + "household_net_income", + "gross_financial_wealth", + "cash_isa", + "stocks_and_shares_isa", + "savings" + ], + "indicator_predictors": [ + "is_private_renter", + "is_female" + ], + "count_predictors": [ + "num_children" + ], + "population": { + "minimum_age": 18 + } + }, + { + "kind": "impute_lifetime_isa_balance", + "output": "lifetime_isa_balance", + "seed": 0, + "salt": "was_lisa:lifetime_isa_balance", + "model": "regime_gated_qrf", + "n_estimators": 100, + "training_rows": "credible_holders", + "expected_regime": "positive_only", + "predictors": [ + "age_band", + "is_female", + "employment_income", + "household_net_income", + "gross_financial_wealth", + "savings", + "cash_isa", + "stocks_and_shares_isa", + "is_private_renter", + "num_children" + ] + }, + { + "kind": "support_clip", + "range": "donor_realized" + }, + { + "kind": "cap_lifetime_isa_to_financial_wealth", + "column": "lifetime_isa_balance", + "cap_column": "gross_financial_wealth", + "method": "pro_rata_within_household", + "ownership_output": "has_lifetime_isa" + }, + { + "kind": "aggregate_person_to_household", + "method": "sum", + "aggregates": { + "household_lifetime_isa_balance": "lifetime_isa_balance" + } + }, + { + "kind": "record_mass_conservation_receipt", + "entity": "household", + "reason": "WAS Lifetime ISA imputation on the source spine: household weights pass through unchanged and total household mass is conserved.", + "declared_factor": 1, + "gate_coupling": "The terminal family gate requires a valid mass-conserving MassChangeRecord carrying exactly this stage-specific reason." + } + ], + "outputs": [ + "has_lifetime_isa", + "lifetime_isa_balance", + "household_lifetime_isa_balance" + ], + "nonnegative_outputs": [ + "lifetime_isa_balance", + "household_lifetime_isa_balance" + ], + "notes": "Imputes Lifetime ISA holdings per adult from the WAS round-8 person tab (microcosm#1003). The donor is every non-dependent adult of the person tab joined many-to-one on CASER8 to the cleaned household tab (the was_wealth donor, same pins); the released value DVFLISAvR8 (the ONS-completed FLISAVR8_i) must sum to the household aggregate DVFLISAVR8_aggr on every household or the stage refuses the tab, and a missing or negative value is refused rather than read as a zero balance. Response classes (observed, banded with the ONS value inside the reported band, ONS-imputed value or holding, rule-impossible) are receipted and never used as predictors. The declared credibility rule recodes holders recorded in an age band starting at 45 or above to non-holders and keeps holders above the balance ceiling as holders outside the balance fit (basis on the clean operation). Ownership is a weighted logistic regression with a ridge penalty on the slopes and an unpenalised intercept, so the donor's weighted ownership share is reproduced in-sample, on the age group, the log of person earnings, household net income, gross financial wealth, cash ISA, stocks-and-shares ISA and savings, private renting, sex and the number of children; the house regime gate (gradient boosting) is miscalibrated for an outcome held by under one per cent of adults with about 120 donor holders. Recipients aged 18 or over hold when a uniform keyed on person_id falls below their probability; no upper age limit is imposed. The balance is the regime-gated QRF fitted on the credible holders and drawn at the owner's keyed quantile (predict_positive_from_uniforms), so it is positive exactly when the person holds. Household predictors reuse the was_wealth definitions; tenure is the private-renter flag on both sides (DVPriRntR8 == 1; tenure_type RENT_PRIVATELY), not the engine is_renting. WAS counts LISAs inside gross financial wealth, so a household total above its gross_financial_wealth draw is scaled down pro rata (receipted) and ownership is re-derived from the capped balance; was_wealth columns are never rewritten. Balances are April 2020 to March 2022 pounds from a Great Britain donor and are not uprated; Northern Ireland recipients are predicted from the GB model. WAS records holdings, not annual contributions, and the stage derives no contribution or bonus." + }, { "stage": "regional_property_uprating", "survey": "Public regional property reference", diff --git a/packages/microcosm-build/src/microcosm/build/uk/spec/sources.yaml b/packages/microcosm-build/src/microcosm/build/uk/spec/sources.yaml index 02e0dcfde..e82949b40 100644 --- a/packages/microcosm-build/src/microcosm/build/uk/spec/sources.yaml +++ b/packages/microcosm-build/src/microcosm/build/uk/spec/sources.yaml @@ -2127,6 +2127,150 @@ stages: - consumer_debt notes: 'Ports incumbent WAS round-8 wealth imputation with signed E5 differences: exact lower-case column matching replaces the fuzzy r/w fallback; cash ISA uses DVCISAVR8_aggr and stocks-and-shares ISA uses DVIISAVR8_aggr; private pension wealth (WAS total private pension wealth less the current defined-benefit component; DB-type components at the SCAPE rate, money-purchase components at reported fund values) is drawn as its own output private_pension_wealth and no longer folded into corporate_wealth, which keeps only the share-like holdings - pension rights are disregarded capital in every means test (UC Regs 2013 Sch 10 para 10 and the HB/JSA/ESA/IS/SPC parallels; uk-data#452) - and the downstream chain segment conditions on both components; each chain segment starts its own fit and draw RNG streams from a child seed derived deterministically from the declared seed (start_chain respawns from the model seed on every call, so one shared model coupled the k-th target of every segment); corporate_wealth folds stocks-and-shares ISA after drawing corporate_wealth_excl_isa; recipient Northern Ireland regions are mapped to Wales for prediction only; student_loan_balance is allocated by household id rather than the incumbent positional off-by-one. The debt segment (fourth chain segment, fourth child seed) reads WAS round-8 derived variables HMortGR8 (total outstanding mortgage debt), HFINWNTR8_exSLC_Sum (net financial wealth excluding student loans; gross less it is the non-student-loan financial liabilities) and Ten1R8 (tenure; codes 2 and 3 are buying with a mortgage and part own/part rent, confirmed by the I1 audit of the pinned tab); UKDS SN 7215 documentation is the codebook. Engine predictors materialize at their native entity and person/benunit values are summed to household, reproducing the incumbent map_to=household semantics; region is one-hot encoded jointly across donor and recipient (the incumbent''s dummy encoding), with unmapped donor GOR codes becoming all-zero dummy rows. The WAS and FRS predictor definitions are not fully like-for-like and are ported as-is; raw WAS missing values are blanket-filled with zero; UKDS negative sentinel codes (-9/-8/-7/-6) are recoded to zero for the nonnegative-domain columns the licensed audit found carrying them (vcarnr8: 2 rows; HBedRmR8: 95.8 percent - the bedrooms question is effectively unasked in the WAS household file, predictor-quality revisit registered on microcosm#145) - a signed difference vs the incumbent, which trains on raw sentinels; DVPriRntR8''s -9 is structural not-applicable so the is_renting mapping is unchanged; genuinely negative domains are never recoded.' +- stage: was_lisa + survey: Wealth and Assets Survey round 8 + source: Office for National Statistics Wealth and Assets Survey, UK Data Service SN 7215, DOI 10.5255/UKDA-SN-7215-20; local licensed round-8 person and household tabs (interviews April 2020 to March 2022, Great Britain). + grain: person + artifacts: + - role: was_qrf_donor + kind: private_microdata + ukds_study_number: 7215 + doi: 10.5255/UKDA-SN-7215-20 + filename: was_round_8_hhold_eul_may_2025_230525.tab + sha256: 18b3eb980c02c99f3d8a3254af859bee31682b2bdc11703877677292b3ce9374 + size_bytes: 39073613 + access: private_local_input + locator: caller-supplied local input + runtime_sha256_required: true + - role: was_person_tab + kind: private_microdata + ukds_study_number: 7215 + doi: 10.5255/UKDA-SN-7215-20 + filename: was_round_8_person_eul_may_2025_230525.tab + format: tab + vintage: round_8 + sha256: 1ca6fd37d9c677242112e0d7839df8b406eb1611db8322b20771f054e329d71a + size_bytes: 356930989 + access: private_local_input + locator: caller-supplied local input + runtime_sha256_required: true + operations: + - kind: clean_was_lisa_donor + scope: WAS round-8 person tab joined many-to-one to the cleaned household tab on the anonymised case number; exact lower-case column matching; the released person LISA value must sum to the household aggregate + household_key: CASER8 + person_columns: + person_number: PersonR8 + is_dependent_child: IsDepR8 + age_band: DVAge17R8 + sex: SexR8 + employment_income: DVGIEmpR8 + self_employment_income: DVGISER8 + holds_lifetime_isa: fisa_binary3r8_i + holding_imputed: fisa_binary3r8_iflag + reported_value: FLISAVR8 + value_imputed: flisavr8_iflag + reported_band: FLISABR8 + band_imputed: flisabr8_iflag + lifetime_isa_balance: DVFLISAvR8 + household_aggregate: DVFLISAVR8_aggr + aggregate_tolerance_gbp: 1.0 + non_dependent_code: 2 + female_code: 2 + age_band_edges: [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80] + sentinel_codes: [-9, -8, -7, -6] + sentinel_recode_columns: + - employment_income + - self_employment_income + household_predictors: + - household_net_income + - num_adults + - num_children + - gross_financial_wealth + - savings + - cash_isa + - stocks_and_shares_isa + credibility_rule: + maximum_holder_age_band_lower: 45 + balance_ceiling_gbp: 40000.0 + basis: LISAs have been opened only by people aged 18 to 39 since 6 April 2017, so no holder was older than 44 by the end of round-8 fieldwork (March 2022); a holder recorded in an age band starting at 45 or above is a misreported ISA type and is recoded to a non-holder. About GBP 30,500 of contributions, government bonus and the one-off 2017-18 Help to Buy ISA transfer was attainable before returns, so a holder above GBP 40,000 stays a holder but leaves the balance fit. + - kind: materialize_rules_engine_predictors + predictors: + - household_net_income + - num_adults + - num_children + - private_pension_income + - employment_income + - self_employment_income + - capital_income + - is_renting + consumed_only: true + - kind: impute_lifetime_isa_ownership + output: has_lifetime_isa + seed: 0 + salt: was_lisa:has_lifetime_isa + model: weighted_ridge_logistic + penalty_c: 1.0 + solver: lbfgs + max_iter: 5000 + standardise: donor_unweighted_mean_sd + age_group_lower_bounds: [0, 25, 35, 45, 55] + log1p_predictors: + - employment_income + - household_net_income + - gross_financial_wealth + - cash_isa + - stocks_and_shares_isa + - savings + indicator_predictors: + - is_private_renter + - is_female + count_predictors: + - num_children + population: + minimum_age: 18 + - kind: impute_lifetime_isa_balance + output: lifetime_isa_balance + seed: 0 + salt: was_lisa:lifetime_isa_balance + model: regime_gated_qrf + n_estimators: 100 + training_rows: credible_holders + expected_regime: positive_only + predictors: + - age_band + - is_female + - employment_income + - household_net_income + - gross_financial_wealth + - savings + - cash_isa + - stocks_and_shares_isa + - is_private_renter + - num_children + - kind: support_clip + range: donor_realized + - kind: cap_lifetime_isa_to_financial_wealth + column: lifetime_isa_balance + cap_column: gross_financial_wealth + method: pro_rata_within_household + ownership_output: has_lifetime_isa + - kind: aggregate_person_to_household + method: sum + aggregates: + household_lifetime_isa_balance: lifetime_isa_balance + - kind: record_mass_conservation_receipt + entity: household + reason: 'WAS Lifetime ISA imputation on the source spine: household weights pass through unchanged and total household mass is conserved.' + declared_factor: 1.0 + gate_coupling: The terminal family gate requires a valid mass-conserving MassChangeRecord carrying exactly this stage-specific reason. + outputs: + - has_lifetime_isa + - lifetime_isa_balance + - household_lifetime_isa_balance + nonnegative_outputs: + - lifetime_isa_balance + - household_lifetime_isa_balance + notes: 'Imputes Lifetime ISA holdings per adult from the WAS round-8 person tab (microcosm#1003). The donor is every non-dependent adult of the person tab joined many-to-one on CASER8 to the cleaned household tab (the was_wealth donor, same pins); the released value DVFLISAvR8 (the ONS-completed FLISAVR8_i) must sum to the household aggregate DVFLISAVR8_aggr on every household or the stage refuses the tab, and a missing or negative value is refused rather than read as a zero balance. Response classes (observed, banded with the ONS value inside the reported band, ONS-imputed value or holding, rule-impossible) are receipted and never used as predictors. The declared credibility rule recodes holders recorded in an age band starting at 45 or above to non-holders and keeps holders above the balance ceiling as holders outside the balance fit (basis on the clean operation). Ownership is a weighted logistic regression with a ridge penalty on the slopes and an unpenalised intercept, so the donor''s weighted ownership share is reproduced in-sample, on the age group, the log of person earnings, household net income, gross financial wealth, cash ISA, stocks-and-shares ISA and savings, private renting, sex and the number of children; the house regime gate (gradient boosting) is miscalibrated for an outcome held by under one per cent of adults with about 120 donor holders. Recipients aged 18 or over hold when a uniform keyed on person_id falls below their probability; no upper age limit is imposed. The balance is the regime-gated QRF fitted on the credible holders and drawn at the owner''s keyed quantile (predict_positive_from_uniforms), so it is positive exactly when the person holds. Household predictors reuse the was_wealth definitions; tenure is the private-renter flag on both sides (DVPriRntR8 == 1; tenure_type RENT_PRIVATELY), not the engine is_renting. WAS counts LISAs inside gross financial wealth, so a household total above its gross_financial_wealth draw is scaled down pro rata (receipted) and ownership is re-derived from the capped balance; was_wealth columns are never rewritten. Balances are April 2020 to March 2022 pounds from a Great Britain donor and are not uprated; Northern Ireland recipients are predicted from the GB model. WAS records holdings, not annual contributions, and the stage derives no contribution or bonus.' - stage: regional_property_uprating survey: Public regional property reference source: MHCLG dwellings and ONS UK House Price Index December 2025 regional average prices. diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/graph.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/graph.py index 9abc84665..c71851c4c 100644 --- a/packages/microcosm-build/src/microcosm/build/uk_runtime/graph.py +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/graph.py @@ -124,6 +124,7 @@ "frs_education": ("frs",), "frs_legacy_proxies": ("frs",), "was_wealth": ("was",), + "was_lisa": ("was", "was_person"), "nts_bus_travel": ( "nts_household", "nts_individual", @@ -142,6 +143,7 @@ _SPLIT_SOURCE_DESCRIPTIONS = { "frs": "Pinned local FRS table directory.", "was": "Pinned local WAS household donor table.", + "was_person": "Pinned local WAS person donor table.", "nts_household": "Pinned local NTS household donor table.", "nts_individual": "Pinned local NTS individual donor table.", "nts_trip": "Pinned local NTS trip donor table.", @@ -213,6 +215,10 @@ "frs_household_draws": frozenset(), "frs_brma": None, "was_wealth": None, + # The LISA model reads the was_wealth household predictors through the + # engine (household net income over the whole frame), an open surface like + # the WAS chain it conditions on. + "was_lisa": None, # The factor's mean is taken over FRS-base owners only, so the support # channel is a direct read. "regional_property_uprating": frozenset( @@ -611,6 +617,11 @@ def _cells( *_cells("household", ("mortgage_debt", "consumer_debt")), _Cell("person", "student_loan_balance", "float64"), ), + "was_lisa": ( + _Cell("person", "has_lifetime_isa", "bool"), + _Cell("person", "lifetime_isa_balance", "float64"), + _Cell("household", "household_lifetime_isa_balance", "float64"), + ), "nts_bus_travel": ( _Cell("person", "local_bus_use_band", "int64"), *_cells( diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/graph_kernels.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/graph_kernels.py index 8cbf46106..92d119613 100644 --- a/packages/microcosm-build/src/microcosm/build/uk_runtime/graph_kernels.py +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/graph_kernels.py @@ -45,7 +45,7 @@ from microcosm.graph.population import dtype_for_token from .. import stage_evidence -from . import bus_use_incidence, frs_hmrc_source, uc_relationships +from . import bus_use_incidence, frs_hmrc_source, uc_relationships, was_wealth from .national_frame import UK_NATIONAL_SCHEMA from .rowwise_geography import id_multiplier_for_values @@ -77,6 +77,7 @@ "frs_household_draws": "frs_household_draws", "frs_brma": "frs_brma", "was_wealth": "was_wealth", + "was_lisa": "was_lisa", "nts_bus_travel": "nts_bus_travel", "regional_property_uprating": "regional_uprating", "lcfs_consumption": "lcfs_consumption", @@ -109,6 +110,9 @@ "frs_education_grant_split": (uk_engine_adapter,), "frs_brma": (uk_engine_adapter,), "was_wealth": (uk_engine_adapter,), + # The LISA stage reads its household donor through the WAS cleaning and its + # household predictors through the WAS recipient surface. + "was_lisa": (uk_engine_adapter, was_wealth), "nts_bus_travel": (uk_engine_adapter, bus_use_incidence), "lcfs_consumption": (uk_engine_adapter,), "etb_vat": (uk_engine_adapter,), @@ -362,7 +366,7 @@ def _fixture_asset_type_facts(path: Path): def _fixture_descriptor( source: Path, ) -> tuple[Mapping[str, object], dict[str, SourceStageSpec]]: - """Parse the H2 bundle's descriptor and its 27 stage specs, keyed by name.""" + """Parse the H2 bundle's descriptor and its stage specs, keyed by name.""" from microcosm.build.source_manifest import SourceStageSpec @@ -386,7 +390,7 @@ def _fixture_descriptor( missing = sorted(set(_STAGE_MODULES) - set(stages)) extra = sorted(set(stages) - set(_STAGE_MODULES)) raise ValueError( - "UK parity fixture must describe the current 34-stage spine " + "UK parity fixture must describe the current 35-stage spine " f"(missing={missing}, extra={extra})." ) return descriptor, stages @@ -434,6 +438,7 @@ def _fixture_implementations(source: Path) -> Mapping[str, object]: from .uc_capital_coherence import UKUCCapitalCoherenceStageTransform from .uc_deduction_attributes import UKUCDeductionAttributesStageTransform from .uc_reporter_redraw import UKUCReporterRedrawStageTransform + from .was_lisa import UKWASLISAStageTransform from .was_wealth import UKWASWealthStageTransform descriptor, stages = _fixture_descriptor(source) @@ -444,6 +449,9 @@ def _fixture_implementations(source: Path) -> Mapping[str, object]: was = pd.read_csv( _fixture_input(source, inputs, "was"), float_precision="round_trip" ) + was_person = pd.read_csv( + _fixture_input(source, inputs, "was_person"), float_precision="round_trip" + ) lcfs_household = pd.read_csv( _fixture_input(source, inputs, "lcfs_household"), float_precision="round_trip", @@ -535,6 +543,12 @@ def _fixture_implementations(source: Path) -> Mapping[str, object]: "was_wealth": UKWASWealthStageTransform( stage=stages["was_wealth"], engine=engine, donor=was ), + "was_lisa": UKWASLISAStageTransform( + stage=stages["was_lisa"], + engine=engine, + donor_household=was, + donor_person=was_person, + ), "nts_bus_travel": UKNTSBusTravelStageTransform( stage=stages["nts_bus_travel"], engine=engine, diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/spine_build.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/spine_build.py index 6025ccdde..f5bce9bc2 100644 --- a/packages/microcosm-build/src/microcosm/build/uk_runtime/spine_build.py +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/spine_build.py @@ -152,6 +152,7 @@ from microcosm.build.uk_runtime.uc_reporter_redraw import ( UKUCReporterRedrawStageTransform, ) +from microcosm.build.uk_runtime.was_lisa import UKWASLISAStageTransform from microcosm.build.uk_runtime.was_wealth import UKWASWealthStageTransform from microcosm.frame import Frame from microcosm.frame.adapters.policyengine_uk import PolicyEngineUKEngine @@ -289,6 +290,14 @@ def _parse_args(argv: list[str] | None = None) -> argparse.Namespace: type=Path, help="Caller-supplied private WAS round-8 household tab for was_wealth.", ) + parser.add_argument( + "--was-person-tab", + type=Path, + help=( + "Caller-supplied private WAS round-8 person tab for was_lisa (with " + "--was-tab)." + ), + ) parser.add_argument( "--nts-household-tab", type=Path, @@ -367,6 +376,7 @@ def _parse_args(argv: list[str] | None = None) -> argparse.Namespace: flag for flag, value in ( ("--was-tab", args.was_tab), + ("--was-person-tab", args.was_person_tab), ("--nts-household-tab", args.nts_household_tab), ("--nts-individual-tab", args.nts_individual_tab), ("--nts-trip-tab", args.nts_trip_tab), @@ -474,6 +484,7 @@ def _synthetic_graph_sources(source: Path) -> dict[str, Path]: raise ValueError("Synthetic fixture inputs must be an object.") names = { "was": "was", + "was_person": "was_person", "nts_household": "nts_household", "nts_individual": "nts_individual", "nts_trip": "nts_trip", @@ -1286,6 +1297,20 @@ def prepare_uk_spine_execution( raise ValueError( "--was-tab is required when the was_wealth stage is scheduled." ) + if args.synthetic_fixture_dir is None and "was_lisa" in stage_names: + missing_was = [ + flag + for flag, value in ( + ("--was-tab", args.was_tab), + ("--was-person-tab", args.was_person_tab), + ) + if value is None + ] + if missing_was: + raise ValueError( + "was_lisa requires caller-supplied private inputs: " + f"{', '.join(missing_was)}." + ) if args.synthetic_fixture_dir is None and "nts_bus_travel" in stage_names: missing_nts = [ flag @@ -1410,6 +1435,15 @@ def prepare_uk_spine_execution( was_tab_path=sources["was"], ) ) + if "was_lisa" in stage_names: + implementations["was_lisa"] = _GraphSourceTransform( + lambda sources: UKWASLISAStageTransform( + stage=stages_by_name["was_lisa"], + engine=engine, + was_tab_path=sources["was"], + was_person_tab_path=sources["was_person"], + ) + ) if "nts_bus_travel" in stage_names: implementations["nts_bus_travel"] = _GraphSourceTransform( lambda sources: UKNTSBusTravelStageTransform( @@ -1569,8 +1603,10 @@ def prepare_uk_spine_execution( graph_sources = _synthetic_graph_sources(args.synthetic_fixture_dir) else: graph_sources = {"frs": args.frs_raw_dir} - if "was_wealth" in stage_names: + if "was_wealth" in stage_names or "was_lisa" in stage_names: graph_sources["was"] = args.was_tab + if "was_lisa" in stage_names: + graph_sources["was_person"] = args.was_person_tab if "nts_bus_travel" in stage_names: graph_sources["nts_household"] = args.nts_household_tab graph_sources["nts_individual"] = args.nts_individual_tab diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/was_lisa.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/was_lisa.py index 32ff40ab7..0a688f06f 100644 --- a/packages/microcosm-build/src/microcosm/build/uk_runtime/was_lisa.py +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/was_lisa.py @@ -121,6 +121,7 @@ BALANCE_COLUMN = "lifetime_isa_balance" HOUSEHOLD_BALANCE_COLUMN = "household_lifetime_isa_balance" FINANCIAL_WEALTH_COLUMN = "gross_financial_wealth" +CAP_METHOD = "pro_rata_within_household" UK_WAS_LISA_PERSON_OUTPUT_COLUMNS: tuple[str, ...] = ( OWNERSHIP_COLUMN, BALANCE_COLUMN, @@ -1352,10 +1353,13 @@ def __call__(self, frame: Frame) -> Frame: if ( cap.get("column") != BALANCE_COLUMN or cap.get("cap_column") != FINANCIAL_WEALTH_COLUMN + or cap.get("method") != CAP_METHOD + or cap.get("ownership_output") != OWNERSHIP_COLUMN ): raise WASLISAError( "cap_lifetime_isa_to_financial_wealth must cap " - f"{BALANCE_COLUMN!r} at {FINANCIAL_WEALTH_COLUMN!r}." + f"{BALANCE_COLUMN!r} at {FINANCIAL_WEALTH_COLUMN!r} " + f"({CAP_METHOD}) and re-derive {OWNERSHIP_COLUMN!r}." ) donor = clean_was_lisa_donor( self._table( diff --git a/packages/microcosm-build/tests/engine/uk/test_uk_release_input_coverage.py b/packages/microcosm-build/tests/engine/uk/test_uk_release_input_coverage.py index a3123b9b4..c47e22f8d 100644 --- a/packages/microcosm-build/tests/engine/uk/test_uk_release_input_coverage.py +++ b/packages/microcosm-build/tests/engine/uk/test_uk_release_input_coverage.py @@ -456,6 +456,7 @@ def test_shipped_manifest_is_current(self) -> None: "salary_sacrifice", "student_loans", "was_wealth", + "was_lisa", "regional_property_uprating", "nts_bus_travel", "lcfs_consumption", diff --git a/packages/microcosm-build/tests/engine_free/shared/test_country_spec.py b/packages/microcosm-build/tests/engine_free/shared/test_country_spec.py index 57b64d6f1..d31331a1c 100644 --- a/packages/microcosm-build/tests/engine_free/shared/test_country_spec.py +++ b/packages/microcosm-build/tests/engine_free/shared/test_country_spec.py @@ -1002,13 +1002,13 @@ def test_uk_source_manifest_contains_only_canonical_spine_stages(self) -> None: spec = load_country_spec("uk") assert spec.sources is not None - # 34 spine stages (uc_reporter_redraw #832, uc_deduction_attributes + # 35 spine stages (uc_reporter_redraw #832, uc_deduction_attributes # #685, frs_relationships #791, hmrc_cgt_asset_type_spine #725, # cgt_incidence_anchor #970, nts_bus_travel #930, then - # spi_income_band_donors (PolicyEngine/chronicle#280 lane) and the SPI - # housing shell (#1012) as the newest); the frs_hmrc_retained_leaves / - # hmrc_spi_income pair is retired (#901). - assert len(spec.sources.stages) == 34 + # spi_income_band_donors (PolicyEngine/chronicle#280 lane), the SPI + # housing shell (#1012) and was_lisa (#1003) as the newest); the + # frs_hmrc_retained_leaves / hmrc_spi_income pair is retired (#901). + assert len(spec.sources.stages) == 35 assert not {"frs_hmrc_retained_leaves", "hmrc_spi_income"}.intersection( stage.stage for stage in spec.sources.stages ) diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_frs_spine.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_frs_spine.py index b35f9ce0a..f9cf9ef37 100644 --- a/packages/microcosm-build/tests/engine_free/uk/test_uk_frs_spine.py +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_frs_spine.py @@ -2279,6 +2279,7 @@ def test_input_artifact_pins_bind_spi_donor_and_ods() -> None: "nts_ticket_tab", "published_fact_surface", "qrf_donor", + "was_person_tab", "was_qrf_donor", } # Every private input, the three NTS tabs included since the SN 5340 @@ -2293,6 +2294,7 @@ def test_input_artifact_pins_bind_spi_donor_and_ods() -> None: str(artifact["role"]): str(artifact["sha256"]) for stage_name in ( "was_wealth", + "was_lisa", "nts_bus_travel", "lcfs_consumption", "etb_vat", @@ -2320,6 +2322,7 @@ def test_e8_manifest_seeds_all_reach_the_build_sidecar_harvester() -> None: assert declared["cgt_incidence_clone"] == {"cgt_prior_amount": 0} assert declared["nts_bus_travel"] == {"local_bus_use_band": 0} + assert declared["was_lisa"] == {"has_lifetime_isa": 0, "lifetime_isa_balance": 0} assert declared["lcfs_consumption"] == { "has_fuel_consumption": 0, "lcfs_consumption": 0, diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_graph.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_graph.py index 730385de6..1a618726c 100644 --- a/packages/microcosm-build/tests/engine_free/uk/test_uk_graph.py +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_graph.py @@ -40,14 +40,14 @@ def test_uk_spine_graph_contains_every_manifest_stage() -> None: graph = uk_spine_graph(spec) ids = {node.id for node in graph.nodes} - # 34 with the #832 uc_reporter_redraw, #685 uc_deduction_attributes, + # 35 with the #832 uc_reporter_redraw, #685 uc_deduction_attributes, # #791 frs_relationships, #725 hmrc_cgt_asset_type_spine, #970 # cgt_incidence_anchor, #930 nts_bus_travel and the income-anchor lane's - # (PolicyEngine/chronicle#280) spi_income_band_donors stages and the #1012 - # spi_housing_shell; the frs_hmrc_retained_leaves / hmrc_spi_income - # certified-pair alternatives are retired (#901), so the manifest roster is - # the graph roster. - assert len(expected) == 34 + # (PolicyEngine/chronicle#280) spi_income_band_donors stages, the #1012 + # spi_housing_shell and the #1003 was_lisa; the frs_hmrc_retained_leaves / + # hmrc_spi_income certified-pair alternatives are retired (#901), so the + # manifest roster is the graph roster. + assert len(expected) == 35 assert {"frs_hmrc_retained_leaves", "hmrc_spi_income"}.isdisjoint(expected) assert set(expected) <= ids assert {"frs_hmrc_retained_leaves", "hmrc_spi_income"}.isdisjoint(ids) @@ -101,6 +101,7 @@ def test_uk_production_graph_binds_split_donor_sources_and_runtime_config() -> N assert {source.name for source in graph.sources} == { "frs", "was", + "was_person", "nts_household", "nts_individual", "nts_trip", @@ -116,6 +117,7 @@ def test_uk_production_graph_binds_split_donor_sources_and_runtime_config() -> N "lcfs_household", "lcfs_person", ) + assert graph.node("was_lisa").sources == ("was", "was_person") assert graph.node("hmrc_spi_income_spine").sources == ( "spi", "hmrc_income", @@ -182,6 +184,7 @@ def test_uk_adapter_source_changes_invalidate_all_consuming_stages(monkeypatch): "frs_education_grant_split", "frs_brma", "was_wealth", + "was_lisa", "nts_bus_travel", "lcfs_consumption", "etb_vat", diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_source_stages.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_source_stages.py index 542c2e768..5dd10c127 100644 --- a/packages/microcosm-build/tests/engine_free/uk/test_uk_source_stages.py +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_source_stages.py @@ -41,6 +41,8 @@ ] E5_STAGE_NAMES = [ "was_wealth", + # #1003: the Lifetime ISA holdings read the was_wealth household draws. + "was_lisa", "regional_property_uprating", ] E6_STAGE_NAMES = [ @@ -215,6 +217,7 @@ def test_country_stage_plan_assembles_spine_plan(self) -> None: "frs_household_draws": _identity, "frs_brma": _identity, "was_wealth": _identity, + "was_lisa": _identity, "nts_bus_travel": _identity, "regional_property_uprating": _identity, "lcfs_consumption": _identity, @@ -330,6 +333,10 @@ def test_e3_outputs_are_backed_by_runtime_written_columns(self) -> None: UC_DEDUCTION_NONNEGATIVE_OUTPUT_COLUMNS, UC_DEDUCTION_OUTPUT_COLUMNS, ) + from microcosm.build.uk_runtime.was_lisa import ( + UK_WAS_LISA_NONNEGATIVE_OUTPUT_COLUMNS, + UK_WAS_LISA_OUTPUT_COLUMNS, + ) from microcosm.build.uk_runtime.was_wealth import ( UK_WAS_WEALTH_NONNEGATIVE_OUTPUT_COLUMNS, UK_WAS_WEALTH_OUTPUT_COLUMNS, @@ -369,6 +376,11 @@ def test_e3_outputs_are_backed_by_runtime_written_columns(self) -> None: stages["was_wealth"].nonnegative_outputs == UK_WAS_WEALTH_NONNEGATIVE_OUTPUT_COLUMNS ) + assert stages["was_lisa"].outputs == UK_WAS_LISA_OUTPUT_COLUMNS + assert ( + stages["was_lisa"].nonnegative_outputs + == UK_WAS_LISA_NONNEGATIVE_OUTPUT_COLUMNS + ) assert stages["uc_deduction_attributes"].outputs == UC_DEDUCTION_OUTPUT_COLUMNS assert ( stages["uc_deduction_attributes"].nonnegative_outputs @@ -545,6 +557,16 @@ def test_e3_operation_kinds_are_declared_in_order(self) -> None: "allocate_within_group_waterfall", "record_mass_conservation_receipt", ] + assert [op.kind for op in stages["was_lisa"].operations] == [ + "clean_was_lisa_donor", + "materialize_rules_engine_predictors", + "impute_lifetime_isa_ownership", + "impute_lifetime_isa_balance", + "support_clip", + "cap_lifetime_isa_to_financial_wealth", + "aggregate_person_to_household", + "record_mass_conservation_receipt", + ] assert [op.kind for op in stages["regional_property_uprating"].operations] == [ "uprate_to_regional_reference", "record_mass_conservation_receipt", @@ -1001,6 +1023,9 @@ def test_every_column_writing_stage_declares_the_receipt_its_module_records() -> from microcosm.build.uk_runtime.regional_uprating import ( UK_REGIONAL_PROPERTY_UPRATING_MASS_CONSERVATION_REASON, ) + from microcosm.build.uk_runtime.was_lisa import ( + UK_WAS_LISA_MASS_CONSERVATION_REASON, + ) from microcosm.build.uk_runtime.was_wealth import ( UK_WAS_WEALTH_MASS_CONSERVATION_REASON, ) @@ -1010,6 +1035,7 @@ def test_every_column_writing_stage_declares_the_receipt_its_module_records() -> stages = spec.sources.stage_map() expected = { "was_wealth": UK_WAS_WEALTH_MASS_CONSERVATION_REASON, + "was_lisa": UK_WAS_LISA_MASS_CONSERVATION_REASON, "regional_property_uprating": ( UK_REGIONAL_PROPERTY_UPRATING_MASS_CONSERVATION_REASON ), diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_spine_acceptance_receipt.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_spine_acceptance_receipt.py index ea92e56e7..f68595818 100644 --- a/packages/microcosm-build/tests/engine_free/uk/test_uk_spine_acceptance_receipt.py +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_spine_acceptance_receipt.py @@ -103,6 +103,10 @@ def _apply_pending_roster_transformations( # from their own incomes right after the SPI income chain. assert "spi_housing_shell" not in roster roster.insert(roster.index("hmrc_spi_income_spine") + 1, "spi_housing_shell") + # #1003 re-mint pending: the Lifetime ISA holdings read the was_wealth + # household draws, so they run right after was_wealth. + assert "was_lisa" not in roster + roster.insert(roster.index("was_wealth") + 1, "was_lisa") return tuple(roster) diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_was_lisa.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_was_lisa.py index 23b061274..2521b11f9 100644 --- a/packages/microcosm-build/tests/engine_free/uk/test_uk_was_lisa.py +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_was_lisa.py @@ -8,6 +8,7 @@ import pandas as pd import pytest +from microcosm.build.country_spec import load_country_spec from microcosm.build.source_manifest import SourceStageSpec from microcosm.build.uk_runtime.national_frame import uk_national_frame from microcosm.build.uk_runtime.stage_health import uk_stage_health_gate @@ -120,6 +121,7 @@ "column": "lifetime_isa_balance", "cap_column": "gross_financial_wealth", "method": "pro_rata_within_household", + "ownership_output": "has_lifetime_isa", } @@ -164,6 +166,38 @@ def _stage() -> SourceStageSpec: ) +def _committed_stage(n_estimators: int = 4) -> SourceStageSpec: + """The packaged ``was_lisa`` declaration, with a small balance forest.""" + + spec = load_country_spec("uk") + assert spec.sources is not None + committed = spec.sources.stage_map()[UK_WAS_LISA_STAGE_NAME] + operations = [ + { + "kind": operation.kind, + **dict(operation.parameters), + **( + {"n_estimators": n_estimators} + if operation.kind == "impute_lifetime_isa_balance" + else {} + ), + } + for operation in committed.operations + ] + return SourceStageSpec.from_mapping( + { + "stage": committed.stage, + "survey": committed.survey, + "source": committed.source, + "grain": committed.grain, + "artifacts": [dict(artifact) for artifact in committed.artifacts], + "operations": operations, + "outputs": list(committed.outputs), + "nonnegative_outputs": list(committed.nonnegative_outputs), + } + ) + + def _columns() -> WASLISAColumns: return WASLISAColumns.from_parameters(CLEAN) @@ -476,7 +510,7 @@ def test_cap_scales_a_household_over_its_financial_wealth_pro_rata() -> None: def _transform() -> UKWASLISAStageTransform: return UKWASLISAStageTransform( - stage=_stage(), + stage=_committed_stage(), engine=_FakeEngine(), donor_household=_was_donor(), donor_person=_was_person_donor(), @@ -565,3 +599,39 @@ def test_stage_requires_its_tabs() -> None: with pytest.raises(WASLISAError, match="was_person_tab"): transform(_recipient_frame()) + + +def test_committed_declaration_carries_the_tested_parameters() -> None: + """The packaged manifest declares exactly what these tests exercise.""" + + committed = load_country_spec("uk").sources.stage_map()[UK_WAS_LISA_STAGE_NAME] + by_kind = { + operation.kind: dict(operation.parameters) for operation in committed.operations + } + + clean = dict(by_kind["clean_was_lisa_donor"]) + clean.pop("scope") + clean["credibility_rule"] = { + key: value for key, value in clean["credibility_rule"].items() if key != "basis" + } + assert clean == CLEAN + assert by_kind["impute_lifetime_isa_ownership"] == OWNERSHIP + assert by_kind["impute_lifetime_isa_balance"] == {**BALANCE, "n_estimators": 100} + assert by_kind["cap_lifetime_isa_to_financial_wealth"] == CAP + assert by_kind["aggregate_person_to_household"] == { + "method": "sum", + "aggregates": {HOUSEHOLD_BALANCE_COLUMN: BALANCE_COLUMN}, + } + receipts = by_kind["record_mass_conservation_receipt"] + assert receipts["reason"] == UK_WAS_LISA_MASS_CONSERVATION_REASON + assert committed.outputs == UK_WAS_LISA_OUTPUT_COLUMNS + roles = {artifact["role"]: artifact for artifact in committed.artifacts} + assert roles["was_person_tab"]["sha256"] == ( + "1ca6fd37d9c677242112e0d7839df8b406eb1611db8322b20771f054e329d71a" + ) + was_wealth = load_country_spec("uk").sources.stage_map()["was_wealth"] + assert roles["was_qrf_donor"] == next( + artifact + for artifact in was_wealth.artifacts + if artifact["role"] == "was_qrf_donor" + ) diff --git a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/fixture.json b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/fixture.json index 28ca3a2cf..e9cec4dd1 100644 --- a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/fixture.json +++ b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/fixture.json @@ -34,7 +34,8 @@ "nts_ticket": "nts_ticket.csv", "nts_trip": "nts_trip.csv", "spi_donor": "spi_donor.csv", - "was": "was.csv" + "was": "was.csv", + "was_person": "was_person.csv" }, "schema_version": "uk-spine-parity-fixture.v1", "stages": { @@ -4766,6 +4767,217 @@ "stage": "uc_reporter_redraw", "survey": "Family Resources Survey 2024-25" }, + "was_lisa": { + "artifacts": [ + { + "access": "private_local_input", + "doi": "10.5255/UKDA-SN-7215-20", + "filename": "was_round_8_hhold_eul_may_2025_230525.tab", + "kind": "private_microdata", + "locator": "caller-supplied local input", + "role": "was_qrf_donor", + "runtime_sha256_required": true, + "sha256": "18b3eb980c02c99f3d8a3254af859bee31682b2bdc11703877677292b3ce9374", + "size_bytes": 39073613, + "ukds_study_number": 7215 + }, + { + "access": "private_local_input", + "doi": "10.5255/UKDA-SN-7215-20", + "filename": "was_round_8_person_eul_may_2025_230525.tab", + "format": "tab", + "kind": "private_microdata", + "locator": "caller-supplied local input", + "role": "was_person_tab", + "runtime_sha256_required": true, + "sha256": "1ca6fd37d9c677242112e0d7839df8b406eb1611db8322b20771f054e329d71a", + "size_bytes": 356930989, + "ukds_study_number": 7215, + "vintage": "round_8" + } + ], + "grain": "person", + "nonnegative_outputs": [ + "lifetime_isa_balance", + "household_lifetime_isa_balance" + ], + "notes": "Imputes Lifetime ISA holdings per adult from the WAS round-8 person tab (microcosm#1003). The donor is every non-dependent adult of the person tab joined many-to-one on CASER8 to the cleaned household tab (the was_wealth donor, same pins); the released value DVFLISAvR8 (the ONS-completed FLISAVR8_i) must sum to the household aggregate DVFLISAVR8_aggr on every household or the stage refuses the tab, and a missing or negative value is refused rather than read as a zero balance. Response classes (observed, banded with the ONS value inside the reported band, ONS-imputed value or holding, rule-impossible) are receipted and never used as predictors. The declared credibility rule recodes holders recorded in an age band starting at 45 or above to non-holders and keeps holders above the balance ceiling as holders outside the balance fit (basis on the clean operation). Ownership is a weighted logistic regression with a ridge penalty on the slopes and an unpenalised intercept, so the donor's weighted ownership share is reproduced in-sample, on the age group, the log of person earnings, household net income, gross financial wealth, cash ISA, stocks-and-shares ISA and savings, private renting, sex and the number of children; the house regime gate (gradient boosting) is miscalibrated for an outcome held by under one per cent of adults with about 120 donor holders. Recipients aged 18 or over hold when a uniform keyed on person_id falls below their probability; no upper age limit is imposed. The balance is the regime-gated QRF fitted on the credible holders and drawn at the owner's keyed quantile (predict_positive_from_uniforms), so it is positive exactly when the person holds. Household predictors reuse the was_wealth definitions; tenure is the private-renter flag on both sides (DVPriRntR8 == 1; tenure_type RENT_PRIVATELY), not the engine is_renting. WAS counts LISAs inside gross financial wealth, so a household total above its gross_financial_wealth draw is scaled down pro rata (receipted) and ownership is re-derived from the capped balance; was_wealth columns are never rewritten. Balances are April 2020 to March 2022 pounds from a Great Britain donor and are not uprated; Northern Ireland recipients are predicted from the GB model. WAS records holdings, not annual contributions, and the stage derives no contribution or bonus.", + "operations": [ + { + "age_band_edges": [ + 0, + 5, + 10, + 15, + 20, + 25, + 30, + 35, + 40, + 45, + 50, + 55, + 60, + 65, + 70, + 75, + 80 + ], + "aggregate_tolerance_gbp": 1, + "credibility_rule": { + "balance_ceiling_gbp": 40000, + "basis": "LISAs have been opened only by people aged 18 to 39 since 6 April 2017, so no holder was older than 44 by the end of round-8 fieldwork (March 2022); a holder recorded in an age band starting at 45 or above is a misreported ISA type and is recoded to a non-holder. About GBP 30,500 of contributions, government bonus and the one-off 2017-18 Help to Buy ISA transfer was attainable before returns, so a holder above GBP 40,000 stays a holder but leaves the balance fit.", + "maximum_holder_age_band_lower": 45 + }, + "female_code": 2, + "household_aggregate": "DVFLISAVR8_aggr", + "household_key": "CASER8", + "household_predictors": [ + "household_net_income", + "num_adults", + "num_children", + "gross_financial_wealth", + "savings", + "cash_isa", + "stocks_and_shares_isa" + ], + "kind": "clean_was_lisa_donor", + "non_dependent_code": 2, + "person_columns": { + "age_band": "DVAge17R8", + "band_imputed": "flisabr8_iflag", + "employment_income": "DVGIEmpR8", + "holding_imputed": "fisa_binary3r8_iflag", + "holds_lifetime_isa": "fisa_binary3r8_i", + "is_dependent_child": "IsDepR8", + "lifetime_isa_balance": "DVFLISAvR8", + "person_number": "PersonR8", + "reported_band": "FLISABR8", + "reported_value": "FLISAVR8", + "self_employment_income": "DVGISER8", + "sex": "SexR8", + "value_imputed": "flisavr8_iflag" + }, + "scope": "WAS round-8 person tab joined many-to-one to the cleaned household tab on the anonymised case number; exact lower-case column matching; the released person LISA value must sum to the household aggregate", + "sentinel_codes": [ + -9, + -8, + -7, + -6 + ], + "sentinel_recode_columns": [ + "employment_income", + "self_employment_income" + ] + }, + { + "consumed_only": true, + "kind": "materialize_rules_engine_predictors", + "predictors": [ + "household_net_income", + "num_adults", + "num_children", + "private_pension_income", + "employment_income", + "self_employment_income", + "capital_income", + "is_renting" + ] + }, + { + "age_group_lower_bounds": [ + 0, + 25, + 35, + 45, + 55 + ], + "count_predictors": [ + "num_children" + ], + "indicator_predictors": [ + "is_private_renter", + "is_female" + ], + "kind": "impute_lifetime_isa_ownership", + "log1p_predictors": [ + "employment_income", + "household_net_income", + "gross_financial_wealth", + "cash_isa", + "stocks_and_shares_isa", + "savings" + ], + "max_iter": 5000, + "model": "weighted_ridge_logistic", + "output": "has_lifetime_isa", + "penalty_c": 1, + "population": { + "minimum_age": 18 + }, + "salt": "was_lisa:has_lifetime_isa", + "seed": 0, + "solver": "lbfgs", + "standardise": "donor_unweighted_mean_sd" + }, + { + "expected_regime": "positive_only", + "kind": "impute_lifetime_isa_balance", + "model": "regime_gated_qrf", + "n_estimators": 4, + "output": "lifetime_isa_balance", + "predictors": [ + "age_band", + "is_female", + "employment_income", + "household_net_income", + "gross_financial_wealth", + "savings", + "cash_isa", + "stocks_and_shares_isa", + "is_private_renter", + "num_children" + ], + "salt": "was_lisa:lifetime_isa_balance", + "seed": 0, + "training_rows": "credible_holders" + }, + { + "kind": "support_clip", + "range": "donor_realized" + }, + { + "cap_column": "gross_financial_wealth", + "column": "lifetime_isa_balance", + "kind": "cap_lifetime_isa_to_financial_wealth", + "method": "pro_rata_within_household", + "ownership_output": "has_lifetime_isa" + }, + { + "aggregates": { + "household_lifetime_isa_balance": "lifetime_isa_balance" + }, + "kind": "aggregate_person_to_household", + "method": "sum" + }, + { + "declared_factor": 1, + "entity": "household", + "gate_coupling": "The terminal family gate requires a valid mass-conserving MassChangeRecord carrying exactly this stage-specific reason.", + "kind": "record_mass_conservation_receipt", + "reason": "WAS Lifetime ISA imputation on the source spine: household weights pass through unchanged and total household mass is conserved." + } + ], + "outputs": [ + "has_lifetime_isa", + "lifetime_isa_balance", + "household_lifetime_isa_balance" + ], + "rewrites": [], + "source": "Office for National Statistics Wealth and Assets Survey, UK Data Service SN 7215, DOI 10.5255/UKDA-SN-7215-20; local licensed round-8 person and household tabs (interviews April 2020 to March 2022, Great Britain).", + "stage": "was_lisa", + "survey": "Wealth and Assets Survey round 8" + }, "was_wealth": { "artifacts": [ { diff --git a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/was.csv b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/was.csv index 10b0cbdbd..9dac330a8 100644 --- a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/was.csv +++ b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/was.csv @@ -1,65 +1,65 @@ -R8xshhwgt,DVLUKValR8_sum,DVPropertyR8,DVFESHARESR8_aggr,DVFShUKVR8_aggr,DVIISAVR8_aggR,DVCISAVR8_aggr,DVFCollVR8_aggr,totalpenr8_aggr,dvvaldbt_scaper8_aggr,NumAdultR8,NumCh18R8,DVGIPPENR8_AGGR,DVGISER8_AGGR,DVGIINVR8_aggr,DVGIEMPR8_AGGR,HBedRmR8,GORR8,DVPriRntR8,CTAmtR8,HFINWNTR8_Sum,HFINWNTR8_exSLC_Sum,HMortGR8,Ten1R8,HFINWR8_SUM,DVhvalueR8,DVHseValR8_sum,DVBlDValR8_sum,DVTotinc_bhcR8,DVSaValR8_aggr,vcarnr8,Tot_LosR8_aggr,Tot_los_exc_SLCR8_aggr -1,10,20000,1,3,5,7,9,100,40,1,0,11,13,15,17,1,8,1,900,-50,20,0,1,30,100000,1000,3000,20000,500,0,9000,4000 -1.1000000000000001,11,20500,2,4,6,8,10,110,41,2,1,12,14,16,18,2,11,2,910,-46,20,10100,2,31,102000,1050,3060,21000,520,1,9010,4005 -1.2,12,21000,3,5,7,9,11,120,42,3,2,13,15,17,19,3,12,1,920,-42,20,10200,3,32,104000,1100,3120,22000,540,2,9020,4010 -1.3,13,21500,4,6,8,10,12,130,43,1,0,14,16,18,20,4,1,2,930,-38,20,0,4,33,106000,1150,3180,23000,560,3,9030,4015 -1.3999999999999999,14,22000,5,7,9,11,13,140,44,2,1,15,17,19,21,5,8,1,940,-34,20,0,1,34,108000,1200,3240,24000,580,0,9040,4020 -1.5,15,22500,6,8,10,12,14,150,45,3,2,16,18,20,22,1,11,2,950,-30,25,10500,2,35,110000,1250,3300,25000,600,1,9050,4025 -1.6000000000000001,16,23000,7,9,11,13,15,160,46,1,0,17,19,21,23,2,12,1,960,-26,25,10600,3,36,112000,1300,3360,26000,620,2,9060,4030 -1,17,23500,8,10,12,14,16,170,47,2,1,18,20,22,24,3,1,2,970,-22,25,0,4,37,114000,1350,3420,27000,640,3,9070,4035 -1.1000000000000001,18,24000,9,11,13,15,17,180,48,3,2,19,21,23,25,4,8,1,980,-18,25,0,1,38,116000,1400,3480,28000,660,0,9080,4040 -1.2,19,24500,10,12,14,16,18,190,49,1,0,20,22,24,26,5,11,2,990,-14,25,10900,2,39,118000,1450,3540,29000,680,1,9090,4045 -1.3,20,25000,11,13,15,17,19,200,50,2,1,21,23,25,27,1,12,1,1000,-10,30,11000,3,40,120000,1500,3600,30000,700,2,9100,4050 -1.3999999999999999,21,25500,12,14,16,18,20,210,51,3,2,22,24,26,28,2,1,2,1010,-6,30,0,4,41,122000,1550,3660,31000,720,3,9110,4055 -1.5,22,26000,13,15,17,19,21,220,52,1,0,23,25,27,29,3,8,1,1020,-2,30,0,1,42,124000,1600,3720,32000,740,0,9120,4060 -1.6000000000000001,23,26500,14,16,18,20,22,230,53,2,1,24,26,28,30,4,11,2,1030,2,30,11300,2,43,126000,1650,3780,33000,760,1,9130,4065 -1,24,27000,15,17,19,21,23,240,54,3,2,25,27,29,31,5,12,1,1040,6,30,11400,3,44,128000,1700,3840,34000,780,2,9140,4070 -1.1000000000000001,25,27500,16,18,20,22,24,250,55,1,0,26,28,30,32,1,1,2,1050,10,35,0,4,45,130000,1750,3900,35000,800,3,9150,4075 -1.2,26,28000,17,19,21,23,25,260,56,2,1,27,29,31,33,2,8,1,1060,14,35,0,1,46,132000,1800,3960,36000,820,0,9160,4080 -1.3,27,28500,18,20,22,24,26,270,57,3,2,28,30,32,34,3,11,2,1070,18,35,11700,2,47,134000,1850,4020,37000,840,1,9170,4085 -1.3999999999999999,28,29000,19,21,23,25,27,280,58,1,0,29,31,33,35,4,12,1,1080,22,35,11800,3,48,136000,1900,4080,38000,860,2,9180,4090 -1.5,29,29500,20,22,24,26,28,290,59,2,1,30,32,34,36,5,1,2,1090,26,35,0,4,49,138000,1950,4140,39000,880,3,9190,4095 -1.6000000000000001,30,30000,21,23,25,27,29,300,60,3,2,31,33,35,37,1,8,1,1100,30,40,0,1,50,140000,2000,4200,40000,900,0,9200,4100 -1,31,30500,22,24,26,28,30,310,61,1,0,32,34,36,38,2,11,2,1110,34,40,12100,2,51,142000,2050,4260,41000,920,1,9210,4105 -1.1000000000000001,32,31000,23,25,27,29,31,320,62,2,1,33,35,37,39,3,12,1,1120,38,40,12200,3,52,144000,2100,4320,42000,940,2,9220,4110 -1.2,33,31500,24,26,28,30,32,330,63,3,2,34,36,38,40,4,1,2,1130,42,40,0,4,53,146000,2150,4380,43000,960,3,9230,4115 -1.3,34,32000,25,27,29,31,33,340,64,1,0,35,37,39,41,5,8,1,1140,46,40,0,1,54,148000,2200,4440,44000,980,0,9240,4120 -1.3999999999999999,35,32500,26,28,30,32,34,350,65,2,1,36,38,40,42,1,11,2,1150,50,45,12500,2,55,150000,2250,4500,45000,1000,1,9250,4125 -1.5,36,33000,27,29,31,33,35,360,66,3,2,37,39,41,43,2,12,1,1160,54,45,12600,3,56,152000,2300,4560,46000,1020,2,9260,4130 -1.6000000000000001,37,33500,28,30,32,34,36,370,67,1,0,38,40,42,44,3,1,2,1170,58,45,0,4,57,154000,2350,4620,47000,1040,3,9270,4135 -1,38,34000,29,31,33,35,37,380,68,2,1,39,41,43,45,4,8,1,1180,62,45,0,1,58,156000,2400,4680,48000,1060,0,9280,4140 -1.1000000000000001,39,34500,30,32,34,36,38,390,69,3,2,40,42,44,46,5,11,2,1190,66,45,12900,2,59,158000,2450,4740,49000,1080,1,9290,4145 -1.2,40,35000,31,33,35,37,39,400,70,1,0,41,43,45,47,1,12,1,1200,70,50,13000,3,60,160000,2500,4800,50000,1100,2,9300,4150 -1.3,41,35500,32,34,36,38,40,410,71,2,1,42,44,46,48,2,1,2,1210,74,50,0,4,61,162000,2550,4860,51000,1120,3,9310,4155 -1.3999999999999999,42,36000,33,35,37,39,41,420,72,3,2,43,45,47,49,3,8,1,1220,78,50,0,1,62,164000,2600,4920,52000,1140,0,9320,4160 -1.5,43,36500,34,36,38,40,42,430,73,1,0,44,46,48,50,4,11,2,1230,82,50,13300,2,63,166000,2650,4980,53000,1160,1,9330,4165 -1.6000000000000001,44,37000,35,37,39,41,43,440,74,2,1,45,47,49,51,5,12,1,1240,86,50,13400,3,64,168000,2700,5040,54000,1180,2,9340,4170 -1,45,37500,36,38,40,42,44,450,75,3,2,46,48,50,52,1,1,2,1250,90,55,0,4,65,170000,2750,5100,55000,1200,3,9350,4175 -1.1000000000000001,46,38000,37,39,41,43,45,460,76,1,0,47,49,51,53,2,8,1,1260,94,55,0,1,66,172000,2800,5160,56000,1220,0,9360,4180 -1.2,47,38500,38,40,42,44,46,470,77,2,1,48,50,52,54,3,11,2,1270,98,55,13700,2,67,174000,2850,5220,57000,1240,1,9370,4185 -1.3,48,39000,39,41,43,45,47,480,78,3,2,49,51,53,55,4,12,1,1280,102,55,13800,3,68,176000,2900,5280,58000,1260,2,9380,4190 -1.3999999999999999,49,39500,40,42,44,46,48,490,79,1,0,50,52,54,56,5,1,2,1290,106,55,0,4,69,178000,2950,5340,59000,1280,3,9390,4195 -1.5,50,40000,41,43,45,47,49,500,80,2,1,51,53,55,57,1,8,1,1300,110,60,0,1,70,180000,3000,5400,60000,1300,0,9400,4200 -1.6000000000000001,51,40500,42,44,46,48,50,510,81,3,2,52,54,56,58,2,11,2,1310,114,60,14100,2,71,182000,3050,5460,61000,1320,1,9410,4205 -1,52,41000,43,45,47,49,51,520,82,1,0,53,55,57,59,3,12,1,1320,118,60,14200,3,72,184000,3100,5520,62000,1340,2,9420,4210 -1.1000000000000001,53,41500,44,46,48,50,52,530,83,2,1,54,56,58,60,4,1,2,1330,122,60,0,4,73,186000,3150,5580,63000,1360,3,9430,4215 -1.2,54,42000,45,47,49,51,53,540,84,3,2,55,57,59,61,5,8,1,1340,126,60,0,1,74,188000,3200,5640,64000,1380,0,9440,4220 -1.3,55,42500,46,48,50,52,54,550,85,1,0,56,58,60,62,1,11,2,1350,130,65,14500,2,75,190000,3250,5700,65000,1400,1,9450,4225 -1.3999999999999999,56,43000,47,49,51,53,55,560,86,2,1,57,59,61,63,2,12,1,1360,134,65,14600,3,76,192000,3300,5760,66000,1420,2,9460,4230 -1.5,57,43500,48,50,52,54,56,570,87,3,2,58,60,62,64,3,1,2,1370,138,65,0,4,77,194000,3350,5820,67000,1440,3,9470,4235 -1.6000000000000001,58,44000,49,51,53,55,57,580,88,1,0,59,61,63,65,4,8,1,1380,142,65,0,1,78,196000,3400,5880,68000,1460,0,9480,4240 -1,59,44500,50,52,54,56,58,590,89,2,1,60,62,64,66,5,11,2,1390,146,65,14900,2,79,198000,3450,5940,69000,1480,1,9490,4245 -1.1000000000000001,60,45000,51,53,55,57,59,600,90,3,2,61,63,65,67,1,12,1,1400,150,70,15000,3,80,200000,3500,6000,70000,1500,2,9500,4250 -1.2,61,45500,52,54,56,58,60,610,91,1,0,62,64,66,68,2,1,2,1410,154,70,0,4,81,202000,3550,6060,71000,1520,3,9510,4255 -1.3,62,46000,53,55,57,59,61,620,92,2,1,63,65,67,69,3,8,1,1420,158,70,0,1,82,204000,3600,6120,72000,1540,0,9520,4260 -1.3999999999999999,63,46500,54,56,58,60,62,630,93,3,2,64,66,68,70,4,11,2,1430,162,70,15300,2,83,206000,3650,6180,73000,1560,1,9530,4265 -1.5,64,47000,55,57,59,61,63,640,94,1,0,65,67,69,71,5,12,1,1440,166,70,15400,3,84,208000,3700,6240,74000,1580,2,9540,4270 -1.6000000000000001,65,47500,56,58,60,62,64,650,95,2,1,66,68,70,72,1,1,2,1450,170,75,0,4,85,210000,3750,6300,75000,1600,3,9550,4275 -1,66,48000,57,59,61,63,65,660,96,3,2,67,69,71,73,2,8,1,1460,174,75,0,1,86,212000,3800,6360,76000,1620,0,9560,4280 -1.1000000000000001,67,48500,58,60,62,64,66,670,97,1,0,68,70,72,74,3,11,2,1470,178,75,15700,2,87,214000,3850,6420,77000,1640,1,9570,4285 -1.2,68,49000,59,61,63,65,67,680,98,2,1,69,71,73,75,4,12,1,1480,182,75,15800,3,88,216000,3900,6480,78000,1660,2,9580,4290 -1.3,69,49500,60,62,64,66,68,690,99,3,2,70,72,74,76,5,1,2,1490,186,75,0,4,89,218000,3950,6540,79000,1680,3,9590,4295 -1.3999999999999999,70,50000,61,63,65,67,69,700,100,1,0,71,73,75,77,1,8,1,1500,190,80,0,1,90,220000,4000,6600,80000,1700,0,9600,4300 -1.5,71,50500,62,64,66,68,70,710,101,2,1,72,74,76,78,2,11,2,1510,194,80,16100,2,91,222000,4050,6660,81000,1720,1,9610,4305 -1.6000000000000001,72,51000,63,65,67,69,71,720,102,3,2,73,75,77,79,3,12,1,1520,198,80,16200,3,92,224000,4100,6720,82000,1740,2,9620,4310 -1,73,51500,64,66,68,70,72,730,103,1,0,74,76,78,80,4,1,2,1530,202,80,0,4,93,226000,4150,6780,83000,1760,3,9630,4315 +CASER8,DVFLISAVR8_aggr,R8xshhwgt,DVLUKValR8_sum,DVPropertyR8,DVFESHARESR8_aggr,DVFShUKVR8_aggr,DVIISAVR8_aggR,DVCISAVR8_aggr,DVFCollVR8_aggr,totalpenr8_aggr,dvvaldbt_scaper8_aggr,NumAdultR8,NumCh18R8,DVGIPPENR8_AGGR,DVGISER8_AGGR,DVGIINVR8_aggr,DVGIEMPR8_AGGR,HBedRmR8,GORR8,DVPriRntR8,CTAmtR8,HFINWNTR8_Sum,HFINWNTR8_exSLC_Sum,HMortGR8,Ten1R8,HFINWR8_SUM,DVhvalueR8,DVHseValR8_sum,DVBlDValR8_sum,DVTotinc_bhcR8,DVSaValR8_aggr,vcarnr8,Tot_LosR8_aggr,Tot_los_exc_SLCR8_aggr +1,5,1,10,20000,1,3,5,7,9,100,40,1,0,11,13,15,17,1,8,1,900,-50,20,0,1,30,100000,1000,3000,20000,500,0,9000,4000 +2,0,1.1000000000000001,11,20500,2,4,6,8,10,110,41,2,1,12,14,16,18,2,11,2,910,-46,20,10100,2,31,102000,1050,3060,21000,520,1,9010,4005 +3,0,1.2,12,21000,3,5,7,9,11,120,42,3,2,13,15,17,19,3,12,1,920,-42,20,10200,3,32,104000,1100,3120,22000,540,2,9020,4010 +4,0,1.3,13,21500,4,6,8,10,12,130,43,1,0,14,16,18,20,4,1,2,930,-38,20,0,4,33,106000,1150,3180,23000,560,3,9030,4015 +5,0,1.3999999999999999,14,22000,5,7,9,11,13,140,44,2,1,15,17,19,21,5,8,1,940,-34,20,0,1,34,108000,1200,3240,24000,580,0,9040,4020 +6,10,1.5,15,22500,6,8,10,12,14,150,45,3,2,16,18,20,22,1,11,2,950,-30,25,10500,2,35,110000,1250,3300,25000,600,1,9050,4025 +7,11,1.6000000000000001,16,23000,7,9,11,13,15,160,46,1,0,17,19,21,23,2,12,1,960,-26,25,10600,3,36,112000,1300,3360,26000,620,2,9060,4030 +8,0,1,17,23500,8,10,12,14,16,170,47,2,1,18,20,22,24,3,1,2,970,-22,25,0,4,37,114000,1350,3420,27000,640,3,9070,4035 +9,0,1.1000000000000001,18,24000,9,11,13,15,17,180,48,3,2,19,21,23,25,4,8,1,980,-18,25,0,1,38,116000,1400,3480,28000,660,0,9080,4040 +10,0,1.2,19,24500,10,12,14,16,18,190,49,1,0,20,22,24,26,5,11,2,990,-14,25,10900,2,39,118000,1450,3540,29000,680,1,9090,4045 +11,15,1.3,20,25000,11,13,15,17,19,200,50,2,1,21,23,25,27,1,12,1,1000,-10,30,11000,3,40,120000,1500,3600,30000,700,2,9100,4050 +12,0,1.3999999999999999,21,25500,12,14,16,18,20,210,51,3,2,22,24,26,28,2,1,2,1010,-6,30,0,4,41,122000,1550,3660,31000,720,3,9110,4055 +13,0,1.5,22,26000,13,15,17,19,21,220,52,1,0,23,25,27,29,3,8,1,1020,-2,30,0,1,42,124000,1600,3720,32000,740,0,9120,4060 +14,0,1.6000000000000001,23,26500,14,16,18,20,22,230,53,2,1,24,26,28,30,4,11,2,1030,2,30,11300,2,43,126000,1650,3780,33000,760,1,9130,4065 +15,19,1,24,27000,15,17,19,21,23,240,54,3,2,25,27,29,31,5,12,1,1040,6,30,11400,3,44,128000,1700,3840,34000,780,2,9140,4070 +16,0,1.1000000000000001,25,27500,16,18,20,22,24,250,55,1,0,26,28,30,32,1,1,2,1050,10,35,0,4,45,130000,1750,3900,35000,800,3,9150,4075 +17,0,1.2,26,28000,17,19,21,23,25,260,56,2,1,27,29,31,33,2,8,1,1060,14,35,0,1,46,132000,1800,3960,36000,820,0,9160,4080 +18,0,1.3,27,28500,18,20,22,24,26,270,57,3,2,28,30,32,34,3,11,2,1070,18,35,11700,2,47,134000,1850,4020,37000,840,1,9170,4085 +19,0,1.3999999999999999,28,29000,19,21,23,25,27,280,58,1,0,29,31,33,35,4,12,1,1080,22,35,11800,3,48,136000,1900,4080,38000,860,2,9180,4090 +20,0,1.5,29,29500,20,22,24,26,28,290,59,2,1,30,32,34,36,5,1,2,1090,26,35,0,4,49,138000,1950,4140,39000,880,3,9190,4095 +21,5,1.6000000000000001,30,30000,21,23,25,27,29,300,60,3,2,31,33,35,37,1,8,1,1100,30,40,0,1,50,140000,2000,4200,40000,900,0,9200,4100 +22,0,1,31,30500,22,24,26,28,30,310,61,1,0,32,34,36,38,2,11,2,1110,34,40,12100,2,51,142000,2050,4260,41000,920,1,9210,4105 +23,0,1.1000000000000001,32,31000,23,25,27,29,31,320,62,2,1,33,35,37,39,3,12,1,1120,38,40,12200,3,52,144000,2100,4320,42000,940,2,9220,4110 +24,0,1.2,33,31500,24,26,28,30,32,330,63,3,2,34,36,38,40,4,1,2,1130,42,40,0,4,53,146000,2150,4380,43000,960,3,9230,4115 +25,9,1.3,34,32000,25,27,29,31,33,340,64,1,0,35,37,39,41,5,8,1,1140,46,40,0,1,54,148000,2200,4440,44000,980,0,9240,4120 +26,0,1.3999999999999999,35,32500,26,28,30,32,34,350,65,2,1,36,38,40,42,1,11,2,1150,50,45,12500,2,55,150000,2250,4500,45000,1000,1,9250,4125 +27,0,1.5,36,33000,27,29,31,33,35,360,66,3,2,37,39,41,43,2,12,1,1160,54,45,12600,3,56,152000,2300,4560,46000,1020,2,9260,4130 +28,0,1.6000000000000001,37,33500,28,30,32,34,36,370,67,1,0,38,40,42,44,3,1,2,1170,58,45,0,4,57,154000,2350,4620,47000,1040,3,9270,4135 +29,13,1,38,34000,29,31,33,35,37,380,68,2,1,39,41,43,45,4,8,1,1180,62,45,0,1,58,156000,2400,4680,48000,1060,0,9280,4140 +30,0,1.1000000000000001,39,34500,30,32,34,36,38,390,69,3,2,40,42,44,46,5,11,2,1190,66,45,12900,2,59,158000,2450,4740,49000,1080,1,9290,4145 +31,0,1.2,40,35000,31,33,35,37,39,400,70,1,0,41,43,45,47,1,12,1,1200,70,50,13000,3,60,160000,2500,4800,50000,1100,2,9300,4150 +32,0,1.3,41,35500,32,34,36,38,40,410,71,2,1,42,44,46,48,2,1,2,1210,74,50,0,4,61,162000,2550,4860,51000,1120,3,9310,4155 +33,0,1.3999999999999999,42,36000,33,35,37,39,41,420,72,3,2,43,45,47,49,3,8,1,1220,78,50,0,1,62,164000,2600,4920,52000,1140,0,9320,4160 +34,0,1.5,43,36500,34,36,38,40,42,430,73,1,0,44,46,48,50,4,11,2,1230,82,50,13300,2,63,166000,2650,4980,53000,1160,1,9330,4165 +35,19,1.6000000000000001,44,37000,35,37,39,41,43,440,74,2,1,45,47,49,51,5,12,1,1240,86,50,13400,3,64,168000,2700,5040,54000,1180,2,9340,4170 +36,0,1,45,37500,36,38,40,42,44,450,75,3,2,46,48,50,52,1,1,2,1250,90,55,0,4,65,170000,2750,5100,55000,1200,3,9350,4175 +37,0,1.1000000000000001,46,38000,37,39,41,43,45,460,76,1,0,47,49,51,53,2,8,1,1260,94,55,0,1,66,172000,2800,5160,56000,1220,0,9360,4180 +38,0,1.2,47,38500,38,40,42,44,46,470,77,2,1,48,50,52,54,3,11,2,1270,98,55,13700,2,67,174000,2850,5220,57000,1240,1,9370,4185 +39,23,1.3,48,39000,39,41,43,45,47,480,78,3,2,49,51,53,55,4,12,1,1280,102,55,13800,3,68,176000,2900,5280,58000,1260,2,9380,4190 +40,0,1.3999999999999999,49,39500,40,42,44,46,48,490,79,1,0,50,52,54,56,5,1,2,1290,106,55,0,4,69,178000,2950,5340,59000,1280,3,9390,4195 +41,0,1.5,50,40000,41,43,45,47,49,500,80,2,1,51,53,55,57,1,8,1,1300,110,60,0,1,70,180000,3000,5400,60000,1300,0,9400,4200 +42,0,1.6000000000000001,51,40500,42,44,46,48,50,510,81,3,2,52,54,56,58,2,11,2,1310,114,60,14100,2,71,182000,3050,5460,61000,1320,1,9410,4205 +43,7,1,52,41000,43,45,47,49,51,520,82,1,0,53,55,57,59,3,12,1,1320,118,60,14200,3,72,184000,3100,5520,62000,1340,2,9420,4210 +44,0,1.1000000000000001,53,41500,44,46,48,50,52,530,83,2,1,54,56,58,60,4,1,2,1330,122,60,0,4,73,186000,3150,5580,63000,1360,3,9430,4215 +45,0,1.2,54,42000,45,47,49,51,53,540,84,3,2,55,57,59,61,5,8,1,1340,126,60,0,1,74,188000,3200,5640,64000,1380,0,9440,4220 +46,0,1.3,55,42500,46,48,50,52,54,550,85,1,0,56,58,60,62,1,11,2,1350,130,65,14500,2,75,190000,3250,5700,65000,1400,1,9450,4225 +47,0,1.3999999999999999,56,43000,47,49,51,53,55,560,86,2,1,57,59,61,63,2,12,1,1360,134,65,14600,3,76,192000,3300,5760,66000,1420,2,9460,4230 +48,0,1.5,57,43500,48,50,52,54,56,570,87,3,2,58,60,62,64,3,1,2,1370,138,65,0,4,77,194000,3350,5820,67000,1440,3,9470,4235 +49,13,1.6000000000000001,58,44000,49,51,53,55,57,580,88,1,0,59,61,63,65,4,8,1,1380,142,65,0,1,78,196000,3400,5880,68000,1460,0,9480,4240 +50,0,1,59,44500,50,52,54,56,58,590,89,2,1,60,62,64,66,5,11,2,1390,146,65,14900,2,79,198000,3450,5940,69000,1480,1,9490,4245 +51,0,1.1000000000000001,60,45000,51,53,55,57,59,600,90,3,2,61,63,65,67,1,12,1,1400,150,70,15000,3,80,200000,3500,6000,70000,1500,2,9500,4250 +52,0,1.2,61,45500,52,54,56,58,60,610,91,1,0,62,64,66,68,2,1,2,1410,154,70,0,4,81,202000,3550,6060,71000,1520,3,9510,4255 +53,17,1.3,62,46000,53,55,57,59,61,620,92,2,1,63,65,67,69,3,8,1,1420,158,70,0,1,82,204000,3600,6120,72000,1540,0,9520,4260 +54,0,1.3999999999999999,63,46500,54,56,58,60,62,630,93,3,2,64,66,68,70,4,11,2,1430,162,70,15300,2,83,206000,3650,6180,73000,1560,1,9530,4265 +55,0,1.5,64,47000,55,57,59,61,63,640,94,1,0,65,67,69,71,5,12,1,1440,166,70,15400,3,84,208000,3700,6240,74000,1580,2,9540,4270 +56,0,1.6000000000000001,65,47500,56,58,60,62,64,650,95,2,1,66,68,70,72,1,1,2,1450,170,75,0,4,85,210000,3750,6300,75000,1600,3,9550,4275 +57,21,1,66,48000,57,59,61,63,65,660,96,3,2,67,69,71,73,2,8,1,1460,174,75,0,1,86,212000,3800,6360,76000,1620,0,9560,4280 +58,0,1.1000000000000001,67,48500,58,60,62,64,66,670,97,1,0,68,70,72,74,3,11,2,1470,178,75,15700,2,87,214000,3850,6420,77000,1640,1,9570,4285 +59,0,1.2,68,49000,59,61,63,65,67,680,98,2,1,69,71,73,75,4,12,1,1480,182,75,15800,3,88,216000,3900,6480,78000,1660,2,9580,4290 +60,0,1.3,69,49500,60,62,64,66,68,690,99,3,2,70,72,74,76,5,1,2,1490,186,75,0,4,89,218000,3950,6540,79000,1680,3,9590,4295 +61,0,1.3999999999999999,70,50000,61,63,65,67,69,700,100,1,0,71,73,75,77,1,8,1,1500,190,80,0,1,90,220000,4000,6600,80000,1700,0,9600,4300 +62,0,1.5,71,50500,62,64,66,68,70,710,101,2,1,72,74,76,78,2,11,2,1510,194,80,16100,2,91,222000,4050,6660,81000,1720,1,9610,4305 +63,7,1.6000000000000001,72,51000,63,65,67,69,71,720,102,3,2,73,75,77,79,3,12,1,1520,198,80,16200,3,92,224000,4100,6720,82000,1740,2,9620,4310 +64,0,1,73,51500,64,66,68,70,72,730,103,1,0,74,76,78,80,4,1,2,1530,202,80,0,4,93,226000,4150,6780,83000,1760,3,9630,4315 diff --git a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/was_person.csv b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/was_person.csv new file mode 100644 index 000000000..67e749ef5 --- /dev/null +++ b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/was_person.csv @@ -0,0 +1,191 @@ +CASER8,PersonR8,IsDepR8,DVAge17R8,SexR8,DVGIEmpR8,DVGISER8,fisa_binary3r8_i,fisa_binary3r8_iflag,FLISAVR8,flisavr8_iflag,FLISABR8,flisabr8_iflag,DVFLISAvR8 +1,1,2,4,1,15000,5000,1,0,5,0,-9,0,5 +2,1,2,7,2,22000,0,0,0,-9,0,-9,0,0 +2,2,2,12,1,23000,0,0,0,-9,0,-9,0,0 +2,3,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 +3,1,2,10,1,29000,0,0,0,-9,0,-9,0,0 +3,2,2,15,2,30000,0,0,0,-9,0,-9,0,0 +3,3,2,6,1,31000,0,0,0,-9,0,-9,0,0 +3,4,1,3,2,-9,-9,-9,0,-9,0,-9,0,0 +3,5,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 +4,1,2,13,2,36000,-8,0,0,-9,0,-9,0,0 +5,1,2,16,1,43000,0,0,0,-9,0,-9,0,0 +5,2,2,7,2,44000,0,0,0,-9,0,-9,0,0 +5,3,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 +6,1,2,13,2,50000,5000,1,0,10,0,-9,0,10 +6,2,2,10,1,51000,0,0,0,-9,0,-9,0,0 +6,3,2,15,2,52000,0,0,0,-9,0,-9,0,0 +6,4,1,3,1,-9,-9,-9,0,-9,0,-9,0,0 +6,5,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 +7,1,2,8,1,17000,0,1,0,11,0,-9,0,11 +8,1,2,11,2,24000,0,0,1,-9,0,-9,0,0 +8,2,2,16,1,25000,0,0,1,-9,0,-9,0,0 +8,3,1,1,2,-9,-9,-9,1,-9,0,-9,0,0 +9,1,2,14,1,31000,0,0,0,-9,0,-9,0,0 +9,2,2,5,2,32000,0,0,0,-9,0,-9,0,0 +9,3,2,10,1,33000,0,0,0,-9,0,-9,0,0 +9,4,1,3,2,-9,-9,-9,0,-9,0,-9,0,0 +9,5,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 +10,1,2,17,2,38000,0,0,0,-9,0,-9,0,0 +11,1,2,6,1,45000,5000,1,0,-8,1,1,0,15 +11,2,2,11,2,46000,0,0,0,-9,0,-9,0,0 +11,3,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 +12,1,2,9,2,52000,0,0,0,-9,0,-9,0,0 +12,2,2,14,1,53000,0,0,0,-9,0,-9,0,0 +12,3,2,5,2,54000,0,0,0,-9,0,-9,0,0 +12,4,1,3,1,-9,-9,-9,0,-9,0,-9,0,0 +12,5,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 +13,1,2,12,1,19000,0,0,0,-9,0,-9,0,0 +14,1,2,15,2,26000,0,0,0,-9,0,-9,0,0 +14,2,2,6,1,27000,0,0,0,-9,0,-9,0,0 +14,3,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 +15,1,2,4,1,33000,0,1,1,19,0,-9,0,19 +15,2,2,9,2,34000,0,0,0,-9,0,-9,0,0 +15,3,2,14,1,35000,0,0,0,-9,0,-9,0,0 +15,4,1,3,2,-9,-9,-9,0,-9,0,-9,0,0 +15,5,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 +16,1,2,7,2,40000,5000,0,0,-9,0,-9,0,0 +17,1,2,10,1,47000,0,0,0,-9,0,-9,0,0 +17,2,2,15,2,48000,0,0,0,-9,0,-9,0,0 +17,3,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 +18,1,2,13,2,54000,0,0,0,-9,0,-9,0,0 +18,2,2,4,1,15000,0,0,0,-9,0,-9,0,0 +18,3,2,9,2,16000,0,0,0,-9,0,-9,0,0 +18,4,1,3,1,-9,-9,-9,0,-9,0,-9,0,0 +18,5,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 +19,1,2,16,1,21000,0,0,0,-9,0,-9,0,0 +20,1,2,5,2,28000,0,0,0,-9,0,-9,0,0 +20,2,2,10,1,29000,0,0,0,-9,0,-9,0,0 +20,3,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 +21,1,2,8,1,35000,5000,1,0,5,0,-9,0,5 +21,2,2,13,2,36000,0,0,0,-9,0,-9,0,0 +21,3,2,4,1,37000,0,0,0,-9,0,-9,0,0 +21,4,1,3,2,-9,-9,-9,0,-9,0,-9,0,0 +21,5,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 +22,1,2,11,2,42000,0,0,0,-9,0,-9,0,0 +23,1,2,14,1,49000,0,0,0,-9,0,-9,0,0 +23,2,2,5,2,50000,0,0,0,-9,0,-9,0,0 +23,3,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 +24,1,2,17,2,16000,0,0,0,-9,0,-9,0,0 +24,2,2,8,1,17000,0,0,0,-9,0,-9,0,0 +24,3,2,13,2,18000,0,0,0,-9,0,-9,0,0 +24,4,1,3,1,-9,-9,-9,0,-9,0,-9,0,0 +24,5,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 +25,1,2,6,1,23000,0,1,0,9,0,-9,0,9 +26,1,2,9,2,30000,5000,0,0,-9,0,-9,0,0 +26,2,2,14,1,31000,0,0,0,-9,0,-9,0,0 +26,3,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 +27,1,2,12,1,37000,0,0,0,-9,0,-9,0,0 +27,2,2,17,2,38000,0,0,0,-9,0,-9,0,0 +27,3,2,8,1,39000,0,0,0,-9,0,-9,0,0 +27,4,1,3,2,-9,-9,-9,0,-9,0,-9,0,0 +27,5,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 +28,1,2,15,2,44000,0,0,0,-9,0,-9,0,0 +29,1,2,4,1,51000,0,1,0,13,0,-9,0,13 +29,2,2,9,2,52000,0,0,0,-9,0,-9,0,0 +29,3,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 +30,1,2,7,2,18000,0,0,0,-9,0,-9,0,0 +30,2,2,12,1,19000,0,0,0,-9,0,-9,0,0 +30,3,2,17,2,20000,0,0,0,-9,0,-9,0,0 +30,4,1,3,1,-9,-9,-9,0,-9,0,-9,0,0 +30,5,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 +31,1,2,10,1,25000,5000,0,0,-9,0,-9,0,0 +32,1,2,13,2,32000,0,0,0,-9,0,-9,0,0 +32,2,2,4,1,33000,0,0,0,-9,0,-9,0,0 +32,3,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 +33,1,2,16,1,39000,0,0,0,-9,0,-9,0,0 +33,2,2,7,2,40000,0,0,0,-9,0,-9,0,0 +33,3,2,12,1,41000,0,0,0,-9,0,-9,0,0 +33,4,1,3,2,-9,-9,-9,0,-9,0,-9,0,0 +33,5,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 +34,1,2,5,2,46000,0,0,0,-9,0,-9,0,0 +35,1,2,8,1,53000,0,1,0,19,0,-9,0,19 +35,2,2,13,2,54000,0,0,0,-9,0,-9,0,0 +35,3,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 +36,1,2,11,2,20000,5000,0,0,-9,0,-9,0,0 +36,2,2,16,1,21000,0,0,0,-9,0,-9,0,0 +36,3,2,7,2,22000,0,0,0,-9,0,-9,0,0 +36,4,1,3,1,-9,-9,-9,0,-9,0,-9,0,0 +36,5,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 +37,1,2,14,1,27000,0,0,0,-9,0,-9,0,0 +38,1,2,17,2,34000,0,0,0,-9,0,-9,0,0 +38,2,2,8,1,35000,0,0,0,-9,0,-9,0,0 +38,3,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 +39,1,2,6,1,41000,0,1,0,23,0,-9,0,23 +39,2,2,11,2,42000,0,0,0,-9,0,-9,0,0 +39,3,2,16,1,43000,0,0,0,-9,0,-9,0,0 +39,4,1,3,2,-9,-9,-9,0,-9,0,-9,0,0 +39,5,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 +40,1,2,9,2,48000,0,0,0,-9,0,-9,0,0 +41,1,2,12,1,15000,5000,0,0,-9,0,-9,0,0 +41,2,2,17,2,16000,0,0,0,-9,0,-9,0,0 +41,3,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 +42,1,2,15,2,22000,0,0,0,-9,0,-9,0,0 +42,2,2,6,1,23000,0,0,0,-9,0,-9,0,0 +42,3,2,11,2,24000,0,0,0,-9,0,-9,0,0 +42,4,1,3,1,-9,-9,-9,0,-9,0,-9,0,0 +42,5,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 +43,1,2,4,1,29000,0,1,0,7,0,-9,0,7 +44,1,2,7,2,36000,0,0,0,-9,0,-9,0,0 +44,2,2,12,1,37000,0,0,0,-9,0,-9,0,0 +44,3,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 +45,1,2,10,1,43000,0,0,0,-9,0,-9,0,0 +45,2,2,15,2,44000,0,0,0,-9,0,-9,0,0 +45,3,2,6,1,45000,0,0,0,-9,0,-9,0,0 +45,4,1,3,2,-9,-9,-9,0,-9,0,-9,0,0 +45,5,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 +46,1,2,13,2,50000,5000,0,0,-9,0,-9,0,0 +47,1,2,16,1,17000,0,0,0,-9,0,-9,0,0 +47,2,2,7,2,18000,0,0,0,-9,0,-9,0,0 +47,3,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 +48,1,2,5,2,24000,0,0,0,-9,0,-9,0,0 +48,2,2,10,1,25000,0,0,0,-9,0,-9,0,0 +48,3,2,15,2,26000,0,0,0,-9,0,-9,0,0 +48,4,1,3,1,-9,-9,-9,0,-9,0,-9,0,0 +48,5,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 +49,1,2,8,1,31000,0,1,0,13,0,-9,0,13 +50,1,2,11,2,38000,0,0,0,-9,0,-9,0,0 +50,2,2,16,1,39000,0,0,0,-9,0,-9,0,0 +50,3,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 +51,1,2,14,1,45000,5000,0,0,-9,0,-9,0,0 +51,2,2,5,2,46000,0,0,0,-9,0,-9,0,0 +51,3,2,10,1,47000,0,0,0,-9,0,-9,0,0 +51,4,1,3,2,-9,-9,-9,0,-9,0,-9,0,0 +51,5,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 +52,1,2,17,2,52000,0,0,0,-9,0,-9,0,0 +53,1,2,6,1,19000,0,1,0,17,0,-9,0,17 +53,2,2,11,2,20000,0,0,0,-9,0,-9,0,0 +53,3,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 +54,1,2,9,2,26000,0,0,0,-9,0,-9,0,0 +54,2,2,14,1,27000,0,0,0,-9,0,-9,0,0 +54,3,2,5,2,28000,0,0,0,-9,0,-9,0,0 +54,4,1,3,1,-9,-9,-9,0,-9,0,-9,0,0 +54,5,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 +55,1,2,12,1,33000,0,0,0,-9,0,-9,0,0 +56,1,2,15,2,40000,5000,0,0,-9,0,-9,0,0 +56,2,2,6,1,41000,0,0,0,-9,0,-9,0,0 +56,3,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 +57,1,2,4,1,47000,0,1,0,21,0,-9,0,21 +57,2,2,9,2,48000,0,0,0,-9,0,-9,0,0 +57,3,2,14,1,49000,0,0,0,-9,0,-9,0,0 +57,4,1,3,2,-9,-9,-9,0,-9,0,-9,0,0 +57,5,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 +58,1,2,7,2,54000,0,0,0,-9,0,-9,0,0 +59,1,2,10,1,21000,0,0,0,-9,0,-9,0,0 +59,2,2,15,2,22000,0,0,0,-9,0,-9,0,0 +59,3,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 +60,1,2,13,2,28000,0,0,0,-9,0,-9,0,0 +60,2,2,4,1,29000,0,0,0,-9,0,-9,0,0 +60,3,2,9,2,30000,0,0,0,-9,0,-9,0,0 +60,4,1,3,1,-9,-9,-9,0,-9,0,-9,0,0 +60,5,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 +61,1,2,16,1,35000,5000,0,0,-9,0,-9,0,0 +62,1,2,5,2,42000,0,0,0,-9,0,-9,0,0 +62,2,2,10,1,43000,0,0,0,-9,0,-9,0,0 +62,3,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 +63,1,2,8,1,49000,0,1,0,7,0,-9,0,7 +63,2,2,13,2,50000,0,0,0,-9,0,-9,0,0 +63,3,2,4,1,51000,0,0,0,-9,0,-9,0,0 +63,4,1,3,2,-9,-9,-9,0,-9,0,-9,0,0 +63,5,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 +64,1,2,11,2,16000,0,0,0,-9,0,-9,0,0 diff --git a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/uk_spine.json b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/uk_spine.json index 1cd078d4c..3c5f58c6b 100644 --- a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/uk_spine.json +++ b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/uk_spine.json @@ -1 +1 @@ -{"country":"uk","nodes":[{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Load the source-bound UK FRS root population.","id":"create_uk_frs","inputs":[],"kernel":"uk.create@1","mass":"conserve","outputs":[{"column":"age","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"gender","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"marital_status","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"hours_worked","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"care_hours","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"is_household_head","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_benunit_head","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_parent","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_uc_claimant","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"employment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"self_employment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"private_pension_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"tax_free_savings_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"savings_interest_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"dividend_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"property_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"maintenance_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"miscellaneous_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"private_transfer_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"lump_sum_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"student_loan_repayments","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"statutory_sick_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"statutory_maternity_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"student_loans","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"access_fund","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"education_grants","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"healthy_start_vouchers","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"free_school_breakfasts","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"free_school_fruit_veg","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"free_school_meals","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"maintenance_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"childcare_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"personal_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"salary_sacrifice_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"salary_sacrifice_asked","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"child_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"income_support_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"attendance_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_sc_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_m_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"iidb_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"carers_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"would_claim_carers_allowance","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"sda_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"afcs_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"ssmg_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pension_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"child_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"working_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"state_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"winter_fuel_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"incapacity_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_m_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_dl_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"jsa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"jsa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"bsp_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"frs_benunit_capital","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"is_married","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"dependent_children","dtype":"int64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"region","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"tenure_type","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"accommodation_type","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"num_bedrooms","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_reported","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_band","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_rebate","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_single_adult_raw","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"water_and_sewerage_charges","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"domestic_rates","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"rent","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"subrent","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"mortgage_interest_repayment","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"mortgage_capital_repayment","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"structural_insurance_payments","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"housing_service_charges","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"external_child_payments","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"sample_fraction":1.0,"sample_seed":578,"stage_contract_sha256":"047d30937efb21e39259fdbed5597751e4f5a0c341ea583c7446e4c9c11eba48","time_period":"2024"},"population":null,"sources":["frs"],"structural":"create","weights":null},{"base":"create_uk_frs","citation":"","description":"Ownership boundary for the source-assembling root stage.","id":"frs_spine.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"base":null,"citation":"","description":"Claim the cells assembled by the UK FRS root transform.","id":"frs_spine","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"age","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"gender","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"marital_status","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hours_worked","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"care_hours","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_household_head","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_benunit_head","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_parent","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_uc_claimant","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"self_employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"private_pension_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"tax_free_savings_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"savings_interest_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dividend_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"maintenance_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"miscellaneous_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"private_transfer_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"lump_sum_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"student_loan_repayments","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"statutory_sick_pay","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"statutory_maternity_pay","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"student_loans","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"access_fund","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"education_grants","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"healthy_start_vouchers","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"free_school_breakfasts","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"free_school_fruit_veg","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"free_school_meals","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"maintenance_expenses","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"childcare_expenses","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"personal_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"salary_sacrifice_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"salary_sacrifice_asked","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"income_support_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"attendance_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_sc_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"iidb_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"carers_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_carers_allowance","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"sda_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"afcs_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"ssmg_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"working_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"state_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"winter_fuel_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"incapacity_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_dl_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"bsp_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"frs_benunit_capital","dtype":"float64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_married","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dependent_children","dtype":"int64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"region","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"tenure_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"accommodation_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"num_bedrooms","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_reported","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_band","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_rebate","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_single_adult_raw","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"water_and_sewerage_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"domestic_rates","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"rent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"subrent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_interest_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_capital_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"structural_insurance_payments","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_service_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"external_child_payments","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"}],"params":{},"population":"frs_spine.boundary","sources":[],"structural":"none","weights":null},{"base":"frs_spine.boundary","citation":"","description":"Ownership boundary before age_tail rewrites.","id":"age_tail.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage age_tail.","id":"age_tail","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["external_child_payments","region"],"entity":"household","rows":"all"},{"columns":["gender"],"entity":"person","rows":"all"}],"kernel":"uk.stage.age_tail@1","mass":"conserve","outputs":[{"column":"age","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"age_tail","stage_contract_sha256":"963a34f38caede2525e3b8735f904bb70a1bbef5a272f0eefd4346343444484f","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_relationships.","id":"frs_relationships","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","is_household_head"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_relationships@1","mass":"conserve","outputs":[{"column":"relationship_to_head","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"ons_family_role","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"ons_family_index","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"ons_household_type","dtype":"string","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_relationships","stage_contract_sha256":"30628808d06d9829ebcbcf460cd355a01261e78c7c73e6006c75bec2e3d60c33","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_employment.","id":"frs_employment","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["ons_household_type","region"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_employment@1","mass":"conserve","outputs":[{"column":"employment_status","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"employment_sector","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"sic_industry_division","dtype":"int64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_employment","stage_contract_sha256":"ddbefaf05b44788d794a6e4b0e8926c14318d66e50d2f11f50ca549538bbf60c","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_council_tax.","id":"frs_council_tax","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","sic_industry_division"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_council_tax@1","mass":"conserve","outputs":[{"column":"council_tax","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_council_tax","stage_contract_sha256":"3381cd9f7a736514d5073c57480e07f5098890f3ca9ed3865392043594771eb9","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_disability.","id":"frs_disability","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["council_tax","region"],"entity":"household","rows":"all"},{"columns":["afcs_reported","age","attendance_allowance_reported","dla_m_reported","dla_sc_reported","esa_contrib_reported","esa_income_reported","iidb_reported","incapacity_benefit_reported","pip_dl_reported","pip_m_reported","sda_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_disability@1","mass":"conserve","outputs":[{"column":"aa_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_sc_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_m_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_m_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_dl_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"is_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_enhanced_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_severely_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_disability","stage_contract_sha256":"ac500b4cb1bc04d4fb72d198592dd376d61da8c150921a6ac53914ac18be0508","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_education.","id":"frs_education","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","esa_contrib_reported","esa_income_reported","is_severely_disabled_for_benefits","jsa_contrib_reported","jsa_income_reported","universal_credit_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_education@1","mass":"conserve","outputs":[{"column":"current_education","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"highest_education","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"is_in_non_advanced_education","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_in_approved_training","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"age_started_or_accepted_current_education_or_training","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"is_before_universal_credit_qualifying_young_person_terminal_date","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"adult_ema","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"child_ema","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"receives_benefits_in_own_right","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_education","stage_contract_sha256":"836cb0f5a582fee1425190e96c9cb81bdef859bd236c8b6bc27660b6e3d0c2f8","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_legacy_proxies.","id":"frs_legacy_proxies","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_legacy_proxies@1","mass":"conserve","outputs":[{"column":"legacy_jobseeker_proxy","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_health_condition_proxy","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_support_group_proxy","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_legacy_proxies","stage_contract_sha256":"1ecf761cf3fa7180da15659e138e67a8654e58272b4fde28344aa27a874ad0aa","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"age_tail.boundary","citation":"","description":"Ownership boundary before frs_education_grant_split rewrites.","id":"frs_education_grant_split.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_education_grant_split.","id":"frs_education_grant_split","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_education_grant_split@1","mass":"conserve","outputs":[{"column":"disabled_students_allowance_eligible_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"education_grants","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_education_grant_split","stage_contract_sha256":"8718f014b90498c2cc7c754289775ca4a41452d9b978d8cbc5f34b64cbdc7df2","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_take_up.","id":"frs_take_up","inputs":[{"columns":["frs_benunit_capital","is_married"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","child_benefit_reported","education_grants","pension_credit_reported","universal_credit_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_take_up@1","mass":"conserve","outputs":[{"column":"would_claim_child_benefit","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"child_benefit_opts_out","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_pc","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_uc","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_tfc","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_extended_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_universal_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_targeted_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_uc_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"maximum_extended_childcare_hours_usage","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_take_up","stage_contract_sha256":"067d31b7fbe733d1d182588705e9ce79df0c8e5f6e8f519314765af49b1b00d7","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_person_draws.","id":"frs_person_draws","inputs":[{"columns":["frs_benunit_capital","maximum_extended_childcare_hours_usage"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_person_draws@1","mass":"conserve","outputs":[{"column":"would_claim_marriage_allowance","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"would_claim_scp","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"attends_private_school_random_draw","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"tax_free_childcare_spend_routed_share","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_person_draws","stage_contract_sha256":"7e0af955541ec5669dcdf1de4e1e6ca642853e48b775ec4e25238b41491df324","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_household_draws.","id":"frs_household_draws","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","tax_free_childcare_spend_routed_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_household_draws@1","mass":"conserve","outputs":[{"column":"household_owns_tv","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"would_evade_tv_licence_fee","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"main_residential_property_purchased_is_first_home","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"property_purchased","dtype":"bool","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_household_draws","stage_contract_sha256":"c74c63b09264319c4bf0049dabba00ecd0ce660beb7b53d6dae71518434bc949","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_brma.","id":"frs_brma","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_brma@1","mass":"conserve","outputs":[{"column":"brma","dtype":"string","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_brma","stage_contract_sha256":"5b8f0b361310c7cd3efbaae3762b347649b7d4afb9e9943131d9bef9266fc3c8","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"frs_education_grant_split.boundary","citation":"","description":"Freeze the assembled-spine gate population.","id":"frs_brma.checkpoint","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_hmrc_spine_leaves.","id":"frs_hmrc_spine_leaves","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["brma","region"],"entity":"household","rows":"all"},{"columns":["age","employee_pension_contributions"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_hmrc_spine_leaves@1","mass":"conserve","outputs":[{"column":"hmrc_spi_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_unemployment_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_incapacity_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"ossben_identifiable_subset","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"srp_regular_code5","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employer_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_hmrc_spine_leaves","stage_contract_sha256":"2bb3d068003489b47cc8676ac26c203ce3c39a9b6e92f3ecd0a3c06acd6addc4","time_period":"2024"},"population":"frs_brma.checkpoint","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"frs_brma.checkpoint","citation":"","description":"Run structural UK stage spi_support_channel.","id":"spi_support_channel","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.spi_support_channel@1","mass":"declared","outputs":[],"params":{"expand_cells":[["person","person_source_id","int64"],["person","person_support_channel","string"],["person","person_support_clone_index","int64"],["benunit","benunit_source_id","int64"],["benunit","benunit_support_channel","string"],["benunit","benunit_support_clone_index","int64"],["household","source_household_id","int64"],["household","source_year","int64"],["household","source_household_key","string"],["household","household_source_id","int64"],["household","household_support_channel","string"],["household","household_support_clone_index","int64"],["household","household_is_spi_synthetic","bool"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"spi_support_channel","stage_contract_sha256":"4b10f1a4a215cdf2c406c9974de2d1e580eb3cd3a25ed34973c1b63abf4a54bb","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by spi_support_channel.","id":"spi_support_channel.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"person_source_id","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"person_support_channel","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"person_support_clone_index","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"benunit_source_id","dtype":"int64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"benunit_support_channel","dtype":"string","entity":"benunit","ownership":"produced","rows":"all"},{"column":"benunit_support_clone_index","dtype":"int64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"source_household_id","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"source_year","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"source_household_key","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"household_source_id","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_support_channel","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"household_support_clone_index","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_is_spi_synthetic","dtype":"bool","entity":"household","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["person.person_source_id","person.person_support_channel","person.person_support_clone_index","benunit.benunit_source_id","benunit.benunit_support_channel","benunit.benunit_support_clone_index","household.source_household_id","household.source_year","household.source_household_key","household.household_source_id","household.household_support_channel","household.household_support_clone_index","household.household_is_spi_synthetic"]},"population":"spi_support_channel","sources":[],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"spi_support_channel","citation":"","description":"Run structural UK stage spi_income_band_donors.","id":"spi_income_band_donors","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.spi_income_band_donors@1","mass":"free","outputs":[],"params":{"expand_cells":[["person","person_source_id","int64"],["person","person_support_channel","string"],["person","person_support_clone_index","int64"],["benunit","benunit_source_id","int64"],["benunit","benunit_support_channel","string"],["benunit","benunit_support_clone_index","int64"],["household","household_source_id","int64"],["household","household_support_channel","string"],["household","household_support_clone_index","int64"],["household","household_is_spi_synthetic","bool"],["household","household_is_spi_income_band_donor","bool"],["household","spi_income_band_donor_lower_bound","float64"],["person","person_is_spi_income_band_carrier","bool"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"spi_income_band_donors","stage_contract_sha256":"047ff55be7acca89a01859271a019428f42a40c38af4885625ec064f8ff213af","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by spi_income_band_donors.","id":"spi_income_band_donors.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"person_source_id","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"person_support_channel","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"person_support_clone_index","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"benunit_source_id","dtype":"int64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"benunit_support_channel","dtype":"string","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"benunit_support_clone_index","dtype":"int64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_source_id","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_support_channel","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_support_clone_index","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_is_spi_synthetic","dtype":"bool","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_is_spi_income_band_donor","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"spi_income_band_donor_lower_bound","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"person_is_spi_income_band_carrier","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["household.household_is_spi_income_band_donor","household.spi_income_band_donor_lower_bound","person.person_is_spi_income_band_carrier"]},"population":"spi_income_band_donors","sources":[],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage hmrc_spi_income_spine.","id":"hmrc_spi_income_spine","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","maintenance_expenses","childcare_expenses","salary_sacrifice_reported","salary_sacrifice_asked","ssmg_reported","incapacity_benefit_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","ossben_identifiable_subset","srp_regular_code5","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier"],"entity":"person","rows":"all"}],"kernel":"uk.stage.hmrc_spi_income_spine@1","mass":"conserve","outputs":[{"column":"charitable_investment_gifts","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"gift_aid","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"other_investment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_employment_benefits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_employment_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_other_social_security_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_taxable_termination_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_miscellaneous_employment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_other_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_state_pension_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_employed_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_total_earned_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_total_investment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_assessable_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"self_employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"savings_interest_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dividend_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"private_pension_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employer_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"personal_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"tax_free_savings_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"income_support_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"working_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"attendance_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"state_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_sc_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_dl_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"sda_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"carers_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"iidb_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"afcs_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"bsp_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"winter_fuel_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hmrc_spi_pay","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hmrc_spi_unemployment_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hmrc_spi_incapacity_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"aa_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_sc_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_m_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_m_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_dl_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_enhanced_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_severely_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_carers_allowance","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"hmrc_spi_income_spine","stage_contract_sha256":"038505263ed7821e028773e041d9e923131df001ad31439d78d7eba5aa1ea64f","time_period":"2024"},"population":"spi_income_band_donors","sources":["frs"],"structural":"none","weights":null},{"base":"spi_income_band_donors","citation":"","description":"Ownership boundary before spi_housing_shell rewrites.","id":"spi_housing_shell.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage spi_housing_shell.","id":"spi_housing_shell","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["council_tax_single_adult_raw","household_support_channel","ons_household_type","region"],"entity":"household","rows":"all"},{"columns":["age","dividend_income","employment_income","is_household_head","other_investment_income","private_pension_income","property_income","savings_interest_income","self_employment_income","state_pension_reported","would_claim_carers_allowance"],"entity":"person","rows":"all"}],"kernel":"uk.stage.spi_housing_shell@1","mass":"conserve","outputs":[{"column":"tenure_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"accommodation_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_band","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"num_bedrooms","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_reported","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"rent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_interest_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_capital_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"structural_insurance_payments","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_service_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"water_and_sewerage_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"domestic_rates","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"subrent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_rebate","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"spi_housing_shell","stage_contract_sha256":"809f19fd33ff79ceda005e8cc3fa89ae40b297dceca26a7658b6259267987890","time_period":"2024"},"population":"spi_housing_shell.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage was_wealth.","id":"was_wealth","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.was_wealth@1","mass":"conserve","outputs":[{"column":"owned_land","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"property_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"corporate_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"private_pension_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"gross_financial_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"net_financial_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"main_residence_value","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"other_residential_property_value","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"non_residential_property_value","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"savings","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"num_vehicles","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"cash_isa","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"stocks_and_shares_isa","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"mortgage_debt","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"consumer_debt","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"student_loan_balance","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"was_wealth","stage_contract_sha256":"366e019c41ee2a28bcd61bbaa62a024ed0bb4b30b3ffc4d87ab23b340b4076bf","time_period":"2024"},"population":"spi_housing_shell.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"spi_housing_shell.boundary","citation":"","description":"Ownership boundary before regional_property_uprating rewrites.","id":"regional_property_uprating.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage regional_property_uprating.","id":"regional_property_uprating","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["household_support_channel","region"],"entity":"household","rows":"all"},{"columns":["age","student_loan_balance"],"entity":"person","rows":"all"}],"kernel":"uk.stage.regional_property_uprating@1","mass":"conserve","outputs":[{"column":"main_residence_value","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_wealth","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"regional_property_uprating","stage_contract_sha256":"acb342e8ca1770556c5682a9411c5ead5d61dd1420cfe6b0305ed14a3407fb25","time_period":"2024"},"population":"regional_property_uprating.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage nts_bus_travel.","id":"nts_bus_travel","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance"],"entity":"person","rows":"all"}],"kernel":"uk.stage.nts_bus_travel@1","mass":"conserve","outputs":[{"column":"local_bus_use_band","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"bus_in_london_trips","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"other_local_bus_trips","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"local_bus_trips","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"bus_pass_eligible","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"local_bus_single_fare_share","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"household_local_bus_trips","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"nts_bus_travel","stage_contract_sha256":"cf854e8cf6edd006b677dcc67b63d6bb104d09eed93d7ee78bde6f0e838b9de9","time_period":"2024"},"population":"regional_property_uprating.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage lcfs_consumption.","id":"lcfs_consumption","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_local_bus_trips"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.lcfs_consumption@1","mass":"conserve","outputs":[{"column":"food_and_non_alcoholic_beverages_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"alcohol_and_tobacco_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"clothing_and_footwear_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"housing_water_and_electricity_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_furnishings_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"health_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"transport_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"communication_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"recreation_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"education_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"restaurants_and_hotels_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"miscellaneous_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"petrol_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"diesel_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"bus_fare_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"domestic_energy_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"electricity_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"gas_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"has_fuel_consumption","dtype":"bool","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"lcfs_consumption","stage_contract_sha256":"63079c6f53d507702b4b1fadcf30def5188baf1f17e026e9f89f285577fe9c60","time_period":"2024"},"population":"regional_property_uprating.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage etb_vat.","id":"etb_vat","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.etb_vat@1","mass":"conserve","outputs":[{"column":"full_rate_vat_expenditure_rate","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"etb_vat","stage_contract_sha256":"5a2b777d88315bcccb72477c088a136c634131e0bc1a339b7287217ee5cfd8d3","time_period":"2024"},"population":"regional_property_uprating.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage etb_services.","id":"etb_services","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.etb_services@1","mass":"conserve","outputs":[{"column":"dfe_education_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"rail_subsidy_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"bus_subsidy_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"rail_usage","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"a_and_e_visits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"admitted_patient_visits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"outpatient_visits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"nhs_a_and_e_spending","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"nhs_admitted_patient_spending","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"nhs_outpatient_spending","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"etb_services","stage_contract_sha256":"37bfc4c0935ab99c5f270f307451cbf6cc6a85a3f8c6ce77429f6a6c66c07021","time_period":"2024"},"population":"regional_property_uprating.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"regional_property_uprating.boundary","citation":"","description":"Ownership boundary before uc_reporter_redraw rewrites.","id":"uc_reporter_redraw.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage uc_reporter_redraw.","id":"uc_reporter_redraw","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.uc_reporter_redraw@1","mass":"conserve","outputs":[{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"uc_reporter_redraw","stage_contract_sha256":"7e94e034cad29c5bae566ffb875c42cddf3a1025c15496907e783ceff1144f8b","time_period":"2024"},"population":"uc_reporter_redraw.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"uc_reporter_redraw.boundary","citation":"","description":"Ownership boundary before uc_capital_coherence rewrites.","id":"uc_capital_coherence.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage uc_capital_coherence.","id":"uc_capital_coherence","inputs":[{"columns":["benunit_support_channel","dependent_children","is_married"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","is_benunit_head","is_parent","person_support_channel","universal_credit_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.uc_capital_coherence@1","mass":"conserve","outputs":[{"column":"uc_reported_capital","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"frs_benunit_capital","dtype":"float64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_uc","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"uc_capital_coherence","stage_contract_sha256":"059f27ee687ee15385b246d43068b17aeecbe3645ccc41fd52fcad06a006a081","time_period":"2024"},"population":"uc_capital_coherence.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage uc_deduction_attributes.","id":"uc_deduction_attributes","inputs":[{"columns":["frs_benunit_capital","would_claim_uc"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.uc_deduction_attributes@1","mass":"conserve","outputs":[{"column":"uc_deduction_random_draw","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"uc_deduction_type_random_draw","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"uc_latent_deduction_rate","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"uc_deduction_combination","dtype":"string","entity":"benunit","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"uc_deduction_attributes","stage_contract_sha256":"6bc7e3ec1a5712e23ca1b7d2956e8b17f2526b94431ba3e5a9294b04658e4fe0","time_period":"2024"},"population":"uc_capital_coherence.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"uc_capital_coherence.boundary","citation":"","description":"Run structural UK stage cgt_support_split.","id":"cgt_support_split","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.cgt_support_split@1","mass":"conserve","outputs":[],"params":{"expand_cells":[["household","household_is_cgt_support_copy","bool"],["household","cgt_support_copies","int64"],["household","cgt_support_copy_index","int64"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"cgt_support_split","stage_contract_sha256":"556e2db7907ad62920149da9104150997031e3cfddbdb4610075369d77147499","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by cgt_support_split.","id":"cgt_support_split.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"household_is_cgt_support_copy","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"cgt_support_copies","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"cgt_support_copy_index","dtype":"int64","entity":"household","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["household.household_is_cgt_support_copy","household.cgt_support_copies","household.cgt_support_copy_index"]},"population":"cgt_support_split","sources":[],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"cgt_support_split","citation":"","description":"Run structural UK stage cgt_incidence_clone.","id":"cgt_incidence_clone","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.cgt_incidence_clone@1","mass":"conserve","outputs":[],"params":{"expand_cells":[["household","household_is_capital_gains_clone","bool"],["person","capital_gains","float64"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"cgt_incidence_clone","stage_contract_sha256":"ee30278543cc0297a5366d855b7753aa04af5518971594c193c52be36bf8a7b4","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by cgt_incidence_clone.","id":"cgt_incidence_clone.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"household_is_capital_gains_clone","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"capital_gains","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["household.household_is_capital_gains_clone","person.capital_gains"]},"population":"cgt_incidence_clone","sources":[],"structural":"none","weights":null},{"base":"cgt_incidence_clone","citation":"","description":"Ownership boundary before hmrc_cgt_gains_spine rewrites.","id":"hmrc_cgt_gains_spine.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage hmrc_cgt_gains_spine.","id":"hmrc_cgt_gains_spine","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["cgt_support_copies","corporate_wealth","gross_financial_wealth","household_is_cgt_support_copy","non_residential_property_value","other_residential_property_value","region"],"entity":"household","rows":"all"},{"columns":["age","dividend_income","employment_income","miscellaneous_income","private_pension_income","property_income","savings_interest_income","self_employment_income","state_pension_reported","tax_free_savings_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.hmrc_cgt_gains_spine@1","mass":"conserve","outputs":[{"column":"capital_gains","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"hmrc_cgt_gains_spine","stage_contract_sha256":"49717d6586a4a5d7fc370200c71c0f91d01473158454571c056deb6f5618d562","time_period":"2024"},"population":"hmrc_cgt_gains_spine.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage hmrc_cgt_asset_type_spine.","id":"hmrc_cgt_asset_type_spine","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["corporate_wealth","gross_financial_wealth","other_residential_property_value","region","stocks_and_shares_isa"],"entity":"household","rows":"all"},{"columns":["age","capital_gains","dividend_income","property_income","self_employment_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.hmrc_cgt_asset_type_spine@1","mass":"conserve","outputs":[{"column":"capital_gains_asset_type","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"capital_gains_residential_property","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"capital_gains_badr","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"hmrc_cgt_asset_type_spine","stage_contract_sha256":"5f9a5f2d12e2a7db87c7c0d6f0df6f70875a579e90c39b2b8c48943eac43905e","time_period":"2024"},"population":"hmrc_cgt_gains_spine.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"hmrc_cgt_gains_spine.boundary","citation":"","description":"Run structural UK stage cgt_incidence_anchor.","id":"cgt_incidence_anchor","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["household_is_capital_gains_clone","region"],"entity":"household","rows":"all"},{"columns":["age","capital_gains","capital_gains_badr","dividend_income","employment_income","miscellaneous_income","private_pension_income","property_income","savings_interest_income","self_employment_income","state_pension_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.cgt_incidence_anchor@1","mass":"conserve","outputs":[],"params":{"expand_cells":[],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"cgt_incidence_anchor","stage_contract_sha256":"b79ce806015de2f1e1703fa68bf4ad871c6df54b5b32633c864632ab68919a48","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage salary_sacrifice.","id":"salary_sacrifice","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains","capital_gains_asset_type","capital_gains_residential_property","capital_gains_badr"],"entity":"person","rows":"all"}],"kernel":"uk.stage.salary_sacrifice@1","mass":"conserve","outputs":[{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"salary_sacrifice","stage_contract_sha256":"89b589d19fcb99b265cb40d08cf2b9ff7955bd41b6de0e8c9ff4dc6f35be1eb6","time_period":"2024"},"population":"cgt_incidence_anchor","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage student_loans.","id":"student_loans","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","current_education","employee_pension_contributions","highest_education","student_loan_repayments","student_loans"],"entity":"person","rows":"all"}],"kernel":"uk.stage.student_loans@1","mass":"conserve","outputs":[{"column":"student_loan_plan","dtype":"string","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"student_loans","stage_contract_sha256":"f2936c5e22a0e9b097437e3f3aabaf06c4561d5c25a9b7c05e720a6553f73bbc","time_period":"2024"},"population":"cgt_incidence_anchor","sources":["frs"],"structural":"none","weights":null}],"sources":[{"codec":"csv-tables","description":"Content-bound UK FRS and donor fixture/source bundle.","name":"frs"}]} +{"country":"uk","nodes":[{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Load the source-bound UK FRS root population.","id":"create_uk_frs","inputs":[],"kernel":"uk.create@1","mass":"conserve","outputs":[{"column":"age","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"gender","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"marital_status","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"hours_worked","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"care_hours","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"is_household_head","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_benunit_head","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_parent","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_uc_claimant","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"employment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"self_employment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"private_pension_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"tax_free_savings_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"savings_interest_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"dividend_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"property_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"maintenance_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"miscellaneous_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"private_transfer_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"lump_sum_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"student_loan_repayments","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"statutory_sick_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"statutory_maternity_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"student_loans","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"access_fund","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"education_grants","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"healthy_start_vouchers","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"free_school_breakfasts","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"free_school_fruit_veg","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"free_school_meals","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"maintenance_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"childcare_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"personal_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"salary_sacrifice_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"salary_sacrifice_asked","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"child_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"income_support_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"attendance_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_sc_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_m_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"iidb_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"carers_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"would_claim_carers_allowance","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"sda_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"afcs_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"ssmg_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pension_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"child_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"working_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"state_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"winter_fuel_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"incapacity_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_m_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_dl_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"jsa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"jsa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"bsp_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"frs_benunit_capital","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"is_married","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"dependent_children","dtype":"int64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"region","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"tenure_type","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"accommodation_type","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"num_bedrooms","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_reported","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_band","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_rebate","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_single_adult_raw","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"water_and_sewerage_charges","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"domestic_rates","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"rent","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"subrent","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"mortgage_interest_repayment","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"mortgage_capital_repayment","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"structural_insurance_payments","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"housing_service_charges","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"external_child_payments","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"sample_fraction":1.0,"sample_seed":578,"stage_contract_sha256":"047d30937efb21e39259fdbed5597751e4f5a0c341ea583c7446e4c9c11eba48","time_period":"2024"},"population":null,"sources":["frs"],"structural":"create","weights":null},{"base":"create_uk_frs","citation":"","description":"Ownership boundary for the source-assembling root stage.","id":"frs_spine.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"base":null,"citation":"","description":"Claim the cells assembled by the UK FRS root transform.","id":"frs_spine","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"age","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"gender","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"marital_status","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hours_worked","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"care_hours","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_household_head","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_benunit_head","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_parent","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_uc_claimant","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"self_employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"private_pension_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"tax_free_savings_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"savings_interest_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dividend_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"maintenance_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"miscellaneous_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"private_transfer_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"lump_sum_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"student_loan_repayments","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"statutory_sick_pay","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"statutory_maternity_pay","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"student_loans","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"access_fund","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"education_grants","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"healthy_start_vouchers","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"free_school_breakfasts","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"free_school_fruit_veg","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"free_school_meals","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"maintenance_expenses","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"childcare_expenses","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"personal_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"salary_sacrifice_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"salary_sacrifice_asked","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"income_support_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"attendance_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_sc_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"iidb_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"carers_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_carers_allowance","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"sda_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"afcs_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"ssmg_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"working_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"state_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"winter_fuel_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"incapacity_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_dl_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"bsp_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"frs_benunit_capital","dtype":"float64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_married","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dependent_children","dtype":"int64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"region","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"tenure_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"accommodation_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"num_bedrooms","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_reported","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_band","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_rebate","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_single_adult_raw","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"water_and_sewerage_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"domestic_rates","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"rent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"subrent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_interest_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_capital_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"structural_insurance_payments","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_service_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"external_child_payments","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"}],"params":{},"population":"frs_spine.boundary","sources":[],"structural":"none","weights":null},{"base":"frs_spine.boundary","citation":"","description":"Ownership boundary before age_tail rewrites.","id":"age_tail.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage age_tail.","id":"age_tail","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["external_child_payments","region"],"entity":"household","rows":"all"},{"columns":["gender"],"entity":"person","rows":"all"}],"kernel":"uk.stage.age_tail@1","mass":"conserve","outputs":[{"column":"age","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"age_tail","stage_contract_sha256":"963a34f38caede2525e3b8735f904bb70a1bbef5a272f0eefd4346343444484f","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_relationships.","id":"frs_relationships","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","is_household_head"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_relationships@1","mass":"conserve","outputs":[{"column":"relationship_to_head","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"ons_family_role","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"ons_family_index","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"ons_household_type","dtype":"string","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_relationships","stage_contract_sha256":"30628808d06d9829ebcbcf460cd355a01261e78c7c73e6006c75bec2e3d60c33","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_employment.","id":"frs_employment","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["ons_household_type","region"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_employment@1","mass":"conserve","outputs":[{"column":"employment_status","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"employment_sector","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"sic_industry_division","dtype":"int64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_employment","stage_contract_sha256":"ddbefaf05b44788d794a6e4b0e8926c14318d66e50d2f11f50ca549538bbf60c","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_council_tax.","id":"frs_council_tax","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","sic_industry_division"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_council_tax@1","mass":"conserve","outputs":[{"column":"council_tax","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_council_tax","stage_contract_sha256":"3381cd9f7a736514d5073c57480e07f5098890f3ca9ed3865392043594771eb9","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_disability.","id":"frs_disability","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["council_tax","region"],"entity":"household","rows":"all"},{"columns":["afcs_reported","age","attendance_allowance_reported","dla_m_reported","dla_sc_reported","esa_contrib_reported","esa_income_reported","iidb_reported","incapacity_benefit_reported","pip_dl_reported","pip_m_reported","sda_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_disability@1","mass":"conserve","outputs":[{"column":"aa_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_sc_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_m_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_m_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_dl_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"is_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_enhanced_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_severely_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_disability","stage_contract_sha256":"ac500b4cb1bc04d4fb72d198592dd376d61da8c150921a6ac53914ac18be0508","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_education.","id":"frs_education","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","esa_contrib_reported","esa_income_reported","is_severely_disabled_for_benefits","jsa_contrib_reported","jsa_income_reported","universal_credit_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_education@1","mass":"conserve","outputs":[{"column":"current_education","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"highest_education","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"is_in_non_advanced_education","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_in_approved_training","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"age_started_or_accepted_current_education_or_training","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"is_before_universal_credit_qualifying_young_person_terminal_date","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"adult_ema","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"child_ema","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"receives_benefits_in_own_right","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_education","stage_contract_sha256":"836cb0f5a582fee1425190e96c9cb81bdef859bd236c8b6bc27660b6e3d0c2f8","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_legacy_proxies.","id":"frs_legacy_proxies","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_legacy_proxies@1","mass":"conserve","outputs":[{"column":"legacy_jobseeker_proxy","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_health_condition_proxy","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_support_group_proxy","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_legacy_proxies","stage_contract_sha256":"1ecf761cf3fa7180da15659e138e67a8654e58272b4fde28344aa27a874ad0aa","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"age_tail.boundary","citation":"","description":"Ownership boundary before frs_education_grant_split rewrites.","id":"frs_education_grant_split.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_education_grant_split.","id":"frs_education_grant_split","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_education_grant_split@1","mass":"conserve","outputs":[{"column":"disabled_students_allowance_eligible_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"education_grants","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_education_grant_split","stage_contract_sha256":"8718f014b90498c2cc7c754289775ca4a41452d9b978d8cbc5f34b64cbdc7df2","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_take_up.","id":"frs_take_up","inputs":[{"columns":["frs_benunit_capital","is_married"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","child_benefit_reported","education_grants","pension_credit_reported","universal_credit_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_take_up@1","mass":"conserve","outputs":[{"column":"would_claim_child_benefit","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"child_benefit_opts_out","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_pc","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_uc","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_tfc","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_extended_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_universal_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_targeted_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_uc_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"maximum_extended_childcare_hours_usage","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_take_up","stage_contract_sha256":"067d31b7fbe733d1d182588705e9ce79df0c8e5f6e8f519314765af49b1b00d7","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_person_draws.","id":"frs_person_draws","inputs":[{"columns":["frs_benunit_capital","maximum_extended_childcare_hours_usage"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_person_draws@1","mass":"conserve","outputs":[{"column":"would_claim_marriage_allowance","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"would_claim_scp","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"attends_private_school_random_draw","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"tax_free_childcare_spend_routed_share","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_person_draws","stage_contract_sha256":"7e0af955541ec5669dcdf1de4e1e6ca642853e48b775ec4e25238b41491df324","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_household_draws.","id":"frs_household_draws","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","tax_free_childcare_spend_routed_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_household_draws@1","mass":"conserve","outputs":[{"column":"household_owns_tv","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"would_evade_tv_licence_fee","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"main_residential_property_purchased_is_first_home","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"property_purchased","dtype":"bool","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_household_draws","stage_contract_sha256":"c74c63b09264319c4bf0049dabba00ecd0ce660beb7b53d6dae71518434bc949","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_brma.","id":"frs_brma","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_brma@1","mass":"conserve","outputs":[{"column":"brma","dtype":"string","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_brma","stage_contract_sha256":"5b8f0b361310c7cd3efbaae3762b347649b7d4afb9e9943131d9bef9266fc3c8","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"frs_education_grant_split.boundary","citation":"","description":"Freeze the assembled-spine gate population.","id":"frs_brma.checkpoint","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_hmrc_spine_leaves.","id":"frs_hmrc_spine_leaves","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["brma","region"],"entity":"household","rows":"all"},{"columns":["age","employee_pension_contributions"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_hmrc_spine_leaves@1","mass":"conserve","outputs":[{"column":"hmrc_spi_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_unemployment_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_incapacity_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"ossben_identifiable_subset","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"srp_regular_code5","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employer_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_hmrc_spine_leaves","stage_contract_sha256":"2bb3d068003489b47cc8676ac26c203ce3c39a9b6e92f3ecd0a3c06acd6addc4","time_period":"2024"},"population":"frs_brma.checkpoint","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"frs_brma.checkpoint","citation":"","description":"Run structural UK stage spi_support_channel.","id":"spi_support_channel","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.spi_support_channel@1","mass":"declared","outputs":[],"params":{"expand_cells":[["person","person_source_id","int64"],["person","person_support_channel","string"],["person","person_support_clone_index","int64"],["benunit","benunit_source_id","int64"],["benunit","benunit_support_channel","string"],["benunit","benunit_support_clone_index","int64"],["household","source_household_id","int64"],["household","source_year","int64"],["household","source_household_key","string"],["household","household_source_id","int64"],["household","household_support_channel","string"],["household","household_support_clone_index","int64"],["household","household_is_spi_synthetic","bool"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"spi_support_channel","stage_contract_sha256":"4b10f1a4a215cdf2c406c9974de2d1e580eb3cd3a25ed34973c1b63abf4a54bb","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by spi_support_channel.","id":"spi_support_channel.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"person_source_id","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"person_support_channel","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"person_support_clone_index","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"benunit_source_id","dtype":"int64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"benunit_support_channel","dtype":"string","entity":"benunit","ownership":"produced","rows":"all"},{"column":"benunit_support_clone_index","dtype":"int64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"source_household_id","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"source_year","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"source_household_key","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"household_source_id","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_support_channel","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"household_support_clone_index","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_is_spi_synthetic","dtype":"bool","entity":"household","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["person.person_source_id","person.person_support_channel","person.person_support_clone_index","benunit.benunit_source_id","benunit.benunit_support_channel","benunit.benunit_support_clone_index","household.source_household_id","household.source_year","household.source_household_key","household.household_source_id","household.household_support_channel","household.household_support_clone_index","household.household_is_spi_synthetic"]},"population":"spi_support_channel","sources":[],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"spi_support_channel","citation":"","description":"Run structural UK stage spi_income_band_donors.","id":"spi_income_band_donors","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.spi_income_band_donors@1","mass":"free","outputs":[],"params":{"expand_cells":[["person","person_source_id","int64"],["person","person_support_channel","string"],["person","person_support_clone_index","int64"],["benunit","benunit_source_id","int64"],["benunit","benunit_support_channel","string"],["benunit","benunit_support_clone_index","int64"],["household","household_source_id","int64"],["household","household_support_channel","string"],["household","household_support_clone_index","int64"],["household","household_is_spi_synthetic","bool"],["household","household_is_spi_income_band_donor","bool"],["household","spi_income_band_donor_lower_bound","float64"],["person","person_is_spi_income_band_carrier","bool"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"spi_income_band_donors","stage_contract_sha256":"047ff55be7acca89a01859271a019428f42a40c38af4885625ec064f8ff213af","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by spi_income_band_donors.","id":"spi_income_band_donors.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"person_source_id","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"person_support_channel","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"person_support_clone_index","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"benunit_source_id","dtype":"int64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"benunit_support_channel","dtype":"string","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"benunit_support_clone_index","dtype":"int64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_source_id","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_support_channel","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_support_clone_index","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_is_spi_synthetic","dtype":"bool","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_is_spi_income_band_donor","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"spi_income_band_donor_lower_bound","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"person_is_spi_income_band_carrier","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["household.household_is_spi_income_band_donor","household.spi_income_band_donor_lower_bound","person.person_is_spi_income_band_carrier"]},"population":"spi_income_band_donors","sources":[],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage hmrc_spi_income_spine.","id":"hmrc_spi_income_spine","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","maintenance_expenses","childcare_expenses","salary_sacrifice_reported","salary_sacrifice_asked","ssmg_reported","incapacity_benefit_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","ossben_identifiable_subset","srp_regular_code5","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier"],"entity":"person","rows":"all"}],"kernel":"uk.stage.hmrc_spi_income_spine@1","mass":"conserve","outputs":[{"column":"charitable_investment_gifts","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"gift_aid","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"other_investment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_employment_benefits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_employment_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_other_social_security_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_taxable_termination_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_miscellaneous_employment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_other_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_state_pension_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_employed_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_total_earned_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_total_investment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_assessable_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"self_employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"savings_interest_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dividend_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"private_pension_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employer_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"personal_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"tax_free_savings_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"income_support_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"working_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"attendance_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"state_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_sc_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_dl_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"sda_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"carers_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"iidb_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"afcs_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"bsp_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"winter_fuel_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hmrc_spi_pay","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hmrc_spi_unemployment_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hmrc_spi_incapacity_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"aa_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_sc_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_m_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_m_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_dl_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_enhanced_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_severely_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_carers_allowance","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"hmrc_spi_income_spine","stage_contract_sha256":"038505263ed7821e028773e041d9e923131df001ad31439d78d7eba5aa1ea64f","time_period":"2024"},"population":"spi_income_band_donors","sources":["frs"],"structural":"none","weights":null},{"base":"spi_income_band_donors","citation":"","description":"Ownership boundary before spi_housing_shell rewrites.","id":"spi_housing_shell.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage spi_housing_shell.","id":"spi_housing_shell","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["council_tax_single_adult_raw","household_support_channel","ons_household_type","region"],"entity":"household","rows":"all"},{"columns":["age","dividend_income","employment_income","is_household_head","other_investment_income","private_pension_income","property_income","savings_interest_income","self_employment_income","state_pension_reported","would_claim_carers_allowance"],"entity":"person","rows":"all"}],"kernel":"uk.stage.spi_housing_shell@1","mass":"conserve","outputs":[{"column":"tenure_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"accommodation_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_band","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"num_bedrooms","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_reported","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"rent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_interest_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_capital_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"structural_insurance_payments","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_service_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"water_and_sewerage_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"domestic_rates","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"subrent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_rebate","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"spi_housing_shell","stage_contract_sha256":"809f19fd33ff79ceda005e8cc3fa89ae40b297dceca26a7658b6259267987890","time_period":"2024"},"population":"spi_housing_shell.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage was_wealth.","id":"was_wealth","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.was_wealth@1","mass":"conserve","outputs":[{"column":"owned_land","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"property_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"corporate_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"private_pension_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"gross_financial_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"net_financial_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"main_residence_value","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"other_residential_property_value","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"non_residential_property_value","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"savings","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"num_vehicles","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"cash_isa","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"stocks_and_shares_isa","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"mortgage_debt","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"consumer_debt","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"student_loan_balance","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"was_wealth","stage_contract_sha256":"366e019c41ee2a28bcd61bbaa62a024ed0bb4b30b3ffc4d87ab23b340b4076bf","time_period":"2024"},"population":"spi_housing_shell.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage was_lisa.","id":"was_lisa","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance"],"entity":"person","rows":"all"}],"kernel":"uk.stage.was_lisa@1","mass":"conserve","outputs":[{"column":"has_lifetime_isa","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"lifetime_isa_balance","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"household_lifetime_isa_balance","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"was_lisa","stage_contract_sha256":"e7948149344bd6c6d119d958d6af360b5fc8ec080d6d4509dc75469182fa6653","time_period":"2024"},"population":"spi_housing_shell.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"spi_housing_shell.boundary","citation":"","description":"Ownership boundary before regional_property_uprating rewrites.","id":"regional_property_uprating.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage regional_property_uprating.","id":"regional_property_uprating","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["household_lifetime_isa_balance","household_support_channel","region"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.regional_property_uprating@1","mass":"conserve","outputs":[{"column":"main_residence_value","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_wealth","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"regional_property_uprating","stage_contract_sha256":"acb342e8ca1770556c5682a9411c5ead5d61dd1420cfe6b0305ed14a3407fb25","time_period":"2024"},"population":"regional_property_uprating.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage nts_bus_travel.","id":"nts_bus_travel","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance"],"entity":"person","rows":"all"}],"kernel":"uk.stage.nts_bus_travel@1","mass":"conserve","outputs":[{"column":"local_bus_use_band","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"bus_in_london_trips","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"other_local_bus_trips","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"local_bus_trips","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"bus_pass_eligible","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"local_bus_single_fare_share","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"household_local_bus_trips","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"nts_bus_travel","stage_contract_sha256":"cf854e8cf6edd006b677dcc67b63d6bb104d09eed93d7ee78bde6f0e838b9de9","time_period":"2024"},"population":"regional_property_uprating.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage lcfs_consumption.","id":"lcfs_consumption","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.lcfs_consumption@1","mass":"conserve","outputs":[{"column":"food_and_non_alcoholic_beverages_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"alcohol_and_tobacco_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"clothing_and_footwear_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"housing_water_and_electricity_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_furnishings_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"health_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"transport_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"communication_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"recreation_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"education_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"restaurants_and_hotels_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"miscellaneous_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"petrol_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"diesel_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"bus_fare_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"domestic_energy_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"electricity_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"gas_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"has_fuel_consumption","dtype":"bool","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"lcfs_consumption","stage_contract_sha256":"63079c6f53d507702b4b1fadcf30def5188baf1f17e026e9f89f285577fe9c60","time_period":"2024"},"population":"regional_property_uprating.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage etb_vat.","id":"etb_vat","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.etb_vat@1","mass":"conserve","outputs":[{"column":"full_rate_vat_expenditure_rate","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"etb_vat","stage_contract_sha256":"5a2b777d88315bcccb72477c088a136c634131e0bc1a339b7287217ee5cfd8d3","time_period":"2024"},"population":"regional_property_uprating.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage etb_services.","id":"etb_services","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.etb_services@1","mass":"conserve","outputs":[{"column":"dfe_education_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"rail_subsidy_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"bus_subsidy_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"rail_usage","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"a_and_e_visits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"admitted_patient_visits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"outpatient_visits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"nhs_a_and_e_spending","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"nhs_admitted_patient_spending","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"nhs_outpatient_spending","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"etb_services","stage_contract_sha256":"37bfc4c0935ab99c5f270f307451cbf6cc6a85a3f8c6ce77429f6a6c66c07021","time_period":"2024"},"population":"regional_property_uprating.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"regional_property_uprating.boundary","citation":"","description":"Ownership boundary before uc_reporter_redraw rewrites.","id":"uc_reporter_redraw.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage uc_reporter_redraw.","id":"uc_reporter_redraw","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.uc_reporter_redraw@1","mass":"conserve","outputs":[{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"uc_reporter_redraw","stage_contract_sha256":"7e94e034cad29c5bae566ffb875c42cddf3a1025c15496907e783ceff1144f8b","time_period":"2024"},"population":"uc_reporter_redraw.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"uc_reporter_redraw.boundary","citation":"","description":"Ownership boundary before uc_capital_coherence rewrites.","id":"uc_capital_coherence.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage uc_capital_coherence.","id":"uc_capital_coherence","inputs":[{"columns":["benunit_support_channel","dependent_children","is_married"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","is_benunit_head","is_parent","person_support_channel","universal_credit_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.uc_capital_coherence@1","mass":"conserve","outputs":[{"column":"uc_reported_capital","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"frs_benunit_capital","dtype":"float64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_uc","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"uc_capital_coherence","stage_contract_sha256":"059f27ee687ee15385b246d43068b17aeecbe3645ccc41fd52fcad06a006a081","time_period":"2024"},"population":"uc_capital_coherence.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage uc_deduction_attributes.","id":"uc_deduction_attributes","inputs":[{"columns":["frs_benunit_capital","would_claim_uc"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.uc_deduction_attributes@1","mass":"conserve","outputs":[{"column":"uc_deduction_random_draw","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"uc_deduction_type_random_draw","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"uc_latent_deduction_rate","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"uc_deduction_combination","dtype":"string","entity":"benunit","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"uc_deduction_attributes","stage_contract_sha256":"6bc7e3ec1a5712e23ca1b7d2956e8b17f2526b94431ba3e5a9294b04658e4fe0","time_period":"2024"},"population":"uc_capital_coherence.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"uc_capital_coherence.boundary","citation":"","description":"Run structural UK stage cgt_support_split.","id":"cgt_support_split","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.cgt_support_split@1","mass":"conserve","outputs":[],"params":{"expand_cells":[["household","household_is_cgt_support_copy","bool"],["household","cgt_support_copies","int64"],["household","cgt_support_copy_index","int64"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"cgt_support_split","stage_contract_sha256":"556e2db7907ad62920149da9104150997031e3cfddbdb4610075369d77147499","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by cgt_support_split.","id":"cgt_support_split.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"household_is_cgt_support_copy","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"cgt_support_copies","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"cgt_support_copy_index","dtype":"int64","entity":"household","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["household.household_is_cgt_support_copy","household.cgt_support_copies","household.cgt_support_copy_index"]},"population":"cgt_support_split","sources":[],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"cgt_support_split","citation":"","description":"Run structural UK stage cgt_incidence_clone.","id":"cgt_incidence_clone","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.cgt_incidence_clone@1","mass":"conserve","outputs":[],"params":{"expand_cells":[["household","household_is_capital_gains_clone","bool"],["person","capital_gains","float64"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"cgt_incidence_clone","stage_contract_sha256":"ee30278543cc0297a5366d855b7753aa04af5518971594c193c52be36bf8a7b4","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by cgt_incidence_clone.","id":"cgt_incidence_clone.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"household_is_capital_gains_clone","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"capital_gains","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["household.household_is_capital_gains_clone","person.capital_gains"]},"population":"cgt_incidence_clone","sources":[],"structural":"none","weights":null},{"base":"cgt_incidence_clone","citation":"","description":"Ownership boundary before hmrc_cgt_gains_spine rewrites.","id":"hmrc_cgt_gains_spine.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage hmrc_cgt_gains_spine.","id":"hmrc_cgt_gains_spine","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["cgt_support_copies","corporate_wealth","gross_financial_wealth","household_is_cgt_support_copy","non_residential_property_value","other_residential_property_value","region"],"entity":"household","rows":"all"},{"columns":["age","dividend_income","employment_income","miscellaneous_income","private_pension_income","property_income","savings_interest_income","self_employment_income","state_pension_reported","tax_free_savings_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.hmrc_cgt_gains_spine@1","mass":"conserve","outputs":[{"column":"capital_gains","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"hmrc_cgt_gains_spine","stage_contract_sha256":"49717d6586a4a5d7fc370200c71c0f91d01473158454571c056deb6f5618d562","time_period":"2024"},"population":"hmrc_cgt_gains_spine.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage hmrc_cgt_asset_type_spine.","id":"hmrc_cgt_asset_type_spine","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["corporate_wealth","gross_financial_wealth","other_residential_property_value","region","stocks_and_shares_isa"],"entity":"household","rows":"all"},{"columns":["age","capital_gains","dividend_income","property_income","self_employment_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.hmrc_cgt_asset_type_spine@1","mass":"conserve","outputs":[{"column":"capital_gains_asset_type","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"capital_gains_residential_property","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"capital_gains_badr","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"hmrc_cgt_asset_type_spine","stage_contract_sha256":"5f9a5f2d12e2a7db87c7c0d6f0df6f70875a579e90c39b2b8c48943eac43905e","time_period":"2024"},"population":"hmrc_cgt_gains_spine.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"hmrc_cgt_gains_spine.boundary","citation":"","description":"Run structural UK stage cgt_incidence_anchor.","id":"cgt_incidence_anchor","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["household_is_capital_gains_clone","region"],"entity":"household","rows":"all"},{"columns":["age","capital_gains","capital_gains_badr","dividend_income","employment_income","miscellaneous_income","private_pension_income","property_income","savings_interest_income","self_employment_income","state_pension_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.cgt_incidence_anchor@1","mass":"conserve","outputs":[],"params":{"expand_cells":[],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"cgt_incidence_anchor","stage_contract_sha256":"b79ce806015de2f1e1703fa68bf4ad871c6df54b5b32633c864632ab68919a48","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage salary_sacrifice.","id":"salary_sacrifice","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains","capital_gains_asset_type","capital_gains_residential_property","capital_gains_badr"],"entity":"person","rows":"all"}],"kernel":"uk.stage.salary_sacrifice@1","mass":"conserve","outputs":[{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"salary_sacrifice","stage_contract_sha256":"89b589d19fcb99b265cb40d08cf2b9ff7955bd41b6de0e8c9ff4dc6f35be1eb6","time_period":"2024"},"population":"cgt_incidence_anchor","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage student_loans.","id":"student_loans","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","current_education","employee_pension_contributions","highest_education","student_loan_repayments","student_loans"],"entity":"person","rows":"all"}],"kernel":"uk.stage.student_loans@1","mass":"conserve","outputs":[{"column":"student_loan_plan","dtype":"string","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"student_loans","stage_contract_sha256":"f2936c5e22a0e9b097437e3f3aabaf06c4561d5c25a9b7c05e720a6553f73bbc","time_period":"2024"},"population":"cgt_incidence_anchor","sources":["frs"],"structural":"none","weights":null}],"sources":[{"codec":"csv-tables","description":"Content-bound UK FRS and donor fixture/source bundle.","name":"frs"}]} diff --git a/tools/build_uk_release_input_coverage_manifest.py b/tools/build_uk_release_input_coverage_manifest.py index d8dc1a568..e8fbd8e4d 100644 --- a/tools/build_uk_release_input_coverage_manifest.py +++ b/tools/build_uk_release_input_coverage_manifest.py @@ -825,6 +825,10 @@ def build_manifest( stage_name="was_wealth", candidate_source=candidate_source, ), + "was_lisa": _source_stage_family_coverage_contract( + stage_name="was_lisa", + candidate_source=candidate_source, + ), "nts_bus_travel": _source_stage_family_coverage_contract( stage_name="nts_bus_travel", candidate_source=candidate_source, diff --git a/tools/graph_uk_spine_fixture.py b/tools/graph_uk_spine_fixture.py index d9ba82784..8a97a9d34 100644 --- a/tools/graph_uk_spine_fixture.py +++ b/tools/graph_uk_spine_fixture.py @@ -129,6 +129,7 @@ from microcosm.build.uk_runtime.uc_reporter_redraw import ( UKUCReporterRedrawStageTransform, ) +from microcosm.build.uk_runtime.was_lisa import UKWASLISAStageTransform from microcosm.build.uk_runtime.was_wealth import UKWASWealthStageTransform from microcosm.frame import Frame from microcosm.frame.adapters.policyengine_uk import PolicyEngineUKEngine @@ -150,11 +151,11 @@ _SPI_DONOR_SAMPLE_SIZE = 64 #: The packaged FRS spine roster the fixture exercises (manifest minus the #: certified-pair exclusions); moves whenever a spine stage is added. -UK_FIXTURE_STAGE_COUNT = 34 +UK_FIXTURE_STAGE_COUNT = 35 _QRF_ESTIMATORS = 4 # These are the complete object-string surface observed in the unchanged -# legacy 34-stage output. Graph storage uses pandas StringDtype/python. +# legacy 35-stage output. Graph storage uses pandas StringDtype/python. _NORMALIZED_STRING_COLUMNS: Mapping[str, tuple[str, ...]] = { "person": ( "gender", @@ -1273,6 +1274,10 @@ def _fixture_stages( stage = _replace_operation( stage, "fit_weighted_qrf_chain", n_estimators=_QRF_ESTIMATORS ) + elif stage.stage == "was_lisa": + stage = _replace_operation( + stage, "impute_lifetime_isa_balance", n_estimators=_QRF_ESTIMATORS + ) elif stage.stage == "nts_bus_travel": stage = _replace_operation( stage, "impute_bus_use_band", n_estimators=_QRF_ESTIMATORS @@ -1433,6 +1438,7 @@ def _build_implementations( stages: Mapping[str, SourceStageSpec], raw_dir: Path, was: pd.DataFrame, + was_person: pd.DataFrame, nts_household: pd.DataFrame, nts_individual: pd.DataFrame, nts_trip: pd.DataFrame, @@ -1506,6 +1512,12 @@ def capture_root(frame: Frame) -> Frame: "was_wealth": UKWASWealthStageTransform( stage=stages["was_wealth"], engine=engine, donor=was ), + "was_lisa": UKWASLISAStageTransform( + stage=stages["was_lisa"], + engine=engine, + donor_household=was, + donor_person=was_person, + ), "nts_bus_travel": UKNTSBusTravelStageTransform( stage=stages["nts_bus_travel"], engine=engine, @@ -1602,7 +1614,7 @@ def _run_legacy_plan( stages: Iterable[SourceStageSpec], implementations: Mapping[str, object], ) -> Frame: - """Run the legacy 34-stage StagePlan oracle and return its final frame.""" + """Run the legacy 35-stage StagePlan oracle and return its final frame.""" stages = tuple(stages) committed = load_country_spec("uk") @@ -1672,11 +1684,13 @@ def generate(output: Path) -> None: stage_map = {stage.stage: stage for stage in stages} was = _was_donor() + was_person = _was_person_donor() nts_household, nts_individual, nts_trip, nts_stage, nts_ticket = _nts_donors() lcfs_household, lcfs_person = _lcfs_donors() etb = _etb_donor() spi_donor = _spi_donor() _write_csv(sources / "was.csv", was) + _write_csv(sources / "was_person.csv", was_person) _write_csv(sources / "nts_household.csv", nts_household) _write_csv(sources / "nts_individual.csv", nts_individual) _write_csv(sources / "nts_trip.csv", nts_trip) @@ -1703,6 +1717,7 @@ def generate(output: Path) -> None: stages=stage_map, raw_dir=raw_dir, was=was, + was_person=was_person, nts_household=nts_household, nts_individual=nts_individual, nts_trip=nts_trip, @@ -1761,6 +1776,7 @@ def generate(output: Path) -> None: "inputs": { "frs_raw": "frs_raw", "was": "was.csv", + "was_person": "was_person.csv", "nts_household": "nts_household.csv", "nts_individual": "nts_individual.csv", "nts_trip": "nts_trip.csv", From 09649365f7c4b789a6ceb649fd0241f97892165a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Juaristi?= <127882282+juaristi22@users.noreply.github.com> Date: Tue, 29 Sep 2026 14:08:45 +0100 Subject: [PATCH 03/17] UK was_lisa gates, export cells and support bounds (#1003) uk_stage_was_lisa_support (stage_health, transferred, release_blocking, evidence_absent_blocks) checks the stage's support-clip receipt on lifetime_isa_balance with zero clip allowances: the balance is drawn from the QRF fitted on the credible holders, so no draw can leave their range. The spine scope carries it. uk_support gains was_lisa_support_bounds.json, built by the sibling tools/build_uk_was_lisa_support_bounds.py from both pinned WAS tabs with the stage's own cleaning (credible holders after the declared rule, outward-rounded to one significant figure: 0 to 30,000). The export allow-list (constant and gates.json) gains household.household_lifetime_isa_balance, person.has_lifetime_isa and person.lifetime_isa_balance; the engine has no LISA variable, so they are candidate-only inputs like cash_isa. The data contract's entry map, evidence ids and spine part scope name the new gate, and the three battery digests and the spine and release_cut part digests are re-pinned from the live committed spec (calibration_seam unchanged). Co-Authored-By: Claude Opus 5.5 --- .../microcosm/build/uk/country_package.json | 5 + .../src/microcosm/build/uk/gates.json | 29 ++- .../build/uk/was_lisa_support_bounds.json | 23 +++ .../build/uk_runtime/battery_bindings.py | 1 + .../build/uk_runtime/calibration_run.py | 1 + .../build/uk_runtime/terminal_gates.py | 4 + .../engine_free/shared/test_country_spec.py | 5 + .../tests/engine_free/uk/test_uk_was_lisa.py | 49 ++++++ .../src/microcosm/data/contract.py | 17 +- .../tests/engine_free/shared/test_contract.py | 8 +- tools/build_uk_was_lisa_support_bounds.py | 166 ++++++++++++++++++ 11 files changed, 296 insertions(+), 12 deletions(-) create mode 100644 packages/microcosm-build/src/microcosm/build/uk/was_lisa_support_bounds.json create mode 100644 tools/build_uk_was_lisa_support_bounds.py diff --git a/packages/microcosm-build/src/microcosm/build/uk/country_package.json b/packages/microcosm-build/src/microcosm/build/uk/country_package.json index c82eb8a14..60e08be56 100644 --- a/packages/microcosm-build/src/microcosm/build/uk/country_package.json +++ b/packages/microcosm-build/src/microcosm/build/uk/country_package.json @@ -267,6 +267,11 @@ "kind": "legacy_json", "schema_id": "legacy_json" }, + { + "path": "was_lisa_support_bounds.json", + "kind": "legacy_json", + "schema_id": "legacy_json" + }, { "path": "local_binding_adjudications.json", "kind": "legacy_json", diff --git a/packages/microcosm-build/src/microcosm/build/uk/gates.json b/packages/microcosm-build/src/microcosm/build/uk/gates.json index e56d2de50..0eebdd801 100644 --- a/packages/microcosm-build/src/microcosm/build/uk/gates.json +++ b/packages/microcosm-build/src/microcosm/build/uk/gates.json @@ -141,6 +141,27 @@ }, "notes": "Stage-time support-clip health gate over the WAS wealth receipt; raw FRS mapping stages have no imputation semantics and intentionally have no empty health gate. Allowances pinned at the receipted spine-e baseline (2026-08-26): zero rows clipped on every non-exempt column, so any clipping is a real signal against a clean baseline; a missing allowance fails closed rather than skipping the comparison." }, + { + "id": "uk_stage_was_lisa_support", + "gate": "stage_health", + "phase": "transferred", + "criticality": "release_blocking", + "evidence_absent_blocks": true, + "parameters": { + "stage": "was_lisa", + "check": "support_clip", + "columns": [ + "lifetime_isa_balance" + ], + "max_clipped_low_rows_by_column": { + "lifetime_isa_balance": 0 + }, + "max_clipped_high_rows_by_column": { + "lifetime_isa_balance": 0 + } + }, + "notes": "Stage-time support-clip health gate over the WAS Lifetime ISA receipt (microcosm#1003): the balance is drawn from the QRF fitted on the credible donor holders, so every draw lies inside their realised range and non-holders are zero; the zero allowances make any clip a signal." + }, { "id": "uk_stage_nts_bus_travel_support", "gate": "stage_health", @@ -684,10 +705,11 @@ "etb_vat_support_bounds.json", "etb_services_support_bounds.json", "uc_deduction_support_bounds.json", - "nts_bus_travel_support_bounds.json" + "nts_bus_travel_support_bounds.json", + "was_lisa_support_bounds.json" ] }, - "notes": "Every WAS/LCFS/ETB imputed output covered by support clipping must remain inside committed disclosure-safe donor support bounds. Exact donor ranges are used in-run for clipping; this release gate uses outward-rounded reviewed bounds so unit-record donor minima and maxima are never committed. The nts_bus_travel person outputs (band and annual trips) are bounded by the NTS donor's ranges since microcosm#930." + "notes": "Every WAS/LCFS/ETB imputed output covered by support clipping must remain inside committed disclosure-safe donor support bounds. Exact donor ranges are used in-run for clipping; this release gate uses outward-rounded reviewed bounds so unit-record donor minima and maxima are never committed. The nts_bus_travel person outputs (band and annual trips) are bounded by the NTS donor's ranges since microcosm#930. The was_lisa person balance is bounded by the WAS person donor's credible holders since microcosm#1003." }, { "id": "uk_aggregate_admin", @@ -747,6 +769,7 @@ "household.household_is_cgt_support_copy", "household.household_is_spi_income_band_donor", "household.household_is_spi_synthetic", + "household.household_lifetime_isa_balance", "household.household_local_bus_trips", "household.spi_income_band_donor_lower_bound", "household.intermediate_zone_code", @@ -783,12 +806,14 @@ "person.esa_health_condition_proxy", "person.esa_support_group_proxy", "person.gift_aid", + "person.has_lifetime_isa", "person.highest_education", "person.is_before_universal_credit_qualifying_young_person_terminal_date", "person.is_in_non_advanced_education", "person.is_parent", "person.is_uc_claimant", "person.legacy_jobseeker_proxy", + "person.lifetime_isa_balance", "person.local_bus_single_fare_share", "person.local_bus_trips", "person.local_bus_use_band", diff --git a/packages/microcosm-build/src/microcosm/build/uk/was_lisa_support_bounds.json b/packages/microcosm-build/src/microcosm/build/uk/was_lisa_support_bounds.json new file mode 100644 index 000000000..eed77f9b9 --- /dev/null +++ b/packages/microcosm-build/src/microcosm/build/uk/was_lisa_support_bounds.json @@ -0,0 +1,23 @@ +{ + "version": 1, + "country": "uk", + "policy": "Disclosure-safe outward-rounded WAS Lifetime ISA support bounds for the UK support gate, generated from the WAS round-8 person and household tabs recorded under source by tools/build_uk_was_lisa_support_bounds.py. Values are the donor-realized exact ranges of the credible holders (after the stage's declared credibility rule) and the zero balances of non-holders, rounded outward to one significant figure, so unit-record minima and maxima are never committed.", + "source": { + "ukds_study_number": 7215, + "doi": "10.5255/UKDA-SN-7215-20", + "household_artifact": "was_round_8_hhold_eul_may_2025_230525.tab", + "household_tab_sha256": "18b3eb980c02c99f3d8a3254af859bee31682b2bdc11703877677292b3ce9374", + "person_artifact": "was_round_8_person_eul_may_2025_230525.tab", + "person_tab_sha256": "1ca6fd37d9c677242112e0d7839df8b406eb1611db8322b20771f054e329d71a", + "sdc_treatment": "Exact donor min/max values are rounded outward to one significant figure before commit, the treatment adjudicated for the WAS wealth bounds by juaristi22 on 2026-08-19 (microcosm#714)." + }, + "bounds": { + "lifetime_isa_balance": [ + 0.0, + 30000 + ] + }, + "chronicle": [ + "Support bounds generated from the tabs pinned as source.household_tab_sha256 (18b3eb980c02\u2026) and source.person_tab_sha256 (1ca6fd37d9c6\u2026) with outward SDC rounding (microcosm#1003)." + ] +} diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/battery_bindings.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/battery_bindings.py index 8ba9e8484..874daf82c 100644 --- a/packages/microcosm-build/src/microcosm/build/uk_runtime/battery_bindings.py +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/battery_bindings.py @@ -549,6 +549,7 @@ def _evaluate_support( "etb_services_support_bounds.json", "uc_deduction_support_bounds.json", "nts_bus_travel_support_bounds.json", + "was_lisa_support_bounds.json", } if set(resource_names) - allowed: raise ValueError( diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/calibration_run.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/calibration_run.py index 19d3fa02b..b44ba665e 100644 --- a/packages/microcosm-build/src/microcosm/build/uk_runtime/calibration_run.py +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/calibration_run.py @@ -89,6 +89,7 @@ UK_SPINE_GATE_SCOPE = ( "uk_stage_was_wealth_support", + "uk_stage_was_lisa_support", "uk_stage_nts_bus_travel_support", "uk_stage_nts_bus_travel_facts", "uk_stage_uc_deduction_attributes", diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/terminal_gates.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/terminal_gates.py index 74fe26bfd..2cb3ac46c 100644 --- a/packages/microcosm-build/src/microcosm/build/uk_runtime/terminal_gates.py +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/terminal_gates.py @@ -201,6 +201,8 @@ def __post_init__(self) -> None: "household.household_is_cgt_support_copy", "household.household_is_spi_income_band_donor", "household.household_is_spi_synthetic", + # #1003: the WAS Lifetime ISA stage's household total and person cells. + "household.household_lifetime_isa_balance", # #930: the NTS bus-travel stage's household journey cell. "household.household_local_bus_trips", "household.spi_income_band_donor_lower_bound", @@ -243,12 +245,14 @@ def __post_init__(self) -> None: "person.esa_health_condition_proxy", "person.esa_support_group_proxy", "person.gift_aid", + "person.has_lifetime_isa", "person.highest_education", "person.is_before_universal_credit_qualifying_young_person_terminal_date", "person.is_in_non_advanced_education", "person.is_parent", "person.is_uc_claimant", "person.legacy_jobseeker_proxy", + "person.lifetime_isa_balance", "person.local_bus_single_fare_share", "person.local_bus_trips", "person.local_bus_use_band", diff --git a/packages/microcosm-build/tests/engine_free/shared/test_country_spec.py b/packages/microcosm-build/tests/engine_free/shared/test_country_spec.py index d31331a1c..8119fac95 100644 --- a/packages/microcosm-build/tests/engine_free/shared/test_country_spec.py +++ b/packages/microcosm-build/tests/engine_free/shared/test_country_spec.py @@ -966,6 +966,7 @@ def test_spi_spine_adds_no_country_package_resources(self) -> None: "was_wealth_support_bounds.json", "uc_deduction_support_bounds.json", "nts_bus_travel_support_bounds.json", + "was_lisa_support_bounds.json", "local_binding_adjudications.json", "local_area_support_exclusions.json", "uk_local_target_census.json", @@ -1084,6 +1085,7 @@ def test_uk_package_loads(self) -> None: "was_wealth_support_bounds.json", "uc_deduction_support_bounds.json", "nts_bus_travel_support_bounds.json", + "was_lisa_support_bounds.json", "local_binding_adjudications.json", "local_area_support_exclusions.json", "uk_local_target_census.json", @@ -1365,6 +1367,7 @@ def test_declares_the_full_june_battery(self, manifest) -> None: "uk_ledger_compile_parity_local_incumbent_2025", "uk_target_surface_local_default_2025", "uk_stage_was_wealth_support", + "uk_stage_was_lisa_support", "uk_stage_nts_bus_travel_support", "uk_stage_nts_bus_travel_facts", "uk_stage_uc_deduction_attributes", @@ -1466,6 +1469,7 @@ def test_strict_absent_evidence_entries_are_declared(self, manifest) -> None: flagged = [g.id for g in manifest.gates if g.evidence_absent_blocks] assert flagged == [ "uk_stage_was_wealth_support", + "uk_stage_was_lisa_support", "uk_stage_nts_bus_travel_support", "uk_stage_nts_bus_travel_facts", "uk_stage_uc_deduction_attributes", @@ -1527,6 +1531,7 @@ def test_thresholds_match_the_schema4_manifest(self, manifest) -> None: "etb_services_support_bounds.json", "uc_deduction_support_bounds.json", "nts_bus_travel_support_bounds.json", + "was_lisa_support_bounds.json", ) aggregate = params["uk_aggregate_admin"] assert aggregate["default_rtol"] == 0.15 diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_was_lisa.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_was_lisa.py index 2521b11f9..d8e4d7e11 100644 --- a/packages/microcosm-build/tests/engine_free/uk/test_uk_was_lisa.py +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_was_lisa.py @@ -2,6 +2,8 @@ from __future__ import annotations +import importlib.util +import json from types import SimpleNamespace import numpy as np @@ -20,6 +22,7 @@ UK_WAS_LISA_MASS_CONSERVATION_REASON, UK_WAS_LISA_OUTPUT_COLUMNS, UK_WAS_LISA_STAGE_NAME, + UK_WAS_LISA_SUPPORT_CLIP_COLUMNS, BalanceModelSpec, OwnershipModelSpec, UKWASLISAStageTransform, @@ -33,8 +36,11 @@ recipient_predictors, ) from microcosm.build.uk_runtime.was_wealth import UK_WAS_ENGINE_PREDICTOR_ENTITIES +from test_support.paths import paths_for from tools.graph_uk_spine_fixture import _was_donor, _was_person_donor +_PATHS = paths_for("microcosm-build") + #: The declared operation parameters (the committed manifest carries these). CLEAN = { "household_key": "CASER8", @@ -635,3 +641,46 @@ def test_committed_declaration_carries_the_tested_parameters() -> None: for artifact in was_wealth.artifacts if artifact["role"] == "was_qrf_donor" ) + + +def _bounds_tool(): + path = _PATHS.repository / "tools/build_uk_was_lisa_support_bounds.py" + spec = importlib.util.spec_from_file_location( + "build_uk_was_lisa_support_bounds", path + ) + assert spec is not None and spec.loader is not None + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + +def test_support_bounds_round_the_credible_range_outward() -> None: + payload = _bounds_tool().support_bounds_payload( + _was_person_donor(), + _was_donor(), + columns=_columns(), + household_tab_sha256="a" * 64, + person_tab_sha256="b" * 64, + ) + + # The synthetic credible holders hold GBP 5-24 (the household-6 holder is + # recoded by the age rule), so the one-significant-figure bounds are 0-30. + assert payload["bounds"] == {BALANCE_COLUMN: [0.0, 30]} + assert payload["source"]["person_tab_sha256"] == "b" * 64 + + +def test_committed_support_bounds_match_the_stage_pins() -> None: + resource = ( + _PATHS.package / "src/microcosm/build/uk" / "was_lisa_support_bounds.json" + ) + payload = json.loads(resource.read_text(encoding="utf-8")) + stage = load_country_spec("uk").sources.stage_map()[UK_WAS_LISA_STAGE_NAME] + pins = {artifact["role"]: artifact["sha256"] for artifact in stage.artifacts} + + assert set(payload["bounds"]) == set(UK_WAS_LISA_SUPPORT_CLIP_COLUMNS) + assert payload["source"]["household_tab_sha256"] == pins["was_qrf_donor"] + assert payload["source"]["person_tab_sha256"] == pins["was_person_tab"] + low, high = payload["bounds"][BALANCE_COLUMN] + assert low == 0.0 + # Outward-rounded to one significant figure: no unit-record value. + assert high == float(f"{high:.0e}") diff --git a/packages/microcosm-data/src/microcosm/data/contract.py b/packages/microcosm-data/src/microcosm/data/contract.py index e127f8f8b..9442b1cea 100644 --- a/packages/microcosm-data/src/microcosm/data/contract.py +++ b/packages/microcosm-data/src/microcosm/data/contract.py @@ -416,13 +416,13 @@ def compatibility_claim_declarer_error(declared_by: object) -> str | None: # fingerprint derives from the manifest digest. Editing the spec moves all # three here in the same reviewed change. _UK_GATE_BATTERY_POLICY_SHA256 = ( - "e729814c1f4fbed346d59bf8713bc2cb342537edd8154b0e72bf049df4e168a9" + "7365ded0928aa124ff8fe3e9ca87cc5b55c8f61ad7fc6c910fa5b17b5cd60e29" ) _UK_GATE_BATTERY_GATES_MANIFEST_SHA256 = ( - "dd6afb4c1f95007303413743c702927dae865783da352f37e7c22b139bb7eb8e" + "dcc233997328072dbb94b823c93b4e3db33e7410ed94533530f0a6fe31f0d4c9" ) _UK_GATE_BATTERY_SPEC_FINGERPRINT = ( - "3f7dbdf16de49dfddae3941bbf088df6b9d61f38f10ab09816271b9ffa9aeb5b" + "13ba3e6141315da40c2db07ec6a3be3ec6607be3c47645220b399c02e8e6f626" ) #: Spec entry id -> the legacy gate name whose observable detail checks #: apply unchanged (the battery re-keys the report by entry id; the gate @@ -467,6 +467,7 @@ def compatibility_claim_declarer_error(declared_by: object) -> str | None: "preflight", ), "uk_stage_was_wealth_support": ("stage_health", "transferred"), + "uk_stage_was_lisa_support": ("stage_health", "transferred"), "uk_stage_nts_bus_travel_support": ("stage_health", "transferred"), "uk_stage_nts_bus_travel_facts": ("stage_health", "transferred"), "uk_stage_uc_deduction_attributes": ("stage_health", "transferred"), @@ -566,6 +567,7 @@ def compatibility_claim_declarer_error(declared_by: object) -> str | None: "uk_degenerate_release_surface", "uk_input_mass_parity", "uk_stage_was_wealth_support", + "uk_stage_was_lisa_support", "uk_stage_nts_bus_travel_support", "uk_stage_nts_bus_travel_facts", "uk_stage_uc_deduction_attributes", @@ -791,6 +793,7 @@ def _uk_line_cut_tag_re(release_id: str) -> re.Pattern[str] | None: "uk_stage_spi_support_channel_mass", "uk_stage_student_loans_realization", "uk_stage_uc_deduction_attributes", + "uk_stage_was_lisa_support", "uk_stage_was_wealth_support", } ), @@ -833,10 +836,10 @@ def _uk_line_cut_tag_re(release_id: str) -> re.Pattern[str] | None: _UK_CERTIFICATION_PART_DIGESTS: Mapping[str, Mapping[str, str]] = { "spine": { "gates_manifest_sha256": ( - "93e09a1e38dddc671d47670fdd464fc0983e810cff954a47bb04ffc3dce00227" + "e24f22b411d69ca0da2a884ed530ed3d19c5b8a3f0061866dbf8c88fb053a267" ), "policy_sha256": ( - "e92db077263b96c1e464b148920a6625721653e9ff07da6888fcc464432fe3a3" + "af1750f20eafea8b63d0a816ceeffe95ad6719a18fb5b81bb8023a9cb770cb6a" ), }, "calibration_seam": { @@ -849,10 +852,10 @@ def _uk_line_cut_tag_re(release_id: str) -> re.Pattern[str] | None: }, "release_cut": { "gates_manifest_sha256": ( - "bb2b4174f7abee105e915b378b1e2275e51c43a3a41d2cf608a265bc7f1e2025" + "dbf6099f574995d3134efeb10d900dd106772f6765d5520e999db45871164c7c" ), "policy_sha256": ( - "6227a9b17b87ef5cb248e4ec4a4d38adae1b464903285484eb6c8624e82a62ec" + "264084717c05c80509795a69299fe60f4513e821f443e0c3f2126911c8ce3605" ), }, } diff --git a/packages/microcosm-data/tests/engine_free/shared/test_contract.py b/packages/microcosm-data/tests/engine_free/shared/test_contract.py index 7ac455473..583ba86d1 100644 --- a/packages/microcosm-data/tests/engine_free/shared/test_contract.py +++ b/packages/microcosm-data/tests/engine_free/shared/test_contract.py @@ -117,13 +117,13 @@ def _trusted_terminal_gate_signing_key(monkeypatch) -> None: UK_GATE_BATTERY_PRODUCER = "microcosm.build.gate_battery" UK_GATE_BATTERY_SIGNING_KEY_ENV = "MICROCOSM_UK_TERMINAL_GATE_SIGNING_KEY" UK_GATE_BATTERY_POLICY_SHA256 = ( - "e729814c1f4fbed346d59bf8713bc2cb342537edd8154b0e72bf049df4e168a9" + "7365ded0928aa124ff8fe3e9ca87cc5b55c8f61ad7fc6c910fa5b17b5cd60e29" ) UK_GATE_BATTERY_GATES_MANIFEST_SHA256 = ( - "dd6afb4c1f95007303413743c702927dae865783da352f37e7c22b139bb7eb8e" + "dcc233997328072dbb94b823c93b4e3db33e7410ed94533530f0a6fe31f0d4c9" ) UK_GATE_BATTERY_SPEC_FINGERPRINT = ( - "3f7dbdf16de49dfddae3941bbf088df6b9d61f38f10ab09816271b9ffa9aeb5b" + "13ba3e6141315da40c2db07ec6a3be3ec6607be3c47645220b399c02e8e6f626" ) UK_GATE_BATTERY_DEGENERATE_EVIDENCE_SHA256 = ( "6f0243bcda09dad26945376230c44ec3cf55d4e417c3a25e29bae8c59bc1a69d" @@ -150,6 +150,7 @@ def _trusted_terminal_gate_signing_key(monkeypatch) -> None: None, ), "uk_stage_was_wealth_support": ("stage_health", "transferred", None), + "uk_stage_was_lisa_support": ("stage_health", "transferred", None), "uk_stage_uc_deduction_attributes": ( "stage_health", "transferred", @@ -1239,6 +1240,7 @@ def _gate_battery_payload( ] stage_health_stages = { "uk_stage_was_wealth_support": "was_wealth", + "uk_stage_was_lisa_support": "was_lisa", "uk_stage_uc_deduction_attributes": "uc_deduction_attributes", "uk_stage_lcfs_consumption_support": "lcfs_consumption", "uk_stage_lcfs_consumption_energy_rake": "lcfs_consumption", diff --git a/tools/build_uk_was_lisa_support_bounds.py b/tools/build_uk_was_lisa_support_bounds.py new file mode 100644 index 000000000..5725e607c --- /dev/null +++ b/tools/build_uk_was_lisa_support_bounds.py @@ -0,0 +1,166 @@ +"""Build disclosure-safe WAS Lifetime ISA support bounds from the pinned WAS tabs. + +The ``was_lisa`` stage clips its drawn balances to the donor's exact realised +range in-run; the terminal ``uk_support`` gate checks the exported column +against these committed bounds instead, rounded outward to one significant +figure so no committed number is a unit-record value (the rounding of +``tools/build_uk_was_wealth_support_bounds.py``). The donor is cleaned by the +stage's own function under the packaged declaration, so the bounds describe +exactly the credible holders the balance model is fitted on. +""" + +from __future__ import annotations + +import argparse +import json +import math +from collections.abc import Mapping +from pathlib import Path +from typing import Any + +import pandas as pd + +from microcosm.build.country_spec import load_country_spec +from microcosm.build.uk_runtime.frs_spine import read_pinned_tab +from microcosm.build.uk_runtime.was_lisa import ( + CLEAN_WAS_LISA_DONOR_KIND, + UK_WAS_HOUSEHOLD_TAB_ROLE, + UK_WAS_LISA_STAGE_NAME, + UK_WAS_LISA_SUPPORT_CLIP_COLUMNS, + UK_WAS_PERSON_TAB_ROLE, + WASLISAColumns, + clean_was_lisa_donor, + was_lisa_support_ranges, +) + +REPO_ROOT = Path(__file__).resolve().parents[1] +DEFAULT_OUTPUT = ( + REPO_ROOT + / "packages/microcosm-build/src/microcosm/build/uk/was_lisa_support_bounds.json" +) + + +def _stage_declaration() -> tuple[Mapping[str, Mapping[str, Any]], WASLISAColumns]: + spec = load_country_spec("uk") + if spec.sources is None: + raise ValueError("the UK spec declares no source stages.") + stage = spec.sources.stage_map()[UK_WAS_LISA_STAGE_NAME] + artifacts = {str(artifact["role"]): artifact for artifact in stage.artifacts} + parameters = next( + dict(operation.parameters) + for operation in stage.operations + if operation.kind == CLEAN_WAS_LISA_DONOR_KIND + ) + return artifacts, WASLISAColumns.from_parameters(parameters) + + +def support_bounds_payload( + person_raw: pd.DataFrame, + household_raw: pd.DataFrame, + *, + columns: WASLISAColumns, + household_tab_sha256: str, + person_tab_sha256: str, +) -> dict[str, object]: + """The committed bounds payload for already-read WAS tabs.""" + + donor = clean_was_lisa_donor(person_raw, household_raw, columns=columns) + exact = was_lisa_support_ranges(donor.person) + return { + "version": 1, + "country": "uk", + "policy": ( + "Disclosure-safe outward-rounded WAS Lifetime ISA support bounds for " + "the UK support gate, generated from the WAS round-8 person and " + "household tabs recorded under source by " + "tools/build_uk_was_lisa_support_bounds.py. Values are the " + "donor-realized exact ranges of the credible holders (after the " + "stage's declared credibility rule) and the zero balances of " + "non-holders, rounded outward to one significant figure, so " + "unit-record minima and maxima are never committed." + ), + "source": { + "ukds_study_number": 7215, + "doi": "10.5255/UKDA-SN-7215-20", + "household_artifact": "was_round_8_hhold_eul_may_2025_230525.tab", + "household_tab_sha256": household_tab_sha256, + "person_artifact": "was_round_8_person_eul_may_2025_230525.tab", + "person_tab_sha256": person_tab_sha256, + "sdc_treatment": ( + "Exact donor min/max values are rounded outward to one " + "significant figure before commit, the treatment adjudicated " + "for the WAS wealth bounds by juaristi22 on 2026-08-19 " + "(microcosm#714)." + ), + }, + "bounds": { + column: list(_outward_round(bounds)) + for column, bounds in exact.items() + if column in UK_WAS_LISA_SUPPORT_CLIP_COLUMNS + }, + "chronicle": [ + "Support bounds generated from the tabs pinned as " + f"source.household_tab_sha256 ({household_tab_sha256[:12]}…) and " + f"source.person_tab_sha256 ({person_tab_sha256[:12]}…) with outward " + "SDC rounding (microcosm#1003)." + ], + } + + +def build_support_bounds(was_tab: Path, was_person_tab: Path) -> dict[str, object]: + """Read both pinned tabs (size and sha256 checked) and build the payload.""" + + artifacts, columns = _stage_declaration() + household_artifact = artifacts[UK_WAS_HOUSEHOLD_TAB_ROLE] + person_artifact = artifacts[UK_WAS_PERSON_TAB_ROLE] + household = read_pinned_tab(was_tab, household_artifact) + person = read_pinned_tab( + was_person_tab, person_artifact, columns=columns.person_raw_columns() + ) + return support_bounds_payload( + person, + household, + columns=columns, + household_tab_sha256=str(household_artifact["sha256"]), + person_tab_sha256=str(person_artifact["sha256"]), + ) + + +def main(argv: list[str] | None = None) -> int: + parser = argparse.ArgumentParser() + parser.add_argument("--was-tab", type=Path, required=True) + parser.add_argument("--was-person-tab", type=Path, required=True) + parser.add_argument("--output-json", type=Path, default=DEFAULT_OUTPUT) + parser.add_argument("--check", action="store_true") + args = parser.parse_args(argv) + payload = build_support_bounds(args.was_tab, args.was_person_tab) + rendered = json.dumps(payload, indent=2, sort_keys=False) + "\n" + if args.check: + if args.output_json.read_text(encoding="utf-8") != rendered: + raise SystemExit(f"{args.output_json} is stale.") + return 0 + args.output_json.write_text(rendered, encoding="utf-8") + return 0 + + +def _outward_round(bounds: tuple[float, float]) -> tuple[float, float]: + lo, hi = bounds + return (_round_down(lo), _round_up(hi)) + + +def _round_down(value: float) -> float: + if value == 0: + return 0.0 + magnitude = 10 ** math.floor(math.log10(abs(value))) + return math.floor(value / magnitude) * magnitude + + +def _round_up(value: float) -> float: + if value == 0: + return 0.0 + magnitude = 10 ** math.floor(math.log10(abs(value))) + return math.ceil(value / magnitude) * magnitude + + +if __name__ == "__main__": + raise SystemExit(main()) From 9627c6c040071476ee89bc8bf3e9e57817b21e79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Juaristi?= <127882282+juaristi22@users.noreply.github.com> Date: Tue, 29 Sep 2026 15:03:15 +0100 Subject: [PATCH 04/17] UK was_lisa receipts, evidence, topic doc and signed differences (#1003) The licensed builds behind the stage: the donor audit, the held-out ownership-model comparison, realised holdings against the donor, the coherence cap, support and release-side checks, the twin against main and a determinism rebuild. Part F records the financial-predictor finding and the options it opens (arm B built and measured, not committed). Aggregate-only CSVs and the scripts that produced them go to docs/evidence/uk-lisa-1003; donor cells under 10 are withheld and income tertiles 1-2 are merged. The topic doc is docs/uk-lisa-1003.md. Two net_new_column entries sign the three new cells against the incumbent reference. Co-Authored-By: Claude Opus 5.5 --- changelog.d/1003-uk-was-lisa-stage.added.md | 20 + docs/evidence/uk-lisa-1003/README.md | 78 ++++ .../uk-lisa-1003/balance_quantiles.csv | 5 + docs/evidence/uk-lisa-1003/checks.csv | 15 + docs/evidence/uk-lisa-1003/donor_audit.csv | 23 + .../uk-lisa-1003/financial_draws_by_age.csv | 21 + .../ownership_model_comparison.csv | 12 + .../uk-lisa-1003/ownership_realised.csv | 17 + .../uk-lisa-1003/scripts/determinism_1003.sh | 29 ++ .../scripts/extract_lisa_1003_evidence.py | 427 ++++++++++++++++++ .../evidence/uk-lisa-1003/scripts/fw_probe.py | 170 +++++++ .../uk-lisa-1003/scripts/lisa_receipt.py | 250 ++++++++++ .../uk-lisa-1003/scripts/model_comparison.py | 255 +++++++++++ .../uk-lisa-1003/scripts/twin_diff_1003.sh | 50 ++ docs/uk-lisa-1003.md | 214 +++++++++ experiments/1003-uk-lisa-receipts.md | 364 +++++++++++++++ .../uk/spine_swap_signed_differences.json | 52 +++ 17 files changed, 2002 insertions(+) create mode 100644 changelog.d/1003-uk-was-lisa-stage.added.md create mode 100644 docs/evidence/uk-lisa-1003/README.md create mode 100644 docs/evidence/uk-lisa-1003/balance_quantiles.csv create mode 100644 docs/evidence/uk-lisa-1003/checks.csv create mode 100644 docs/evidence/uk-lisa-1003/donor_audit.csv create mode 100644 docs/evidence/uk-lisa-1003/financial_draws_by_age.csv create mode 100644 docs/evidence/uk-lisa-1003/ownership_model_comparison.csv create mode 100644 docs/evidence/uk-lisa-1003/ownership_realised.csv create mode 100755 docs/evidence/uk-lisa-1003/scripts/determinism_1003.sh create mode 100644 docs/evidence/uk-lisa-1003/scripts/extract_lisa_1003_evidence.py create mode 100644 docs/evidence/uk-lisa-1003/scripts/fw_probe.py create mode 100644 docs/evidence/uk-lisa-1003/scripts/lisa_receipt.py create mode 100644 docs/evidence/uk-lisa-1003/scripts/model_comparison.py create mode 100755 docs/evidence/uk-lisa-1003/scripts/twin_diff_1003.sh create mode 100644 docs/uk-lisa-1003.md create mode 100644 experiments/1003-uk-lisa-receipts.md diff --git a/changelog.d/1003-uk-was-lisa-stage.added.md b/changelog.d/1003-uk-was-lisa-stage.added.md new file mode 100644 index 000000000..168a3fe65 --- /dev/null +++ b/changelog.d/1003-uk-was-lisa-stage.added.md @@ -0,0 +1,20 @@ +A person-grain `was_lisa` stage joins the UK spine right after `was_wealth` (microcosm#1003; María's rulings of 2026-09-23 and 2026-09-29). It gives every adult a Lifetime ISA holding, imputed from the Wealth and Assets Survey round-8 person tab (UKDS SN 7215, End User Licence), and exports three new cells: `person.has_lifetime_isa`, `person.lifetime_isa_balance` and `household.household_lifetime_isa_balance`. + +The donor. The person tab is pinned by size and sha256 beside the `was_wealth` household tab and read selectively (`read_pinned_tab(..., columns=)`). `clean_was_lisa_donor` joins each person to its household on `CASER8` and refuses the tab unless the released values `DVFLISAvR8` sum to the household's `DVFLISAVR8_aggr`. A missing or negative value is refused, never read as zero. The response class is kept for the receipt and never used as a predictor: observed, banded, ONS-imputed or rule-impossible. A declared credibility rule recodes holders in age bands from 45 up to non-holders (LISAs open only to adults under 40 since April 2017). Holders above £40,000 stay holders but leave the balance fit. + +The model. Ownership is a weighted ridge logistic with an unpenalised intercept (`impute_lifetime_isa_ownership`). Its predictors are the age group, log earnings, household net income, gross financial wealth, cash ISA, stocks-and-shares ISA and savings, private renting, sex and the number of children. An adult holds when a person-keyed uniform falls below their probability. The balance is the regime-gated QRF fitted on the credible holders and drawn at a second person-keyed quantile (`impute_lifetime_isa_balance`), so it is positive exactly when the person holds. + +Coherence. A household total above its `gross_financial_wealth` draw is scaled down pro rata (`cap_lifetime_isa_to_financial_wealth`, receipted), because WAS counts LISAs inside gross financial wealth. The household cell is the sum of its persons (`aggregate_person_to_household`). No `was_wealth` column is rewritten. Balances are 2020-22 pounds from a Great Britain donor, not uprated. No contribution or bonus column is created. + +Gates. `uk_stage_was_lisa_support` (`stage_health`, support clip, release-blocking) joins the spine gate scope. `uk_support` gains `was_lisa_support_bounds.json`, generated with `--check` by `tools/build_uk_was_lisa_support_bounds.py`. + +Surfaces that move in lockstep: + +- the sources manifest and its projection; +- five schema branches and the operation-kind allow-list; +- the graph roster, kernel registry and spine tool (`--was-person-tab`); +- the H2 fixture (35 stages, a synthetic `was_person.csv`) and the coverage manifest; +- the export allow-lists, the country package and the gate-policy digests; +- two net-new-column signed differences. + +Receipts are in `experiments/1003-uk-lisa-receipts.md`, aggregates in `docs/evidence/uk-lisa-1003/`, and the topic doc is `docs/uk-lisa-1003.md`. diff --git a/docs/evidence/uk-lisa-1003/README.md b/docs/evidence/uk-lisa-1003/README.md new file mode 100644 index 000000000..b2e2c92b2 --- /dev/null +++ b/docs/evidence/uk-lisa-1003/README.md @@ -0,0 +1,78 @@ +# Evidence for the Lifetime ISA stage (microcosm#1003) + +These are aggregate-only extracts of the licensed builds behind the `was_lisa` spine stage. +[`experiments/1003-uk-lisa-receipts.md`](../../../experiments/1003-uk-lisa-receipts.md) is the +receipt that reads them, and [`docs/uk-lisa-1003.md`](../../uk-lisa-1003.md) is the topic doc. + +The licensed inputs and outputs live outside the tree under `data/ukds/acceptance/1003-lisa/`: + +- the WAS round-8 household and person tabs; +- the spine H5 files and their build sidecars; +- the full receipts, which include per-record detail. + +## The builds + +All four were built on the #930 lane's SPI-first spine recipe with `--was-person-tab`, seed 42 and +the same pinned inputs: + +- `spine-ctl`: main `5187fce25`. +- `spine-lisa`: branch head `360e7846c`. +- `spine-lisa-2`: a rebuild of `spine-lisa`, for determinism. +- `spine-lisa-b`: the head without the four financial predictors. This is measurement only and was + never committed. + +Every tree carries the measurement-only PLAN_5 student-loan realisation relaxation (1.0 to 2.0) +while #1049 is open. It is never committed. + +## Files + +- `donor_audit.csv`: the donor audit of receipt Part A. + - The person-to-household pin check, the non-dependent adult population and the released and + credible holders. + - The response classes and the credibility rule's counts and weighted shares. +- `ownership_model_comparison.csv`: receipt Part B. + - Held-out ownership shares by age, tenure and income for the stage logistic, the house regime + gate, the gate tuned for rare events and the age-group rates. + - Each model's held-out weighted log loss. The folds are five, by household. +- `ownership_realised.csv`: receipt Part C. + - Weighted ownership shares of adults on the donor, the candidate spine and arm B, from the + stage evidence, plus the model's expected share. + - Co-holding within households. +- `balance_quantiles.csv`: weighted owner balance quantiles and means for four populations: + - the donor's credible holders; + - the held-out forest draws; + - the spine; + - arm B. +- `financial_draws_by_age.csv`: receipt Part F, by age group. + - The spine's WAS financial draws against the donor's, overall and by support channel. + - Weighted medians of gross financial wealth, and weighted means of log(1 + x) for the + financial and earnings predictors. + - The private-renting share. +- `checks.csv`: receipt Parts D and E. + - The coherence cap, the support clip and the release-side column checks on the written H5. + - The spine gate counts and the twin and determinism verdicts. + +## Scripts + +`scripts/` holds the measurement scripts, formatted but otherwise as run. Rerunning them from the +committed copies reproduces the lane's receipts byte for byte: + +- `lisa_receipt.py` reads a build's `was_lisa` stage evidence, recomputes the realised figures + from its H5 and runs the release-side checks. +- `model_comparison.py` is the five-fold held-out comparison on the donor. +- `fw_probe.py` compares the stage-time spine's financial draws with the donor's. +- `twin_diff_1003.sh` runs the twin payload compare, the classification and the adjudication. +- `determinism_1003.sh` runs the rebuild and its payload compare. +- `extract_lisa_1003_evidence.py` writes the CSVs here from the lane's receipts. + +## Redaction + +- Donor counts under 10 are withheld, and so is any count that would reveal one by subtraction: + - holders above the £40,000 ceiling; + - the credible holders in the balance fit; + - the banded and ownership-imputed classes apart. +- The donor's lowest household-income tertile has fewer than 10 holders, so income is published + as tertiles 1–2 against tertile 3. +- Balance quantiles and means are rounded to two significant figures, and weighted medians of + financial wealth to three. +- No single respondent's value is written, neither a donor maximum nor the spine's largest draw. diff --git a/docs/evidence/uk-lisa-1003/balance_quantiles.csv b/docs/evidence/uk-lisa-1003/balance_quantiles.csv new file mode 100644 index 000000000..be8197b48 --- /dev/null +++ b/docs/evidence/uk-lisa-1003/balance_quantiles.csv @@ -0,0 +1,5 @@ +owners,p10_gbp,p25_gbp,p50_gbp,p75_gbp,p90_gbp,weighted_mean_gbp +donor credible holders,500,1500,6000,10000,10000,6100 +"donor credible holders, held-out draws (5-fold)",500,950,5000,8800,15000,5700 +spine owners (stage evidence),1000,2400,6500,10000,15000,6700 +"spine owners, arm B (stage evidence)",500,1400,5000,9000,10000,5600 diff --git a/docs/evidence/uk-lisa-1003/checks.csv b/docs/evidence/uk-lisa-1003/checks.csv new file mode 100644 index 000000000..9d6f7cca4 --- /dev/null +++ b/docs/evidence/uk-lisa-1003/checks.csv @@ -0,0 +1,15 @@ +check,spine,spine_arm_b +cap: households over gross financial wealth,<10,76 +cap: owners cleared,0,<10 +cap: pct of weighted LISA mass removed,0.515,12.702 +support clip: rows clipped low / high,0 / 0,0 / 0 +H5: no household total above gross financial wealth,True,True +H5: household total equals the sum of its persons,True,True +H5: holds exactly where the balance is positive,True,True +H5: support gate on uk/was_lisa_support_bounds.json,True,True +H5: nonnegative,True,True +H5: on the export allow-list,True,True +H5: no degenerate cell,True,True +spine gates passed (control: 26 of 26),27 of 27,27 of 27 +"twin against main: only the three cells differ, mass log gains the conserved was_lisa record",True, +"determinism: second build payload-identical, equal mass log and stage evidence",True, diff --git a/docs/evidence/uk-lisa-1003/donor_audit.csv b/docs/evidence/uk-lisa-1003/donor_audit.csv new file mode 100644 index 000000000..ab27326ab --- /dev/null +++ b/docs/evidence/uk-lisa-1003/donor_audit.csv @@ -0,0 +1,23 @@ +item,value +persons_read,32271 +households,15128 +households_with_person_values_summing_to_aggregate,15128 +largest_person_to_household_difference_gbp,0.0 +dependent_children_excluded,4996 +dependent_children_with_a_value,0 +donor_adults,27275 +donor_adults_weighted_millions,50.2 +released_flag_value_disagreements,0 +holders_released,141 +weighted_adult_ownership_pct_released,0.930 +observed_non_holders,26888 +ons_imputed_non_holders,246 +holders_exact_value,107 +holders_banded_or_ons_imputed,13 +holders_recoded_for_age,21 +recoded_pct_of_weighted_released_holders,4.290 +recoded_pct_of_weighted_lisa_mass,26.155 +holders_above_balance_ceiling,<10 +balance_ceiling_gbp,40000 +holders_after_rule,120 +weighted_adult_ownership_pct_after_rule,0.890 diff --git a/docs/evidence/uk-lisa-1003/financial_draws_by_age.csv b/docs/evidence/uk-lisa-1003/financial_draws_by_age.csv new file mode 100644 index 000000000..452521fa6 --- /dev/null +++ b/docs/evidence/uk-lisa-1003/financial_draws_by_age.csv @@ -0,0 +1,21 @@ +population,age_group,weighted_adult_share_pct,gross_financial_wealth_weighted_median_gbp,gross_financial_wealth_weighted_mean_log1p,savings_weighted_mean_log1p,cash_isa_weighted_mean_log1p,stocks_and_shares_isa_weighted_mean_log1p,employment_income_weighted_mean_log1p,private_renter_share_pct +donor,18-24,9.3,12200,9.21,5.72,2.5,1.11,5.59,19.0 +donor,25-34,17.3,8820,8.75,5.02,2.34,0.92,7.76,26.0 +donor,35-44,16.6,12000,9.13,5.13,2.71,1.08,7.83,21.0 +donor,45-54,17.1,15000,9.25,5.53,2.61,1.32,7.52,17.7 +donor,55+,39.7,31800,9.94,5.79,3.57,1.85,2.7,8.3 +spine,18-24,8.3,48800,10.37,6.75,3.77,2.18,6.02,30.3 +spine,25-34,15.0,26300,9.87,5.93,3.28,1.71,8.16,35.1 +spine,35-44,16.9,30200,10.1,5.99,3.13,1.87,8.19,23.6 +spine,45-54,14.9,47000,10.43,6.43,3.59,2.41,7.89,15.4 +spine,55+,44.8,70300,10.69,6.6,4.22,2.57,3.17,7.0 +spine frs-channel rows,18-24,9.9,46100,10.3,6.55,3.61,2.03,4.63,32.0 +spine frs-channel rows,25-34,17.1,27800,9.95,6.03,3.38,1.77,7.58,36.2 +spine frs-channel rows,35-44,16.9,32000,10.16,6.16,3.15,1.93,7.75,23.4 +spine frs-channel rows,45-54,15.5,50200,10.42,6.48,3.58,2.41,7.35,15.7 +spine frs-channel rows,55+,40.7,63800,10.51,6.39,3.93,2.47,2.73,6.9 +spine spi-channel rows,18-24,6.6,52300,10.47,7.07,4.0,2.4,8.18,27.7 +spine spi-channel rows,25-34,12.9,23500,9.76,5.79,3.14,1.62,8.96,33.5 +spine spi-channel rows,35-44,16.9,28300,10.04,5.82,3.1,1.81,8.64,23.8 +spine spi-channel rows,45-54,14.4,41600,10.43,6.39,3.6,2.4,8.49,15.1 +spine spi-channel rows,55+,49.2,75400,10.85,6.77,4.47,2.64,3.54,7.0 diff --git a/docs/evidence/uk-lisa-1003/ownership_model_comparison.csv b/docs/evidence/uk-lisa-1003/ownership_model_comparison.csv new file mode 100644 index 000000000..6791acb1d --- /dev/null +++ b/docs/evidence/uk-lisa-1003/ownership_model_comparison.csv @@ -0,0 +1,12 @@ +group,donor_pct,stage_logistic_pct,house_gate_boosting_defaults_pct,boosting_tuned_rare_events_pct,age_group_rates_pct +all adults,0.890,0.873,0.622,0.711,0.884 +18-24,2.092,2.032,1.251,1.491,2.092 +25-34,2.388,2.328,1.733,1.881,2.357 +35-44,1.700,1.665,0.920,1.434,1.693 +45-54,0.000,0.006,0.094,0.017,0.000 +55+,0.000,0.009,0.093,0.016,0.000 +private renters,2.736,2.691,1.687,1.843,1.263 +other tenures,0.537,0.525,0.418,0.495,0.811 +household net income tertiles 1-2,0.446,0.528,0.360,0.408,0.804 +household net income tertile 3,1.776,1.561,1.144,1.317,1.044 +held-out weighted log loss x1000,,39.41,52.39,39.92,44.00 diff --git a/docs/evidence/uk-lisa-1003/ownership_realised.csv b/docs/evidence/uk-lisa-1003/ownership_realised.csv new file mode 100644 index 000000000..b3c368c8a --- /dev/null +++ b/docs/evidence/uk-lisa-1003/ownership_realised.csv @@ -0,0 +1,17 @@ +group,donor_pct,spine_pct,spine_arm_b_pct +all adults,0.890,1.251,1.062 +model expected share,,1.357,1.087 +18-24,2.092,4.141,2.912 +25-34,2.388,3.017,3.002 +35-44,1.700,2.613,2.153 +45-54,0.000,0.020,0.020 +55+,0.000,0.020,0.006 +female,0.723,1.070,0.911 +male,1.070,1.442,1.223 +private renters,2.736,4.012,3.534 +other tenures,0.537,0.677,0.549 +household net income tertiles 1-2,0.446,0.871,0.707 +household net income tertile 3,1.776,2.010,1.773 +FRS-channel rows,,1.382,1.122 +SPI-channel rows,,1.114,1.000 +co-holding: weighted share of holder households with 2+ holders,24.192,3.902,2.282 diff --git a/docs/evidence/uk-lisa-1003/scripts/determinism_1003.sh b/docs/evidence/uk-lisa-1003/scripts/determinism_1003.sh new file mode 100755 index 000000000..ef65f7f1b --- /dev/null +++ b/docs/evidence/uk-lisa-1003/scripts/determinism_1003.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +# microcosm#1003 determinism receipt: a second candidate build from the same tree and inputs, +# payload-compared with spine-lisa (every store key, the root mass log, the was_lisa stage evidence). +set -uo pipefail +A=/Users/mariajuaristi/Desktop/PolicyEngine/data/ukds/acceptance/1003-lisa +U=/Users/mariajuaristi/Desktop/PolicyEngine/data/ukds +CAND=/Users/mariajuaristi/Desktop/PolicyEngine/repos/populace-1003-shard +TREE=/Users/mariajuaristi/Desktop/PolicyEngine/repos/populace-1003 +OUT=$A/diff-spine-lisa-vs-spine-lisa-2; mkdir -p "$OUT" +echo "$(date +%H:%M:%S) shard head $(git -C $CAND rev-parse HEAD); dirty: $(git -C $CAND status --short | tr '\n' ' ')" +bash $A/scripts/build_1003.sh $CAND $A/spine-lisa-2 spine-lisa-2 --was-person-tab $U/was_2006_22/was_round_8_person_eul_may_2025_230525.tab > $A/logs/spine-lisa-2.build.log 2>&1; echo "rebuild exit $?" +cd "$TREE" +.venv/bin/python tools/compare_uk_h5_payload.py "$A/spine-lisa/spine-lisa.h5" "$A/spine-lisa-2/spine-lisa-2.h5" --json-out "$OUT/payload_diff.json" > "$OUT/compare.log" 2>&1; echo "compare exit $?" +.venv/bin/python -W ignore - "$A" "$OUT" <<'PY' +import sys, json, pandas as pd +A, OUT = sys.argv[1], sys.argv[2] +one = pd.HDFStore(f"{A}/spine-lisa/spine-lisa.h5", "r"); two = pd.HDFStore(f"{A}/spine-lisa-2/spine-lisa-2.h5", "r") +report = {"store_keys_equal": list(one.keys()) == list(two.keys()), "keys": {}} +for key in one.keys(): + report["keys"][key] = bool(one[key].equals(two[key])) +report["mass_log_equal"] = one._handle.root._v_attrs.populace_mass_log_json == two._handle.root._v_attrs.populace_mass_log_json +one.close(); two.close() +e1 = json.load(open(f"{A}/spine-lisa/spine-lisa.build.json"))["stage_evidence"]["was_lisa"] +e2 = json.load(open(f"{A}/spine-lisa-2/spine-lisa-2.build.json"))["stage_evidence"]["was_lisa"] +report["was_lisa_evidence_equal"] = e1 == e2 +report["verdict"] = bool(report["store_keys_equal"] and all(report["keys"].values()) and report["mass_log_equal"] and report["was_lisa_evidence_equal"]) +json.dump(report, open(f"{OUT}/determinism.json", "w"), indent=2); print(json.dumps(report, indent=1)) +PY +echo "determinism exit $?" diff --git a/docs/evidence/uk-lisa-1003/scripts/extract_lisa_1003_evidence.py b/docs/evidence/uk-lisa-1003/scripts/extract_lisa_1003_evidence.py new file mode 100644 index 000000000..9743e0eec --- /dev/null +++ b/docs/evidence/uk-lisa-1003/scripts/extract_lisa_1003_evidence.py @@ -0,0 +1,427 @@ +"""Aggregate-only evidence for microcosm#1003 (docs/evidence/uk-lisa-1003). + +Reads the lane's local receipts (written by the sibling measurement scripts on the +licensed builds under data/ukds/acceptance/1003-lisa/) and writes the committed +CSVs. Disclosure control: donor counts under 10 are withheld, and so is any count +that would reveal one by subtraction (the credible holders in the balance fit, the +banded and ownership-imputed classes apart); the donor's lowest household-income +tertile holds fewer than 10 holders, so income is published as tertiles 1-2 +against tertile 3; balance quantiles and means are rounded to two significant +figures; no single respondent's value (a donor maximum, the spine's maximum draw) +is written. + + python docs/evidence/uk-lisa-1003/scripts/extract_lisa_1003_evidence.py \ + --lane-dir data/ukds/acceptance/1003-lisa \ + --out docs/evidence/uk-lisa-1003 +""" + +from __future__ import annotations + +import argparse +import csv +import json +from pathlib import Path +from typing import Any + +AGE_GROUPS = ("18-24", "25-34", "35-44", "45-54", "55+") +MODELS = ( + ("stage logistic", "stage_logistic"), + ("house gate (boosting, defaults)", "house_gate_boosting_defaults"), + ("boosting tuned for rare events", "boosting_tuned_rare_events"), + ("age-group rates", "age_group_rates"), +) +QUANTILES = ("p10", "p25", "p50", "p75", "p90") + + +def pct(value: float | None) -> str: + return "" if value is None else f"{value * 100:.3f}" + + +def sig2(value: float) -> int: + return int(float(f"{value:.2g}")) + + +def count(value: int) -> int | str: + return "<10" if 0 < value < 10 else value + + +def write(path: Path, header: list[str], rows: list[list[Any]]) -> None: + with path.open("w", newline="", encoding="utf-8") as handle: + writer = csv.writer(handle, lineterminator="\n") + writer.writerow(header) + writer.writerows(rows) + + +def donor_audit(evidence: dict[str, Any]) -> list[list[Any]]: + donor = evidence["donor"] + classes = donor["response_classes"] + rule = donor["credibility_rule"] + adult_weight = sum(entry["weight"] for entry in classes.values()) + banded_or_imputed = ( + classes["holder_banded_value"]["persons"] + + classes["holder_imputed_value"]["persons"] + + classes["imputed_holder"]["persons"] + ) + return [ + ["persons_read", donor["persons_read"]], + ["households", donor["households"]], + [ + "households_with_person_values_summing_to_aggregate", + donor["aggregate_check"]["households_checked"], + ], + [ + "largest_person_to_household_difference_gbp", + donor["aggregate_check"]["max_abs_difference_gbp"], + ], + ["dependent_children_excluded", donor["dependent_children_excluded"]], + ["dependent_children_with_a_value", donor["dependent_children_with_a_value"]], + ["donor_adults", donor["donor_adults"]], + ["donor_adults_weighted_millions", round(adult_weight / 1e6, 1)], + [ + "released_flag_value_disagreements", + donor["released_flag_value_disagreements"], + ], + ["holders_released", donor["holders_released"]], + [ + "weighted_adult_ownership_pct_released", + pct(donor["weighted_adult_ownership_share_released"]), + ], + ["observed_non_holders", classes["observed_non_holder"]["persons"]], + ["ons_imputed_non_holders", classes["imputed_non_holder"]["persons"]], + ["holders_exact_value", classes["observed_holder_exact_value"]["persons"]], + ["holders_banded_or_ons_imputed", banded_or_imputed], + ["holders_recoded_for_age", rule["holders_recoded_for_age"]], + [ + "recoded_pct_of_weighted_released_holders", + pct(rule["recoded_weighted_share_of_holders"]), + ], + [ + "recoded_pct_of_weighted_lisa_mass", + pct(rule["recoded_weighted_share_of_lisa_mass"]), + ], + ["holders_above_balance_ceiling", count(rule["holders_above_ceiling"])], + ["balance_ceiling_gbp", int(rule["balance_ceiling_gbp"])], + ["holders_after_rule", donor["holders_after_rule"]], + [ + "weighted_adult_ownership_pct_after_rule", + pct(donor["weighted_adult_ownership_share"]), + ], + ] + + +def model_comparison(comparison: dict[str, Any]) -> list[list[Any]]: + rows: list[list[Any]] = [] + keys = [("all_adults", "all adults")] + keys += [(f"age {group}", group) for group in AGE_GROUPS] + keys += [ + ("private renters", "private renters"), + ("other tenures", "other tenures"), + ("household net income tertiles 1-2", "household net income tertiles 1-2"), + ("household net income tertile 3", "household net income tertile 3"), + ] + for key, label in keys: + rows.append( + [label, pct(comparison["donor"][key])] + + [pct(comparison[name][key]) for name, _ in MODELS] + ) + rows.append( + ["held-out weighted log loss x1000", ""] + + [ + f"{comparison[name]['held_out_weighted_log_loss_x1000']:.2f}" + for name, _ in MODELS + ] + ) + return rows + + +def realised( + main: dict[str, Any], arm_b: dict[str, Any], comparison: dict[str, Any] +) -> list[list[Any]]: + donor = main["realised"]["donor"] + spine = main["realised"]["recipient"] + spine_b = arm_b["realised"]["recipient"] + + def merged(profile: dict[str, Any]) -> float: + # The spine's income tertiles carry equal weight by construction (weighted cuts). + tertile = profile["by_household_net_income_tertile"] + return (tertile["1"] + tertile["2"]) / 2 + + rows: list[list[Any]] = [ + [ + "all adults", + pct(donor["all_adults"]), + pct(spine["all_adults"]), + pct(spine_b["all_adults"]), + ], + [ + "model expected share", + "", + pct(main["realised"]["model_expected_adult_ownership_share"]), + pct(arm_b["realised"]["model_expected_adult_ownership_share"]), + ], + ] + for group in AGE_GROUPS: + rows.append( + [ + group, + pct(donor["by_age_group"][group]), + pct(spine["by_age_group"][group]), + pct(spine_b["by_age_group"][group]), + ] + ) + for key, label in (("female", "female"), ("male", "male")): + rows.append( + [ + label, + pct(donor["by_sex"][key]), + pct(spine["by_sex"][key]), + pct(spine_b["by_sex"][key]), + ] + ) + for key, label in ( + ("private_renter", "private renters"), + ("other", "other tenures"), + ): + rows.append( + [ + label, + pct(donor["by_private_renting"][key]), + pct(spine["by_private_renting"][key]), + pct(spine_b["by_private_renting"][key]), + ] + ) + rows.append( + [ + "household net income tertiles 1-2", + pct(comparison["donor"]["household net income tertiles 1-2"]), + pct(merged(spine)), + pct(merged(spine_b)), + ] + ) + rows.append( + [ + "household net income tertile 3", + pct(donor["by_household_net_income_tertile"]["3"]), + pct(spine["by_household_net_income_tertile"]["3"]), + pct(spine_b["by_household_net_income_tertile"]["3"]), + ] + ) + for channel in ("frs", "spi"): + rows.append( + [ + f"{channel.upper()}-channel rows", + "", + pct(spine["by_channel"][channel]), + pct(spine_b["by_channel"][channel]), + ] + ) + rows.append( + [ + "co-holding: weighted share of holder households with 2+ holders", + pct(main["realised"]["co_holding_share_of_owner_households"]["donor"]), + pct(main["realised"]["co_holding_share_of_owner_households"]["recipient"]), + pct(arm_b["realised"]["co_holding_share_of_owner_households"]["recipient"]), + ] + ) + return rows + + +def balances( + main: dict[str, Any], arm_b: dict[str, Any], comparison: dict[str, Any] +) -> list[list[Any]]: + balance = comparison["balance"] + return [ + ["donor credible holders"] + + [sig2(balance["donor_quantiles"][q]) for q in QUANTILES] + + [sig2(balance["donor_weighted_mean"])], + ["donor credible holders, held-out draws (5-fold)"] + + [sig2(balance["held_out_draw_quantiles"][q]) for q in QUANTILES] + + [sig2(balance["held_out_draw_weighted_mean"])], + ["spine owners (stage evidence)"] + + [sig2(main["realised"]["owner_balance_quantiles"][q]) for q in QUANTILES] + + [sig2(main["realised"]["owner_weighted_mean_balance"])], + ["spine owners, arm B (stage evidence)"] + + [sig2(arm_b["realised"]["owner_balance_quantiles"][q]) for q in QUANTILES] + + [sig2(arm_b["realised"]["owner_weighted_mean_balance"])], + ] + + +def financial_draws(probe: dict[str, Any]) -> list[list[Any]]: + rows: list[list[Any]] = [] + populations = [("donor", probe["donor"]), ("spine", probe["spine_all"])] + populations += [ + (f"spine {channel}-channel rows", groups) + for channel, groups in sorted(probe["spine_by_channel"].items()) + ] + for name, groups in populations: + for group in AGE_GROUPS: + row = groups[group] + rows.append( + [ + name, + group, + f"{row['weighted_adult_share'] * 100:.1f}", + int(row["gross_financial_wealth_weighted_median"]), + row["gross_financial_wealth_weighted_mean_log1p"], + row["savings_weighted_mean_log1p"], + row["cash_isa_weighted_mean_log1p"], + row["stocks_and_shares_isa_weighted_mean_log1p"], + row["employment_income_weighted_mean_log1p"], + f"{row['private_renter_share'] * 100:.1f}", + ] + ) + return rows + + +def checks( + main: dict[str, Any], + arm_b: dict[str, Any], + gates: dict[str, dict[str, Any]], + twin: dict[str, Any], + determinism: dict[str, Any], +) -> list[list[Any]]: + def coherence(receipt: dict[str, Any], key: str) -> Any: + return receipt["evidence"]["financial_wealth_coherence"][key] + + def passed(name: str) -> str: + statuses = [gate["status"] for gate in gates[name]["gates"].values()] + return f"{statuses.count('passed')} of {len(statuses)}" + + return [ + [ + "cap: households over gross financial wealth", + count(coherence(main, "households_over_financial_wealth")), + count(coherence(arm_b, "households_over_financial_wealth")), + ], + [ + "cap: owners cleared", + count(coherence(main, "owners_cleared")), + count(coherence(arm_b, "owners_cleared")), + ], + [ + "cap: pct of weighted LISA mass removed", + pct(coherence(main, "share_of_weighted_lisa_mass_removed")), + pct(coherence(arm_b, "share_of_weighted_lisa_mass_removed")), + ], + ["support clip: rows clipped low / high", "0 / 0", "0 / 0"], + [ + "H5: no household total above gross financial wealth", + main["recomputed"]["households_over_gross_financial_wealth"] == 0, + arm_b["recomputed"]["households_over_gross_financial_wealth"] == 0, + ], + [ + "H5: household total equals the sum of its persons", + main["recomputed"]["household_total_identity_max_abs_gbp"] == 0.0, + arm_b["recomputed"]["household_total_identity_max_abs_gbp"] == 0.0, + ], + [ + "H5: holds exactly where the balance is positive", + main["recomputed"]["flag_iff_positive_balance"], + arm_b["recomputed"]["flag_iff_positive_balance"], + ], + [ + "H5: support gate on uk/was_lisa_support_bounds.json", + main["release_checks"]["support_gate"], + arm_b["release_checks"]["support_gate"], + ], + [ + "H5: nonnegative", + main["release_checks"]["nonnegative"], + arm_b["release_checks"]["nonnegative"], + ], + [ + "H5: on the export allow-list", + main["release_checks"]["export_allow_listed"], + arm_b["release_checks"]["export_allow_listed"], + ], + [ + "H5: no degenerate cell", + all(v is None for v in main["release_checks"]["degenerate"].values()), + all(v is None for v in arm_b["release_checks"]["degenerate"].values()), + ], + [ + "spine gates passed (control: " + passed("spine-ctl") + ")", + passed("spine-lisa"), + passed("spine-lisa-b"), + ], + [ + "twin against main: only the three cells differ, mass log gains the conserved was_lisa record", + twin["verdict"], + "", + ], + [ + "determinism: second build payload-identical, equal mass log and stage evidence", + determinism["verdict"], + "", + ], + ] + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--lane-dir", type=Path, required=True) + parser.add_argument("--out", type=Path, required=True) + args = parser.parse_args() + lane: Path = args.lane_dir + receipts = lane / "receipts" + main_receipt = json.loads((receipts / "receipt-spine-lisa.json").read_text()) + arm_b_receipt = json.loads((receipts / "receipt-spine-lisa-b.json").read_text()) + comparison = json.loads((receipts / "model-comparison.json").read_text()) + probe = json.loads( + (receipts / "financial-wealth-probe-spine-lisa.json").read_text() + ) + gates = { + name: json.loads((lane / name / f"{name}.spine_gates.json").read_text()) + for name in ("spine-ctl", "spine-lisa", "spine-lisa-b") + } + twin = json.loads( + (lane / "diff-spine-lisa-vs-spine-ctl" / "adjudication.json").read_text() + ) + determinism = json.loads( + (lane / "diff-spine-lisa-vs-spine-lisa-2" / "determinism.json").read_text() + ) + out: Path = args.out + out.mkdir(parents=True, exist_ok=True) + main_evidence = main_receipt["evidence"] + arm_b_evidence = arm_b_receipt["evidence"] + write(out / "donor_audit.csv", ["item", "value"], donor_audit(main_evidence)) + write( + out / "ownership_model_comparison.csv", + ["group", "donor_pct"] + [f"{column}_pct" for _, column in MODELS], + model_comparison(comparison), + ) + write( + out / "ownership_realised.csv", + ["group", "donor_pct", "spine_pct", "spine_arm_b_pct"], + realised(main_evidence, arm_b_evidence, comparison), + ) + write( + out / "balance_quantiles.csv", + ["owners"] + [f"{q}_gbp" for q in QUANTILES] + ["weighted_mean_gbp"], + balances(main_evidence, arm_b_evidence, comparison), + ) + write( + out / "financial_draws_by_age.csv", + [ + "population", + "age_group", + "weighted_adult_share_pct", + "gross_financial_wealth_weighted_median_gbp", + "gross_financial_wealth_weighted_mean_log1p", + "savings_weighted_mean_log1p", + "cash_isa_weighted_mean_log1p", + "stocks_and_shares_isa_weighted_mean_log1p", + "employment_income_weighted_mean_log1p", + "private_renter_share_pct", + ], + financial_draws(probe), + ) + write( + out / "checks.csv", + ["check", "spine", "spine_arm_b"], + checks(main_receipt, arm_b_receipt, gates, twin, determinism), + ) + + +if __name__ == "__main__": + main() diff --git a/docs/evidence/uk-lisa-1003/scripts/fw_probe.py b/docs/evidence/uk-lisa-1003/scripts/fw_probe.py new file mode 100644 index 000000000..d792272f4 --- /dev/null +++ b/docs/evidence/uk-lisa-1003/scripts/fw_probe.py @@ -0,0 +1,170 @@ +"""microcosm#1003 receipt Part F: the spine's WAS financial draws against the WAS donor, by age. + +The stage-time spine is the candidate H5 without the CGT band donors (added after was_lisa); +the CGT incidence clones stay, because a clone and its original carry identical wealth and LISA +cells and their weights sum to the stage-time weight. The donor is the stage's own cleaned +person donor (non-dependent adults, credibility rule applied). Also records the ownership share +option (c) would imply: the donor's age-group shares applied to the spine's adult age mix. +Aggregates only (weighted medians rounded to 3 significant figures). + + .venv/bin/python -W ignore [spine-lisa] (from the populace-1003 worktree) +""" + +from __future__ import annotations + +import json +import sys +from pathlib import Path + +import numpy as np +import pandas as pd + +from microcosm.build.country_spec import load_country_spec +from microcosm.build.uk_runtime.frs_spine import read_pinned_tab +from microcosm.build.uk_runtime.was_lisa import WASLISAColumns, clean_was_lisa_donor + +A = Path("/Users/mariajuaristi/Desktop/PolicyEngine/data/ukds/acceptance/1003-lisa") +U = Path("/Users/mariajuaristi/Desktop/PolicyEngine/data/ukds/was_2006_22") +LABELS = ["18-24", "25-34", "35-44", "45-54", "55+"] +HOUSEHOLD = ("gross_financial_wealth", "savings", "cash_isa", "stocks_and_shares_isa") + + +def sig3(value: float) -> float: + return float(f"{value:.3g}") + + +def wmedian(values, weights) -> float: + values = np.asarray(values, float) + weights = np.asarray(weights, float) + order = np.argsort(values, kind="stable") + cw = np.cumsum(weights[order]) + return float(values[order][np.searchsorted(cw, 0.5 * cw[-1])]) + + +def by_group(frame: pd.DataFrame, weight: str) -> dict: + out = {} + for label, group in frame.groupby("group", observed=True): + w = group[weight].to_numpy(float) + row = {"weighted_adult_share": float(w.sum() / frame[weight].sum())} + for column in (*HOUSEHOLD, "employment_income"): + values = group[column].clip(lower=0).to_numpy(float) + row[f"{column}_weighted_median"] = sig3(wmedian(values, w)) + row[f"{column}_weighted_mean_log1p"] = round( + float(np.average(np.log1p(values), weights=w)), 2 + ) + row["private_renter_share"] = round( + float(np.average(group["renter"].to_numpy(float), weights=w)), 3 + ) + out[str(label)] = row + return out + + +def main(name: str) -> None: + stage = load_country_spec("uk").sources.stage_map()["was_lisa"] + params = {op.kind: dict(op.parameters) for op in stage.operations} + artifacts = {a["role"]: a for a in stage.artifacts} + columns = WASLISAColumns.from_parameters(params["clean_was_lisa_donor"]) + donor = clean_was_lisa_donor( + read_pinned_tab( + U / "was_round_8_person_eul_may_2025_230525.tab", + artifacts["was_person_tab"], + columns=columns.person_raw_columns(), + ), + read_pinned_tab( + U / "was_round_8_hhold_eul_may_2025_230525.tab", artifacts["was_qrf_donor"] + ), + columns=columns, + ).person + donor["group"] = pd.cut( + donor["age_floor"], [-1, 24, 34, 44, 54, 200], labels=LABELS + ) + donor["renter"] = donor["is_private_renter"].astype(float) + + store = pd.HDFStore(A / name / f"{name}.h5", "r") + person = store["/person"] + household = store["/household"] + store.close() + household = household.loc[ + ~household["household_is_cgt_band_donor"].astype(bool) + ].set_index("household_id") + spine = person[person["person_household_id"].isin(household.index)].copy() + hid = spine["person_household_id"].to_numpy() + for column in (*HOUSEHOLD, "household_weight"): + spine[column] = household[column].reindex(hid).to_numpy(float) + spine["channel"] = ( + household["household_support_channel"].astype(str).reindex(hid).to_numpy() + ) + spine["renter"] = ( + household["tenure_type"].astype(str).reindex(hid).str.contains("RENT_PRIVATELY") + ).to_numpy(float) + spine = spine[spine["age"] >= 18].copy() + spine["group"] = pd.cut(spine["age"], [17, 24, 34, 44, 54, 200], labels=LABELS) + + result = { + "spine": name, + "spine_rows": "candidate H5 without CGT band donors (stage-time population; clones carry identical cells)", + "donor": by_group(donor, "weight"), + "spine_all": by_group(spine, "household_weight"), + "spine_by_channel": { + str(c): by_group(g, "household_weight") for c, g in spine.groupby("channel") + }, + } + donor_share = donor.groupby("group", observed=True).apply( + lambda g: np.average(g["holds"].astype(float), weights=g["weight"]) + ) + spine_mix = ( + spine.groupby("group", observed=True)["household_weight"].sum() + / spine["household_weight"].sum() + ) + result["option_c_implied_adult_share"] = float((donor_share * spine_mix).sum()) + result["donor_age_group_shares"] = { + str(k): float(v) for k, v in donor_share.items() + } + result["spine_adult_age_mix"] = {str(k): float(v) for k, v in spine_mix.items()} + result["spine_weighted_adults"] = float(spine["household_weight"].sum()) + (A / "receipts").mkdir(exist_ok=True) + json.dump( + result, + open(A / "receipts" / f"financial-wealth-probe-{name}.json", "w"), + indent=1, + ) + for key in ("donor", "spine_all"): + print(key) + print( + pd.DataFrame(result[key]) + .T[ + [ + "weighted_adult_share", + "gross_financial_wealth_weighted_median", + "gross_financial_wealth_weighted_mean_log1p", + "savings_weighted_mean_log1p", + "employment_income_weighted_mean_log1p", + "private_renter_share", + ] + ] + .to_string() + ) + for channel, rows in result["spine_by_channel"].items(): + print("channel", channel) + print( + pd.DataFrame(rows) + .T[ + [ + "weighted_adult_share", + "gross_financial_wealth_weighted_median", + "gross_financial_wealth_weighted_mean_log1p", + ] + ] + .to_string() + ) + print( + "option (c) implied adult share:", + round(result["option_c_implied_adult_share"] * 100, 3), + "% on", + round(result["spine_weighted_adults"] / 1e6, 2), + "m weighted adults", + ) + + +if __name__ == "__main__": + main(sys.argv[1] if len(sys.argv) > 1 else "spine-lisa") diff --git a/docs/evidence/uk-lisa-1003/scripts/lisa_receipt.py b/docs/evidence/uk-lisa-1003/scripts/lisa_receipt.py new file mode 100644 index 000000000..8a3c1a407 --- /dev/null +++ b/docs/evidence/uk-lisa-1003/scripts/lisa_receipt.py @@ -0,0 +1,250 @@ +"""microcosm#1003 receipts: the was_lisa stage on a licensed candidate spine. + +Reads the build sidecar's was_lisa stage evidence and the candidate H5, recomputes +the realised ownership and balances from the H5 as an independent check of the +evidence, and runs the release-side column checks (degenerate, support bounds, +nonnegative, export allow-list) on the three new cells. Aggregates only; run +from the populace-1003 worktree's venv: + + .venv/bin/python spine-lisa +""" + +from __future__ import annotations + +import json +import sys +from pathlib import Path + +import numpy as np +import pandas as pd + +from microcosm.build.gates import support_gate +from microcosm.build.uk_runtime.terminal_gates import ( + UK_ALLOWED_EXTRA_EXPORT_COLUMNS, + _degenerate_kind, +) + +A = Path("/Users/mariajuaristi/Desktop/PolicyEngine/data/ukds/acceptance/1003-lisa") +TREE = Path("/Users/mariajuaristi/Desktop/PolicyEngine/repos/populace-1003") +NEW = { + "person": ("has_lifetime_isa", "lifetime_isa_balance"), + "household": ("household_lifetime_isa_balance",), +} +GROUPS = ( + (18, 24, "18-24"), + (25, 34, "25-34"), + (35, 44, "35-44"), + (45, 54, "45-54"), + (55, 200, "55+"), +) + + +def wq(values, weights, qs=(0.1, 0.25, 0.5, 0.75, 0.9)): + values = np.asarray(values, float) + weights = np.asarray(weights, float) + order = np.argsort(values, kind="stable") + cw = np.cumsum(weights[order]) + return { + f"p{int(q * 100)}": float( + values[order][min(int(np.searchsorted(cw, q * cw[-1])), len(values) - 1)] + ) + for q in qs + } + + +def share(mask, weights): + return float(weights[mask].sum() / weights.sum()) if weights.sum() > 0 else None + + +def main(name: str) -> None: + build = json.load(open(A / name / f"{name}.build.json")) + evidence = build["stage_evidence"]["was_lisa"] + store = pd.HDFStore(A / name / f"{name}.h5", "r") + keys = store.keys() + person = ( + store["/person"] + if "/person" in keys + else store[[k for k in keys if k.endswith("person")][0]] + ) + household = ( + store["/household"] + if "/household" in keys + else store[[k for k in keys if k.endswith("household")][0]] + ) + store.close() + weight_column = "household_weight" + hw = pd.Series( + household[weight_column].to_numpy(float), + index=household["household_id"].to_numpy(), + ) + pw = hw.reindex(person["person_household_id"].to_numpy()).to_numpy(float) + holds = person["has_lifetime_isa"].to_numpy(bool) + balance = person["lifetime_isa_balance"].to_numpy(float) + age = person["age"].to_numpy(float) + adult = age >= 18 + female = person["gender"].astype(str).str.upper().str.contains("FEMALE").to_numpy() + tenure = ( + household.set_index("household_id")["tenure_type"] + .astype(str) + .reindex(person["person_household_id"].to_numpy()) + .to_numpy() + ) + renter = np.char.find(tenure.astype(str), "RENT_PRIVATELY") >= 0 + channel = ( + household.set_index("household_id")["household_support_channel"] + .astype(str) + .reindex(person["person_household_id"].to_numpy()) + .to_numpy() + if "household_support_channel" in household + else np.array(["frs"] * len(person)) + ) + recomputed = { + "persons": int(len(person)), + "adults": int(adult.sum()), + "holders": int(holds.sum()), + "weighted_holders": float(pw[holds].sum()), + "weighted_adults": float(pw[adult].sum()), + "adult_ownership_share": share(holds[adult], pw[adult]), + "by_age_group": { + label: share( + holds[adult & (age >= lo) & (age <= hi)], + pw[adult & (age >= lo) & (age <= hi)], + ) + for lo, hi, label in GROUPS + }, + "by_sex": { + "female": share(holds[adult & female], pw[adult & female]), + "male": share(holds[adult & ~female], pw[adult & ~female]), + }, + "by_private_renting": { + "private_renter": share(holds[adult & renter], pw[adult & renter]), + "other": share(holds[adult & ~renter], pw[adult & ~renter]), + }, + "by_channel": { + str(c): share(holds[adult & (channel == c)], pw[adult & (channel == c)]) + for c in sorted(set(channel)) + }, + "holders_on_spi_rows_weighted_share": share(channel[holds] != "frs", pw[holds]) + if holds.any() + else None, + "under_18_holders": int((holds & ~adult).sum()), + "owner_balance_quantiles": wq(balance[holds], pw[holds]) + if holds.any() + else None, + "owner_weighted_mean_balance": float( + np.average(balance[holds], weights=pw[holds]) + ) + if holds.any() + else None, + "weighted_total_gbp_bn": float((balance * pw).sum() / 1e9), + "flag_iff_positive_balance": bool(np.array_equal(holds, balance > 0)), + "min_positive_balance": float(balance[holds].min()) if holds.any() else None, + "max_balance": float(balance.max()), + } + totals = ( + pd.Series(balance, index=person["person_household_id"].to_numpy()) + .groupby(level=0) + .sum() + .reindex(household["household_id"].to_numpy()) + .fillna(0.0) + .to_numpy() + ) + recomputed["household_total_identity_max_abs_gbp"] = float( + np.abs( + totals - household["household_lifetime_isa_balance"].to_numpy(float) + ).max() + ) + recomputed["households_over_gross_financial_wealth"] = int( + ( + household["household_lifetime_isa_balance"].to_numpy(float) + > household["gross_financial_wealth"].to_numpy(float) + 1e-6 + ).sum() + ) + owner_households = ( + pd.Series(holds.astype(int), index=person["person_household_id"].to_numpy()) + .groupby(level=0) + .sum() + ) + owner_households = owner_households[owner_households > 0] + hwo = hw.reindex(owner_households.index).to_numpy(float) + recomputed["co_holding_share_of_owner_households"] = ( + float(hwo[owner_households.to_numpy() > 1].sum() / hwo.sum()) + if len(hwo) + else None + ) + bounds = json.load( + open( + TREE + / "packages/microcosm-build/src/microcosm/build/uk/was_lisa_support_bounds.json" + ) + )["bounds"] + release_checks = { + "degenerate": { + f"{entity}.{column}": ( + _degenerate_kind((person if entity == "person" else household)[column]) + or (None,) + )[0] + for entity, columns in NEW.items() + for column in columns + }, + "support_gate": support_gate( + {"lifetime_isa_balance": balance}, {k: tuple(v) for k, v in bounds.items()} + ).passed, + "nonnegative": bool( + (balance >= 0).all() + and (household["household_lifetime_isa_balance"].to_numpy(float) >= 0).all() + ), + "export_allow_listed": all( + f"{entity}.{column}" in UK_ALLOWED_EXTRA_EXPORT_COLUMNS + for entity, columns in NEW.items() + for column in columns + ), + "dtypes": { + f"{entity}.{column}": str( + (person if entity == "person" else household)[column].dtype + ) + for entity, columns in NEW.items() + for column in columns + }, + } + realised = evidence["realised"] + cross_check = { + "adult_ownership_share": ( + realised["recipient"]["all_adults"], + recomputed["adult_ownership_share"], + ), + "owner_weighted_mean_balance": ( + realised["owner_weighted_mean_balance"], + recomputed["owner_weighted_mean_balance"], + ), + "weighted_total_gbp": ( + realised["weighted_total_gbp"], + recomputed["weighted_total_gbp_bn"] * 1e9, + ), + } + out = { + "name": name, + "evidence": evidence, + "recomputed": recomputed, + "release_checks": release_checks, + "cross_check_evidence_vs_h5": cross_check, + } + (A / "receipts").mkdir(exist_ok=True) + json.dump( + out, open(A / "receipts" / f"receipt-{name}.json", "w"), indent=1, default=str + ) + print( + json.dumps( + { + "recomputed": recomputed, + "release_checks": release_checks, + "cross_check": cross_check, + }, + indent=1, + default=str, + ) + ) + + +if __name__ == "__main__": + main(sys.argv[1] if len(sys.argv) > 1 else "spine-lisa") diff --git a/docs/evidence/uk-lisa-1003/scripts/model_comparison.py b/docs/evidence/uk-lisa-1003/scripts/model_comparison.py new file mode 100644 index 000000000..ead31d3e5 --- /dev/null +++ b/docs/evidence/uk-lisa-1003/scripts/model_comparison.py @@ -0,0 +1,255 @@ +"""microcosm#1003 receipt: ownership-model comparison on the WAS donor, 5-fold by household. + +Uses the stage's own code on the sha-pinned tabs: the committed was_lisa declaration, +clean_was_lisa_donor (credibility rule applied), ownership_design and +fit_ownership_model for the logistic, and the committed balance spec for the +holders-only QRF. The alternatives are the house regime gate (scikit-learn's +HistGradientBoostingClassifier at library defaults, as RegimeGatedQRF fits it), +the same classifier tuned for rare events, and donor weighted rates by age group. +Reports expected (probability-weighted) ownership shares, held-out weighted log +loss, and held-out holder balance quantiles. Aggregates only. + + .venv/bin/python (from the populace-1003 worktree) +""" + +from __future__ import annotations + +import json +import warnings +from pathlib import Path + +import numpy as np +import pandas as pd +from sklearn.ensemble import HistGradientBoostingClassifier + +from microcosm.build.country_spec import load_country_spec +from microcosm.build.stochastic_assignment import stable_identity_uniforms +from microcosm.build.uk_runtime.frs_spine import read_pinned_tab +from microcosm.build.uk_runtime.was_lisa import ( + BALANCE_COLUMN, + CLEAN_WAS_LISA_DONOR_KIND, + IMPUTE_LIFETIME_ISA_BALANCE_KIND, + IMPUTE_LIFETIME_ISA_OWNERSHIP_KIND, + BalanceModelSpec, + OwnershipModelSpec, + WASLISAColumns, + clean_was_lisa_donor, + fit_ownership_model, +) + +warnings.filterwarnings("ignore") +A = Path("/Users/mariajuaristi/Desktop/PolicyEngine/data/ukds/acceptance/1003-lisa") +U = Path("/Users/mariajuaristi/Desktop/PolicyEngine/data/ukds/was_2006_22") + +stage = load_country_spec("uk").sources.stage_map()["was_lisa"] +params = {op.kind: dict(op.parameters) for op in stage.operations} +artifacts = {a["role"]: a for a in stage.artifacts} +columns = WASLISAColumns.from_parameters(params[CLEAN_WAS_LISA_DONOR_KIND]) +own_spec = OwnershipModelSpec.from_parameters( + params[IMPUTE_LIFETIME_ISA_OWNERSHIP_KIND] +) +bal_spec = BalanceModelSpec.from_parameters(params[IMPUTE_LIFETIME_ISA_BALANCE_KIND]) +household = read_pinned_tab( + U / "was_round_8_hhold_eul_may_2025_230525.tab", artifacts["was_qrf_donor"] +) +person = read_pinned_tab( + U / "was_round_8_person_eul_may_2025_230525.tab", + artifacts["was_person_tab"], + columns=columns.person_raw_columns(), +) +donor = clean_was_lisa_donor(person, household, columns=columns).person.reset_index( + drop=True +) +w = donor["weight"].to_numpy(float) +y = donor["holds"].to_numpy(int) +groups = np.searchsorted( + np.asarray(own_spec.age_group_lower_bounds[1:], float), + donor["age_floor"].to_numpy(float), + side="right", +) +labels = own_spec.group_labels() +RAW = [ + "age_band", + "is_female", + "employment_income", + "self_employment_income", + "household_net_income", + "num_adults", + "num_children", + "is_private_renter", + "gross_financial_wealth", + "savings", + "cash_isa", + "stocks_and_shares_isa", +] + + +def tertiles(values): + order = np.argsort(values, kind="stable") + cw = np.cumsum(w[order]) / w.sum() + cuts = np.interp([1 / 3, 2 / 3], cw, values[order]) + return np.digitize(values, cuts) + + +inc_t = tertiles(donor["household_net_income"].to_numpy(float)) +gfw_t = tertiles(donor["gross_financial_wealth"].to_numpy(float)) +renter = donor["is_private_renter"].to_numpy(float) == 1.0 + + +def profile(prob): + out = {"all_adults": float((w * prob).sum() / w.sum())} + for i, label in enumerate(labels): + m = groups == i + out[f"age {label}"] = float((w[m] * prob[m]).sum() / w[m].sum()) + for name, mask in (("private renters", renter), ("other tenures", ~renter)): + out[name] = float((w[mask] * prob[mask]).sum() / w[mask].sum()) + for i in range(3): + m = inc_t == i + out[f"household net income tertile {i + 1}"] = float( + (w[m] * prob[m]).sum() / w[m].sum() + ) + m = gfw_t == i + out[f"gross financial wealth tertile {i + 1}"] = float( + (w[m] * prob[m]).sum() / w[m].sum() + ) + # The donor's bottom income tertile holds fewer than 10 holders, so the published cell merges tertiles 1-2. + m = inc_t <= 1 + out["household net income tertiles 1-2"] = float( + (w[m] * prob[m]).sum() / w[m].sum() + ) + return out + + +def logistic(tr, te): + fitted, _ = fit_ownership_model(donor.loc[tr].reset_index(drop=True), own_spec) + return fitted.probabilities(donor.loc[te]) + + +def hgb_default(tr, te): + c = HistGradientBoostingClassifier(random_state=0).fit( + donor.loc[tr, RAW], y[tr], sample_weight=w[tr] + ) + return c.predict_proba(donor.loc[te, RAW])[:, 1] + + +def hgb_tuned(tr, te): + c = HistGradientBoostingClassifier( + random_state=0, + early_stopping=False, + max_iter=100, + learning_rate=0.05, + max_leaf_nodes=8, + min_samples_leaf=200, + l2_regularization=1.0, + ).fit(donor.loc[tr, RAW], y[tr], sample_weight=w[tr]) + return c.predict_proba(donor.loc[te, RAW])[:, 1] + + +def age_rates(tr, te): + rate = { + g: (w[tr][groups[tr] == g] * y[tr][groups[tr] == g]).sum() + / w[tr][groups[tr] == g].sum() + for g in np.unique(groups[tr]) + } + return np.asarray([rate.get(g, 0.0) for g in groups[te]]) + + +households = donor["household_key"].unique() +rng = np.random.default_rng(7) +rng.shuffle(households) +folds = np.array_split(households, 5) +result = { + "donor": profile(y.astype(float)), + "donor_adults": int(len(donor)), + "donor_holders": int(y.sum()), + "folds": 5, + "fold_seed": 7, +} +for name, fn in ( + ("stage logistic", logistic), + ("house gate (boosting, defaults)", hgb_default), + ("boosting tuned for rare events", hgb_tuned), + ("age-group rates", age_rates), +): + prob = np.zeros(len(donor)) + for fold in folds: + te = donor["household_key"].isin(fold).to_numpy() + prob[te] = fn(~te, te) + result[name] = profile(prob) + clipped = np.clip(prob, 1e-9, 1 - 1e-9) + result[name]["held_out_weighted_log_loss_x1000"] = float( + -np.average(y * np.log(clipped) + (1 - y) * np.log(1 - clipped), weights=w) + * 1000 + ) + +# Balance: the committed holders-only QRF on held-out credible holders. +from microcosm.fit.qrf import RegimeGatedQRF # noqa: E402 + +value = donor[BALANCE_COLUMN].to_numpy(float) +credible = (y == 1) & np.isfinite(value) & (value > 0) +drawn = np.full(len(donor), np.nan) +ids = ( + (donor["household_key"] * 100 + donor["person_number"]).astype(np.int64).to_numpy() +) +for fold in folds: + te = donor["household_key"].isin(fold).to_numpy() + tr = ~te & credible + fitted = RegimeGatedQRF(n_estimators=bal_spec.n_estimators, seed=bal_spec.seed).fit( + donor.loc[tr, [*bal_spec.predictors, BALANCE_COLUMN, "weight"]] + .astype(float) + .reset_index(drop=True), + list(bal_spec.predictors), + [BALANCE_COLUMN], + weights="weight", + ) + hold = te & credible + if hold.any(): + q = stable_identity_uniforms(ids[hold], seed=bal_spec.seed, salt=bal_spec.salt) + drawn[hold] = fitted.predict_positive_from_uniforms( + donor.loc[hold, list(bal_spec.predictors)] + .astype(float) + .reset_index(drop=True), + quantiles={BALANCE_COLUMN: q}, + )[BALANCE_COLUMN].to_numpy(float) + + +def wq(v, ww): + o = np.argsort(v, kind="stable") + cw = np.cumsum(ww[o]) + return { + f"p{int(q * 100)}": float( + v[o][min(int(np.searchsorted(cw, q * cw[-1])), len(v) - 1)] + ) + for q in (0.1, 0.25, 0.5, 0.75, 0.9) + } + + +result["balance"] = { + "credible_holders": int(credible.sum()), + "donor_quantiles": wq(value[credible], w[credible]), + "donor_weighted_mean": float(np.average(value[credible], weights=w[credible])), + "held_out_draw_quantiles": wq(drawn[credible], w[credible]), + "held_out_draw_weighted_mean": float( + np.average(drawn[credible], weights=w[credible]) + ), +} +(A / "receipts").mkdir(exist_ok=True) +json.dump(result, open(A / "receipts" / "model-comparison.json", "w"), indent=1) +table = ( + pd.DataFrame( + {k: v for k, v in result.items() if isinstance(v, dict) and k != "balance"} + ) + .drop(index="held_out_weighted_log_loss_x1000", errors="ignore") + .mul(100) + .round(2) +) +print(table.to_string()) +print( + "log loss x1000:", + { + k: round(v["held_out_weighted_log_loss_x1000"], 2) + for k, v in result.items() + if isinstance(v, dict) and "held_out_weighted_log_loss_x1000" in v + }, +) +print(json.dumps(result["balance"], indent=1)) diff --git a/docs/evidence/uk-lisa-1003/scripts/twin_diff_1003.sh b/docs/evidence/uk-lisa-1003/scripts/twin_diff_1003.sh new file mode 100755 index 000000000..0ce8bf7de --- /dev/null +++ b/docs/evidence/uk-lisa-1003/scripts/twin_diff_1003.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash +# Twin diff spine-ctl (main) vs spine-lisa (the was_lisa branch): payload compare, classification, +# and the adjudication of the two undeclarable consequences (appended columns move the column +# order; the stage's mass receipt joins the root mass log). +set -uo pipefail +TREE=/Users/mariajuaristi/Desktop/PolicyEngine/repos/populace-1003 +A=/Users/mariajuaristi/Desktop/PolicyEngine/data/ukds/acceptance/1003-lisa +OUT=$A/diff-spine-lisa-vs-spine-ctl; mkdir -p "$OUT"; cd "$TREE" +.venv/bin/python tools/compare_uk_h5_payload.py "$A/spine-ctl/spine-ctl.h5" "$A/spine-lisa/spine-lisa.h5" --json-out "$OUT/payload_diff.json" > "$OUT/compare.log" 2>&1 +echo "compare exit $?" +.venv/bin/python tools/classify_uk_payload_diff.py "$OUT/payload_diff.json" "$A/spine-lisa-payload-expectation.json" --json-out "$OUT/classified.json" > "$OUT/classify.log" 2>&1 +echo "classify exit $?" +.venv/bin/python -W ignore - "$A" "$OUT" <<'PY' +import sys, json, pandas as pd +from microcosm.build.uk_runtime.was_lisa import UK_WAS_LISA_MASS_CONSERVATION_REASON +A, OUT = sys.argv[1], sys.argv[2] +new = {"person": ["has_lifetime_isa", "lifetime_isa_balance"], "household": ["household_lifetime_isa_balance"]} +c = json.load(open(f"{OUT}/classified.json")) +report = {"classify_summary": c["summary"], "unexpected": [(u["entity"], u["column"], u["surface"]) for u in c["unexpected"]]} +ctl = pd.HDFStore(f"{A}/spine-ctl/spine-ctl.h5", "r"); cand = pd.HDFStore(f"{A}/spine-lisa/spine-lisa.h5", "r") +report["store_keys_equal"] = list(ctl.keys()) == list(cand.keys()) +for key in ctl.keys(): + a, b = ctl[key], cand[key] + entity = key.strip("/").split("/")[-1] + if isinstance(b, pd.DataFrame): + extra = [col for col in b.columns if col not in a.columns] + report[key] = { + "new_columns": extra, + "new_columns_as_expected": sorted(extra) == sorted(new.get(entity, [])), + "new_columns_appended_last": list(b.columns[len(a.columns):]) == extra, + "rest_equals_control": bool(b.drop(columns=extra).equals(a)), + "dtypes": {col: str(b[col].dtype) for col in extra}, + } + else: + report[key] = {"equals_control": bool(b.equals(a))} +left = json.loads(ctl._handle.root._v_attrs.populace_mass_log_json) +right = json.loads(cand._handle.root._v_attrs.populace_mass_log_json) +ctl.close(); cand.close() +added = [r for r in right if r not in left] +report["mass_log"] = { + "control_records": len(left), "candidate_records": len(right), + "control_is_prefix_or_subsequence": all(r in right for r in left), + "added_records": len(added), + "added_is_the_was_lisa_receipt": len(added) == 1 and added[0].get("reason") == UK_WAS_LISA_MASS_CONSERVATION_REASON, + "added_conserved": len(added) == 1 and added[0].get("old_total") == added[0].get("new_total"), +} +only_expected_unexpected = all(u[1] == "__column_order__" and u[0] in new for u in report["unexpected"]) +report["verdict"] = bool(only_expected_unexpected and report["store_keys_equal"] and all(v.get("rest_equals_control", v.get("equals_control", False)) and v.get("new_columns_as_expected", True) for k, v in report.items() if k.startswith("/")) and report["mass_log"]["added_is_the_was_lisa_receipt"] and report["mass_log"]["added_conserved"] and report["mass_log"]["control_is_prefix_or_subsequence"]) +json.dump(report, open(f"{OUT}/adjudication.json", "w"), indent=2); print(json.dumps(report, indent=1)) +PY diff --git a/docs/uk-lisa-1003.md b/docs/uk-lisa-1003.md new file mode 100644 index 000000000..db6272bf4 --- /dev/null +++ b/docs/uk-lisa-1003.md @@ -0,0 +1,214 @@ +# Lifetime ISA holdings on the UK spine (microcosm#1003) + +The `was_lisa` spine stage gives every adult of the UK spine a Lifetime ISA +(LISA) holding imputed from the Wealth and Assets Survey (WAS) round 8. It adds +three exported cells: + +| Cell | Meaning | +| --- | --- | +| `person.has_lifetime_isa` | The person holds one or more LISAs. | +| `person.lifetime_isa_balance` | The current value across the person's LISAs, in pounds (zero for non-holders). | +| `household.household_lifetime_isa_balance` | The sum of its persons' balances. | + +The fields describe holdings: who has a LISA and how much is in it. They do not +describe annual contributions (see [The annual-contribution gap](#the-annual-contribution-gap)). +Measured receipts are in +[`experiments/1003-uk-lisa-receipts.md`](../experiments/1003-uk-lisa-receipts.md). + +## Source + +WAS round 8 (ONS, UK Data Service SN 7215, DOI 10.5255/UKDA-SN-7215-20) +interviewed households in Great Britain between April 2020 and March 2022. Each +adult is asked which ISA types they hold (`FISA`, code 3 is a Lifetime ISA) and +the current value of their LISAs (`FLISAV`), or, when they do not know it, a +band on a LISA-specific card (`FLISAB`, eight bands from under £1,000 to +£10,000 or more). ONS imputes item non-response and imputes a value inside the +reported band, and releases the completed value as `DVFLISAvR8` +(`= FLISAVR8_i`). The household file's `DVFLISAVR8_aggr` is the sum of those +person values. + +The stage reads both licensed tabs, pinned by size and sha256 in +`uk/spec/sources.yaml`: + +- the round-8 household tab, the `was_wealth` donor with the same pins; +- the round-8 person tab `was_round_8_person_eul_may_2025_230525.tab`, of whose + 4,079 columns it reads 14, joined to its household on the anonymised case + number `CASER8`. + +The stage refuses a person tab whose released values do not sum to the +household aggregate on every household, so the variable the model is trained +on is provably the one ONS aggregates. + +## Missing answers, banded answers and ONS imputation + +The released value has no missing or negative entries on the pinned tab, and +the ownership flag (`fisa_binary3r8_i`) agrees with a positive value on every +record. The stage still refuses a missing or negative value rather than reading +it as a zero balance. Each donor adult keeps a response class, recorded in the +stage evidence and never used as a predictor: + +- observed non-holder, or non-holder whose ownership ONS imputed; +- holder with an exact reported value; +- holder with a banded value (ONS imputed the value inside the band; the band + itself was reported or imputed); +- holder whose value ONS imputed without a band, or whose ownership ONS + imputed; +- holder recoded by the credibility rule below. + +On the pinned tab, 126 of the 141 released holders reported an exact value. The +other 15 reported or were imputed a band, and ONS's imputed value lies inside +the band for every one of them. The model trains on the ONS-completed values, as +the `was_wealth` stage trains on ONS-completed household aggregates. + +## Credibility rule + +Some released records are impossible under the product rules, and the stage +declares a rule for them (`clean_was_lisa_donor.credibility_rule`): + +- **Age.** LISAs exist from 6 April 2017 and can be opened only by adults under + 40 ([The Individual Savings Account (Amendment No. 2) Regulations 2017, + explanatory memorandum](https://www.legislation.gov.uk/uksi/2017/466/pdfs/uksiem_20170466_en.pdf); + [gov.uk: who can open a Lifetime ISA](https://www.gov.uk/lifetime-isa/who-can-open-a-lifetime-isa)), + so no holder was older than 44 by the end of round-8 fieldwork. Holders + recorded in an age band starting at 45 or above are read as a misreported ISA + type and recoded to non-holders. Their value stays inside the household's + gross financial wealth, where WAS already counts it. +- **Balance.** Payments are limited to £4,000 a year with a 25% bonus + ([gov.uk: Lifetime ISA](https://www.gov.uk/lifetime-isa)). Five tax years to + March 2022 allow £25,000 of payments and bonus. The one-off 2017-18 transfer + of Help to Buy ISA savings held at 5 April 2017 did not count towards the + limit and attracted the bonus + ([HM Treasury, Lifetime ISA technical note, September 2016, para 1.25](https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/553333/Lifetime_ISA_technical_note_September_2016_update.pdf)); + a Help to Buy ISA accepted £1,200 in its first month and £200 a month from + 1 December 2015 ([UK Finance](https://www.ukfinance.org.uk/help-buy-isa)), + so at most about £4,400 could be transferred. About £30,500 was therefore + attainable before investment returns. Holders above the declared ceiling of + £40,000 stay holders but leave the balance fit. + +On the pinned tab the rule recodes 21 holders aged 45 or over and keeps a +handful of holders above the ceiling out of the balance fit. Together these +records are about 5% of weighted holders but about a third of the weighted LISA +mass, so the rule matters for totals and not for the typical balance. The +weighted median holder balance is £6,000 with or without it, and ONS +publishes a £6,000 median for households holding LISAs in April 2020 to March +2022 ([Financial wealth: wealth in Great Britain](https://www.ons.gov.uk/peoplepopulationandcommunity/personalandhouseholdfinances/incomeandwealth/datasets/financialwealthwealthingreatbritain), +Table 5.1). No age limit is imposed on recipients: the model decides, and it +gives adults aged 45 or over a very small probability. + +## How the stage imputes + +`was_lisa` runs right after `was_wealth`, so every household of the spine, +including the SPI support copies and income-band donors, has its final incomes +and its own WAS financial draws before the LISA draw. + +1. **Who holds.** A weighted logistic regression with a ridge penalty on the + slopes, fitted on the donor's non-dependent adults with the WAS household + weight each person carries. Predictors: five age groups (the public file has + five-year age bands only), the logarithm of the person's earnings, household + net income, gross financial wealth, cash ISA, stocks-and-shares ISA and + savings, private renting, sex and the number of children. The intercept is + unpenalised, so the model's weighted mean probability on the donor equals the + donor's weighted ownership share. A recipient aged 18 or over holds when a + uniform keyed on the person id falls below their probability, so adding or + reordering rows never moves a draw. +2. **How much.** The house regime-gated quantile regression forest, fitted on + the credible holders only, drawn at a second person-keyed quantile. A + balance is positive exactly when the person holds. +3. **Coherence.** A household whose LISA total exceeds its `gross_financial_wealth` + draw has its persons' balances scaled down pro rata, and ownership is + re-derived from the capped balance. The number of households, persons and + pounds affected is receipted. + +The ownership part is a logistic because the house regime gate (a +gradient-boosting classifier) is miscalibrated for an outcome held by under one +per cent of adults. Held out by household on the donor, the gate reproduced +0.62% ownership against the donor's 0.89% and understated each age group under +45 by between a quarter and a half. The logistic reproduced 0.87% and every age +and tenure margin within 0.07 points (María's ruling of 2026-09-29; the +comparison is in the receipts, Part B). + +Household predictors use the `was_wealth` definitions. Tenure is the +private-renter flag on both sides (WAS `DVPriRntR8 == 1`; the spine's +`tenure_type` of `RENT_PRIVATELY`), not the engine's `is_renting`. + +## Reconciliation with the existing wealth columns + +WAS counts every ISA, LISAs included, inside gross financial wealth +(`HFINWR8_SUM`, the spine's `gross_financial_wealth`) and therefore inside net +financial wealth. LISAs are not inside `savings` (savings accounts), +`cash_isa`, `stocks_and_shares_isa` or `corporate_wealth`. The LISA columns are +a detail of gross financial wealth: they must never be added to it, to +`savings`, or to the ISA columns. The engine's `total_wealth` does not read +`gross_financial_wealth`, and no engine variable reads the LISA columns today; +the engine's means-test capital reads `savings` and `corporate_wealth`, so +neither cash ISAs nor LISAs reach it. Innovative-finance ISAs and ISAs of +unknown type remain inside gross financial wealth only. + +## Coverage and vintage + +- Balances are April 2020 to March 2022 pounds from a Great Britain donor and + are not uprated to the spine year. LISA holdings have grown since; a + published LISA stock or count series would be needed to uprate them. +- Northern Ireland adults are predicted from the Great Britain model. +- Conditional ownership odds from 2020-22 are applied to the 2024-25 spine. A + holder in 2024-25 can be up to about 47; the donor, interviewed earlier, + cannot show holders that old, so those ages carry only the model's small + probability. +- People in one household are drawn independently given their predictors. In + the donor, 24% of weighted holder households have two or more holders after + the credibility rule; on the candidate spine, 4% do (receipts, Part C). + +## On the candidate spine + +Measured on the licensed candidate spine (receipts, Parts C to F): + +- 1.25% of weighted adults hold a LISA, against the donor's 0.89%. Every age + group under 45 is above the donor's share, and 18 to 24 most (4.1% against + 2.1%). +- The weighted median owner balance is £6,500, against the donor's £6,000, and + the p90 is £15,000 against £10,000. +- The excess comes from the inputs, not the fit. The spine's WAS financial + draws, from the `was_wealth` stage and unchanged here, have two to four times + the donor's median gross financial wealth at every age. Financial wealth is + the ownership model's strongest predictor. +- Receipts Part F measures the alternatives: dropping the financial predictors, + or recalibrating the intercept by age group. +- The coherence cap binds on fewer than 10 households and removes 0.5% of the + weighted LISA mass. + +## What the fields support + +The fields support analysis of who holds LISAs and how much they hold, for +example the distribution of LISA wealth, or a means-test or wealth measure that +counts LISA balances once the engine reads them. They do not support reliable +scoring of reforms to the annual payment limit or the bonus rate, which depend +on contributions; reforms to withdrawals or to first-home purchases, which need +withdrawal and purchase flows and eligibility; or a cash-versus-stocks-and- +shares split, which WAS does not record. + +## The annual-contribution gap + +WAS measures holdings and values at interview. It has no LISA-specific amount +paid in during a tax year. A balance accumulates payments, bonuses, returns and +withdrawals, so it does not identify the payments of a particular year, and +holding a LISA does not show whether the person paid in that year. The stage +therefore creates no contribution column and derives no contribution or bonus +from a balance. + +References for a future contribution extension, carried from the issue as +references only (not requests to obtain data or to contact providers or HMRC): + +- Moneybox and CBI Economics, + [The value of Lifetime ISAs](https://www.moneyboxapp.com/wp-content/uploads/2025/10/CBI-Economics-The-Value-of-Lifetime-ISAs.pdf#page=17), + pp. 17-18: LISA deposit totals and means by income band and employment status + for 2024-25, from proprietary provider data with extrapolation. +- Moneybox, + [written evidence to Parliament, section 9](https://committees.parliament.uk/writtenevidence/136651/html/): + the share of its customers who reached the annual limit in 2024. +- HMRC, [Annual savings statistics 2026](https://www.gov.uk/government/statistics/annual-savings-statistics-2026), + ISA subscription totals and counts (Table 9.4), with the + [methodology](https://www.gov.uk/government/statistics/annual-savings-statistics-2026/annual-savings-statistics-background-and-methodology) + describing the separate LISA administrative source. + +A contribution extension would build on the ownership and balance fields +added here. diff --git a/experiments/1003-uk-lisa-receipts.md b/experiments/1003-uk-lisa-receipts.md new file mode 100644 index 000000000..99edd02e0 --- /dev/null +++ b/experiments/1003-uk-lisa-receipts.md @@ -0,0 +1,364 @@ +# microcosm#1003 receipts: Lifetime ISA holdings from the WAS round-8 person tab + +Plan: `repos/uk-1003-lisa-plan-2026-09-29.md`, approved 2026-09-29. María's rulings: + +- 2026-09-23: a new person-grain stage `was_lisa` right after `was_wealth`; the household total + capped pro rata at `gross_financial_wealth`, with a receipt. +- 2026-09-29: a declared credibility rule for impossible donor records; ownership from a + weighted ridge logistic with person-keyed draws; the balance from the holders-only house QRF. + +Branch `uk-1003-lisa` in `repos/populace-1003`, off main `5187fce25` (no UK change since +`6a70cd4ee`, the #901 merge). Commits: C1 `88182f311` (runtime), C2 `0c7f19002` (manifest, +graph, driver, fixture), C3 `360e7846c` (gates, export cells, support bounds). The licensed +builds, sidecars and measurement scripts live under `data/ukds/acceptance/1003-lisa/`, outside +the tree. `docs/evidence/uk-lisa-1003/` has aggregate extracts, and +[`docs/uk-lisa-1003.md`](../docs/uk-lisa-1003.md) is the topic doc. + +Disclosure control follows the lane convention: + +- Donor counts under 10 are suppressed, and so is any count that would reveal one by + subtraction. +- Balance quantiles and means are rounded to two significant figures, and weighted medians of + financial wealth to three. +- No single respondent's value is quoted. + +Builds. Every licensed build used the SPI-first spine recipe of the #930 lane plus +`--was-person-tab`, with seed 42 and the same pinned inputs. Both trees carry one +measurement-only relaxation, never committed, while #1049 is open on main: the PLAN_5 student-loan +realisation deviation limit is raised from 1.0 to 2.0 in `uk/gates.json`. The builds are: + +- `spine-ctl`: main `5187fce25`. +- `spine-lisa`: the branch head `360e7846c`. +- `spine-lisa-2`: the same tree again, for determinism. +- `spine-lisa-b`: the head with the four financial predictors removed from both models. This is + measurement only and was not committed (Part F). + +## Part A. The donor audit + +The stage reads two licensed tabs, pinned in `uk/spec/sources.yaml` and checked by size and +sha256 at runtime: + +- the round-8 household tab, the `was_wealth` donor with the same pins; +- the person tab `was_round_8_person_eul_may_2025_230525.tab` (sha256 `1ca6fd37…d71a`, + 356,930,989 bytes). + +It reads 14 of the person tab's 4,079 columns. The person tab was extracted from the private +mirror's `was_2006_22.zip` (at `b3322dd5`), together with its `mrdoc/` documentation. + +Join and pin check (`clean_was_lisa_donor` on the pinned tabs): + +- 32,271 persons read in 15,128 households. Every person joins exactly one household on + `CASER8`. +- The released person values `DVFLISAvR8` sum to the household's `DVFLISAVR8_aggr` on all + 15,128 households. The largest absolute difference is £0; the tolerance is £1. +- 4,996 dependent children are excluded. None carries a LISA value. +- The donor is 27,275 non-dependent adults, weighted to 50.2 million. +- There are no missing or negative values and no sentinel recodes of the two person income + predictors. +- The released ownership flag `fisa_binary3r8_i` agrees with a positive value on every record. +- There are 141 released holders, 0.93% of weighted adults. + +Response classes after the credibility rule are recorded in the stage evidence and never used as +predictors: + +- 26,888 observed non-holders. +- 246 non-holders whose ownership ONS imputed. +- 107 holders with an exact reported value. +- 13 holders with a banded value or whose ownership ONS imputed. Both classes are under 10 and are + reported together. +- 21 holders recoded by the rule. + +Over the 141 released holders, 126 reported an exact value. The other 15 reported a band or had +one imputed, and ONS's imputed value lies inside the band for every one of them (the plan's audit +against the round-8 codebook). + +The credibility rule (`clean_was_lisa_donor.credibility_rule`; its basis is in the topic doc): + +- 21 holders in age bands starting at 45 or above are recoded to non-holders. They are 4.3% of + the weighted released holders and 26.2% of the weighted LISA mass. +- Fewer than 10 holders above £40,000 stay holders but leave the balance fit. +- Together these records are about 5% of the weighted holders and about a third of the weighted + LISA mass. +- After the rule there are 120 holders, 0.890% of weighted adults. + +Credible holder balances, weighted: + +- p10 £500 +- p25 £1,500 +- median £6,000 +- p75 £10,000 +- p90 £10,000 +- weighted mean £6,100 + +Donor ownership by group (weighted share of adults): + +| Group | Share | +| --- | --- | +| all adults | 0.890% | +| 18–24 | 2.09% | +| 25–34 | 2.39% | +| 35–44 | 1.70% | +| 45–54 | 0 (the rule) | +| 55+ | 0 (the rule) | +| female / male | 0.72% / 1.07% | +| private renters / other tenures | 2.74% / 0.54% | +| household net income tertiles 1–2 / tertile 3 | 0.45% / 1.78% | + +## Part B. The ownership model + +Held-out comparison on the cleaned donor: 5 folds by household (fold seed 7), run through the +stage's own `fit_ownership_model` with the committed declaration. The alternatives are: + +- the house regime gate (`HistGradientBoostingClassifier` at library defaults, as + `RegimeGatedQRF` fits it); +- the same classifier tuned for rare events; +- the donor's weighted rates by age group. + +Each entry is the probability-weighted ownership share of held-out adults, and the last row is +the held-out weighted log loss: + +| Held out | Donor | Stage logistic | House gate | Tuned boosting | Age-group rates | +| --- | --- | --- | --- | --- | --- | +| all adults | 0.890% | 0.873% | 0.622% | 0.711% | 0.884% | +| 18–24 | 2.09% | 2.03% | 1.25% | 1.49% | 2.09% | +| 25–34 | 2.39% | 2.33% | 1.73% | 1.88% | 2.36% | +| 35–44 | 1.70% | 1.67% | 0.92% | 1.43% | 1.69% | +| 45–54 | 0 | 0.006% | 0.094% | 0.017% | 0 | +| 55+ | 0 | 0.009% | 0.093% | 0.016% | 0 | +| private renters | 2.74% | 2.69% | 1.69% | 1.84% | 1.26% | +| other tenures | 0.54% | 0.52% | 0.42% | 0.49% | 0.81% | +| income tertiles 1–2 | 0.45% | 0.53% | 0.36% | 0.41% | 0.80% | +| income tertile 3 | 1.78% | 1.56% | 1.14% | 1.32% | 1.04% | +| log loss × 1000 | | 39.4 | 52.4 | 39.9 | 44.0 | + +How the models compare: + +- **House gate.** It is miscalibrated for an outcome held by under one per cent of adults. It + reproduces 0.62% against 0.89%, understates each age group under 45 by between a quarter and a + half, and has the worst held-out log loss. +- **Tuned boosting.** Tuning closes part of the gap, not all of it. +- **Age-group rates.** They are calibrated by age but blind to tenure and income. +- **Stage logistic.** It matches every age and tenure margin within 0.07 points, with the lowest + log loss. + +A plan-time probe found the logistic's fit stable for the ridge constant C from 0.1 to 10. María +ruled for the logistic on 2026-09-29. + +Balance, held out on the credible holders (the committed holders-only QRF, drawn at the stage's +person-keyed quantile): + +- Held-out draws: p10 £500, p25 £950, median £5,000, p75 £8,800, p90 £15,000, mean £5,700. +- The donor's own values: £500, £1,500, £6,000, £10,000 and £10,000, mean £6,100. + +With under 100 training holders per fold the held-out draws are noisy. Their median sits £1,000 +below the donor's, their p90 sits above it, and their mean is 7% lower. + +The ownership model on the full donor (stage evidence), in terms of standardised coefficients: + +- The age groups under 45 carry +0.88 to +1.06, and 45 and over −1.03 and −0.89. +- Log gross financial wealth has +0.97, log earnings +0.76, log savings +0.42, and private + renting +0.40. +- Log stocks-and-shares ISA has −0.28 and the number of children −0.18. +- Sex (−0.09), cash ISA and household net income are small. + +The weighted mean probability matches the donor share (0.8897% against 0.8902%), as the +unpenalised intercept guarantees up to solver tolerance. By age group, the model's mean probability is within 0.02 points of the +donor share. The solver converged in 22 iterations. + +## Part C. Realised holdings against the donor + +Stage evidence of `spine-lisa`: 57,733 persons at stage time, 45,920 of them adults. The 11,813 +persons under 18 are set to zero. Weighted ownership share of adults: + +| Group | Donor | Spine | Spine, arm B | +| --- | --- | --- | --- | +| all adults | 0.890% | 1.25% | 1.06% | +| model's expected share on the spine | | 1.36% | 1.09% | +| 18–24 | 2.09% | 4.14% | 2.91% | +| 25–34 | 2.39% | 3.02% | 3.00% | +| 35–44 | 1.70% | 2.61% | 2.15% | +| 45–54 | 0 | 0.020% | 0.020% | +| 55+ | 0 | 0.020% | 0.006% | +| female | 0.72% | 1.07% | 0.91% | +| male | 1.07% | 1.44% | 1.22% | +| private renters | 2.74% | 4.01% | 3.53% | +| other tenures | 0.54% | 0.68% | 0.55% | +| household net income tertiles 1–2 | 0.45% | 0.87% | 0.71% | +| household net income tertile 3 | 1.78% | 2.01% | 1.77% | +| FRS-channel rows | | 1.38% | 1.12% | +| SPI-channel rows | | 1.11% | 1.00% | + +Arm B is the measurement build without the financial predictors (Part F). Income tertiles are +computed on each side's own distribution. The donor's lowest tertile has fewer than 10 holders, +so tertiles 1 and 2 are merged throughout. On the spine the merged share is the mean of its two +first tertiles' shares, which carry equal weight by construction. + +The spine holds 1.4 times the donor's share. Part F traces the excess to the spine's WAS +financial draws. + +Owner balances, weighted: + +| Owners | p10 | p25 | Median | p75 | p90 | Mean | +| --- | --- | --- | --- | --- | --- | --- | +| donor credible holders | £500 | £1,500 | £6,000 | £10,000 | £10,000 | £6,100 | +| spine | £1,000 | £2,400 | £6,500 | £10,000 | £15,000 | £6,700 | +| spine, arm B | £500 | £1,400 | £5,000 | £9,000 | £10,000 | £5,600 | + +No drawn balance exceeds £20,000, and every balance lies within the credible donor range. The +weighted LISA total at stage time is £4.45 billion. That figure is 2020-22 pounds on the 2024-25 +spine population and is not uprated. + +Co-holding: 24% of the donor's weighted holder households have two or more holders, against 4% +on the spine. Persons are drawn independently given their predictors (topic doc, coverage +section). This is receipted and not modelled. + +Cross-check against the H5. `lisa_receipt.py` recomputes the realised figures from the written +`spine-lisa.h5`, which holds 116,077 persons and 92,321 adults. It finds 1.258% of weighted +adults holding, an owner mean of £6,800 and £4.55 billion. The H5 is the spine after the CGT +stages: + +- `cgt_incidence_clone` copies every household and splits its weight. +- `cgt_band_donors` adds 392,000 households of support mass drawn from existing households. + +The copies carry their source's LISA cells, so shares move by under 0.01 points and the total by +the donors' mass. + +## Part D. Coherence, support and release checks + +Coherence cap (`cap_lifetime_isa_to_financial_wealth`, pro rata within the household): + +- Fewer than 10 households had a LISA total above their `gross_financial_wealth` draw, and their + persons were scaled. +- No owner was cleared. +- £23 million weighted was removed, 0.51% of the weighted LISA mass. +- After the cap no household total exceeds its gross financial wealth. On the written H5 the + household total equals the sum of its persons to £0. + +Support: the stage's `support_clip` on `lifetime_isa_balance` clipped no row low and no row high +out of 57,733. The committed `uk/was_lisa_support_bounds.json` bounds the column at +[0, 30,000]: the credible donor range, rounded outward to one significant figure by +`tools/build_uk_was_lisa_support_bounds.py`, whose `--check` passes on the pinned tabs. + +Release-side checks on the written H5, with the functions the terminal gates use: + +- None of the three cells is degenerate. Their dtypes are bool, float64 and float64. +- The support gate on the committed bounds passes. +- Every value is non-negative. +- All three cells are on the UK export allow-list. +- `has_lifetime_isa` is true exactly where `lifetime_isa_balance` is positive, on every row. + +Spine gate battery: + +- 27 of 27 gates pass on `spine-lisa`; the control passes 26 of 26. +- The new gate is `uk_stage_was_lisa_support` (`stage_health`, `check: support_clip`, + `release_blocking`, phase `transferred`). It passes with no failures on one column checked. +- Neither build is a release candidate, so `shippable` is false on both by construction. + +## Part E. Twin diff and determinism + +Twin: `spine-ctl` against `spine-lisa`. The payload compare and classification ran with +`tools/compare_uk_h5_payload.py` and `tools/classify_uk_payload_diff.py`, against the declared +expectation `spine-lisa-payload-expectation.json`. + +The two H5s have equal store keys and equal row counts: 53,806 households, 62,469 benefit units +and 116,077 persons. + +- `benunit` and `time_period` are payload-identical. +- `household` differs only by `household_lifetime_isa_balance`. +- `person` differs only by `has_lifetime_isa` and `lifetime_isa_balance`. +- Dropping the new columns leaves frames equal to the control's. +- The root mass log grows from 15 to 16 records. The one added record is the `was_lisa` receipt: + household mass 29,422,433 conserved, declared factor 1.0. Every control record is still present. + +The classifier observed the four expected changes and no expected change went unobserved. It +reported two unexpected items: the household and person `__column_order__`, which the +expectation format cannot declare because the new columns join mid-table. Both were adjudicated +by the drop-and-compare above. Verdict: true. + +Determinism: `spine-lisa-2` was rebuilt from the same tree and inputs. + +- `tools/compare_uk_h5_payload.py` reports `payload_identical: true` against `spine-lisa`. +- The file digests differ (`587128b5…` and `be100ef3…`). HDF5 writes differ at the byte level. +- Every store key is equal, the root mass log is equal, and the `was_lisa` stage evidence is + equal. + +## Part F. The financial predictors carry the spine's financial-wealth level + +This part is an open ruling for María. + +The logistic reproduces the donor when held out (Part B), yet on the spine its expected share is +1.36% against the donor's 0.89%. The model is not the cause; its inputs differ. + +- **Wealth draws.** The spine's WAS financial draws sit well above the donor's at every age. +- **Coefficients.** The two largest standardised financial coefficients (log gross financial + wealth +0.97, log savings +0.42) carry that level into ownership. + +`fw_probe.py` compares the stage-time spine with the stage's own cleaned donor, in weighted +medians and weighted means of log(1 + x) over adults. The stage-time spine is the candidate H5 +without the CGT band donors; a clone and its original carry identical cells and their weights sum +to the stage-time weight. + +| Age | Median gross financial wealth, donor | Spine | Ratio | Mean log, gross financial wealth, donor / spine | Mean log, savings, donor / spine | Private renters, donor / spine | +| --- | --- | --- | --- | --- | --- | --- | +| 18–24 | £12,200 | £48,800 | 4.0 | 9.21 / 10.37 | 5.72 / 6.75 | 19.0% / 30.3% | +| 25–34 | £8,820 | £26,300 | 3.0 | 8.75 / 9.87 | 5.02 / 5.93 | 26.0% / 35.1% | +| 35–44 | £12,000 | £30,200 | 2.5 | 9.13 / 10.10 | 5.13 / 5.99 | 21.0% / 23.6% | +| 45–54 | £15,000 | £47,000 | 3.1 | 9.25 / 10.43 | 5.53 / 6.43 | 17.7% / 15.4% | +| 55+ | £31,800 | £70,300 | 2.2 | 9.94 / 10.69 | 5.79 / 6.60 | 8.3% / 7.0% | + +- **Channels.** The gap is on both channels. The median for 18–24 is £46,100 on FRS-channel rows + and £52,300 on SPI-channel rows; for 35–44 it is £32,000 and £28,300. +- **Earnings.** Mean log earnings are 0.36 to 0.47 higher on the spine in every age group. Spine + incomes are 2024-25 pounds and the donor's are 2020-22 pounds. +- **Private renting.** Among adults under 35 the private-renting share is 9 to 11 points higher + on the spine. +- **Not introduced here.** The twin (Part E) shows every `was_wealth` column byte-identical to + main. The register's standing wealth adjudication (`spine_swap_signed_differences.json`, + `was-wealth-qrf-incidence`) already records the spine's savings mean at 1.97 times the donor + per household. +- **Uprating.** No `was_wealth` operation uprates the donor's 2020-22 values, its wealth or its + income predictors. Spine households, whose incomes are 2024-25 pounds, therefore condition on + richer donors. How much of the gap that explains is a question for the follow-up. + +Three options, measured or implied on the same inputs: + +- **(a) Keep the approved design.** On the spine: + - Ownership is 1.25% (660,000 weighted holders on 52.7 million adults at stage time) and twice + the donor's share at 18–24. + - Owner balances run higher: median £6,500, p90 £15,000. + - The cap removes 0.5% of the LISA mass. +- **(b) Drop the four financial predictors** (gross financial wealth, savings, cash ISA, + stocks-and-shares ISA) from both models. This is arm B, built and measured but not committed. + - Ownership falls to 1.06% (560,000), and household net income takes over part of the wealth + signal (its coefficient rises from +0.03 to +0.74). + - The age profile is closer to the donor's but still above it at every age under 45, where the + spine's earnings and private-renting share are also above the donor's. + - Balances fall to the donor's shape (median £5,000, p90 £10,000). + - Coherence breaks. Ownership no longer follows the household's financial wealth, so the cap + binds on 76 households, removes 12.7% of the weighted LISA mass, and clears fewer than 10 + owners whose household has no financial wealth. +- **(c) Keep the predictors and recalibrate the intercept by age group** so the spine's expected + share in each age group under 45 equals the donor's. This is not built. It is a declared, + receipted step after the fit. + - It implies 0.82% of the spine's adults (430,000). The spine's adults are older than the + donor's: 45% are 55 or over, against 40%. + - Within each age group, the ranking by financial wealth, and with it the coherence, stays as + in (a). + - Balances stay as in (a), because the balance forest still conditions on the financial draws. + - It anchors the 2024-25 spine to the 2020-22 donor rate, and holdings have grown since. + +Whichever option she picks, the `was_wealth` level is a follow-up in its own right: it moves every +reader of the financial draws, not only this stage. + +## Part G. The annual-contribution gap + +WAS measures holdings and values at interview, and has no LISA-specific amount paid in during a +tax year. A balance accumulates payments, bonuses, returns and withdrawals, so it does not +identify one year's payments. Holding a LISA does not show that the person paid in that year. + +The stage creates no contribution column and derives no contribution or bonus from a balance. The +issue's references for a future extension are carried in the topic doc as references only: + +- Moneybox and CBI Economics on deposits by income band; +- Moneybox's written evidence on the share of customers at the annual limit; +- HMRC's annual savings statistics and the separate LISA administrative source. diff --git a/packages/microcosm-build/src/microcosm/build/uk/spine_swap_signed_differences.json b/packages/microcosm-build/src/microcosm/build/uk/spine_swap_signed_differences.json index 4a0131272..ae1f33a65 100644 --- a/packages/microcosm-build/src/microcosm/build/uk/spine_swap_signed_differences.json +++ b/packages/microcosm-build/src/microcosm/build/uk/spine_swap_signed_differences.json @@ -845,6 +845,58 @@ ] } } + }, + { + "id": "lifetime-isa-person-net-new-column", + "class": "net_new_column", + "scope": { + "surface": "nonzero_shares", + "columns": [ + "has_lifetime_isa", + "lifetime_isa_balance" + ], + "entities": [ + "person" + ] + }, + "expectation": "column_missing_in_reference", + "magnitude_evidence": "The was_lisa stage (microcosm#1003) imputes each adult's Lifetime ISA holding from the WAS round-8 person tab: has_lifetime_isa from a weighted ridge logistic with person-keyed draws, lifetime_isa_balance from the regime-gated QRF fitted on the credible donor holders, positive exactly where the person holds (both zero under 18). The pinned incumbent has no such columns, so they are present in the candidate and absent from the reference: coverage the spine adds rather than a divergence in a shared column. On the licensed candidate spine 996 of 116,077 person rows hold (unweighted nonzero share 0.00858 on both columns); 1.25% of weighted adults hold at stage time against the donor's 0.89%, with a weighted median owner balance of GBP 6,500 against the donor's GBP 6,000, the excess traced to the spine's WAS financial draws (receipts Part F).", + "evidence": "experiments/1003-uk-lisa-receipts.md#part-c-realised-holdings-against-the-donor", + "adjudicator": "juaristi22", + "adjudicated_on": "2026-09-29", + "quantitative": { + "structural": { + "expected_columns": [ + "has_lifetime_isa", + "lifetime_isa_balance" + ] + } + } + }, + { + "id": "lifetime-isa-household-net-new-column", + "class": "net_new_column", + "scope": { + "surface": "nonzero_shares", + "columns": [ + "household_lifetime_isa_balance" + ], + "entities": [ + "household" + ] + }, + "expectation": "column_missing_in_reference", + "magnitude_evidence": "household_lifetime_isa_balance is the sum of the household's persons' lifetime_isa_balance (the was_lisa stage, microcosm#1003), after the pro-rata cap at the household's gross_financial_wealth draw, inside which WAS already counts LISAs; it is a detail of gross financial wealth and is never added to it. The pinned incumbent has no such column, so it is present in the candidate and absent from the reference: coverage the spine adds rather than a divergence in a shared column. On the licensed candidate spine 964 of 53,806 household rows carry a positive total (unweighted nonzero share 0.0179; 2.16% of weighted households), the total equals the sum of its persons on every row and no total exceeds its gross financial wealth.", + "evidence": "experiments/1003-uk-lisa-receipts.md#part-d-coherence-support-and-release-checks", + "adjudicator": "juaristi22", + "adjudicated_on": "2026-09-29", + "quantitative": { + "structural": { + "expected_columns": [ + "household_lifetime_isa_balance" + ] + } + } } ] } From 13f293a98783e318c53426d59554d9356c716cc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Juaristi?= <127882282+juaristi22@users.noreply.github.com> Date: Tue, 29 Sep 2026 15:06:23 +0100 Subject: [PATCH 05/17] Receipts: label the Part F table and cite HMRC's 2024-25 LISA subscription growth (#1003) Co-Authored-By: Claude Opus 5.5 --- experiments/1003-uk-lisa-receipts.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/experiments/1003-uk-lisa-receipts.md b/experiments/1003-uk-lisa-receipts.md index 99edd02e0..1cd6f0ccb 100644 --- a/experiments/1003-uk-lisa-receipts.md +++ b/experiments/1003-uk-lisa-receipts.md @@ -162,8 +162,8 @@ The ownership model on the full donor (stage evidence), in terms of standardised - Sex (−0.09), cash ISA and household net income are small. The weighted mean probability matches the donor share (0.8897% against 0.8902%), as the -unpenalised intercept guarantees up to solver tolerance. By age group, the model's mean probability is within 0.02 points of the -donor share. The solver converged in 22 iterations. +unpenalised intercept guarantees up to solver tolerance. By age group, the model's mean +probability is within 0.02 points of the donor share. The solver converged in 22 iterations. ## Part C. Realised holdings against the donor @@ -298,7 +298,7 @@ medians and weighted means of log(1 + x) over adults. The stage-time spine is th without the CGT band donors; a clone and its original carry identical cells and their weights sum to the stage-time weight. -| Age | Median gross financial wealth, donor | Spine | Ratio | Mean log, gross financial wealth, donor / spine | Mean log, savings, donor / spine | Private renters, donor / spine | +| Age | Median gross financial wealth, donor | Median, spine | Ratio | Mean log, gross financial wealth, donor / spine | Mean log, savings, donor / spine | Private renters, donor / spine | | --- | --- | --- | --- | --- | --- | --- | | 18–24 | £12,200 | £48,800 | 4.0 | 9.21 / 10.37 | 5.72 / 6.75 | 19.0% / 30.3% | | 25–34 | £8,820 | £26,300 | 3.0 | 8.75 / 9.87 | 5.02 / 5.93 | 26.0% / 35.1% | @@ -345,7 +345,9 @@ Three options, measured or implied on the same inputs: - Within each age group, the ranking by financial wealth, and with it the coherence, stays as in (a). - Balances stay as in (a), because the balance forest still conditions on the financial draws. - - It anchors the 2024-25 spine to the 2020-22 donor rate, and holdings have grown since. + - It anchors the 2024-25 spine to the 2020-22 donor rate, and holdings have grown since: + HMRC reports LISA subscriptions 20.1% (£472 million) higher in 2024 to 2025 + ([annual savings statistics, September 2026 commentary](https://www.gov.uk/government/statistics/annual-savings-statistics-2026/commentary-for-annual-savings-statistics-september-2026)). Whichever option she picks, the `was_wealth` level is a follow-up in its own right: it moves every reader of the financial draws, not only this stage. From 1e6448c4be88db15a155e663a7b5203929f73fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Juaristi?= <127882282+juaristi22@users.noreply.github.com> Date: Wed, 30 Sep 2026 14:30:03 +0100 Subject: [PATCH 06/17] Withhold the released exact/banded holder split (review round 1, item 1) The receipts and the topic doc published the released split (126 exact, 15 banded) beside the classes after the credibility rule (107 exact, 13 banded or ONS-imputed, 21 recoded), which reveals by subtraction that two of the recoded holders were banded: a count under 10, against the evidence's own redaction rule. The released split is dropped; the finding that every ONS-imputed value lies inside its band stands without it. Co-Authored-By: Claude Opus 5.5 --- docs/uk-lisa-1003.md | 8 ++++---- experiments/1003-uk-lisa-receipts.md | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/uk-lisa-1003.md b/docs/uk-lisa-1003.md index db6272bf4..cb0b40f07 100644 --- a/docs/uk-lisa-1003.md +++ b/docs/uk-lisa-1003.md @@ -55,10 +55,10 @@ stage evidence and never used as a predictor: imputed; - holder recoded by the credibility rule below. -On the pinned tab, 126 of the 141 released holders reported an exact value. The -other 15 reported or were imputed a band, and ONS's imputed value lies inside -the band for every one of them. The model trains on the ONS-completed values, as -the `was_wealth` stage trains on ONS-completed household aggregates. +On the pinned tab, most released holders reported an exact value. For every +holder who reported a band or had one imputed, ONS's imputed value lies inside +the band. The model trains on the ONS-completed values, as the `was_wealth` +stage trains on ONS-completed household aggregates. ## Credibility rule diff --git a/experiments/1003-uk-lisa-receipts.md b/experiments/1003-uk-lisa-receipts.md index 1cd6f0ccb..85852ad18 100644 --- a/experiments/1003-uk-lisa-receipts.md +++ b/experiments/1003-uk-lisa-receipts.md @@ -68,9 +68,10 @@ predictors: reported together. - 21 holders recoded by the rule. -Over the 141 released holders, 126 reported an exact value. The other 15 reported a band or had -one imputed, and ONS's imputed value lies inside the band for every one of them (the plan's audit -against the round-8 codebook). +Most released holders reported an exact value. For every holder who reported a band or had one +imputed, ONS's imputed value lies inside the band (the plan's audit against the round-8 codebook). +The released split between exact and banded values is not published: together with the classes +after the rule it would reveal, by subtraction, a count under 10 among the recoded holders. The credibility rule (`clean_was_lisa_donor.credibility_rule`; its basis is in the topic doc): From 575b23bdaf3aff4aa4f81faa4df61d710ac5ebb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Juaristi?= <127882282+juaristi22@users.noreply.github.com> Date: Wed, 30 Sep 2026 14:31:02 +0100 Subject: [PATCH 07/17] Label the donor's youngest age group 16-24 wherever it is published (review round 1, item 4) WAS counts adults from 16 and the public file bands age 15-19, so the donor's first ownership group (lower bound 0, non-dependent adults) spans 16-24 while the recipient's spans 18-24 (minimum age 18). Every published donor figure for that group is now labelled 16-24: the receipts' Part A, B, C and F tables, the topic doc, and the evidence CSVs (the extraction script maps the evidence's recipient-side key to the donor span; values unchanged). Part A states the band's size (about 30% of the group's weight, fewer than 10 of its holders) and why the model keeps it: the band carries the 18-19-year-old holders it cannot separate from 16-17. Co-Authored-By: Claude Opus 5.5 --- .../uk-lisa-1003/financial_draws_by_age.csv | 2 +- .../uk-lisa-1003/ownership_model_comparison.csv | 2 +- .../evidence/uk-lisa-1003/ownership_realised.csv | 2 +- .../scripts/extract_lisa_1003_evidence.py | 16 ++++++++++++---- docs/uk-lisa-1003.md | 6 ++++-- experiments/1003-uk-lisa-receipts.md | 16 +++++++++++----- 6 files changed, 30 insertions(+), 14 deletions(-) diff --git a/docs/evidence/uk-lisa-1003/financial_draws_by_age.csv b/docs/evidence/uk-lisa-1003/financial_draws_by_age.csv index 452521fa6..45a8a0821 100644 --- a/docs/evidence/uk-lisa-1003/financial_draws_by_age.csv +++ b/docs/evidence/uk-lisa-1003/financial_draws_by_age.csv @@ -1,5 +1,5 @@ population,age_group,weighted_adult_share_pct,gross_financial_wealth_weighted_median_gbp,gross_financial_wealth_weighted_mean_log1p,savings_weighted_mean_log1p,cash_isa_weighted_mean_log1p,stocks_and_shares_isa_weighted_mean_log1p,employment_income_weighted_mean_log1p,private_renter_share_pct -donor,18-24,9.3,12200,9.21,5.72,2.5,1.11,5.59,19.0 +donor,16-24,9.3,12200,9.21,5.72,2.5,1.11,5.59,19.0 donor,25-34,17.3,8820,8.75,5.02,2.34,0.92,7.76,26.0 donor,35-44,16.6,12000,9.13,5.13,2.71,1.08,7.83,21.0 donor,45-54,17.1,15000,9.25,5.53,2.61,1.32,7.52,17.7 diff --git a/docs/evidence/uk-lisa-1003/ownership_model_comparison.csv b/docs/evidence/uk-lisa-1003/ownership_model_comparison.csv index 6791acb1d..843b6b1b5 100644 --- a/docs/evidence/uk-lisa-1003/ownership_model_comparison.csv +++ b/docs/evidence/uk-lisa-1003/ownership_model_comparison.csv @@ -1,6 +1,6 @@ group,donor_pct,stage_logistic_pct,house_gate_boosting_defaults_pct,boosting_tuned_rare_events_pct,age_group_rates_pct all adults,0.890,0.873,0.622,0.711,0.884 -18-24,2.092,2.032,1.251,1.491,2.092 +16-24,2.092,2.032,1.251,1.491,2.092 25-34,2.388,2.328,1.733,1.881,2.357 35-44,1.700,1.665,0.920,1.434,1.693 45-54,0.000,0.006,0.094,0.017,0.000 diff --git a/docs/evidence/uk-lisa-1003/ownership_realised.csv b/docs/evidence/uk-lisa-1003/ownership_realised.csv index b3c368c8a..862f24e80 100644 --- a/docs/evidence/uk-lisa-1003/ownership_realised.csv +++ b/docs/evidence/uk-lisa-1003/ownership_realised.csv @@ -1,7 +1,7 @@ group,donor_pct,spine_pct,spine_arm_b_pct all adults,0.890,1.251,1.062 model expected share,,1.357,1.087 -18-24,2.092,4.141,2.912 +18-24 (donor 16-24),2.092,4.141,2.912 25-34,2.388,3.017,3.002 35-44,1.700,2.613,2.153 45-54,0.000,0.020,0.020 diff --git a/docs/evidence/uk-lisa-1003/scripts/extract_lisa_1003_evidence.py b/docs/evidence/uk-lisa-1003/scripts/extract_lisa_1003_evidence.py index 9743e0eec..066803e70 100644 --- a/docs/evidence/uk-lisa-1003/scripts/extract_lisa_1003_evidence.py +++ b/docs/evidence/uk-lisa-1003/scripts/extract_lisa_1003_evidence.py @@ -8,7 +8,10 @@ tertile holds fewer than 10 holders, so income is published as tertiles 1-2 against tertile 3; balance quantiles and means are rounded to two significant figures; no single respondent's value (a donor maximum, the spine's maximum draw) -is written. +is written. The stage evidence keys the youngest age group by the recipient's +label (18-24); on the donor side that group spans 16-24 (WAS adults start at 16 +and the public file's band 15-19 cannot separate 16-17 from 18-19), so every +donor figure for it is labelled 16-24 here. python docs/evidence/uk-lisa-1003/scripts/extract_lisa_1003_evidence.py \ --lane-dir data/ukds/acceptance/1003-lisa \ @@ -31,6 +34,8 @@ ("age-group rates", "age_group_rates"), ) QUANTILES = ("p10", "p25", "p50", "p75", "p90") +#: The donor's span for each recipient age-group label (review round 1, item 4). +DONOR_AGE_LABELS = {"18-24": "16-24"} def pct(value: float | None) -> str: @@ -112,7 +117,9 @@ def donor_audit(evidence: dict[str, Any]) -> list[list[Any]]: def model_comparison(comparison: dict[str, Any]) -> list[list[Any]]: rows: list[list[Any]] = [] keys = [("all_adults", "all adults")] - keys += [(f"age {group}", group) for group in AGE_GROUPS] + keys += [ + (f"age {group}", DONOR_AGE_LABELS.get(group, group)) for group in AGE_GROUPS + ] keys += [ ("private renters", "private renters"), ("other tenures", "other tenures"), @@ -161,9 +168,10 @@ def merged(profile: dict[str, Any]) -> float: ], ] for group in AGE_GROUPS: + donor_group = DONOR_AGE_LABELS.get(group, group) rows.append( [ - group, + group if donor_group == group else f"{group} (donor {donor_group})", pct(donor["by_age_group"][group]), pct(spine["by_age_group"][group]), pct(spine_b["by_age_group"][group]), @@ -259,7 +267,7 @@ def financial_draws(probe: dict[str, Any]) -> list[list[Any]]: rows.append( [ name, - group, + DONOR_AGE_LABELS.get(group, group) if name == "donor" else group, f"{row['weighted_adult_share'] * 100:.1f}", int(row["gross_financial_wealth_weighted_median"]), row["gross_financial_wealth_weighted_mean_log1p"], diff --git a/docs/uk-lisa-1003.md b/docs/uk-lisa-1003.md index cb0b40f07..017c47325 100644 --- a/docs/uk-lisa-1003.md +++ b/docs/uk-lisa-1003.md @@ -163,8 +163,10 @@ unknown type remain inside gross financial wealth only. Measured on the licensed candidate spine (receipts, Parts C to F): - 1.25% of weighted adults hold a LISA, against the donor's 0.89%. Every age - group under 45 is above the donor's share, and 18 to 24 most (4.1% against - 2.1%). + group under 45 is above the donor's share, the youngest most: 4.1% of the + spine's adults aged 18 to 24, against 2.1% of the donor's aged 16 to 24. The + donor's first group includes 16- and 17-year-olds, who cannot hold a LISA, + because the public file bands age 15 to 19. - The weighted median owner balance is £6,500, against the donor's £6,000, and the p90 is £15,000 against £10,000. - The excess comes from the inputs, not the fit. The spine's WAS financial diff --git a/experiments/1003-uk-lisa-receipts.md b/experiments/1003-uk-lisa-receipts.md index 85852ad18..b72a2fddd 100644 --- a/experiments/1003-uk-lisa-receipts.md +++ b/experiments/1003-uk-lisa-receipts.md @@ -96,7 +96,7 @@ Donor ownership by group (weighted share of adults): | Group | Share | | --- | --- | | all adults | 0.890% | -| 18–24 | 2.09% | +| 16–24 | 2.09% | | 25–34 | 2.39% | | 35–44 | 1.70% | | 45–54 | 0 (the rule) | @@ -105,6 +105,12 @@ Donor ownership by group (weighted share of adults): | private renters / other tenures | 2.74% / 0.54% | | household net income tertiles 1–2 / tertile 3 | 0.45% / 1.78% | +The donor's first age group spans 16 to 24, not 18 to 24. WAS counts adults from 16, and the +public file's band 15–19 cannot separate the 16- and 17-year-olds, who cannot hold a LISA, from +the 18- and 19-year-olds. That band is about 30% of the group's weight and holds fewer than 10 of +its holders. The model keeps the band, because it carries the 18–19-year-old holders, and applies +the group's coefficient to recipients aged 18 to 24. + ## Part B. The ownership model Held-out comparison on the cleaned donor: 5 folds by household (fold seed 7), run through the @@ -121,7 +127,7 @@ the held-out weighted log loss: | Held out | Donor | Stage logistic | House gate | Tuned boosting | Age-group rates | | --- | --- | --- | --- | --- | --- | | all adults | 0.890% | 0.873% | 0.622% | 0.711% | 0.884% | -| 18–24 | 2.09% | 2.03% | 1.25% | 1.49% | 2.09% | +| 16–24 | 2.09% | 2.03% | 1.25% | 1.49% | 2.09% | | 25–34 | 2.39% | 2.33% | 1.73% | 1.88% | 2.36% | | 35–44 | 1.70% | 1.67% | 0.92% | 1.43% | 1.69% | | 45–54 | 0 | 0.006% | 0.094% | 0.017% | 0 | @@ -175,7 +181,7 @@ persons under 18 are set to zero. Weighted ownership share of adults: | --- | --- | --- | --- | | all adults | 0.890% | 1.25% | 1.06% | | model's expected share on the spine | | 1.36% | 1.09% | -| 18–24 | 2.09% | 4.14% | 2.91% | +| 18–24 (donor 16–24) | 2.09% | 4.14% | 2.91% | | 25–34 | 2.39% | 3.02% | 3.00% | | 35–44 | 1.70% | 2.61% | 2.15% | | 45–54 | 0 | 0.020% | 0.020% | @@ -301,7 +307,7 @@ to the stage-time weight. | Age | Median gross financial wealth, donor | Median, spine | Ratio | Mean log, gross financial wealth, donor / spine | Mean log, savings, donor / spine | Private renters, donor / spine | | --- | --- | --- | --- | --- | --- | --- | -| 18–24 | £12,200 | £48,800 | 4.0 | 9.21 / 10.37 | 5.72 / 6.75 | 19.0% / 30.3% | +| 18–24 (donor 16–24) | £12,200 | £48,800 | 4.0 | 9.21 / 10.37 | 5.72 / 6.75 | 19.0% / 30.3% | | 25–34 | £8,820 | £26,300 | 3.0 | 8.75 / 9.87 | 5.02 / 5.93 | 26.0% / 35.1% | | 35–44 | £12,000 | £30,200 | 2.5 | 9.13 / 10.10 | 5.13 / 5.99 | 21.0% / 23.6% | | 45–54 | £15,000 | £47,000 | 3.1 | 9.25 / 10.43 | 5.53 / 6.43 | 17.7% / 15.4% | @@ -325,7 +331,7 @@ Three options, measured or implied on the same inputs: - **(a) Keep the approved design.** On the spine: - Ownership is 1.25% (660,000 weighted holders on 52.7 million adults at stage time) and twice - the donor's share at 18–24. + the donor's share in the youngest group (18–24 on the spine, 16–24 in the donor). - Owner balances run higher: median £6,500, p90 £15,000. - The cap removes 0.5% of the LISA mass. - **(b) Drop the four financial predictors** (gross financial wealth, savings, cash ISA, From 58a3b95b205c895dfc50ba3dc3bf9a2720ad7cf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Juaristi?= <127882282+juaristi22@users.noreply.github.com> Date: Wed, 30 Sep 2026 15:03:15 +0100 Subject: [PATCH 08/17] Stop reading the self-employment income no LISA model uses (review round 1, item 5) The stage read DVGISER8 from the person tab, recoded its sentinels and materialised the engine's person self_employment_income, but neither the ownership logistic nor the balance forest takes it as a predictor (as the approved plan specified). The person-tab read, the sentinel recode, the person-grain engine read and the donor column go; the closed schema branch drops the key. Outputs are unchanged. The household-level materialize_rules_engine_predictors list keeps its eight entries: it declares the inputs of the reused was_wealth predictor function, which materialises them in one call (the stage uses three). Lockstep: the synthetic person tab moves its sentinel to an adult's earnings (so the recode path stays covered), the H2 fixture and the release-input coverage manifest are regenerated, and the committed held-out comparison drops the feature from its two boosting arms (house gate 0.62% -> 0.58%, tuned 0.71% -> 0.72%; the logistic and the age-group rates are unchanged), with the receipts' Part B, the CSV and the topic doc following. Co-Authored-By: Claude Opus 5.5 --- .../ownership_model_comparison.csv | 22 +- .../uk-lisa-1003/scripts/model_comparison.py | 1 - docs/uk-lisa-1003.md | 6 +- experiments/1003-uk-lisa-receipts.md | 33 +- .../spec_engine/schema/sources.schema.json | 4 - .../uk/release_input_coverage_manifest.json | 30 +- .../src/microcosm/build/uk/source_stages.json | 4 +- .../src/microcosm/build/uk/spec/sources.yaml | 2 - .../microcosm/build/uk_runtime/was_lisa.py | 12 +- .../tests/engine_free/uk/test_uk_was_lisa.py | 8 +- .../parity/uk_spine/sources/fixture.json | 4 +- .../parity/uk_spine/sources/was_person.csv | 382 +++++++++--------- .../fixtures/parity/uk_spine/uk_spine.json | 2 +- tools/graph_uk_spine_fixture.py | 13 +- 14 files changed, 253 insertions(+), 270 deletions(-) diff --git a/docs/evidence/uk-lisa-1003/ownership_model_comparison.csv b/docs/evidence/uk-lisa-1003/ownership_model_comparison.csv index 843b6b1b5..7e9083ca7 100644 --- a/docs/evidence/uk-lisa-1003/ownership_model_comparison.csv +++ b/docs/evidence/uk-lisa-1003/ownership_model_comparison.csv @@ -1,12 +1,12 @@ group,donor_pct,stage_logistic_pct,house_gate_boosting_defaults_pct,boosting_tuned_rare_events_pct,age_group_rates_pct -all adults,0.890,0.873,0.622,0.711,0.884 -16-24,2.092,2.032,1.251,1.491,2.092 -25-34,2.388,2.328,1.733,1.881,2.357 -35-44,1.700,1.665,0.920,1.434,1.693 -45-54,0.000,0.006,0.094,0.017,0.000 -55+,0.000,0.009,0.093,0.016,0.000 -private renters,2.736,2.691,1.687,1.843,1.263 -other tenures,0.537,0.525,0.418,0.495,0.811 -household net income tertiles 1-2,0.446,0.528,0.360,0.408,0.804 -household net income tertile 3,1.776,1.561,1.144,1.317,1.044 -held-out weighted log loss x1000,,39.41,52.39,39.92,44.00 +all adults,0.890,0.873,0.582,0.718,0.884 +16-24,2.092,2.032,1.284,1.528,2.092 +25-34,2.388,2.328,1.322,1.855,2.357 +35-44,1.700,1.665,1.074,1.481,1.693 +45-54,0.000,0.006,0.098,0.015,0.000 +55+,0.000,0.009,0.096,0.015,0.000 +private renters,2.736,2.691,1.347,1.870,1.263 +other tenures,0.537,0.525,0.435,0.497,0.811 +household net income tertiles 1-2,0.446,0.528,0.346,0.406,0.804 +household net income tertile 3,1.776,1.561,1.052,1.339,1.044 +held-out weighted log loss x1000,,39.41,53.26,41.42,44.00 diff --git a/docs/evidence/uk-lisa-1003/scripts/model_comparison.py b/docs/evidence/uk-lisa-1003/scripts/model_comparison.py index ead31d3e5..a968aac5c 100644 --- a/docs/evidence/uk-lisa-1003/scripts/model_comparison.py +++ b/docs/evidence/uk-lisa-1003/scripts/model_comparison.py @@ -72,7 +72,6 @@ "age_band", "is_female", "employment_income", - "self_employment_income", "household_net_income", "num_adults", "num_children", diff --git a/docs/uk-lisa-1003.md b/docs/uk-lisa-1003.md index 017c47325..8bf38ace4 100644 --- a/docs/uk-lisa-1003.md +++ b/docs/uk-lisa-1003.md @@ -122,9 +122,9 @@ and its own WAS financial draws before the LISA draw. The ownership part is a logistic because the house regime gate (a gradient-boosting classifier) is miscalibrated for an outcome held by under one per cent of adults. Held out by household on the donor, the gate reproduced -0.62% ownership against the donor's 0.89% and understated each age group under -45 by between a quarter and a half. The logistic reproduced 0.87% and every age -and tenure margin within 0.07 points (María's ruling of 2026-09-29; the +0.58% ownership against the donor's 0.89% and understated each age group under +45 by more than a third. The logistic reproduced 0.87% and every age and tenure +margin within 0.07 points (María's ruling of 2026-09-29; the comparison is in the receipts, Part B). Household predictors use the `was_wealth` definitions. Tenure is the diff --git a/experiments/1003-uk-lisa-receipts.md b/experiments/1003-uk-lisa-receipts.md index b72a2fddd..f156e630d 100644 --- a/experiments/1003-uk-lisa-receipts.md +++ b/experiments/1003-uk-lisa-receipts.md @@ -53,8 +53,7 @@ Join and pin check (`clean_was_lisa_donor` on the pinned tabs): 15,128 households. The largest absolute difference is £0; the tolerance is £1. - 4,996 dependent children are excluded. None carries a LISA value. - The donor is 27,275 non-dependent adults, weighted to 50.2 million. -- There are no missing or negative values and no sentinel recodes of the two person income - predictors. +- There are no missing or negative values and no sentinel recodes of the earnings predictor. - The released ownership flag `fisa_binary3r8_i` agrees with a positive value on every record. - There are 141 released holders, 0.93% of weighted adults. @@ -126,28 +125,32 @@ the held-out weighted log loss: | Held out | Donor | Stage logistic | House gate | Tuned boosting | Age-group rates | | --- | --- | --- | --- | --- | --- | -| all adults | 0.890% | 0.873% | 0.622% | 0.711% | 0.884% | -| 16–24 | 2.09% | 2.03% | 1.25% | 1.49% | 2.09% | -| 25–34 | 2.39% | 2.33% | 1.73% | 1.88% | 2.36% | -| 35–44 | 1.70% | 1.67% | 0.92% | 1.43% | 1.69% | -| 45–54 | 0 | 0.006% | 0.094% | 0.017% | 0 | -| 55+ | 0 | 0.009% | 0.093% | 0.016% | 0 | -| private renters | 2.74% | 2.69% | 1.69% | 1.84% | 1.26% | -| other tenures | 0.54% | 0.52% | 0.42% | 0.49% | 0.81% | -| income tertiles 1–2 | 0.45% | 0.53% | 0.36% | 0.41% | 0.80% | -| income tertile 3 | 1.78% | 1.56% | 1.14% | 1.32% | 1.04% | -| log loss × 1000 | | 39.4 | 52.4 | 39.9 | 44.0 | +| all adults | 0.890% | 0.873% | 0.582% | 0.718% | 0.884% | +| 16–24 | 2.09% | 2.03% | 1.28% | 1.53% | 2.09% | +| 25–34 | 2.39% | 2.33% | 1.32% | 1.86% | 2.36% | +| 35–44 | 1.70% | 1.67% | 1.07% | 1.48% | 1.69% | +| 45–54 | 0 | 0.006% | 0.098% | 0.015% | 0 | +| 55+ | 0 | 0.009% | 0.096% | 0.015% | 0 | +| private renters | 2.74% | 2.69% | 1.35% | 1.87% | 1.26% | +| other tenures | 0.54% | 0.52% | 0.43% | 0.50% | 0.81% | +| income tertiles 1–2 | 0.45% | 0.53% | 0.35% | 0.41% | 0.80% | +| income tertile 3 | 1.78% | 1.56% | 1.05% | 1.34% | 1.04% | +| log loss × 1000 | | 39.4 | 53.3 | 41.4 | 44.0 | How the models compare: - **House gate.** It is miscalibrated for an outcome held by under one per cent of adults. It - reproduces 0.62% against 0.89%, understates each age group under 45 by between a quarter and a - half, and has the worst held-out log loss. + reproduces 0.58% against 0.89%, understates each age group under 45 by more than a third, and + has the worst held-out log loss. - **Tuned boosting.** Tuning closes part of the gap, not all of it. - **Age-group rates.** They are calibrated by age but blind to tenure and income. - **Stage logistic.** It matches every age and tenure margin within 0.07 points, with the lowest log loss. +Every arm sees only the predictors the stage reads. Since review round 1 the stage no longer +reads self-employment income, which no model used, so the two boosting arms lost it as a +feature; the logistic and the age-group rates are unchanged. + A plan-time probe found the logistic's fit stable for the ridge constant C from 0.1 to 10. María ruled for the logistic on 2026-09-29. diff --git a/packages/microcosm-build/src/microcosm/build/spec_engine/schema/sources.schema.json b/packages/microcosm-build/src/microcosm/build/spec_engine/schema/sources.schema.json index b14c887f1..e3efd2c1a 100644 --- a/packages/microcosm-build/src/microcosm/build/spec_engine/schema/sources.schema.json +++ b/packages/microcosm-build/src/microcosm/build/spec_engine/schema/sources.schema.json @@ -9593,7 +9593,6 @@ "age_band", "sex", "employment_income", - "self_employment_income", "holds_lifetime_isa", "holding_imputed", "reported_value", @@ -9618,9 +9617,6 @@ "employment_income": { "type": "string" }, - "self_employment_income": { - "type": "string" - }, "holds_lifetime_isa": { "type": "string" }, diff --git a/packages/microcosm-build/src/microcosm/build/uk/release_input_coverage_manifest.json b/packages/microcosm-build/src/microcosm/build/uk/release_input_coverage_manifest.json index b26970b4b..0feab8e5e 100644 --- a/packages/microcosm-build/src/microcosm/build/uk/release_input_coverage_manifest.json +++ b/packages/microcosm-build/src/microcosm/build/uk/release_input_coverage_manifest.json @@ -468,7 +468,7 @@ "required_mass_change_reason": "Capital-gains incidence anchor moves the mass of non-liable clone households back to their paired originals until the sub-exempt and loss-making clone mass match the Advani-Summers reporter composition at the redrawn liable mass; every pair's mass and the total household mass are conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", + "source_manifest_sha256": "01567b46aa26765fea6afd4c9a64674f8ed5e2e8fe32de106a03ec06f1da33bd", "source_vintages": { "source": "Advani and Summers (2020), Capital Gains and UK Inequality, CAGE Working Paper 465", "survey": "Family Resources Survey 2024-25, SPI synthetic support, the HMRC Table 3 redrawn gains on the spine and Advani-Summers capital-gains incidence" @@ -491,7 +491,7 @@ "capital_gains" ], "source_manifest": "source_stages.json", - "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", + "source_manifest_sha256": "01567b46aa26765fea6afd4c9a64674f8ed5e2e8fe32de106a03ec06f1da33bd", "source_vintages": { "source": "Advani and Summers (2020), Capital Gains and UK Inequality, CAGE Working Paper 465", "survey": "Family Resources Survey 2024-25, SPI synthetic support, and Advani-Summers capital-gains incidence" @@ -513,7 +513,7 @@ "required_mass_change_reason": "Capital-gains support split divides the wealthiest households of each HMRC Table 3 income band into light copies at equal weight; every household's mass and the total household mass are conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", + "source_manifest_sha256": "01567b46aa26765fea6afd4c9a64674f8ed5e2e8fe32de106a03ec06f1da33bd", "source_vintages": { "source": "HMRC Capital Gains Tax statistics, July 2026 release, Table 3 for 2024-25, via the vendored conditioning facts", "survey": "Family Resources Survey 2024-25, SPI synthetic support and HMRC Capital Gains Tax statistics Table 3 (2024-25 individuals by size of gain and taxable income)" @@ -542,7 +542,7 @@ "required_mass_change_reason": "ETB public-services imputation on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", + "source_manifest_sha256": "01567b46aa26765fea6afd4c9a64674f8ed5e2e8fe32de106a03ec06f1da33bd", "source_vintages": { "source": "UK Data Service SN 8856 Effects of Taxes and Benefits household tab, DfT rail fare index, and public NHS activity/cost table.", "survey": "Effects of Taxes and Benefits 1977-2024 and NHS age-gender public table" @@ -562,7 +562,7 @@ "required_mass_change_reason": "ETB VAT expenditure-rate imputation on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", + "source_manifest_sha256": "01567b46aa26765fea6afd4c9a64674f8ed5e2e8fe32de106a03ec06f1da33bd", "source_vintages": { "source": "UK Data Service SN 8856 Effects of Taxes and Benefits household tab and cited VAT anchor resource.", "survey": "Effects of Taxes and Benefits 1977-2024" @@ -584,7 +584,7 @@ "required_mass_change_reason": "CGT asset-type assignment on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", + "source_manifest_sha256": "01567b46aa26765fea6afd4c9a64674f8ed5e2e8fe32de106a03ec06f1da33bd", "source_vintages": { "source": "https://www.gov.uk/government/statistics/capital-gains-tax-statistics", "survey": "HMRC Capital Gains Tax statistics 2026 release, Table 8 (UK residential property disposals, 2024-25, administrative), Table 4.1 (individuals claiming Business Asset Disposal Relief or Investors' Relief by band of qualifying gain, 2024-25, administrative) and Table 7 (disposals, proceeds and gains by asset type, 2023-24, sample-based), vendored from the pinned Chronicle feed" @@ -608,7 +608,7 @@ "capital_gains" ], "source_manifest": "source_stages.json", - "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", + "source_manifest_sha256": "01567b46aa26765fea6afd4c9a64674f8ed5e2e8fe32de106a03ec06f1da33bd", "source_vintages": { "conditioning_resource": "hmrc_cgt_conditioning_facts.json", "conditioning_resource_sha256": "24a9440421f9c80ecf3f5ad7035b5b08626e02898f50e4a8ae9c0aad02821bfe", @@ -697,7 +697,7 @@ "full_frs_tei_band_unavailable" ], "source_manifest": "source_stages.json", - "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", + "source_manifest_sha256": "01567b46aa26765fea6afd4c9a64674f8ed5e2e8fe32de106a03ec06f1da33bd", "source_vintages": { "hmrc_surface": "2023-24", "mapped_build_period": "2024", @@ -738,7 +738,7 @@ "required_mass_change_reason": "LCFS consumption imputation on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", + "source_manifest_sha256": "01567b46aa26765fea6afd4c9a64674f8ed5e2e8fe32de106a03ec06f1da33bd", "source_vintages": { "source": "UK Data Service SN 9468 Living Costs and Food Survey 2023-24 household/person tabs and the vendored Chronicle facts for NEED 2023 mean kWh, the FY2024-25 Ofgem cap levels, road-fuel outturn (DESNZ, HMRC, ONS), the DfT VEH1103 licensed-car stock, NTS bus use and the DfT and devolved bus finance tables.", "survey": "Living Costs and Food Survey 2023-24" @@ -764,7 +764,7 @@ "required_mass_change_reason": "NTS bus-travel imputation on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", + "source_manifest_sha256": "01567b46aa26765fea6afd4c9a64674f8ed5e2e8fe32de106a03ec06f1da33bd", "source_vintages": { "source": "Department for Transport National Travel Survey, UK Data Service SN 5340 (End User Licence, 19th edition, November 2025), DOI 10.5255/UKDA-SN-5340-19; local licensed tab files (household, individual, trip); England residents only from 2013.", "survey": "National Travel Survey 2002-2024" @@ -785,7 +785,7 @@ "property_wealth" ], "source_manifest": "source_stages.json", - "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", + "source_manifest_sha256": "01567b46aa26765fea6afd4c9a64674f8ed5e2e8fe32de106a03ec06f1da33bd", "source_vintages": { "source": "MHCLG dwellings and ONS UK House Price Index December 2025 regional average prices.", "survey": "Public regional property reference" @@ -809,7 +809,7 @@ "employee_pension_contributions" ], "source_manifest": "source_stages.json", - "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", + "source_manifest_sha256": "01567b46aa26765fea6afd4c9a64674f8ed5e2e8fe32de106a03ec06f1da33bd", "source_vintages": { "source": "HMRC, Salary sacrifice reform for pension contributions effective from 6 April 2029", "survey": "Family Resources Survey 2024-25 salary-sacrifice respondents and HMRC salary-sacrifice reform analysis" @@ -831,7 +831,7 @@ "student_loan_plan" ], "source_manifest": "source_stages.json", - "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", + "source_manifest_sha256": "01567b46aa26765fea6afd4c9a64674f8ed5e2e8fe32de106a03ec06f1da33bd", "source_vintages": { "source": "Explore Education Statistics Table 6a, Higher education total", "survey": "Family Resources Survey 2024-25 and Student Loans Company borrower forecasts for England" @@ -853,7 +853,7 @@ "required_mass_change_reason": "WAS Lifetime ISA imputation on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", + "source_manifest_sha256": "01567b46aa26765fea6afd4c9a64674f8ed5e2e8fe32de106a03ec06f1da33bd", "source_vintages": { "source": "Office for National Statistics Wealth and Assets Survey, UK Data Service SN 7215, DOI 10.5255/UKDA-SN-7215-20; local licensed round-8 person and household tabs (interviews April 2020 to March 2022, Great Britain).", "survey": "Wealth and Assets Survey round 8" @@ -888,7 +888,7 @@ "required_mass_change_reason": "WAS wealth imputation on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "9f1eb10940dd3990a42c0f4c26c1399313a979254fbec730972035a75f587671", + "source_manifest_sha256": "01567b46aa26765fea6afd4c9a64674f8ed5e2e8fe32de106a03ec06f1da33bd", "source_vintages": { "source": "Office for National Statistics Wealth and Assets Survey, UK Data Service SN 7215, DOI 10.5255/UKDA-SN-7215-20; local licensed 2006-22 household tab.", "survey": "Wealth and Assets Survey round 8" diff --git a/packages/microcosm-build/src/microcosm/build/uk/source_stages.json b/packages/microcosm-build/src/microcosm/build/uk/source_stages.json index 2f58fea22..09990c633 100644 --- a/packages/microcosm-build/src/microcosm/build/uk/source_stages.json +++ b/packages/microcosm-build/src/microcosm/build/uk/source_stages.json @@ -2541,7 +2541,6 @@ "age_band": "DVAge17R8", "sex": "SexR8", "employment_income": "DVGIEmpR8", - "self_employment_income": "DVGISER8", "holds_lifetime_isa": "fisa_binary3r8_i", "holding_imputed": "fisa_binary3r8_iflag", "reported_value": "FLISAVR8", @@ -2580,8 +2579,7 @@ -6 ], "sentinel_recode_columns": [ - "employment_income", - "self_employment_income" + "employment_income" ], "household_predictors": [ "household_net_income", diff --git a/packages/microcosm-build/src/microcosm/build/uk/spec/sources.yaml b/packages/microcosm-build/src/microcosm/build/uk/spec/sources.yaml index e82949b40..7c553946e 100644 --- a/packages/microcosm-build/src/microcosm/build/uk/spec/sources.yaml +++ b/packages/microcosm-build/src/microcosm/build/uk/spec/sources.yaml @@ -2164,7 +2164,6 @@ stages: age_band: DVAge17R8 sex: SexR8 employment_income: DVGIEmpR8 - self_employment_income: DVGISER8 holds_lifetime_isa: fisa_binary3r8_i holding_imputed: fisa_binary3r8_iflag reported_value: FLISAVR8 @@ -2180,7 +2179,6 @@ stages: sentinel_codes: [-9, -8, -7, -6] sentinel_recode_columns: - employment_income - - self_employment_income household_predictors: - household_net_income - num_adults diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/was_lisa.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/was_lisa.py index 0a688f06f..8b1871e5c 100644 --- a/packages/microcosm-build/src/microcosm/build/uk_runtime/was_lisa.py +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/was_lisa.py @@ -151,11 +151,9 @@ "stocks_and_shares_isa", ) PRIVATE_RENTER_COLUMN = "is_private_renter" -#: Engine inputs read at person grain on the recipients. -PERSON_ENGINE_PREDICTORS: tuple[str, ...] = ( - "employment_income", - "self_employment_income", -) +#: Engine inputs read at person grain on the recipients (the models use earnings +#: only; self-employment income is not read, microcosm#1059 review round 1). +PERSON_ENGINE_PREDICTORS: tuple[str, ...] = ("employment_income",) PRIVATE_RENTER_TENURE = "RENT_PRIVATELY" #: Donor response classes (evidence only; never predictors). @@ -222,7 +220,6 @@ class WASLISAColumns: age_band: str sex: str employment_income: str - self_employment_income: str holds_lifetime_isa: str holding_imputed: str reported_value: str @@ -247,7 +244,6 @@ class WASLISAColumns: "age_band", "sex", "employment_income", - "self_employment_income", "holds_lifetime_isa", "holding_imputed", "reported_value", @@ -293,7 +289,6 @@ def from_parameters(cls, parameters: Mapping[str, Any]) -> WASLISAColumns: age_band=str(person["age_band"]), sex=str(person["sex"]), employment_income=str(person["employment_income"]), - self_employment_income=str(person["self_employment_income"]), holds_lifetime_isa=str(person["holds_lifetime_isa"]), holding_imputed=str(person["holding_imputed"]), reported_value=str(person["reported_value"]), @@ -669,7 +664,6 @@ def clean_was_lisa_donor( adults["sex"].to_numpy(dtype=float) == columns.female_code ).astype(float), "employment_income": incomes["employment_income"], - "self_employment_income": incomes["self_employment_income"], **{ column: adults[column].astype(float).to_numpy() for column in HOUSEHOLD_PREDICTORS diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_was_lisa.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_was_lisa.py index d8e4d7e11..9d554cd21 100644 --- a/packages/microcosm-build/tests/engine_free/uk/test_uk_was_lisa.py +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_was_lisa.py @@ -50,7 +50,6 @@ "age_band": "DVAge17R8", "sex": "SexR8", "employment_income": "DVGIEmpR8", - "self_employment_income": "DVGISER8", "holds_lifetime_isa": "fisa_binary3r8_i", "holding_imputed": "fisa_binary3r8_iflag", "reported_value": "FLISAVR8", @@ -65,7 +64,7 @@ "female_code": 2, "age_band_edges": list(range(0, 85, 5)), "sentinel_codes": [-9, -8, -7, -6], - "sentinel_recode_columns": ["employment_income", "self_employment_income"], + "sentinel_recode_columns": ["employment_income"], "household_predictors": [ "household_net_income", "num_adults", @@ -300,10 +299,7 @@ def test_clean_joins_persons_to_households_and_applies_the_credibility_rule() -> assert receipt["credible_holders_in_balance_fit"] == 14 assert receipt["credibility_rule"]["holders_recoded_for_age"] == 1 assert receipt["aggregate_check"]["max_abs_difference_gbp"] == 0.0 - assert receipt["sentinel_recodes"] == { - "employment_income": 0, - "self_employment_income": 1, - } + assert receipt["sentinel_recodes"] == {"employment_income": 1} assert receipt["released_flag_value_disagreements"] == 0 classes = {k: v["persons"] for k, v in receipt["response_classes"].items()} assert classes[RULE_IMPOSSIBLE_HOLDER] == 1 diff --git a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/fixture.json b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/fixture.json index e9cec4dd1..d79fbe2d7 100644 --- a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/fixture.json +++ b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/fixture.json @@ -4854,7 +4854,6 @@ "person_number": "PersonR8", "reported_band": "FLISABR8", "reported_value": "FLISAVR8", - "self_employment_income": "DVGISER8", "sex": "SexR8", "value_imputed": "flisavr8_iflag" }, @@ -4866,8 +4865,7 @@ -6 ], "sentinel_recode_columns": [ - "employment_income", - "self_employment_income" + "employment_income" ] }, { diff --git a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/was_person.csv b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/was_person.csv index 67e749ef5..8ca1abacf 100644 --- a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/was_person.csv +++ b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/was_person.csv @@ -1,191 +1,191 @@ -CASER8,PersonR8,IsDepR8,DVAge17R8,SexR8,DVGIEmpR8,DVGISER8,fisa_binary3r8_i,fisa_binary3r8_iflag,FLISAVR8,flisavr8_iflag,FLISABR8,flisabr8_iflag,DVFLISAvR8 -1,1,2,4,1,15000,5000,1,0,5,0,-9,0,5 -2,1,2,7,2,22000,0,0,0,-9,0,-9,0,0 -2,2,2,12,1,23000,0,0,0,-9,0,-9,0,0 -2,3,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 -3,1,2,10,1,29000,0,0,0,-9,0,-9,0,0 -3,2,2,15,2,30000,0,0,0,-9,0,-9,0,0 -3,3,2,6,1,31000,0,0,0,-9,0,-9,0,0 -3,4,1,3,2,-9,-9,-9,0,-9,0,-9,0,0 -3,5,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 -4,1,2,13,2,36000,-8,0,0,-9,0,-9,0,0 -5,1,2,16,1,43000,0,0,0,-9,0,-9,0,0 -5,2,2,7,2,44000,0,0,0,-9,0,-9,0,0 -5,3,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 -6,1,2,13,2,50000,5000,1,0,10,0,-9,0,10 -6,2,2,10,1,51000,0,0,0,-9,0,-9,0,0 -6,3,2,15,2,52000,0,0,0,-9,0,-9,0,0 -6,4,1,3,1,-9,-9,-9,0,-9,0,-9,0,0 -6,5,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 -7,1,2,8,1,17000,0,1,0,11,0,-9,0,11 -8,1,2,11,2,24000,0,0,1,-9,0,-9,0,0 -8,2,2,16,1,25000,0,0,1,-9,0,-9,0,0 -8,3,1,1,2,-9,-9,-9,1,-9,0,-9,0,0 -9,1,2,14,1,31000,0,0,0,-9,0,-9,0,0 -9,2,2,5,2,32000,0,0,0,-9,0,-9,0,0 -9,3,2,10,1,33000,0,0,0,-9,0,-9,0,0 -9,4,1,3,2,-9,-9,-9,0,-9,0,-9,0,0 -9,5,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 -10,1,2,17,2,38000,0,0,0,-9,0,-9,0,0 -11,1,2,6,1,45000,5000,1,0,-8,1,1,0,15 -11,2,2,11,2,46000,0,0,0,-9,0,-9,0,0 -11,3,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 -12,1,2,9,2,52000,0,0,0,-9,0,-9,0,0 -12,2,2,14,1,53000,0,0,0,-9,0,-9,0,0 -12,3,2,5,2,54000,0,0,0,-9,0,-9,0,0 -12,4,1,3,1,-9,-9,-9,0,-9,0,-9,0,0 -12,5,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 -13,1,2,12,1,19000,0,0,0,-9,0,-9,0,0 -14,1,2,15,2,26000,0,0,0,-9,0,-9,0,0 -14,2,2,6,1,27000,0,0,0,-9,0,-9,0,0 -14,3,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 -15,1,2,4,1,33000,0,1,1,19,0,-9,0,19 -15,2,2,9,2,34000,0,0,0,-9,0,-9,0,0 -15,3,2,14,1,35000,0,0,0,-9,0,-9,0,0 -15,4,1,3,2,-9,-9,-9,0,-9,0,-9,0,0 -15,5,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 -16,1,2,7,2,40000,5000,0,0,-9,0,-9,0,0 -17,1,2,10,1,47000,0,0,0,-9,0,-9,0,0 -17,2,2,15,2,48000,0,0,0,-9,0,-9,0,0 -17,3,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 -18,1,2,13,2,54000,0,0,0,-9,0,-9,0,0 -18,2,2,4,1,15000,0,0,0,-9,0,-9,0,0 -18,3,2,9,2,16000,0,0,0,-9,0,-9,0,0 -18,4,1,3,1,-9,-9,-9,0,-9,0,-9,0,0 -18,5,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 -19,1,2,16,1,21000,0,0,0,-9,0,-9,0,0 -20,1,2,5,2,28000,0,0,0,-9,0,-9,0,0 -20,2,2,10,1,29000,0,0,0,-9,0,-9,0,0 -20,3,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 -21,1,2,8,1,35000,5000,1,0,5,0,-9,0,5 -21,2,2,13,2,36000,0,0,0,-9,0,-9,0,0 -21,3,2,4,1,37000,0,0,0,-9,0,-9,0,0 -21,4,1,3,2,-9,-9,-9,0,-9,0,-9,0,0 -21,5,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 -22,1,2,11,2,42000,0,0,0,-9,0,-9,0,0 -23,1,2,14,1,49000,0,0,0,-9,0,-9,0,0 -23,2,2,5,2,50000,0,0,0,-9,0,-9,0,0 -23,3,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 -24,1,2,17,2,16000,0,0,0,-9,0,-9,0,0 -24,2,2,8,1,17000,0,0,0,-9,0,-9,0,0 -24,3,2,13,2,18000,0,0,0,-9,0,-9,0,0 -24,4,1,3,1,-9,-9,-9,0,-9,0,-9,0,0 -24,5,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 -25,1,2,6,1,23000,0,1,0,9,0,-9,0,9 -26,1,2,9,2,30000,5000,0,0,-9,0,-9,0,0 -26,2,2,14,1,31000,0,0,0,-9,0,-9,0,0 -26,3,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 -27,1,2,12,1,37000,0,0,0,-9,0,-9,0,0 -27,2,2,17,2,38000,0,0,0,-9,0,-9,0,0 -27,3,2,8,1,39000,0,0,0,-9,0,-9,0,0 -27,4,1,3,2,-9,-9,-9,0,-9,0,-9,0,0 -27,5,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 -28,1,2,15,2,44000,0,0,0,-9,0,-9,0,0 -29,1,2,4,1,51000,0,1,0,13,0,-9,0,13 -29,2,2,9,2,52000,0,0,0,-9,0,-9,0,0 -29,3,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 -30,1,2,7,2,18000,0,0,0,-9,0,-9,0,0 -30,2,2,12,1,19000,0,0,0,-9,0,-9,0,0 -30,3,2,17,2,20000,0,0,0,-9,0,-9,0,0 -30,4,1,3,1,-9,-9,-9,0,-9,0,-9,0,0 -30,5,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 -31,1,2,10,1,25000,5000,0,0,-9,0,-9,0,0 -32,1,2,13,2,32000,0,0,0,-9,0,-9,0,0 -32,2,2,4,1,33000,0,0,0,-9,0,-9,0,0 -32,3,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 -33,1,2,16,1,39000,0,0,0,-9,0,-9,0,0 -33,2,2,7,2,40000,0,0,0,-9,0,-9,0,0 -33,3,2,12,1,41000,0,0,0,-9,0,-9,0,0 -33,4,1,3,2,-9,-9,-9,0,-9,0,-9,0,0 -33,5,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 -34,1,2,5,2,46000,0,0,0,-9,0,-9,0,0 -35,1,2,8,1,53000,0,1,0,19,0,-9,0,19 -35,2,2,13,2,54000,0,0,0,-9,0,-9,0,0 -35,3,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 -36,1,2,11,2,20000,5000,0,0,-9,0,-9,0,0 -36,2,2,16,1,21000,0,0,0,-9,0,-9,0,0 -36,3,2,7,2,22000,0,0,0,-9,0,-9,0,0 -36,4,1,3,1,-9,-9,-9,0,-9,0,-9,0,0 -36,5,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 -37,1,2,14,1,27000,0,0,0,-9,0,-9,0,0 -38,1,2,17,2,34000,0,0,0,-9,0,-9,0,0 -38,2,2,8,1,35000,0,0,0,-9,0,-9,0,0 -38,3,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 -39,1,2,6,1,41000,0,1,0,23,0,-9,0,23 -39,2,2,11,2,42000,0,0,0,-9,0,-9,0,0 -39,3,2,16,1,43000,0,0,0,-9,0,-9,0,0 -39,4,1,3,2,-9,-9,-9,0,-9,0,-9,0,0 -39,5,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 -40,1,2,9,2,48000,0,0,0,-9,0,-9,0,0 -41,1,2,12,1,15000,5000,0,0,-9,0,-9,0,0 -41,2,2,17,2,16000,0,0,0,-9,0,-9,0,0 -41,3,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 -42,1,2,15,2,22000,0,0,0,-9,0,-9,0,0 -42,2,2,6,1,23000,0,0,0,-9,0,-9,0,0 -42,3,2,11,2,24000,0,0,0,-9,0,-9,0,0 -42,4,1,3,1,-9,-9,-9,0,-9,0,-9,0,0 -42,5,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 -43,1,2,4,1,29000,0,1,0,7,0,-9,0,7 -44,1,2,7,2,36000,0,0,0,-9,0,-9,0,0 -44,2,2,12,1,37000,0,0,0,-9,0,-9,0,0 -44,3,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 -45,1,2,10,1,43000,0,0,0,-9,0,-9,0,0 -45,2,2,15,2,44000,0,0,0,-9,0,-9,0,0 -45,3,2,6,1,45000,0,0,0,-9,0,-9,0,0 -45,4,1,3,2,-9,-9,-9,0,-9,0,-9,0,0 -45,5,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 -46,1,2,13,2,50000,5000,0,0,-9,0,-9,0,0 -47,1,2,16,1,17000,0,0,0,-9,0,-9,0,0 -47,2,2,7,2,18000,0,0,0,-9,0,-9,0,0 -47,3,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 -48,1,2,5,2,24000,0,0,0,-9,0,-9,0,0 -48,2,2,10,1,25000,0,0,0,-9,0,-9,0,0 -48,3,2,15,2,26000,0,0,0,-9,0,-9,0,0 -48,4,1,3,1,-9,-9,-9,0,-9,0,-9,0,0 -48,5,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 -49,1,2,8,1,31000,0,1,0,13,0,-9,0,13 -50,1,2,11,2,38000,0,0,0,-9,0,-9,0,0 -50,2,2,16,1,39000,0,0,0,-9,0,-9,0,0 -50,3,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 -51,1,2,14,1,45000,5000,0,0,-9,0,-9,0,0 -51,2,2,5,2,46000,0,0,0,-9,0,-9,0,0 -51,3,2,10,1,47000,0,0,0,-9,0,-9,0,0 -51,4,1,3,2,-9,-9,-9,0,-9,0,-9,0,0 -51,5,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 -52,1,2,17,2,52000,0,0,0,-9,0,-9,0,0 -53,1,2,6,1,19000,0,1,0,17,0,-9,0,17 -53,2,2,11,2,20000,0,0,0,-9,0,-9,0,0 -53,3,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 -54,1,2,9,2,26000,0,0,0,-9,0,-9,0,0 -54,2,2,14,1,27000,0,0,0,-9,0,-9,0,0 -54,3,2,5,2,28000,0,0,0,-9,0,-9,0,0 -54,4,1,3,1,-9,-9,-9,0,-9,0,-9,0,0 -54,5,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 -55,1,2,12,1,33000,0,0,0,-9,0,-9,0,0 -56,1,2,15,2,40000,5000,0,0,-9,0,-9,0,0 -56,2,2,6,1,41000,0,0,0,-9,0,-9,0,0 -56,3,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 -57,1,2,4,1,47000,0,1,0,21,0,-9,0,21 -57,2,2,9,2,48000,0,0,0,-9,0,-9,0,0 -57,3,2,14,1,49000,0,0,0,-9,0,-9,0,0 -57,4,1,3,2,-9,-9,-9,0,-9,0,-9,0,0 -57,5,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 -58,1,2,7,2,54000,0,0,0,-9,0,-9,0,0 -59,1,2,10,1,21000,0,0,0,-9,0,-9,0,0 -59,2,2,15,2,22000,0,0,0,-9,0,-9,0,0 -59,3,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 -60,1,2,13,2,28000,0,0,0,-9,0,-9,0,0 -60,2,2,4,1,29000,0,0,0,-9,0,-9,0,0 -60,3,2,9,2,30000,0,0,0,-9,0,-9,0,0 -60,4,1,3,1,-9,-9,-9,0,-9,0,-9,0,0 -60,5,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 -61,1,2,16,1,35000,5000,0,0,-9,0,-9,0,0 -62,1,2,5,2,42000,0,0,0,-9,0,-9,0,0 -62,2,2,10,1,43000,0,0,0,-9,0,-9,0,0 -62,3,1,1,2,-9,-9,-9,0,-9,0,-9,0,0 -63,1,2,8,1,49000,0,1,0,7,0,-9,0,7 -63,2,2,13,2,50000,0,0,0,-9,0,-9,0,0 -63,3,2,4,1,51000,0,0,0,-9,0,-9,0,0 -63,4,1,3,2,-9,-9,-9,0,-9,0,-9,0,0 -63,5,1,1,1,-9,-9,-9,0,-9,0,-9,0,0 -64,1,2,11,2,16000,0,0,0,-9,0,-9,0,0 +CASER8,PersonR8,IsDepR8,DVAge17R8,SexR8,DVGIEmpR8,fisa_binary3r8_i,fisa_binary3r8_iflag,FLISAVR8,flisavr8_iflag,FLISABR8,flisabr8_iflag,DVFLISAvR8 +1,1,2,4,1,15000,1,0,5,0,-9,0,5 +2,1,2,7,2,22000,0,0,-9,0,-9,0,0 +2,2,2,12,1,23000,0,0,-9,0,-9,0,0 +2,3,1,1,2,-9,-9,0,-9,0,-9,0,0 +3,1,2,10,1,29000,0,0,-9,0,-9,0,0 +3,2,2,15,2,30000,0,0,-9,0,-9,0,0 +3,3,2,6,1,31000,0,0,-9,0,-9,0,0 +3,4,1,3,2,-9,-9,0,-9,0,-9,0,0 +3,5,1,1,1,-9,-9,0,-9,0,-9,0,0 +4,1,2,13,2,-8,0,0,-9,0,-9,0,0 +5,1,2,16,1,43000,0,0,-9,0,-9,0,0 +5,2,2,7,2,44000,0,0,-9,0,-9,0,0 +5,3,1,1,1,-9,-9,0,-9,0,-9,0,0 +6,1,2,13,2,50000,1,0,10,0,-9,0,10 +6,2,2,10,1,51000,0,0,-9,0,-9,0,0 +6,3,2,15,2,52000,0,0,-9,0,-9,0,0 +6,4,1,3,1,-9,-9,0,-9,0,-9,0,0 +6,5,1,1,2,-9,-9,0,-9,0,-9,0,0 +7,1,2,8,1,17000,1,0,11,0,-9,0,11 +8,1,2,11,2,24000,0,1,-9,0,-9,0,0 +8,2,2,16,1,25000,0,1,-9,0,-9,0,0 +8,3,1,1,2,-9,-9,1,-9,0,-9,0,0 +9,1,2,14,1,31000,0,0,-9,0,-9,0,0 +9,2,2,5,2,32000,0,0,-9,0,-9,0,0 +9,3,2,10,1,33000,0,0,-9,0,-9,0,0 +9,4,1,3,2,-9,-9,0,-9,0,-9,0,0 +9,5,1,1,1,-9,-9,0,-9,0,-9,0,0 +10,1,2,17,2,38000,0,0,-9,0,-9,0,0 +11,1,2,6,1,45000,1,0,-8,1,1,0,15 +11,2,2,11,2,46000,0,0,-9,0,-9,0,0 +11,3,1,1,1,-9,-9,0,-9,0,-9,0,0 +12,1,2,9,2,52000,0,0,-9,0,-9,0,0 +12,2,2,14,1,53000,0,0,-9,0,-9,0,0 +12,3,2,5,2,54000,0,0,-9,0,-9,0,0 +12,4,1,3,1,-9,-9,0,-9,0,-9,0,0 +12,5,1,1,2,-9,-9,0,-9,0,-9,0,0 +13,1,2,12,1,19000,0,0,-9,0,-9,0,0 +14,1,2,15,2,26000,0,0,-9,0,-9,0,0 +14,2,2,6,1,27000,0,0,-9,0,-9,0,0 +14,3,1,1,2,-9,-9,0,-9,0,-9,0,0 +15,1,2,4,1,33000,1,1,19,0,-9,0,19 +15,2,2,9,2,34000,0,0,-9,0,-9,0,0 +15,3,2,14,1,35000,0,0,-9,0,-9,0,0 +15,4,1,3,2,-9,-9,0,-9,0,-9,0,0 +15,5,1,1,1,-9,-9,0,-9,0,-9,0,0 +16,1,2,7,2,40000,0,0,-9,0,-9,0,0 +17,1,2,10,1,47000,0,0,-9,0,-9,0,0 +17,2,2,15,2,48000,0,0,-9,0,-9,0,0 +17,3,1,1,1,-9,-9,0,-9,0,-9,0,0 +18,1,2,13,2,54000,0,0,-9,0,-9,0,0 +18,2,2,4,1,15000,0,0,-9,0,-9,0,0 +18,3,2,9,2,16000,0,0,-9,0,-9,0,0 +18,4,1,3,1,-9,-9,0,-9,0,-9,0,0 +18,5,1,1,2,-9,-9,0,-9,0,-9,0,0 +19,1,2,16,1,21000,0,0,-9,0,-9,0,0 +20,1,2,5,2,28000,0,0,-9,0,-9,0,0 +20,2,2,10,1,29000,0,0,-9,0,-9,0,0 +20,3,1,1,2,-9,-9,0,-9,0,-9,0,0 +21,1,2,8,1,35000,1,0,5,0,-9,0,5 +21,2,2,13,2,36000,0,0,-9,0,-9,0,0 +21,3,2,4,1,37000,0,0,-9,0,-9,0,0 +21,4,1,3,2,-9,-9,0,-9,0,-9,0,0 +21,5,1,1,1,-9,-9,0,-9,0,-9,0,0 +22,1,2,11,2,42000,0,0,-9,0,-9,0,0 +23,1,2,14,1,49000,0,0,-9,0,-9,0,0 +23,2,2,5,2,50000,0,0,-9,0,-9,0,0 +23,3,1,1,1,-9,-9,0,-9,0,-9,0,0 +24,1,2,17,2,16000,0,0,-9,0,-9,0,0 +24,2,2,8,1,17000,0,0,-9,0,-9,0,0 +24,3,2,13,2,18000,0,0,-9,0,-9,0,0 +24,4,1,3,1,-9,-9,0,-9,0,-9,0,0 +24,5,1,1,2,-9,-9,0,-9,0,-9,0,0 +25,1,2,6,1,23000,1,0,9,0,-9,0,9 +26,1,2,9,2,30000,0,0,-9,0,-9,0,0 +26,2,2,14,1,31000,0,0,-9,0,-9,0,0 +26,3,1,1,2,-9,-9,0,-9,0,-9,0,0 +27,1,2,12,1,37000,0,0,-9,0,-9,0,0 +27,2,2,17,2,38000,0,0,-9,0,-9,0,0 +27,3,2,8,1,39000,0,0,-9,0,-9,0,0 +27,4,1,3,2,-9,-9,0,-9,0,-9,0,0 +27,5,1,1,1,-9,-9,0,-9,0,-9,0,0 +28,1,2,15,2,44000,0,0,-9,0,-9,0,0 +29,1,2,4,1,51000,1,0,13,0,-9,0,13 +29,2,2,9,2,52000,0,0,-9,0,-9,0,0 +29,3,1,1,1,-9,-9,0,-9,0,-9,0,0 +30,1,2,7,2,18000,0,0,-9,0,-9,0,0 +30,2,2,12,1,19000,0,0,-9,0,-9,0,0 +30,3,2,17,2,20000,0,0,-9,0,-9,0,0 +30,4,1,3,1,-9,-9,0,-9,0,-9,0,0 +30,5,1,1,2,-9,-9,0,-9,0,-9,0,0 +31,1,2,10,1,25000,0,0,-9,0,-9,0,0 +32,1,2,13,2,32000,0,0,-9,0,-9,0,0 +32,2,2,4,1,33000,0,0,-9,0,-9,0,0 +32,3,1,1,2,-9,-9,0,-9,0,-9,0,0 +33,1,2,16,1,39000,0,0,-9,0,-9,0,0 +33,2,2,7,2,40000,0,0,-9,0,-9,0,0 +33,3,2,12,1,41000,0,0,-9,0,-9,0,0 +33,4,1,3,2,-9,-9,0,-9,0,-9,0,0 +33,5,1,1,1,-9,-9,0,-9,0,-9,0,0 +34,1,2,5,2,46000,0,0,-9,0,-9,0,0 +35,1,2,8,1,53000,1,0,19,0,-9,0,19 +35,2,2,13,2,54000,0,0,-9,0,-9,0,0 +35,3,1,1,1,-9,-9,0,-9,0,-9,0,0 +36,1,2,11,2,20000,0,0,-9,0,-9,0,0 +36,2,2,16,1,21000,0,0,-9,0,-9,0,0 +36,3,2,7,2,22000,0,0,-9,0,-9,0,0 +36,4,1,3,1,-9,-9,0,-9,0,-9,0,0 +36,5,1,1,2,-9,-9,0,-9,0,-9,0,0 +37,1,2,14,1,27000,0,0,-9,0,-9,0,0 +38,1,2,17,2,34000,0,0,-9,0,-9,0,0 +38,2,2,8,1,35000,0,0,-9,0,-9,0,0 +38,3,1,1,2,-9,-9,0,-9,0,-9,0,0 +39,1,2,6,1,41000,1,0,23,0,-9,0,23 +39,2,2,11,2,42000,0,0,-9,0,-9,0,0 +39,3,2,16,1,43000,0,0,-9,0,-9,0,0 +39,4,1,3,2,-9,-9,0,-9,0,-9,0,0 +39,5,1,1,1,-9,-9,0,-9,0,-9,0,0 +40,1,2,9,2,48000,0,0,-9,0,-9,0,0 +41,1,2,12,1,15000,0,0,-9,0,-9,0,0 +41,2,2,17,2,16000,0,0,-9,0,-9,0,0 +41,3,1,1,1,-9,-9,0,-9,0,-9,0,0 +42,1,2,15,2,22000,0,0,-9,0,-9,0,0 +42,2,2,6,1,23000,0,0,-9,0,-9,0,0 +42,3,2,11,2,24000,0,0,-9,0,-9,0,0 +42,4,1,3,1,-9,-9,0,-9,0,-9,0,0 +42,5,1,1,2,-9,-9,0,-9,0,-9,0,0 +43,1,2,4,1,29000,1,0,7,0,-9,0,7 +44,1,2,7,2,36000,0,0,-9,0,-9,0,0 +44,2,2,12,1,37000,0,0,-9,0,-9,0,0 +44,3,1,1,2,-9,-9,0,-9,0,-9,0,0 +45,1,2,10,1,43000,0,0,-9,0,-9,0,0 +45,2,2,15,2,44000,0,0,-9,0,-9,0,0 +45,3,2,6,1,45000,0,0,-9,0,-9,0,0 +45,4,1,3,2,-9,-9,0,-9,0,-9,0,0 +45,5,1,1,1,-9,-9,0,-9,0,-9,0,0 +46,1,2,13,2,50000,0,0,-9,0,-9,0,0 +47,1,2,16,1,17000,0,0,-9,0,-9,0,0 +47,2,2,7,2,18000,0,0,-9,0,-9,0,0 +47,3,1,1,1,-9,-9,0,-9,0,-9,0,0 +48,1,2,5,2,24000,0,0,-9,0,-9,0,0 +48,2,2,10,1,25000,0,0,-9,0,-9,0,0 +48,3,2,15,2,26000,0,0,-9,0,-9,0,0 +48,4,1,3,1,-9,-9,0,-9,0,-9,0,0 +48,5,1,1,2,-9,-9,0,-9,0,-9,0,0 +49,1,2,8,1,31000,1,0,13,0,-9,0,13 +50,1,2,11,2,38000,0,0,-9,0,-9,0,0 +50,2,2,16,1,39000,0,0,-9,0,-9,0,0 +50,3,1,1,2,-9,-9,0,-9,0,-9,0,0 +51,1,2,14,1,45000,0,0,-9,0,-9,0,0 +51,2,2,5,2,46000,0,0,-9,0,-9,0,0 +51,3,2,10,1,47000,0,0,-9,0,-9,0,0 +51,4,1,3,2,-9,-9,0,-9,0,-9,0,0 +51,5,1,1,1,-9,-9,0,-9,0,-9,0,0 +52,1,2,17,2,52000,0,0,-9,0,-9,0,0 +53,1,2,6,1,19000,1,0,17,0,-9,0,17 +53,2,2,11,2,20000,0,0,-9,0,-9,0,0 +53,3,1,1,1,-9,-9,0,-9,0,-9,0,0 +54,1,2,9,2,26000,0,0,-9,0,-9,0,0 +54,2,2,14,1,27000,0,0,-9,0,-9,0,0 +54,3,2,5,2,28000,0,0,-9,0,-9,0,0 +54,4,1,3,1,-9,-9,0,-9,0,-9,0,0 +54,5,1,1,2,-9,-9,0,-9,0,-9,0,0 +55,1,2,12,1,33000,0,0,-9,0,-9,0,0 +56,1,2,15,2,40000,0,0,-9,0,-9,0,0 +56,2,2,6,1,41000,0,0,-9,0,-9,0,0 +56,3,1,1,2,-9,-9,0,-9,0,-9,0,0 +57,1,2,4,1,47000,1,0,21,0,-9,0,21 +57,2,2,9,2,48000,0,0,-9,0,-9,0,0 +57,3,2,14,1,49000,0,0,-9,0,-9,0,0 +57,4,1,3,2,-9,-9,0,-9,0,-9,0,0 +57,5,1,1,1,-9,-9,0,-9,0,-9,0,0 +58,1,2,7,2,54000,0,0,-9,0,-9,0,0 +59,1,2,10,1,21000,0,0,-9,0,-9,0,0 +59,2,2,15,2,22000,0,0,-9,0,-9,0,0 +59,3,1,1,1,-9,-9,0,-9,0,-9,0,0 +60,1,2,13,2,28000,0,0,-9,0,-9,0,0 +60,2,2,4,1,29000,0,0,-9,0,-9,0,0 +60,3,2,9,2,30000,0,0,-9,0,-9,0,0 +60,4,1,3,1,-9,-9,0,-9,0,-9,0,0 +60,5,1,1,2,-9,-9,0,-9,0,-9,0,0 +61,1,2,16,1,35000,0,0,-9,0,-9,0,0 +62,1,2,5,2,42000,0,0,-9,0,-9,0,0 +62,2,2,10,1,43000,0,0,-9,0,-9,0,0 +62,3,1,1,2,-9,-9,0,-9,0,-9,0,0 +63,1,2,8,1,49000,1,0,7,0,-9,0,7 +63,2,2,13,2,50000,0,0,-9,0,-9,0,0 +63,3,2,4,1,51000,0,0,-9,0,-9,0,0 +63,4,1,3,2,-9,-9,0,-9,0,-9,0,0 +63,5,1,1,1,-9,-9,0,-9,0,-9,0,0 +64,1,2,11,2,16000,0,0,-9,0,-9,0,0 diff --git a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/uk_spine.json b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/uk_spine.json index 3c5f58c6b..b3a16ab57 100644 --- a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/uk_spine.json +++ b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/uk_spine.json @@ -1 +1 @@ -{"country":"uk","nodes":[{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Load the source-bound UK FRS root population.","id":"create_uk_frs","inputs":[],"kernel":"uk.create@1","mass":"conserve","outputs":[{"column":"age","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"gender","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"marital_status","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"hours_worked","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"care_hours","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"is_household_head","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_benunit_head","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_parent","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_uc_claimant","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"employment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"self_employment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"private_pension_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"tax_free_savings_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"savings_interest_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"dividend_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"property_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"maintenance_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"miscellaneous_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"private_transfer_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"lump_sum_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"student_loan_repayments","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"statutory_sick_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"statutory_maternity_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"student_loans","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"access_fund","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"education_grants","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"healthy_start_vouchers","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"free_school_breakfasts","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"free_school_fruit_veg","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"free_school_meals","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"maintenance_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"childcare_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"personal_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"salary_sacrifice_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"salary_sacrifice_asked","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"child_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"income_support_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"attendance_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_sc_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_m_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"iidb_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"carers_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"would_claim_carers_allowance","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"sda_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"afcs_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"ssmg_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pension_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"child_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"working_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"state_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"winter_fuel_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"incapacity_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_m_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_dl_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"jsa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"jsa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"bsp_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"frs_benunit_capital","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"is_married","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"dependent_children","dtype":"int64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"region","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"tenure_type","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"accommodation_type","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"num_bedrooms","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_reported","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_band","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_rebate","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_single_adult_raw","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"water_and_sewerage_charges","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"domestic_rates","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"rent","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"subrent","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"mortgage_interest_repayment","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"mortgage_capital_repayment","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"structural_insurance_payments","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"housing_service_charges","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"external_child_payments","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"sample_fraction":1.0,"sample_seed":578,"stage_contract_sha256":"047d30937efb21e39259fdbed5597751e4f5a0c341ea583c7446e4c9c11eba48","time_period":"2024"},"population":null,"sources":["frs"],"structural":"create","weights":null},{"base":"create_uk_frs","citation":"","description":"Ownership boundary for the source-assembling root stage.","id":"frs_spine.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"base":null,"citation":"","description":"Claim the cells assembled by the UK FRS root transform.","id":"frs_spine","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"age","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"gender","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"marital_status","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hours_worked","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"care_hours","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_household_head","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_benunit_head","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_parent","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_uc_claimant","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"self_employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"private_pension_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"tax_free_savings_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"savings_interest_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dividend_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"maintenance_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"miscellaneous_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"private_transfer_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"lump_sum_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"student_loan_repayments","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"statutory_sick_pay","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"statutory_maternity_pay","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"student_loans","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"access_fund","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"education_grants","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"healthy_start_vouchers","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"free_school_breakfasts","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"free_school_fruit_veg","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"free_school_meals","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"maintenance_expenses","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"childcare_expenses","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"personal_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"salary_sacrifice_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"salary_sacrifice_asked","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"income_support_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"attendance_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_sc_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"iidb_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"carers_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_carers_allowance","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"sda_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"afcs_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"ssmg_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"working_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"state_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"winter_fuel_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"incapacity_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_dl_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"bsp_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"frs_benunit_capital","dtype":"float64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_married","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dependent_children","dtype":"int64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"region","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"tenure_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"accommodation_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"num_bedrooms","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_reported","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_band","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_rebate","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_single_adult_raw","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"water_and_sewerage_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"domestic_rates","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"rent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"subrent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_interest_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_capital_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"structural_insurance_payments","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_service_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"external_child_payments","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"}],"params":{},"population":"frs_spine.boundary","sources":[],"structural":"none","weights":null},{"base":"frs_spine.boundary","citation":"","description":"Ownership boundary before age_tail rewrites.","id":"age_tail.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage age_tail.","id":"age_tail","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["external_child_payments","region"],"entity":"household","rows":"all"},{"columns":["gender"],"entity":"person","rows":"all"}],"kernel":"uk.stage.age_tail@1","mass":"conserve","outputs":[{"column":"age","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"age_tail","stage_contract_sha256":"963a34f38caede2525e3b8735f904bb70a1bbef5a272f0eefd4346343444484f","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_relationships.","id":"frs_relationships","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","is_household_head"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_relationships@1","mass":"conserve","outputs":[{"column":"relationship_to_head","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"ons_family_role","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"ons_family_index","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"ons_household_type","dtype":"string","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_relationships","stage_contract_sha256":"30628808d06d9829ebcbcf460cd355a01261e78c7c73e6006c75bec2e3d60c33","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_employment.","id":"frs_employment","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["ons_household_type","region"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_employment@1","mass":"conserve","outputs":[{"column":"employment_status","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"employment_sector","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"sic_industry_division","dtype":"int64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_employment","stage_contract_sha256":"ddbefaf05b44788d794a6e4b0e8926c14318d66e50d2f11f50ca549538bbf60c","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_council_tax.","id":"frs_council_tax","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","sic_industry_division"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_council_tax@1","mass":"conserve","outputs":[{"column":"council_tax","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_council_tax","stage_contract_sha256":"3381cd9f7a736514d5073c57480e07f5098890f3ca9ed3865392043594771eb9","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_disability.","id":"frs_disability","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["council_tax","region"],"entity":"household","rows":"all"},{"columns":["afcs_reported","age","attendance_allowance_reported","dla_m_reported","dla_sc_reported","esa_contrib_reported","esa_income_reported","iidb_reported","incapacity_benefit_reported","pip_dl_reported","pip_m_reported","sda_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_disability@1","mass":"conserve","outputs":[{"column":"aa_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_sc_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_m_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_m_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_dl_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"is_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_enhanced_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_severely_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_disability","stage_contract_sha256":"ac500b4cb1bc04d4fb72d198592dd376d61da8c150921a6ac53914ac18be0508","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_education.","id":"frs_education","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","esa_contrib_reported","esa_income_reported","is_severely_disabled_for_benefits","jsa_contrib_reported","jsa_income_reported","universal_credit_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_education@1","mass":"conserve","outputs":[{"column":"current_education","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"highest_education","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"is_in_non_advanced_education","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_in_approved_training","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"age_started_or_accepted_current_education_or_training","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"is_before_universal_credit_qualifying_young_person_terminal_date","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"adult_ema","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"child_ema","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"receives_benefits_in_own_right","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_education","stage_contract_sha256":"836cb0f5a582fee1425190e96c9cb81bdef859bd236c8b6bc27660b6e3d0c2f8","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_legacy_proxies.","id":"frs_legacy_proxies","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_legacy_proxies@1","mass":"conserve","outputs":[{"column":"legacy_jobseeker_proxy","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_health_condition_proxy","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_support_group_proxy","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_legacy_proxies","stage_contract_sha256":"1ecf761cf3fa7180da15659e138e67a8654e58272b4fde28344aa27a874ad0aa","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"age_tail.boundary","citation":"","description":"Ownership boundary before frs_education_grant_split rewrites.","id":"frs_education_grant_split.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_education_grant_split.","id":"frs_education_grant_split","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_education_grant_split@1","mass":"conserve","outputs":[{"column":"disabled_students_allowance_eligible_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"education_grants","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_education_grant_split","stage_contract_sha256":"8718f014b90498c2cc7c754289775ca4a41452d9b978d8cbc5f34b64cbdc7df2","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_take_up.","id":"frs_take_up","inputs":[{"columns":["frs_benunit_capital","is_married"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","child_benefit_reported","education_grants","pension_credit_reported","universal_credit_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_take_up@1","mass":"conserve","outputs":[{"column":"would_claim_child_benefit","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"child_benefit_opts_out","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_pc","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_uc","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_tfc","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_extended_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_universal_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_targeted_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_uc_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"maximum_extended_childcare_hours_usage","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_take_up","stage_contract_sha256":"067d31b7fbe733d1d182588705e9ce79df0c8e5f6e8f519314765af49b1b00d7","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_person_draws.","id":"frs_person_draws","inputs":[{"columns":["frs_benunit_capital","maximum_extended_childcare_hours_usage"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_person_draws@1","mass":"conserve","outputs":[{"column":"would_claim_marriage_allowance","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"would_claim_scp","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"attends_private_school_random_draw","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"tax_free_childcare_spend_routed_share","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_person_draws","stage_contract_sha256":"7e0af955541ec5669dcdf1de4e1e6ca642853e48b775ec4e25238b41491df324","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_household_draws.","id":"frs_household_draws","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","tax_free_childcare_spend_routed_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_household_draws@1","mass":"conserve","outputs":[{"column":"household_owns_tv","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"would_evade_tv_licence_fee","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"main_residential_property_purchased_is_first_home","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"property_purchased","dtype":"bool","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_household_draws","stage_contract_sha256":"c74c63b09264319c4bf0049dabba00ecd0ce660beb7b53d6dae71518434bc949","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_brma.","id":"frs_brma","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_brma@1","mass":"conserve","outputs":[{"column":"brma","dtype":"string","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_brma","stage_contract_sha256":"5b8f0b361310c7cd3efbaae3762b347649b7d4afb9e9943131d9bef9266fc3c8","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"frs_education_grant_split.boundary","citation":"","description":"Freeze the assembled-spine gate population.","id":"frs_brma.checkpoint","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_hmrc_spine_leaves.","id":"frs_hmrc_spine_leaves","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["brma","region"],"entity":"household","rows":"all"},{"columns":["age","employee_pension_contributions"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_hmrc_spine_leaves@1","mass":"conserve","outputs":[{"column":"hmrc_spi_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_unemployment_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_incapacity_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"ossben_identifiable_subset","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"srp_regular_code5","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employer_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_hmrc_spine_leaves","stage_contract_sha256":"2bb3d068003489b47cc8676ac26c203ce3c39a9b6e92f3ecd0a3c06acd6addc4","time_period":"2024"},"population":"frs_brma.checkpoint","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"frs_brma.checkpoint","citation":"","description":"Run structural UK stage spi_support_channel.","id":"spi_support_channel","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.spi_support_channel@1","mass":"declared","outputs":[],"params":{"expand_cells":[["person","person_source_id","int64"],["person","person_support_channel","string"],["person","person_support_clone_index","int64"],["benunit","benunit_source_id","int64"],["benunit","benunit_support_channel","string"],["benunit","benunit_support_clone_index","int64"],["household","source_household_id","int64"],["household","source_year","int64"],["household","source_household_key","string"],["household","household_source_id","int64"],["household","household_support_channel","string"],["household","household_support_clone_index","int64"],["household","household_is_spi_synthetic","bool"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"spi_support_channel","stage_contract_sha256":"4b10f1a4a215cdf2c406c9974de2d1e580eb3cd3a25ed34973c1b63abf4a54bb","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by spi_support_channel.","id":"spi_support_channel.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"person_source_id","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"person_support_channel","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"person_support_clone_index","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"benunit_source_id","dtype":"int64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"benunit_support_channel","dtype":"string","entity":"benunit","ownership":"produced","rows":"all"},{"column":"benunit_support_clone_index","dtype":"int64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"source_household_id","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"source_year","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"source_household_key","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"household_source_id","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_support_channel","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"household_support_clone_index","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_is_spi_synthetic","dtype":"bool","entity":"household","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["person.person_source_id","person.person_support_channel","person.person_support_clone_index","benunit.benunit_source_id","benunit.benunit_support_channel","benunit.benunit_support_clone_index","household.source_household_id","household.source_year","household.source_household_key","household.household_source_id","household.household_support_channel","household.household_support_clone_index","household.household_is_spi_synthetic"]},"population":"spi_support_channel","sources":[],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"spi_support_channel","citation":"","description":"Run structural UK stage spi_income_band_donors.","id":"spi_income_band_donors","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.spi_income_band_donors@1","mass":"free","outputs":[],"params":{"expand_cells":[["person","person_source_id","int64"],["person","person_support_channel","string"],["person","person_support_clone_index","int64"],["benunit","benunit_source_id","int64"],["benunit","benunit_support_channel","string"],["benunit","benunit_support_clone_index","int64"],["household","household_source_id","int64"],["household","household_support_channel","string"],["household","household_support_clone_index","int64"],["household","household_is_spi_synthetic","bool"],["household","household_is_spi_income_band_donor","bool"],["household","spi_income_band_donor_lower_bound","float64"],["person","person_is_spi_income_band_carrier","bool"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"spi_income_band_donors","stage_contract_sha256":"047ff55be7acca89a01859271a019428f42a40c38af4885625ec064f8ff213af","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by spi_income_band_donors.","id":"spi_income_band_donors.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"person_source_id","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"person_support_channel","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"person_support_clone_index","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"benunit_source_id","dtype":"int64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"benunit_support_channel","dtype":"string","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"benunit_support_clone_index","dtype":"int64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_source_id","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_support_channel","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_support_clone_index","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_is_spi_synthetic","dtype":"bool","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_is_spi_income_band_donor","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"spi_income_band_donor_lower_bound","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"person_is_spi_income_band_carrier","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["household.household_is_spi_income_band_donor","household.spi_income_band_donor_lower_bound","person.person_is_spi_income_band_carrier"]},"population":"spi_income_band_donors","sources":[],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage hmrc_spi_income_spine.","id":"hmrc_spi_income_spine","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","maintenance_expenses","childcare_expenses","salary_sacrifice_reported","salary_sacrifice_asked","ssmg_reported","incapacity_benefit_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","ossben_identifiable_subset","srp_regular_code5","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier"],"entity":"person","rows":"all"}],"kernel":"uk.stage.hmrc_spi_income_spine@1","mass":"conserve","outputs":[{"column":"charitable_investment_gifts","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"gift_aid","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"other_investment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_employment_benefits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_employment_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_other_social_security_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_taxable_termination_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_miscellaneous_employment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_other_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_state_pension_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_employed_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_total_earned_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_total_investment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_assessable_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"self_employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"savings_interest_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dividend_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"private_pension_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employer_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"personal_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"tax_free_savings_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"income_support_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"working_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"attendance_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"state_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_sc_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_dl_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"sda_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"carers_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"iidb_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"afcs_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"bsp_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"winter_fuel_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hmrc_spi_pay","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hmrc_spi_unemployment_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hmrc_spi_incapacity_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"aa_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_sc_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_m_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_m_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_dl_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_enhanced_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_severely_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_carers_allowance","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"hmrc_spi_income_spine","stage_contract_sha256":"038505263ed7821e028773e041d9e923131df001ad31439d78d7eba5aa1ea64f","time_period":"2024"},"population":"spi_income_band_donors","sources":["frs"],"structural":"none","weights":null},{"base":"spi_income_band_donors","citation":"","description":"Ownership boundary before spi_housing_shell rewrites.","id":"spi_housing_shell.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage spi_housing_shell.","id":"spi_housing_shell","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["council_tax_single_adult_raw","household_support_channel","ons_household_type","region"],"entity":"household","rows":"all"},{"columns":["age","dividend_income","employment_income","is_household_head","other_investment_income","private_pension_income","property_income","savings_interest_income","self_employment_income","state_pension_reported","would_claim_carers_allowance"],"entity":"person","rows":"all"}],"kernel":"uk.stage.spi_housing_shell@1","mass":"conserve","outputs":[{"column":"tenure_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"accommodation_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_band","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"num_bedrooms","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_reported","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"rent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_interest_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_capital_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"structural_insurance_payments","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_service_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"water_and_sewerage_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"domestic_rates","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"subrent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_rebate","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"spi_housing_shell","stage_contract_sha256":"809f19fd33ff79ceda005e8cc3fa89ae40b297dceca26a7658b6259267987890","time_period":"2024"},"population":"spi_housing_shell.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage was_wealth.","id":"was_wealth","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.was_wealth@1","mass":"conserve","outputs":[{"column":"owned_land","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"property_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"corporate_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"private_pension_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"gross_financial_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"net_financial_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"main_residence_value","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"other_residential_property_value","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"non_residential_property_value","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"savings","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"num_vehicles","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"cash_isa","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"stocks_and_shares_isa","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"mortgage_debt","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"consumer_debt","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"student_loan_balance","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"was_wealth","stage_contract_sha256":"366e019c41ee2a28bcd61bbaa62a024ed0bb4b30b3ffc4d87ab23b340b4076bf","time_period":"2024"},"population":"spi_housing_shell.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage was_lisa.","id":"was_lisa","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance"],"entity":"person","rows":"all"}],"kernel":"uk.stage.was_lisa@1","mass":"conserve","outputs":[{"column":"has_lifetime_isa","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"lifetime_isa_balance","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"household_lifetime_isa_balance","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"was_lisa","stage_contract_sha256":"e7948149344bd6c6d119d958d6af360b5fc8ec080d6d4509dc75469182fa6653","time_period":"2024"},"population":"spi_housing_shell.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"spi_housing_shell.boundary","citation":"","description":"Ownership boundary before regional_property_uprating rewrites.","id":"regional_property_uprating.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage regional_property_uprating.","id":"regional_property_uprating","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["household_lifetime_isa_balance","household_support_channel","region"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.regional_property_uprating@1","mass":"conserve","outputs":[{"column":"main_residence_value","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_wealth","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"regional_property_uprating","stage_contract_sha256":"acb342e8ca1770556c5682a9411c5ead5d61dd1420cfe6b0305ed14a3407fb25","time_period":"2024"},"population":"regional_property_uprating.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage nts_bus_travel.","id":"nts_bus_travel","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance"],"entity":"person","rows":"all"}],"kernel":"uk.stage.nts_bus_travel@1","mass":"conserve","outputs":[{"column":"local_bus_use_band","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"bus_in_london_trips","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"other_local_bus_trips","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"local_bus_trips","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"bus_pass_eligible","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"local_bus_single_fare_share","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"household_local_bus_trips","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"nts_bus_travel","stage_contract_sha256":"cf854e8cf6edd006b677dcc67b63d6bb104d09eed93d7ee78bde6f0e838b9de9","time_period":"2024"},"population":"regional_property_uprating.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage lcfs_consumption.","id":"lcfs_consumption","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.lcfs_consumption@1","mass":"conserve","outputs":[{"column":"food_and_non_alcoholic_beverages_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"alcohol_and_tobacco_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"clothing_and_footwear_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"housing_water_and_electricity_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_furnishings_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"health_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"transport_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"communication_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"recreation_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"education_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"restaurants_and_hotels_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"miscellaneous_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"petrol_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"diesel_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"bus_fare_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"domestic_energy_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"electricity_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"gas_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"has_fuel_consumption","dtype":"bool","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"lcfs_consumption","stage_contract_sha256":"63079c6f53d507702b4b1fadcf30def5188baf1f17e026e9f89f285577fe9c60","time_period":"2024"},"population":"regional_property_uprating.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage etb_vat.","id":"etb_vat","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.etb_vat@1","mass":"conserve","outputs":[{"column":"full_rate_vat_expenditure_rate","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"etb_vat","stage_contract_sha256":"5a2b777d88315bcccb72477c088a136c634131e0bc1a339b7287217ee5cfd8d3","time_period":"2024"},"population":"regional_property_uprating.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage etb_services.","id":"etb_services","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.etb_services@1","mass":"conserve","outputs":[{"column":"dfe_education_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"rail_subsidy_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"bus_subsidy_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"rail_usage","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"a_and_e_visits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"admitted_patient_visits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"outpatient_visits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"nhs_a_and_e_spending","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"nhs_admitted_patient_spending","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"nhs_outpatient_spending","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"etb_services","stage_contract_sha256":"37bfc4c0935ab99c5f270f307451cbf6cc6a85a3f8c6ce77429f6a6c66c07021","time_period":"2024"},"population":"regional_property_uprating.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"regional_property_uprating.boundary","citation":"","description":"Ownership boundary before uc_reporter_redraw rewrites.","id":"uc_reporter_redraw.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage uc_reporter_redraw.","id":"uc_reporter_redraw","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.uc_reporter_redraw@1","mass":"conserve","outputs":[{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"uc_reporter_redraw","stage_contract_sha256":"7e94e034cad29c5bae566ffb875c42cddf3a1025c15496907e783ceff1144f8b","time_period":"2024"},"population":"uc_reporter_redraw.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"uc_reporter_redraw.boundary","citation":"","description":"Ownership boundary before uc_capital_coherence rewrites.","id":"uc_capital_coherence.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage uc_capital_coherence.","id":"uc_capital_coherence","inputs":[{"columns":["benunit_support_channel","dependent_children","is_married"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","is_benunit_head","is_parent","person_support_channel","universal_credit_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.uc_capital_coherence@1","mass":"conserve","outputs":[{"column":"uc_reported_capital","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"frs_benunit_capital","dtype":"float64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_uc","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"uc_capital_coherence","stage_contract_sha256":"059f27ee687ee15385b246d43068b17aeecbe3645ccc41fd52fcad06a006a081","time_period":"2024"},"population":"uc_capital_coherence.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage uc_deduction_attributes.","id":"uc_deduction_attributes","inputs":[{"columns":["frs_benunit_capital","would_claim_uc"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.uc_deduction_attributes@1","mass":"conserve","outputs":[{"column":"uc_deduction_random_draw","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"uc_deduction_type_random_draw","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"uc_latent_deduction_rate","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"uc_deduction_combination","dtype":"string","entity":"benunit","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"uc_deduction_attributes","stage_contract_sha256":"6bc7e3ec1a5712e23ca1b7d2956e8b17f2526b94431ba3e5a9294b04658e4fe0","time_period":"2024"},"population":"uc_capital_coherence.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"uc_capital_coherence.boundary","citation":"","description":"Run structural UK stage cgt_support_split.","id":"cgt_support_split","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.cgt_support_split@1","mass":"conserve","outputs":[],"params":{"expand_cells":[["household","household_is_cgt_support_copy","bool"],["household","cgt_support_copies","int64"],["household","cgt_support_copy_index","int64"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"cgt_support_split","stage_contract_sha256":"556e2db7907ad62920149da9104150997031e3cfddbdb4610075369d77147499","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by cgt_support_split.","id":"cgt_support_split.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"household_is_cgt_support_copy","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"cgt_support_copies","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"cgt_support_copy_index","dtype":"int64","entity":"household","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["household.household_is_cgt_support_copy","household.cgt_support_copies","household.cgt_support_copy_index"]},"population":"cgt_support_split","sources":[],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"cgt_support_split","citation":"","description":"Run structural UK stage cgt_incidence_clone.","id":"cgt_incidence_clone","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.cgt_incidence_clone@1","mass":"conserve","outputs":[],"params":{"expand_cells":[["household","household_is_capital_gains_clone","bool"],["person","capital_gains","float64"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"cgt_incidence_clone","stage_contract_sha256":"ee30278543cc0297a5366d855b7753aa04af5518971594c193c52be36bf8a7b4","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by cgt_incidence_clone.","id":"cgt_incidence_clone.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"household_is_capital_gains_clone","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"capital_gains","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["household.household_is_capital_gains_clone","person.capital_gains"]},"population":"cgt_incidence_clone","sources":[],"structural":"none","weights":null},{"base":"cgt_incidence_clone","citation":"","description":"Ownership boundary before hmrc_cgt_gains_spine rewrites.","id":"hmrc_cgt_gains_spine.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage hmrc_cgt_gains_spine.","id":"hmrc_cgt_gains_spine","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["cgt_support_copies","corporate_wealth","gross_financial_wealth","household_is_cgt_support_copy","non_residential_property_value","other_residential_property_value","region"],"entity":"household","rows":"all"},{"columns":["age","dividend_income","employment_income","miscellaneous_income","private_pension_income","property_income","savings_interest_income","self_employment_income","state_pension_reported","tax_free_savings_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.hmrc_cgt_gains_spine@1","mass":"conserve","outputs":[{"column":"capital_gains","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"hmrc_cgt_gains_spine","stage_contract_sha256":"49717d6586a4a5d7fc370200c71c0f91d01473158454571c056deb6f5618d562","time_period":"2024"},"population":"hmrc_cgt_gains_spine.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage hmrc_cgt_asset_type_spine.","id":"hmrc_cgt_asset_type_spine","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["corporate_wealth","gross_financial_wealth","other_residential_property_value","region","stocks_and_shares_isa"],"entity":"household","rows":"all"},{"columns":["age","capital_gains","dividend_income","property_income","self_employment_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.hmrc_cgt_asset_type_spine@1","mass":"conserve","outputs":[{"column":"capital_gains_asset_type","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"capital_gains_residential_property","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"capital_gains_badr","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"hmrc_cgt_asset_type_spine","stage_contract_sha256":"5f9a5f2d12e2a7db87c7c0d6f0df6f70875a579e90c39b2b8c48943eac43905e","time_period":"2024"},"population":"hmrc_cgt_gains_spine.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"hmrc_cgt_gains_spine.boundary","citation":"","description":"Run structural UK stage cgt_incidence_anchor.","id":"cgt_incidence_anchor","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["household_is_capital_gains_clone","region"],"entity":"household","rows":"all"},{"columns":["age","capital_gains","capital_gains_badr","dividend_income","employment_income","miscellaneous_income","private_pension_income","property_income","savings_interest_income","self_employment_income","state_pension_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.cgt_incidence_anchor@1","mass":"conserve","outputs":[],"params":{"expand_cells":[],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"cgt_incidence_anchor","stage_contract_sha256":"b79ce806015de2f1e1703fa68bf4ad871c6df54b5b32633c864632ab68919a48","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage salary_sacrifice.","id":"salary_sacrifice","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains","capital_gains_asset_type","capital_gains_residential_property","capital_gains_badr"],"entity":"person","rows":"all"}],"kernel":"uk.stage.salary_sacrifice@1","mass":"conserve","outputs":[{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"salary_sacrifice","stage_contract_sha256":"89b589d19fcb99b265cb40d08cf2b9ff7955bd41b6de0e8c9ff4dc6f35be1eb6","time_period":"2024"},"population":"cgt_incidence_anchor","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage student_loans.","id":"student_loans","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","current_education","employee_pension_contributions","highest_education","student_loan_repayments","student_loans"],"entity":"person","rows":"all"}],"kernel":"uk.stage.student_loans@1","mass":"conserve","outputs":[{"column":"student_loan_plan","dtype":"string","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"student_loans","stage_contract_sha256":"f2936c5e22a0e9b097437e3f3aabaf06c4561d5c25a9b7c05e720a6553f73bbc","time_period":"2024"},"population":"cgt_incidence_anchor","sources":["frs"],"structural":"none","weights":null}],"sources":[{"codec":"csv-tables","description":"Content-bound UK FRS and donor fixture/source bundle.","name":"frs"}]} +{"country":"uk","nodes":[{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Load the source-bound UK FRS root population.","id":"create_uk_frs","inputs":[],"kernel":"uk.create@1","mass":"conserve","outputs":[{"column":"age","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"gender","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"marital_status","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"hours_worked","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"care_hours","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"is_household_head","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_benunit_head","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_parent","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_uc_claimant","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"employment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"self_employment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"private_pension_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"tax_free_savings_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"savings_interest_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"dividend_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"property_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"maintenance_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"miscellaneous_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"private_transfer_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"lump_sum_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"student_loan_repayments","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"statutory_sick_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"statutory_maternity_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"student_loans","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"access_fund","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"education_grants","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"healthy_start_vouchers","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"free_school_breakfasts","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"free_school_fruit_veg","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"free_school_meals","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"maintenance_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"childcare_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"personal_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"salary_sacrifice_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"salary_sacrifice_asked","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"child_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"income_support_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"attendance_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_sc_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_m_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"iidb_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"carers_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"would_claim_carers_allowance","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"sda_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"afcs_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"ssmg_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pension_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"child_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"working_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"state_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"winter_fuel_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"incapacity_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_m_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_dl_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"jsa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"jsa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"bsp_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"frs_benunit_capital","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"is_married","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"dependent_children","dtype":"int64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"region","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"tenure_type","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"accommodation_type","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"num_bedrooms","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_reported","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_band","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_rebate","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_single_adult_raw","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"water_and_sewerage_charges","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"domestic_rates","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"rent","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"subrent","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"mortgage_interest_repayment","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"mortgage_capital_repayment","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"structural_insurance_payments","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"housing_service_charges","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"external_child_payments","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"sample_fraction":1.0,"sample_seed":578,"stage_contract_sha256":"047d30937efb21e39259fdbed5597751e4f5a0c341ea583c7446e4c9c11eba48","time_period":"2024"},"population":null,"sources":["frs"],"structural":"create","weights":null},{"base":"create_uk_frs","citation":"","description":"Ownership boundary for the source-assembling root stage.","id":"frs_spine.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"base":null,"citation":"","description":"Claim the cells assembled by the UK FRS root transform.","id":"frs_spine","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"age","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"gender","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"marital_status","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hours_worked","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"care_hours","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_household_head","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_benunit_head","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_parent","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_uc_claimant","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"self_employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"private_pension_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"tax_free_savings_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"savings_interest_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dividend_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"maintenance_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"miscellaneous_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"private_transfer_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"lump_sum_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"student_loan_repayments","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"statutory_sick_pay","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"statutory_maternity_pay","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"student_loans","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"access_fund","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"education_grants","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"healthy_start_vouchers","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"free_school_breakfasts","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"free_school_fruit_veg","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"free_school_meals","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"maintenance_expenses","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"childcare_expenses","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"personal_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"salary_sacrifice_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"salary_sacrifice_asked","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"income_support_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"attendance_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_sc_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"iidb_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"carers_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_carers_allowance","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"sda_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"afcs_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"ssmg_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"working_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"state_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"winter_fuel_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"incapacity_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_dl_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"bsp_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"frs_benunit_capital","dtype":"float64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_married","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dependent_children","dtype":"int64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"region","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"tenure_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"accommodation_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"num_bedrooms","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_reported","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_band","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_rebate","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_single_adult_raw","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"water_and_sewerage_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"domestic_rates","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"rent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"subrent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_interest_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_capital_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"structural_insurance_payments","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_service_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"external_child_payments","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"}],"params":{},"population":"frs_spine.boundary","sources":[],"structural":"none","weights":null},{"base":"frs_spine.boundary","citation":"","description":"Ownership boundary before age_tail rewrites.","id":"age_tail.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage age_tail.","id":"age_tail","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["external_child_payments","region"],"entity":"household","rows":"all"},{"columns":["gender"],"entity":"person","rows":"all"}],"kernel":"uk.stage.age_tail@1","mass":"conserve","outputs":[{"column":"age","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"age_tail","stage_contract_sha256":"963a34f38caede2525e3b8735f904bb70a1bbef5a272f0eefd4346343444484f","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_relationships.","id":"frs_relationships","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","is_household_head"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_relationships@1","mass":"conserve","outputs":[{"column":"relationship_to_head","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"ons_family_role","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"ons_family_index","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"ons_household_type","dtype":"string","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_relationships","stage_contract_sha256":"30628808d06d9829ebcbcf460cd355a01261e78c7c73e6006c75bec2e3d60c33","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_employment.","id":"frs_employment","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["ons_household_type","region"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_employment@1","mass":"conserve","outputs":[{"column":"employment_status","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"employment_sector","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"sic_industry_division","dtype":"int64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_employment","stage_contract_sha256":"ddbefaf05b44788d794a6e4b0e8926c14318d66e50d2f11f50ca549538bbf60c","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_council_tax.","id":"frs_council_tax","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","sic_industry_division"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_council_tax@1","mass":"conserve","outputs":[{"column":"council_tax","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_council_tax","stage_contract_sha256":"3381cd9f7a736514d5073c57480e07f5098890f3ca9ed3865392043594771eb9","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_disability.","id":"frs_disability","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["council_tax","region"],"entity":"household","rows":"all"},{"columns":["afcs_reported","age","attendance_allowance_reported","dla_m_reported","dla_sc_reported","esa_contrib_reported","esa_income_reported","iidb_reported","incapacity_benefit_reported","pip_dl_reported","pip_m_reported","sda_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_disability@1","mass":"conserve","outputs":[{"column":"aa_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_sc_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_m_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_m_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_dl_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"is_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_enhanced_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_severely_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_disability","stage_contract_sha256":"ac500b4cb1bc04d4fb72d198592dd376d61da8c150921a6ac53914ac18be0508","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_education.","id":"frs_education","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","esa_contrib_reported","esa_income_reported","is_severely_disabled_for_benefits","jsa_contrib_reported","jsa_income_reported","universal_credit_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_education@1","mass":"conserve","outputs":[{"column":"current_education","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"highest_education","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"is_in_non_advanced_education","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_in_approved_training","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"age_started_or_accepted_current_education_or_training","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"is_before_universal_credit_qualifying_young_person_terminal_date","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"adult_ema","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"child_ema","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"receives_benefits_in_own_right","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_education","stage_contract_sha256":"836cb0f5a582fee1425190e96c9cb81bdef859bd236c8b6bc27660b6e3d0c2f8","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_legacy_proxies.","id":"frs_legacy_proxies","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_legacy_proxies@1","mass":"conserve","outputs":[{"column":"legacy_jobseeker_proxy","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_health_condition_proxy","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_support_group_proxy","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_legacy_proxies","stage_contract_sha256":"1ecf761cf3fa7180da15659e138e67a8654e58272b4fde28344aa27a874ad0aa","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"age_tail.boundary","citation":"","description":"Ownership boundary before frs_education_grant_split rewrites.","id":"frs_education_grant_split.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_education_grant_split.","id":"frs_education_grant_split","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_education_grant_split@1","mass":"conserve","outputs":[{"column":"disabled_students_allowance_eligible_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"education_grants","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_education_grant_split","stage_contract_sha256":"8718f014b90498c2cc7c754289775ca4a41452d9b978d8cbc5f34b64cbdc7df2","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_take_up.","id":"frs_take_up","inputs":[{"columns":["frs_benunit_capital","is_married"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","child_benefit_reported","education_grants","pension_credit_reported","universal_credit_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_take_up@1","mass":"conserve","outputs":[{"column":"would_claim_child_benefit","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"child_benefit_opts_out","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_pc","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_uc","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_tfc","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_extended_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_universal_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_targeted_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_uc_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"maximum_extended_childcare_hours_usage","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_take_up","stage_contract_sha256":"067d31b7fbe733d1d182588705e9ce79df0c8e5f6e8f519314765af49b1b00d7","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_person_draws.","id":"frs_person_draws","inputs":[{"columns":["frs_benunit_capital","maximum_extended_childcare_hours_usage"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_person_draws@1","mass":"conserve","outputs":[{"column":"would_claim_marriage_allowance","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"would_claim_scp","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"attends_private_school_random_draw","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"tax_free_childcare_spend_routed_share","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_person_draws","stage_contract_sha256":"7e0af955541ec5669dcdf1de4e1e6ca642853e48b775ec4e25238b41491df324","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_household_draws.","id":"frs_household_draws","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","tax_free_childcare_spend_routed_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_household_draws@1","mass":"conserve","outputs":[{"column":"household_owns_tv","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"would_evade_tv_licence_fee","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"main_residential_property_purchased_is_first_home","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"property_purchased","dtype":"bool","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_household_draws","stage_contract_sha256":"c74c63b09264319c4bf0049dabba00ecd0ce660beb7b53d6dae71518434bc949","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_brma.","id":"frs_brma","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_brma@1","mass":"conserve","outputs":[{"column":"brma","dtype":"string","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_brma","stage_contract_sha256":"5b8f0b361310c7cd3efbaae3762b347649b7d4afb9e9943131d9bef9266fc3c8","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"frs_education_grant_split.boundary","citation":"","description":"Freeze the assembled-spine gate population.","id":"frs_brma.checkpoint","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_hmrc_spine_leaves.","id":"frs_hmrc_spine_leaves","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["brma","region"],"entity":"household","rows":"all"},{"columns":["age","employee_pension_contributions"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_hmrc_spine_leaves@1","mass":"conserve","outputs":[{"column":"hmrc_spi_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_unemployment_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_incapacity_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"ossben_identifiable_subset","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"srp_regular_code5","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employer_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_hmrc_spine_leaves","stage_contract_sha256":"2bb3d068003489b47cc8676ac26c203ce3c39a9b6e92f3ecd0a3c06acd6addc4","time_period":"2024"},"population":"frs_brma.checkpoint","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"frs_brma.checkpoint","citation":"","description":"Run structural UK stage spi_support_channel.","id":"spi_support_channel","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.spi_support_channel@1","mass":"declared","outputs":[],"params":{"expand_cells":[["person","person_source_id","int64"],["person","person_support_channel","string"],["person","person_support_clone_index","int64"],["benunit","benunit_source_id","int64"],["benunit","benunit_support_channel","string"],["benunit","benunit_support_clone_index","int64"],["household","source_household_id","int64"],["household","source_year","int64"],["household","source_household_key","string"],["household","household_source_id","int64"],["household","household_support_channel","string"],["household","household_support_clone_index","int64"],["household","household_is_spi_synthetic","bool"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"spi_support_channel","stage_contract_sha256":"4b10f1a4a215cdf2c406c9974de2d1e580eb3cd3a25ed34973c1b63abf4a54bb","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by spi_support_channel.","id":"spi_support_channel.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"person_source_id","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"person_support_channel","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"person_support_clone_index","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"benunit_source_id","dtype":"int64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"benunit_support_channel","dtype":"string","entity":"benunit","ownership":"produced","rows":"all"},{"column":"benunit_support_clone_index","dtype":"int64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"source_household_id","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"source_year","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"source_household_key","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"household_source_id","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_support_channel","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"household_support_clone_index","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_is_spi_synthetic","dtype":"bool","entity":"household","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["person.person_source_id","person.person_support_channel","person.person_support_clone_index","benunit.benunit_source_id","benunit.benunit_support_channel","benunit.benunit_support_clone_index","household.source_household_id","household.source_year","household.source_household_key","household.household_source_id","household.household_support_channel","household.household_support_clone_index","household.household_is_spi_synthetic"]},"population":"spi_support_channel","sources":[],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"spi_support_channel","citation":"","description":"Run structural UK stage spi_income_band_donors.","id":"spi_income_band_donors","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.spi_income_band_donors@1","mass":"free","outputs":[],"params":{"expand_cells":[["person","person_source_id","int64"],["person","person_support_channel","string"],["person","person_support_clone_index","int64"],["benunit","benunit_source_id","int64"],["benunit","benunit_support_channel","string"],["benunit","benunit_support_clone_index","int64"],["household","household_source_id","int64"],["household","household_support_channel","string"],["household","household_support_clone_index","int64"],["household","household_is_spi_synthetic","bool"],["household","household_is_spi_income_band_donor","bool"],["household","spi_income_band_donor_lower_bound","float64"],["person","person_is_spi_income_band_carrier","bool"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"spi_income_band_donors","stage_contract_sha256":"047ff55be7acca89a01859271a019428f42a40c38af4885625ec064f8ff213af","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by spi_income_band_donors.","id":"spi_income_band_donors.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"person_source_id","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"person_support_channel","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"person_support_clone_index","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"benunit_source_id","dtype":"int64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"benunit_support_channel","dtype":"string","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"benunit_support_clone_index","dtype":"int64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_source_id","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_support_channel","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_support_clone_index","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_is_spi_synthetic","dtype":"bool","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_is_spi_income_band_donor","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"spi_income_band_donor_lower_bound","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"person_is_spi_income_band_carrier","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["household.household_is_spi_income_band_donor","household.spi_income_band_donor_lower_bound","person.person_is_spi_income_band_carrier"]},"population":"spi_income_band_donors","sources":[],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage hmrc_spi_income_spine.","id":"hmrc_spi_income_spine","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","maintenance_expenses","childcare_expenses","salary_sacrifice_reported","salary_sacrifice_asked","ssmg_reported","incapacity_benefit_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","ossben_identifiable_subset","srp_regular_code5","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier"],"entity":"person","rows":"all"}],"kernel":"uk.stage.hmrc_spi_income_spine@1","mass":"conserve","outputs":[{"column":"charitable_investment_gifts","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"gift_aid","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"other_investment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_employment_benefits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_employment_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_other_social_security_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_taxable_termination_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_miscellaneous_employment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_other_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_state_pension_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_employed_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_total_earned_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_total_investment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_assessable_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"self_employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"savings_interest_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dividend_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"private_pension_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employer_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"personal_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"tax_free_savings_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"income_support_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"working_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"attendance_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"state_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_sc_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_dl_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"sda_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"carers_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"iidb_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"afcs_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"bsp_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"winter_fuel_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hmrc_spi_pay","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hmrc_spi_unemployment_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hmrc_spi_incapacity_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"aa_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_sc_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_m_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_m_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_dl_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_enhanced_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_severely_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_carers_allowance","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"hmrc_spi_income_spine","stage_contract_sha256":"038505263ed7821e028773e041d9e923131df001ad31439d78d7eba5aa1ea64f","time_period":"2024"},"population":"spi_income_band_donors","sources":["frs"],"structural":"none","weights":null},{"base":"spi_income_band_donors","citation":"","description":"Ownership boundary before spi_housing_shell rewrites.","id":"spi_housing_shell.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage spi_housing_shell.","id":"spi_housing_shell","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["council_tax_single_adult_raw","household_support_channel","ons_household_type","region"],"entity":"household","rows":"all"},{"columns":["age","dividend_income","employment_income","is_household_head","other_investment_income","private_pension_income","property_income","savings_interest_income","self_employment_income","state_pension_reported","would_claim_carers_allowance"],"entity":"person","rows":"all"}],"kernel":"uk.stage.spi_housing_shell@1","mass":"conserve","outputs":[{"column":"tenure_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"accommodation_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_band","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"num_bedrooms","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_reported","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"rent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_interest_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_capital_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"structural_insurance_payments","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_service_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"water_and_sewerage_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"domestic_rates","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"subrent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_rebate","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"spi_housing_shell","stage_contract_sha256":"809f19fd33ff79ceda005e8cc3fa89ae40b297dceca26a7658b6259267987890","time_period":"2024"},"population":"spi_housing_shell.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage was_wealth.","id":"was_wealth","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.was_wealth@1","mass":"conserve","outputs":[{"column":"owned_land","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"property_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"corporate_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"private_pension_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"gross_financial_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"net_financial_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"main_residence_value","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"other_residential_property_value","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"non_residential_property_value","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"savings","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"num_vehicles","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"cash_isa","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"stocks_and_shares_isa","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"mortgage_debt","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"consumer_debt","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"student_loan_balance","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"was_wealth","stage_contract_sha256":"366e019c41ee2a28bcd61bbaa62a024ed0bb4b30b3ffc4d87ab23b340b4076bf","time_period":"2024"},"population":"spi_housing_shell.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage was_lisa.","id":"was_lisa","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance"],"entity":"person","rows":"all"}],"kernel":"uk.stage.was_lisa@1","mass":"conserve","outputs":[{"column":"has_lifetime_isa","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"lifetime_isa_balance","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"household_lifetime_isa_balance","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"was_lisa","stage_contract_sha256":"f1d0f962e84d32007821b32e4e03a8af9443acc0ed3d1836ff094dcbacb928da","time_period":"2024"},"population":"spi_housing_shell.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"spi_housing_shell.boundary","citation":"","description":"Ownership boundary before regional_property_uprating rewrites.","id":"regional_property_uprating.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage regional_property_uprating.","id":"regional_property_uprating","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["household_lifetime_isa_balance","household_support_channel","region"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.regional_property_uprating@1","mass":"conserve","outputs":[{"column":"main_residence_value","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_wealth","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"regional_property_uprating","stage_contract_sha256":"acb342e8ca1770556c5682a9411c5ead5d61dd1420cfe6b0305ed14a3407fb25","time_period":"2024"},"population":"regional_property_uprating.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage nts_bus_travel.","id":"nts_bus_travel","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance"],"entity":"person","rows":"all"}],"kernel":"uk.stage.nts_bus_travel@1","mass":"conserve","outputs":[{"column":"local_bus_use_band","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"bus_in_london_trips","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"other_local_bus_trips","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"local_bus_trips","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"bus_pass_eligible","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"local_bus_single_fare_share","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"household_local_bus_trips","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"nts_bus_travel","stage_contract_sha256":"cf854e8cf6edd006b677dcc67b63d6bb104d09eed93d7ee78bde6f0e838b9de9","time_period":"2024"},"population":"regional_property_uprating.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage lcfs_consumption.","id":"lcfs_consumption","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.lcfs_consumption@1","mass":"conserve","outputs":[{"column":"food_and_non_alcoholic_beverages_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"alcohol_and_tobacco_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"clothing_and_footwear_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"housing_water_and_electricity_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_furnishings_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"health_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"transport_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"communication_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"recreation_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"education_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"restaurants_and_hotels_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"miscellaneous_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"petrol_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"diesel_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"bus_fare_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"domestic_energy_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"electricity_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"gas_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"has_fuel_consumption","dtype":"bool","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"lcfs_consumption","stage_contract_sha256":"63079c6f53d507702b4b1fadcf30def5188baf1f17e026e9f89f285577fe9c60","time_period":"2024"},"population":"regional_property_uprating.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage etb_vat.","id":"etb_vat","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.etb_vat@1","mass":"conserve","outputs":[{"column":"full_rate_vat_expenditure_rate","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"etb_vat","stage_contract_sha256":"5a2b777d88315bcccb72477c088a136c634131e0bc1a339b7287217ee5cfd8d3","time_period":"2024"},"population":"regional_property_uprating.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage etb_services.","id":"etb_services","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.etb_services@1","mass":"conserve","outputs":[{"column":"dfe_education_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"rail_subsidy_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"bus_subsidy_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"rail_usage","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"a_and_e_visits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"admitted_patient_visits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"outpatient_visits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"nhs_a_and_e_spending","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"nhs_admitted_patient_spending","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"nhs_outpatient_spending","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"etb_services","stage_contract_sha256":"37bfc4c0935ab99c5f270f307451cbf6cc6a85a3f8c6ce77429f6a6c66c07021","time_period":"2024"},"population":"regional_property_uprating.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"regional_property_uprating.boundary","citation":"","description":"Ownership boundary before uc_reporter_redraw rewrites.","id":"uc_reporter_redraw.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage uc_reporter_redraw.","id":"uc_reporter_redraw","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.uc_reporter_redraw@1","mass":"conserve","outputs":[{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"uc_reporter_redraw","stage_contract_sha256":"7e94e034cad29c5bae566ffb875c42cddf3a1025c15496907e783ceff1144f8b","time_period":"2024"},"population":"uc_reporter_redraw.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"uc_reporter_redraw.boundary","citation":"","description":"Ownership boundary before uc_capital_coherence rewrites.","id":"uc_capital_coherence.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage uc_capital_coherence.","id":"uc_capital_coherence","inputs":[{"columns":["benunit_support_channel","dependent_children","is_married"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","is_benunit_head","is_parent","person_support_channel","universal_credit_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.uc_capital_coherence@1","mass":"conserve","outputs":[{"column":"uc_reported_capital","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"frs_benunit_capital","dtype":"float64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_uc","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"uc_capital_coherence","stage_contract_sha256":"059f27ee687ee15385b246d43068b17aeecbe3645ccc41fd52fcad06a006a081","time_period":"2024"},"population":"uc_capital_coherence.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage uc_deduction_attributes.","id":"uc_deduction_attributes","inputs":[{"columns":["frs_benunit_capital","would_claim_uc"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.uc_deduction_attributes@1","mass":"conserve","outputs":[{"column":"uc_deduction_random_draw","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"uc_deduction_type_random_draw","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"uc_latent_deduction_rate","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"uc_deduction_combination","dtype":"string","entity":"benunit","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"uc_deduction_attributes","stage_contract_sha256":"6bc7e3ec1a5712e23ca1b7d2956e8b17f2526b94431ba3e5a9294b04658e4fe0","time_period":"2024"},"population":"uc_capital_coherence.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"uc_capital_coherence.boundary","citation":"","description":"Run structural UK stage cgt_support_split.","id":"cgt_support_split","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.cgt_support_split@1","mass":"conserve","outputs":[],"params":{"expand_cells":[["household","household_is_cgt_support_copy","bool"],["household","cgt_support_copies","int64"],["household","cgt_support_copy_index","int64"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"cgt_support_split","stage_contract_sha256":"556e2db7907ad62920149da9104150997031e3cfddbdb4610075369d77147499","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by cgt_support_split.","id":"cgt_support_split.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"household_is_cgt_support_copy","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"cgt_support_copies","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"cgt_support_copy_index","dtype":"int64","entity":"household","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["household.household_is_cgt_support_copy","household.cgt_support_copies","household.cgt_support_copy_index"]},"population":"cgt_support_split","sources":[],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"cgt_support_split","citation":"","description":"Run structural UK stage cgt_incidence_clone.","id":"cgt_incidence_clone","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.cgt_incidence_clone@1","mass":"conserve","outputs":[],"params":{"expand_cells":[["household","household_is_capital_gains_clone","bool"],["person","capital_gains","float64"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"cgt_incidence_clone","stage_contract_sha256":"ee30278543cc0297a5366d855b7753aa04af5518971594c193c52be36bf8a7b4","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by cgt_incidence_clone.","id":"cgt_incidence_clone.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"household_is_capital_gains_clone","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"capital_gains","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["household.household_is_capital_gains_clone","person.capital_gains"]},"population":"cgt_incidence_clone","sources":[],"structural":"none","weights":null},{"base":"cgt_incidence_clone","citation":"","description":"Ownership boundary before hmrc_cgt_gains_spine rewrites.","id":"hmrc_cgt_gains_spine.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage hmrc_cgt_gains_spine.","id":"hmrc_cgt_gains_spine","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["cgt_support_copies","corporate_wealth","gross_financial_wealth","household_is_cgt_support_copy","non_residential_property_value","other_residential_property_value","region"],"entity":"household","rows":"all"},{"columns":["age","dividend_income","employment_income","miscellaneous_income","private_pension_income","property_income","savings_interest_income","self_employment_income","state_pension_reported","tax_free_savings_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.hmrc_cgt_gains_spine@1","mass":"conserve","outputs":[{"column":"capital_gains","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"hmrc_cgt_gains_spine","stage_contract_sha256":"49717d6586a4a5d7fc370200c71c0f91d01473158454571c056deb6f5618d562","time_period":"2024"},"population":"hmrc_cgt_gains_spine.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage hmrc_cgt_asset_type_spine.","id":"hmrc_cgt_asset_type_spine","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["corporate_wealth","gross_financial_wealth","other_residential_property_value","region","stocks_and_shares_isa"],"entity":"household","rows":"all"},{"columns":["age","capital_gains","dividend_income","property_income","self_employment_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.hmrc_cgt_asset_type_spine@1","mass":"conserve","outputs":[{"column":"capital_gains_asset_type","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"capital_gains_residential_property","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"capital_gains_badr","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"hmrc_cgt_asset_type_spine","stage_contract_sha256":"5f9a5f2d12e2a7db87c7c0d6f0df6f70875a579e90c39b2b8c48943eac43905e","time_period":"2024"},"population":"hmrc_cgt_gains_spine.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"hmrc_cgt_gains_spine.boundary","citation":"","description":"Run structural UK stage cgt_incidence_anchor.","id":"cgt_incidence_anchor","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["household_is_capital_gains_clone","region"],"entity":"household","rows":"all"},{"columns":["age","capital_gains","capital_gains_badr","dividend_income","employment_income","miscellaneous_income","private_pension_income","property_income","savings_interest_income","self_employment_income","state_pension_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.cgt_incidence_anchor@1","mass":"conserve","outputs":[],"params":{"expand_cells":[],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"cgt_incidence_anchor","stage_contract_sha256":"b79ce806015de2f1e1703fa68bf4ad871c6df54b5b32633c864632ab68919a48","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage salary_sacrifice.","id":"salary_sacrifice","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","household_lifetime_isa_balance","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","has_fuel_consumption","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone"],"entity":"household","rows":"all"},{"columns":["age","gender","marital_status","hours_worked","care_hours","is_household_head","is_benunit_head","is_parent","is_uc_claimant","employment_income","self_employment_income","private_pension_income","tax_free_savings_income","savings_interest_income","dividend_income","property_income","maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","salary_sacrifice_reported","salary_sacrifice_asked","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","bsp_reported","relationship_to_head","ons_family_role","ons_family_index","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","other_investment_income","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains","capital_gains_asset_type","capital_gains_residential_property","capital_gains_badr"],"entity":"person","rows":"all"}],"kernel":"uk.stage.salary_sacrifice@1","mass":"conserve","outputs":[{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"salary_sacrifice","stage_contract_sha256":"89b589d19fcb99b265cb40d08cf2b9ff7955bd41b6de0e8c9ff4dc6f35be1eb6","time_period":"2024"},"population":"cgt_incidence_anchor","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage student_loans.","id":"student_loans","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","current_education","employee_pension_contributions","highest_education","student_loan_repayments","student_loans"],"entity":"person","rows":"all"}],"kernel":"uk.stage.student_loans@1","mass":"conserve","outputs":[{"column":"student_loan_plan","dtype":"string","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.100.0"],["policyengine-core","3.32.5"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"student_loans","stage_contract_sha256":"f2936c5e22a0e9b097437e3f3aabaf06c4561d5c25a9b7c05e720a6553f73bbc","time_period":"2024"},"population":"cgt_incidence_anchor","sources":["frs"],"structural":"none","weights":null}],"sources":[{"codec":"csv-tables","description":"Content-bound UK FRS and donor fixture/source bundle.","name":"frs"}]} diff --git a/tools/graph_uk_spine_fixture.py b/tools/graph_uk_spine_fixture.py index 8a97a9d34..980f9634c 100644 --- a/tools/graph_uk_spine_fixture.py +++ b/tools/graph_uk_spine_fixture.py @@ -619,16 +619,17 @@ def _was_person_donor() -> pd.DataFrame: "IsDepR8": 2.0 if adult else 1.0, "DVAge17R8": float(band), "SexR8": float(1 + (household + person) % 2), + # Household 3's first adult carries a sentinel earnings code, + # which the stage recodes to zero and receipts. "DVGIEmpR8": ( - 15_000.0 + 1_000.0 * ((household * 7 + person) % 40) + ( + -8.0 + if household == 3 and person == 0 + else 15_000.0 + 1_000.0 * ((household * 7 + person) % 40) + ) if adult else -9.0 ), - "DVGISER8": ( - (-8.0 if household == 3 else 5_000.0 * (household % 5 == 0)) - if adult and person == 0 - else (0.0 if adult else -9.0) - ), "fisa_binary3r8_i": 1.0 if value > 0 else (0.0 if adult else -9.0), "fisa_binary3r8_iflag": ( 1.0 if (holder and household == 14) or household == 7 else 0.0 From 73d1736f4dbe1d54be865e60f521933619ff55b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Juaristi?= <127882282+juaristi22@users.noreply.github.com> Date: Wed, 30 Sep 2026 15:04:42 +0100 Subject: [PATCH 09/17] Withhold a complementary count so the #931 level totals recover no suppressed one (#1057 review round 2, item 8) Vahid's round 2 on #1057: every household row lies in exactly one area per level, so a level total less its published counts is the sum of the suppressed ones; with zeros published each suppressed count is 1 or 2, and at K=15 the residual pinned eleven of fourteen (all 2). Dropping the cell `rows` would not close it: the expected rows sum to the same total (and the integer pool counts with the public census shares fix it anyway). The harness's new `resuppress_evidence` pass: - withholds one published count per level that has suppressed counts (`withheld`, with its z-score, ESS and source count), chosen in a value-independent order (sha256 of level and area code) among counts above the minimum, so the residual carries an unknown of at least minimum + 1; - withholds the level minima of rows, ESS and sources there, the breach-table minima, and any breach quantile inside the suppressed range; - recomputes max |z| and the share above 3 over published areas only (at K=1 the reported LA maximum belonged to a suppressed area). `main` applies the pass before writing; the committed file is re-suppressed in place (no cell regenerated, sha 7d120d52... -> 99013cc1...). Tests: the committed file is a fixed point, each level with suppressed counts carries one complement and a non-degenerate feasible range for their sum, and two invented-level cases. Co-Authored-By: Claude Opus 5.5 --- .../uk-931/atomic-assignment-cells.json | 194 +++++++++--------- .../931-uk-atomic-assignment-receipts.md | 2 +- .../test_uk_atomic_assignment_measurement.py | 100 ++++++++- tools/measure_uk_atomic_assignment.py | 128 +++++++++++- 4 files changed, 322 insertions(+), 102 deletions(-) diff --git a/docs/evidence/uk-931/atomic-assignment-cells.json b/docs/evidence/uk-931/atomic-assignment-cells.json index 3f7854bfa..cc8ea7980 100644 --- a/docs/evidence/uk-931/atomic-assignment-cells.json +++ b/docs/evidence/uk-931/atomic-assignment-cells.json @@ -5734,13 +5734,13 @@ }, { "area_code": "S14000067", - "ess": 3.494549246629244, + "ess": "withheld", "expected_rows": 0.8495759781402032, "level": "constituency", "region_code": "S99999999", - "rows": 4.0, - "sources": 4.0, - "z": 3.4486229619883035 + "rows": "withheld", + "sources": "withheld", + "z": null }, { "area_code": "S14000068", @@ -8774,13 +8774,13 @@ }, { "area_code": "E08000001", - "ess": 3.5704411706610144, + "ess": "withheld", "expected_rows": 1.834024628196246, "level": "la", "region_code": "E12000002", - "rows": 4.0, - "sources": 3.0, - "z": 1.630836952650422 + "rows": "withheld", + "sources": "withheld", + "z": null }, { "area_code": "E08000002", @@ -10774,19 +10774,19 @@ "sources_lt_50": 650 }, "ess": { - "median": 0.5, - "min": 0.0, + "median": null, + "min": null, "p10": 0.0 }, "n_areas": 650, "rows": { - "median": 0.5, - "min": 0.0, + "median": null, + "min": null, "p10": 0.0 }, "sources": { - "median": 0.5, - "min": 0.0, + "median": null, + "min": null, "p10": 0.0 } }, @@ -11161,19 +11161,19 @@ "sources_lt_50": 361 }, "ess": { - "median": 1.0, - "min": 0.0, + "median": null, + "min": null, "p10": 0.0 }, "n_areas": 361, "rows": { - "median": 1.0, - "min": 0.0, + "median": null, + "min": null, "p10": 0.0 }, "sources": { - "median": 1.0, - "min": 0.0, + "median": null, + "min": null, "p10": 0.0 } } @@ -11188,20 +11188,20 @@ "areas_with_expected_ge_5": 0, "max_abs_z": null, "max_relative_error_expected_ge_100": null, - "min_ess": 0.0, - "min_rows": 0.0, - "min_sources": 0.0, + "min_ess": null, + "min_rows": null, + "min_sources": null, "share_abs_z_gt_3": null }, "la": { "areas": 361, "areas_with_expected_ge_100": 0, "areas_with_expected_ge_5": 8, - "max_abs_z": 1.960185329533569, + "max_abs_z": 1.7792633920213976, "max_relative_error_expected_ge_100": null, - "min_ess": 0.0, - "min_rows": 0.0, - "min_sources": 0.0, + "min_ess": null, + "min_rows": null, + "min_sources": null, "share_abs_z_gt_3": 0.0 } }, @@ -14422,13 +14422,13 @@ }, { "area_code": "E14001383", - "ess": 4.543112270491409, + "ess": "withheld", "expected_rows": 0.8779568353843269, "level": "constituency", "region_code": "E12000003", - "rows": 5.0, - "sources": 4.0, - "z": 4.44181524733946 + "rows": "withheld", + "sources": "withheld", + "z": null }, { "area_code": "E14001384", @@ -20112,13 +20112,13 @@ }, { "area_code": "E08000013", - "ess": 4.3954301911509805, + "ess": "withheld", "expected_rows": 1.23301269213974, "level": "la", "region_code": "E12000002", - "rows": 5.0, - "sources": 4.0, - "z": 3.4368557547919285 + "rows": "withheld", + "sources": "withheld", + "z": null }, { "area_code": "E08000014", @@ -21992,19 +21992,19 @@ "sources_lt_50": 650 }, "ess": { - "median": 1.0, - "min": 0.0, + "median": null, + "min": null, "p10": 0.0 }, "n_areas": 650, "rows": { - "median": 1.0, - "min": 0.0, + "median": null, + "min": null, "p10": 0.0 }, "sources": { - "median": 1.0, - "min": 0.0, + "median": null, + "min": null, "p10": 0.0 } }, @@ -22379,19 +22379,19 @@ "sources_lt_50": 361 }, "ess": { - "median": 1.0, - "min": 0.0, + "median": null, + "min": null, "p10": 0.0 }, "n_areas": 361, "rows": { - "median": 1.0, - "min": 0.0, + "median": null, + "min": null, "p10": 0.0 }, "sources": { - "median": 1.0, - "min": 0.0, + "median": null, + "min": null, "p10": 0.0 } } @@ -22411,20 +22411,20 @@ "areas_with_expected_ge_5": 0, "max_abs_z": null, "max_relative_error_expected_ge_100": null, - "min_ess": 0.0, - "min_rows": 0.0, - "min_sources": 0.0, + "min_ess": null, + "min_rows": null, + "min_sources": null, "share_abs_z_gt_3": null }, "la": { "areas": 361, "areas_with_expected_ge_100": 0, "areas_with_expected_ge_5": 8, - "max_abs_z": 1.9429417808796687, + "max_abs_z": 1.4985125208022148, "max_relative_error_expected_ge_100": null, - "min_ess": 0.0, - "min_rows": 0.0, - "min_sources": 0.0, + "min_ess": null, + "min_rows": null, + "min_sources": null, "share_abs_z_gt_3": 0.0 } }, @@ -24047,13 +24047,13 @@ }, { "area_code": "E14001223", - "ess": 5.152613339985145, + "ess": "withheld", "expected_rows": 7.417830112135873, "level": "constituency", "region_code": "E12000007", - "rows": 6.0, - "sources": 6.0, - "z": -0.5239101332605105 + "rows": "withheld", + "sources": "withheld", + "z": null }, { "area_code": "E14001224", @@ -29907,13 +29907,13 @@ }, { "area_code": "E07000073", - "ess": 10.50753327339876, + "ess": "withheld", "expected_rows": 9.938938321688275, "level": "la", "region_code": "E12000006", - "rows": 11.0, - "sources": 9.0, - "z": 0.3390168019620868 + "rows": "withheld", + "sources": "withheld", + "z": null }, { "area_code": "E07000074", @@ -33218,18 +33218,18 @@ }, "ess": { "median": 9.118373837188708, - "min": 1.6938881792291236, + "min": null, "p10": 5.1484791747885525 }, "n_areas": 650, "rows": { "median": 10.0, - "min": 2.0, + "min": null, "p10": 6.0 }, "sources": { "median": 7.0, - "min": 2.0, + "min": null, "p10": 4.0 } }, @@ -33605,18 +33605,18 @@ }, "ess": { "median": 13.763460276308816, - "min": 0.0, + "min": null, "p10": 5.965875927872619 }, "n_areas": 361, "rows": { "median": 16.0, - "min": 0.0, + "min": null, "p10": 7.0 }, "sources": { "median": 9.0, - "min": 0.0, + "min": null, "p10": 5.0 } } @@ -33631,10 +33631,10 @@ "areas_with_expected_ge_5": 649, "max_abs_z": 3.667074195015453, "max_relative_error_expected_ge_100": null, - "min_ess": 1.6938881792291236, - "min_rows": 2.0, - "min_sources": 2.0, - "share_abs_z_gt_3": 0.007704160246533128 + "min_ess": null, + "min_rows": null, + "min_sources": null, + "share_abs_z_gt_3": 0.007763975155279503 }, "la": { "areas": 361, @@ -33642,9 +33642,9 @@ "areas_with_expected_ge_5": 355, "max_abs_z": 2.9242915524512685, "max_relative_error_expected_ge_100": 0.0691829874090789, - "min_ess": 0.0, - "min_rows": 0.0, - "min_sources": 0.0, + "min_ess": null, + "min_rows": null, + "min_sources": null, "share_abs_z_gt_3": 0.0 } }, @@ -35265,13 +35265,13 @@ }, { "area_code": "E14001223", - "ess": 3.51391796609051, + "ess": "withheld", "expected_rows": 7.417830112135873, "level": "constituency", "region_code": "E12000007", - "rows": 4.0, - "sources": 3.0, - "z": -1.2629410351663422 + "rows": "withheld", + "sources": "withheld", + "z": null }, { "area_code": "E14001224", @@ -41125,13 +41125,13 @@ }, { "area_code": "E07000073", - "ess": 5.7425976641442835, + "ess": "withheld", "expected_rows": 9.939383611017385, "level": "la", "region_code": "E12000006", - "rows": 6.0, - "sources": 6.0, - "z": -1.2586334817077316 + "rows": "withheld", + "sources": "withheld", + "z": null }, { "area_code": "E07000074", @@ -44436,18 +44436,18 @@ }, "ess": { "median": 9.07468089311904, - "min": 1.6567307229122428, + "min": null, "p10": 5.579519044811266 }, "n_areas": 650, "rows": { "median": 10.0, - "min": 2.0, + "min": null, "p10": 6.0 }, "sources": { "median": 7.0, - "min": 2.0, + "min": null, "p10": 4.0 } }, @@ -44823,18 +44823,18 @@ }, "ess": { "median": 13.716548013069318, - "min": 0.0, + "min": null, "p10": 6.514957816027997 }, "n_areas": 361, "rows": { "median": 15.0, - "min": 0.0, + "min": null, "p10": 7.0 }, "sources": { "median": 9.0, - "min": 0.0, + "min": null, "p10": 6.0 } } @@ -44854,10 +44854,10 @@ "areas_with_expected_ge_5": 649, "max_abs_z": 4.071008252058869, "max_relative_error_expected_ge_100": null, - "min_ess": 1.6567307229122428, - "min_rows": 2.0, - "min_sources": 2.0, - "share_abs_z_gt_3": 0.0030816640986132513 + "min_ess": null, + "min_rows": null, + "min_sources": null, + "share_abs_z_gt_3": 0.0031007751937984496 }, "la": { "areas": 361, @@ -44865,9 +44865,9 @@ "areas_with_expected_ge_5": 355, "max_abs_z": 2.772278632961248, "max_relative_error_expected_ge_100": 0.1079834426741643, - "min_ess": 0.0, - "min_rows": 0.0, - "min_sources": 0.0, + "min_ess": null, + "min_rows": null, + "min_sources": null, "share_abs_z_gt_3": 0.0 } }, @@ -44909,7 +44909,7 @@ "spine": "spine-r.h5", "spine_sha256": "921612e88eefcf21511ac6ad5faf60a1514f577490188c6e39aec49cb4224f27" }, - "purpose": "Assignment-level before/after evidence for the UK geography-first reordering (step 2): legacy sequential ladder draw versus the identity-keyed single-stage draw, design weights, no solve; per-area counts below the minimum are suppressed together with their z-scores, and no unit records appear.", + "purpose": "Assignment-level before/after evidence for the UK geography-first reordering (step 2): legacy sequential ladder draw versus the identity-keyed single-stage draw, design weights, no solve; per-area counts below the minimum are suppressed together with their z-scores, one more count per level with suppressed counts is withheld so the level total cannot recover them, the level minima are withheld there and the z summaries cover published areas only; no unit records appear.", "supports": { "uk_ew_output_area_2021": "1b0dec268be0141f03ec05dc3b55c13733cc2bb20be5e403d76d73c8e27dc797", "uk_ni_data_zone_2021": "facb9923f589cb68eefa8fad37911e618b6137964ff58a231976ef62584b669f", diff --git a/experiments/931-uk-atomic-assignment-receipts.md b/experiments/931-uk-atomic-assignment-receipts.md index ec51a89f7..86eaf256f 100644 --- a/experiments/931-uk-atomic-assignment-receipts.md +++ b/experiments/931-uk-atomic-assignment-receipts.md @@ -17,7 +17,7 @@ Disclosure: the committed 1 % evidence and this file report population aggregate ## R1 — f001 (1 %, sample seed 578; committed evidence) -Evidence: `docs/evidence/uk-931/atomic-assignment-cells.json`, sha256 `7d120d529da618edebd5b96b9bbddfcca28ed2e06e6c9bbbebacab5b1a0322e8` (4 cells × 1,011 areas; 985 area counts suppressed as `<3`, their z-scores blanked with them since the round-1 review of #932 found the counts recoverable from `expected_rows` and `z`; the file was re-suppressed in place under the harness's rule, no cell regenerated, from sha256 `32f494df…`). +Evidence: `docs/evidence/uk-931/atomic-assignment-cells.json`, sha256 `99013cc15c6d4368027dd64fa6a4133a6ba40011e96d25919c528f622b60dbf9` (4 cells × 1,011 areas; 985 area counts suppressed as `<3`, their z-scores blanked with them since the round-1 review of #932 found the counts recoverable from `expected_rows` and `z`). Round 2 of the #1057 review (item 8, folded into microcosm#1059) found the suppressed counts still recoverable at K=15 from the level totals, since every row lies in one area per level and the expected rows sum to the total, and the K=1 LA `max_abs_z` taken from a suppressed area. So `resuppress_evidence` in the harness now withholds one more count per level that has suppressed ones (`withheld`, chosen in a value-independent order among counts above the minimum), withholds the level and breach-table minima there and any breach quantile in the suppressed range, and computes the z summaries over published areas only. The file was re-suppressed in place (no cell regenerated) from sha256 `7d120d52…`, earlier `32f494df…`; the test checks it is a fixed point of the pass and that no suppressed count is determined by the level total. | law | K | rows | source hh | gate | shared gate | London share | const. min rows / ESS / sources | const. max abs z / share abs z>3 (n) | const. breaches | LA min rows / ESS / sources | LA max abs z / share>3 (n) | LA breaches | identity stable | K-growth nested | |---|---:|---:|---:|---|---|---:|---|---|---:|---|---|---:|---|---| diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_atomic_assignment_measurement.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_atomic_assignment_measurement.py index 9a9106a3b..107a5ee51 100644 --- a/packages/microcosm-build/tests/engine_free/uk/test_uk_atomic_assignment_measurement.py +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_atomic_assignment_measurement.py @@ -188,7 +188,84 @@ def test_breach_tables_and_disclosure_suppression(harness, toy_ladder): assert harness._suppressed_area({**row, "rows": 0.0}, 3)["z"] == 0.3 -def test_committed_931_evidence_is_internally_consistent(): +def _level_areas(level, counts, expected): + return [ + { + "level": level, + "area_code": f"{level}-{index:03d}", + "region_code": "E12000001", + "expected_rows": expected, + "rows": float(count), + "ess": float(count), + "sources": float(count), + "z": 0.1, + } + for index, count in enumerate(counts) + ] + + +def test_complementary_suppression_leaves_no_suppressed_count_determined(harness): + # Round 2 of microcosm#1057, item 8: with zeros published and the level total + # known (the expected rows sum to it), two suppressed counts of 2 were pinned + # by the residual. The complement adds an unknown of at least minimum + 1. + counts = [2, 2, 0, 3, 7, 12, 30] + areas = [ + harness._suppressed_area(row, 3) + for row in _level_areas("constituency", counts, sum(counts) / len(counts)) + ] + protected = harness._complement_suppressed(areas, 3) + withheld = [area for area in protected if area["rows"] == harness.WITHHELD] + assert len(withheld) == 1 + assert withheld[0]["z"] is None and withheld[0]["ess"] == harness.WITHHELD + assert harness._complement_suppressed(protected, 3) == protected + total = sum(area["expected_rows"] for area in protected) + published = sum(a["rows"] for a in protected if not isinstance(a["rows"], str)) + suppressed = sum(1 for a in protected if a["rows"] == "<3") + residual = total - published + # The reader's feasible sums for the suppressed counts span more than one value. + assert min(2 * suppressed, residual - 4) >= suppressed + 1 + + +def test_resuppression_withholds_summaries_that_carry_a_suppressed_value(harness): + counts = [1, 2, 9, 10, 11] + areas = [ + harness._suppressed_area({**row, "z": float(index)}, 3) + for index, row in enumerate(_level_areas("la", counts, 6.0)) + ] + evidence = { + "minimum_count": 3, + "cells": [ + { + "areas": areas, + "levels": { + "la": { + "min_rows": 1.0, + "min_ess": 1.0, + "min_sources": 1.0, + "max_abs_z": 4.0, + "share_abs_z_gt_3": 0.2, + } + }, + "breaches": {"la": {"rows": {"min": 1.0, "p10": 1.0, "median": 9.0}}}, + } + ], + } + out = harness.resuppress_evidence(evidence) + level = out["cells"][0]["levels"]["la"] + assert level["min_rows"] is None and level["min_sources"] is None + # The largest |z| belonged to a suppressed or withheld area; the summary is + # over published areas only. + published_z = [abs(a["z"]) for a in out["cells"][0]["areas"] if a["z"] is not None] + assert level["max_abs_z"] == max(published_z) + assert out["cells"][0]["breaches"]["la"]["rows"] == { + "min": None, + "p10": None, + "median": 9.0, + } + assert harness.resuppress_evidence(out) == out + + +def test_committed_931_evidence_is_internally_consistent(harness): root = paths_for("microcosm-build").repository path = root / "docs/evidence/uk-931/atomic-assignment-cells.json" if not path.is_file(): @@ -206,7 +283,7 @@ def test_committed_931_evidence_is_internally_consistent(): for field in ("rows", "ess", "sources"): value = area[field] if isinstance(value, str): - assert value == f"<{evidence['minimum_count']}" + assert value in {f"<{evidence['minimum_count']}", harness.WITHHELD} else: assert value == 0 or value >= evidence["minimum_count"] if isinstance(area["rows"], str): @@ -214,4 +291,23 @@ def test_committed_931_evidence_is_internally_consistent(): assert "household_id" not in area and "source_household_id" not in area if cell["law"] == "keyed": assert all(cell["identity_stability"].values()) + minimum = evidence["minimum_count"] + for level, summary in cell["levels"].items(): + areas = [area for area in cell["areas"] if area["level"] == level] + suppressed = sum(1 for area in areas if area["rows"] == f"<{minimum}") + if not suppressed: + continue + # One complement per level, and no summary carries a suppressed value. + assert sum(1 for area in areas if area["rows"] == harness.WITHHELD) == 1 + assert summary["min_rows"] is None and summary["min_sources"] is None + # A reader who knows the level total (the expected rows sum to it) + # and the rule can bound the suppressed counts' sum, but not pin it. + total = round(sum(area["expected_rows"] for area in areas)) + published = sum( + area["rows"] for area in areas if not isinstance(area["rows"], str) + ) + highest = min((minimum - 1) * suppressed, total - published - minimum - 1) + assert highest >= suppressed + 1, (cell["law"], cell["n_clones"], level) + # The committed file is a fixed point of the harness's disclosure pass. + assert harness.resuppress_evidence(evidence) == evidence assert np.isfinite(sum(c["wall_seconds"] for c in evidence["cells"])) diff --git a/tools/measure_uk_atomic_assignment.py b/tools/measure_uk_atomic_assignment.py index 6de7e0dbf..ea90b520d 100644 --- a/tools/measure_uk_atomic_assignment.py +++ b/tools/measure_uk_atomic_assignment.py @@ -24,7 +24,10 @@ It is a diagnostic recorder only: it never gates and release builds do not run it. Disclosure (UKDS EUL CD137 clause 8, CD171 s5.2.1): the evidence JSON carries no unit records and reports any per-area count below -``--minimum-count`` as " dict: } +#: A published count withheld only to protect suppressed ones at its level. +WITHHELD = "withheld" +_AREA_COUNT_FIELDS = ("rows", "ess", "sources") + + +def _complement_order(level: str, code: str) -> str: + """A value-independent order over areas (the complement choice must not + depend on the counts it protects).""" + + return hashlib.sha256(f"{level}:{code}".encode()).hexdigest() + + +def _complement_suppressed(areas: list[dict], minimum: int) -> list[dict]: + """Withhold one published count per level that has suppressed counts. + + Every household row lies in exactly one area per level, and the expected + rows sum to the level total (which the integer pool counts and the public + census shares fix in any case), so the total less the published counts is + the sum of the suppressed ones. With zeros published, each suppressed count + lies between 1 and ``minimum - 1``, and a sum at either end of that range + pins every one of them (microcosm#1057 review round 2, item 8). At each such + level the first area, in a value-independent order, whose count exceeds the + minimum is withheld as well (its z-score, ESS and source count with it), so + the residual carries an unknown of at least ``minimum + 1``. A level that + already carries a withheld area is left as it is, so the pass is idempotent. + """ + + out = [dict(area) for area in areas] + for level in sorted({area["level"] for area in out}): + members = [area for area in out if area["level"] == level] + if not any( + isinstance(area["rows"], str) and area["rows"] != WITHHELD + for area in members + ): + continue + if any(area["rows"] == WITHHELD for area in members): + continue + eligible = sorted( + ( + area + for area in members + if not isinstance(area["rows"], str) and area["rows"] > minimum + ), + key=lambda area: _complement_order(level, area["area_code"]), + ) + if not eligible: + raise ValueError( + f"level {level!r} has suppressed counts but no count above the " + "minimum to withhold beside them." + ) + chosen = eligible[0] + for field in _AREA_COUNT_FIELDS: + chosen[field] = WITHHELD + chosen["z"] = None + return out + + +def _published_z_summary( + areas: list[dict], level: str +) -> tuple[float | None, float | None]: + """max |z| and the share above 3 over the level's published areas only + (expected rows of at least 5), so no summary carries a suppressed z.""" + + z = [ + abs(float(area["z"])) + for area in areas + if area["level"] == level + and area["z"] is not None + and float(area["expected_rows"]) >= 5.0 + ] + if not z: + return None, None + return max(z), sum(value > 3 for value in z) / len(z) + + +def resuppress_evidence(evidence: dict) -> dict: + """The committed disclosure rule applied to a written evidence payload. + + Primary suppression (``_suppressed_area``) runs when a cell is written; this + pass adds the complementary suppression of each level and withholds the + summaries that would reveal a suppressed value: the level minima of rows, + ESS and sources, the breach-table minima and any breach quantile inside the + suppressed range, and it recomputes the z summaries over published areas. + It is idempotent, so the committed file is a fixed point. + """ + + minimum = int(evidence["minimum_count"]) + out = json.loads(json.dumps(evidence)) + for cell in out["cells"]: + cell["areas"] = _complement_suppressed(cell["areas"], minimum) + for level, summary in cell["levels"].items(): + protected = any( + isinstance(area[field], str) + for area in cell["areas"] + if area["level"] == level + for field in _AREA_COUNT_FIELDS + ) + if protected: + summary["min_rows"] = None + summary["min_ess"] = None + summary["min_sources"] = None + summary["max_abs_z"], summary["share_abs_z_gt_3"] = _published_z_summary( + cell["areas"], level + ) + breaches = cell["breaches"].get(level, {}) + for field in _AREA_COUNT_FIELDS: + stats = breaches.get(field) + if not isinstance(stats, dict): + continue + for name, value in list(stats.items()): + if not isinstance(value, (int, float)): + continue + if (protected and name == "min") or 0 < value < minimum: + stats[name] = None + return out + + def _peak_rss_bytes() -> int: usage = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss return int(usage if sys.platform == "darwin" else usage * 1024) @@ -592,7 +712,10 @@ def main(argv: list[str] | None = None) -> None: "reordering (step 2): legacy sequential ladder draw versus the " "identity-keyed single-stage draw, design weights, no solve; per-area " "counts below the minimum are suppressed together with their " - "z-scores, and no unit records appear." + "z-scores, one more count per level with suppressed counts is " + "withheld so the level total cannot recover them, the level minima " + "are withheld there and the z summaries cover published areas only; " + "no unit records appear." ), "date": dt.date.today().isoformat(), "model_period": model_period, @@ -612,6 +735,7 @@ def main(argv: list[str] | None = None) -> None: "minimum_count": args.minimum_count, "cells": cells, } + evidence = resuppress_evidence(evidence) args.evidence_out.parent.mkdir(parents=True, exist_ok=True) args.evidence_out.write_text( json.dumps(evidence, indent=2, sort_keys=True) + "\n", encoding="utf-8" From 9c13b32695062a634624c27cd7127e9342b21fb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Juaristi?= <127882282+juaristi22@users.noreply.github.com> Date: Wed, 30 Sep 2026 15:09:15 +0100 Subject: [PATCH 10/17] Refuse an occupied national --out before the attempt opens (#1057 review round 2, item 9) The C2 refusal (#1057 round 1) ran inside prepare_national_build, after the attempt id was minted and telemetry opened, so a refused second run wrote failure.json (`release_authorized: false`) and a failed Logbook row into the first candidate's directory, and opened a failed staging run. The check moves to `refuse_occupied_national_output`, called in `_national_main` with the other argument refusals, before the staged- dataset pre-flight and before any attempt exists: a refused run writes nothing into the occupied directory. No Logbook row is owed, as for every refusal that precedes the attempt (the driver's standing rule: argument refusals cost nothing). The input's existence is still checked inside the attempt; the collision check needs only its path. Test: the second run raises FileExistsError and leaves every file under the first candidate's --out byte-identical, with no failure.json and one Logbook row. The runbook and the graph doc say so. Co-Authored-By: Claude Opus 5.5 --- docs/uk-full-build-graph.md | 2 +- docs/uk-national-calibration-runbook-623.md | 7 +-- .../build/uk_runtime/full_build_cli.py | 44 ++++++++++++++----- .../uk/test_uk_rowwise_national_role.py | 33 ++++++++------ 4 files changed, 57 insertions(+), 29 deletions(-) diff --git a/docs/uk-full-build-graph.md b/docs/uk-full-build-graph.md index 7d9de42ee..9d76af74c 100644 --- a/docs/uk-full-build-graph.md +++ b/docs/uk-full-build-graph.md @@ -124,7 +124,7 @@ Recorded for review in `experiments/901-uk-main-rebase-receipts.md` (R3): Recorded at the review of the national line's move onto the graph (`experiments/901-uk-national-graph-path-receipts.md`): - The measure-exclusion windows and the target-fit deferral register are evaluated at `--review-date` (default today) on the national line, as the dense graph already did; the retired seam evaluated both at the run clock. A back-dated review date therefore keeps expired exclusions and deferrals in force, which the seam never allowed; the date is a node parameter (`uk.full.national_targets`, `uk.full.gates.calibrated`) and is recorded in the request bindings. -- An occupied `--out` is refused before any work on the national line (the seam's `FileExistsError`), so a repeated run never replaces a candidate under the Logbook row that names it. A `KeyboardInterrupt` records a `discarded` row on both lines and re-raises, as the seam did. +- An occupied `--out` is refused on the national line with the other argument refusals, before the attempt opens (the seam's `FileExistsError`), so a repeated run never replaces a candidate under the Logbook row that names it and writes nothing into its directory. A `KeyboardInterrupt` records a `discarded` row on both lines and re-raises, as the seam did. - `build.json` is re-issued after the close step on both lines: the staging receipts are appended to the rowwise manifest and, on the national line, the delivery summary to the build record (the release assembler reads it there), and the completion marker then carries those files' final digests rather than the note that receipts follow. - The measure receipt records a scratch-mode resolver's `source_path` relative to the per-run scratch root (`simulation-input.h5`), so the measure and national problem nodes are deterministic between identical runs; the receipt no longer carries a temporary directory. - Under `--release-candidate` the three atomic-area supports must be the `sources.yaml` rows (sha256 and byte size), whatever digest was pinned on the command line, and `tools/preflight_uk_local_release_candidate.py` refuses a manifest whose `geography.assignment` is not the atomic law on those same pins (microcosm#932, round 1). diff --git a/docs/uk-national-calibration-runbook-623.md b/docs/uk-national-calibration-runbook-623.md index 3c0938642..d11d01f85 100644 --- a/docs/uk-national-calibration-runbook-623.md +++ b/docs/uk-national-calibration-runbook-623.md @@ -50,9 +50,10 @@ uv run --no-sync python tools/build_uk_full.py --release-role national \ ``` `--out` must not already hold a candidate: the role refuses an occupied -output directory before any work (`failure.json` names the -`FileExistsError`, the Logbook row is `failed`), so a rebuild goes into a -fresh directory rather than over the bytes an earlier row names. An +output directory with the other argument refusals, before the attempt opens +(a `FileExistsError`; nothing is written into the directory, no Logbook row, +no staging run), so a rebuild goes into a fresh directory rather than over +the bytes an earlier row names. An operator interrupt (Ctrl-C) records a `discarded` row and closes the staging run as failed. `--review-date` (default today) dates the measure-exclusion windows and the target-fit deferral register on this line, as it does on diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/full_build_cli.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/full_build_cli.py index 1b4209464..ff684bde8 100644 --- a/packages/microcosm-build/src/microcosm/build/uk_runtime/full_build_cli.py +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/full_build_cli.py @@ -1618,6 +1618,32 @@ def _ledger_facts_pin(path: Path) -> dict: return {"sha256": artifact["sha256"], "size_bytes": int(artifact["size_bytes"])} +def refuse_occupied_national_output(args: argparse.Namespace) -> None: + """Refuse an occupied ``--out`` before any national attempt exists. + + The publication step replaces whatever is at ``--out``, so a second run into + a candidate's directory would silently replace the first candidate's bytes + under the Logbook row that names them (review C2); the retired seam refused + it before any work (``_validate_output_paths``). The refusal runs with the + other argument refusals, before the attempt id is minted and telemetry + opens, so it writes nothing into the occupied directory: no failure + sidecar, no Logbook row, no staging run (microcosm#1057 review round 2, + item 9). Dry runs write nothing and are not refused. + """ + + national_role.validate_output_paths( + output_paths( + args.out, + posture=posture_of(args), + vintage=str(load_uk_frs_release().vintage), + ), + # The input's existence is checked inside the attempt, as before; the + # collision check needs only its path. + input_h5=Path(args.input_h5).expanduser(), + ladder_path=None, + ) + + def prepare_national_build( args: argparse.Namespace, *, telemetry=None, attempt: dict | None = None ) -> PreparedUKNationalBuild: @@ -1657,17 +1683,9 @@ def prepare_national_build( args._calibration_year = calibration_year args._frs_vintage = str(release.vintage) args._doctrine_override_receipt = overrides - if not args.dry_run: - # The seam refused an occupied output directory before any work - # (``_validate_output_paths`` in ``_run_national_attempt``); the - # publication step replaces whatever is at ``--out``, so without this - # a second run would silently replace the first candidate's bytes - # under the Logbook row that names them. - national_role.validate_output_paths( - output_paths(args.out, posture=posture, vintage=args._frs_vintage), - input_h5=input_h5, - ladder_path=None, - ) + # An occupied ``--out`` is refused in ``_national_main`` before the attempt + # opens (``refuse_occupied_national_output``), so a refused run leaves + # nothing in the first candidate's directory. config = UKNationalBuildConfig( calibration_year=calibration_year, time_period=time_period, @@ -2299,6 +2317,10 @@ def _national_main(args: argparse.Namespace) -> int: args ).national.operation_inventory(), ) + # Argument refusals cost nothing, the occupied output directory included; + # the credential check reaches the Hub, so it runs last, still before any + # input is read. + refuse_occupied_national_output(args) preflight_staged_dataset(args) started_at = time.perf_counter() started_ts = datetime.now(UTC) diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_rowwise_national_role.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_rowwise_national_role.py index 2439bbf0c..f7f685013 100644 --- a/packages/microcosm-build/tests/engine_free/uk/test_uk_rowwise_national_role.py +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_rowwise_national_role.py @@ -674,20 +674,25 @@ def test_uk_national_role_marks_the_staging_run_failed_on_a_refusal( def test_uk_national_role_refuses_an_occupied_output_directory(monkeypatch, tmp_path): """The seam refused to overwrite an existing candidate artifact; the graph - driver keeps that refusal before any work, so a second run into the same - ``--out`` leaves the first candidate's bytes under its Logbook row.""" + driver refuses it with the other argument refusals, before the attempt + opens, so a second run into the same ``--out`` leaves the first candidate's + directory exactly as it was: no failure sidecar, no second Logbook row + (microcosm#1057 review round 2, item 9).""" pytest.importorskip("tables") builder = candidate._load_builder_module() input_h5, _registry, _artifact, _pin = _national_inputs(monkeypatch, tmp_path) out = tmp_path / "national" assert builder.main(_argv(input_h5, out, "--no-staging", "--epochs", "5")) == 0 - first = { - name: _sha(out / name) - for name in ("microcosm_uk_2024_25.h5", "build_record.json", "build.json") + before = { + str(path.relative_to(out)): _sha(path) + for path in sorted(out.rglob("*")) + if path.is_file() } head = load_spool_rows(out / "logbook-spool")[0].row_digest - assert ( + with pytest.raises( + FileExistsError, match="refusing to overwrite existing candidate artifact" + ): builder.main( _argv( input_h5, @@ -699,16 +704,16 @@ def test_uk_national_role_refuses_an_occupied_output_directory(monkeypatch, tmp_ head, ) ) - == 1 - ) - failure = json.loads((out / "failure.json").read_text()) - assert failure["error_type"] == "FileExistsError" - assert "refusing to overwrite existing candidate artifact" in failure["message"] - assert {name: _sha(out / name) for name in first} == first + after = { + str(path.relative_to(out)): _sha(path) + for path in sorted(out.rglob("*")) + if path.is_file() + } + assert after == before + assert not (out / "failure.json").exists() rows = load_spool_rows(out / "logbook-spool") - assert [row.disposition for row in rows] == ["iterating", "failed"] - assert "input_sha_verified" not in rows[1].phases_reached + assert [row.disposition for row in rows] == ["iterating"] def test_uk_national_role_blocks_on_a_failed_seam_gate(monkeypatch, tmp_path): From 0073c5b3d8f47ee487c308fc5b3b56cf603cf243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Juaristi?= <127882282+juaristi22@users.noreply.github.com> Date: Wed, 30 Sep 2026 15:09:38 +0100 Subject: [PATCH 11/17] Commit the R5 comparison script beside its evidence (#1057 review round 2, item 10) `compare_a_vs_b2.json` cited a script that lived only in the licensed data tree. The script (no data, no machine paths) is committed as docs/evidence/uk-901-national-ab/scripts/compare_national_ab.py, formatted under the evidence-scripts ruff waiver, so R5 can be regenerated by anyone with the licensed inputs; the JSON's purpose and the #1057 receipts point at it. Co-Authored-By: Claude Opus 5.5 --- .../uk-901-national-ab/compare_a_vs_b2.json | 2 +- .../scripts/compare_national_ab.py | 235 ++++++++++++++++++ .../901-uk-national-graph-path-receipts.md | 3 +- 3 files changed, 238 insertions(+), 2 deletions(-) create mode 100644 docs/evidence/uk-901-national-ab/scripts/compare_national_ab.py diff --git a/docs/evidence/uk-901-national-ab/compare_a_vs_b2.json b/docs/evidence/uk-901-national-ab/compare_a_vs_b2.json index 6094b3d6a..87f0abbe6 100644 --- a/docs/evidence/uk-901-national-ab/compare_a_vs_b2.json +++ b/docs/evidence/uk-901-national-ab/compare_a_vs_b2.json @@ -1,5 +1,5 @@ { - "purpose": "R5 of experiments/901-uk-national-graph-path-receipts.md: the licensed seam-vs-graph national A/B on the 10 % smoke spine of the #901 pre-merge run (53,806 households, 1,062 targets), compared field by field by data/ukds/acceptance/901-national-ab/compare_national_ab.py. Aggregates and field-level differences only; no unit records.", + "purpose": "R5 of experiments/901-uk-national-graph-path-receipts.md: the licensed seam-vs-graph national A/B on the 10 % smoke spine of the #901 pre-merge run (53,806 households, 1,062 targets), compared field by field by docs/evidence/uk-901-national-ab/scripts/compare_national_ab.py (run in the licensed lane as data/ukds/acceptance/901-national-ab/compare_national_ab.py; committed by microcosm#1059 on review round 2 of #1057, item 10). Aggregates and field-level differences only; no unit records.", "date": "2026-09-29", "a": "a-seam (main at the #901 merge, 6a70cd4ee, run_uk_calibration)", "b": "b-graph-2 (uk-national-graph-path at 218226898, microcosm-build-uk --release-role national)", diff --git a/docs/evidence/uk-901-national-ab/scripts/compare_national_ab.py b/docs/evidence/uk-901-national-ab/scripts/compare_national_ab.py new file mode 100644 index 000000000..f56034348 --- /dev/null +++ b/docs/evidence/uk-901-national-ab/scripts/compare_national_ab.py @@ -0,0 +1,235 @@ +"""Compare the seam (A) and graph (B) national builds on one spine. + +Usage (from a tree with the uk extra): uv run --no-sync python compare_national_ab.py + +Reports as JSON: the solve through the target-support sidecars both sides +write before the battery (row names, target vector, design and final weights, +the CSR matrix), the diagnostics minus the build block and the build block +minus its operational fields, the gate report outcomes and details, the +Logbook rows' identity and pin digests, the H5 payload when both sides wrote +one, and the wall time. +""" + +from __future__ import annotations + +import hashlib +import json +import sys +from pathlib import Path + +import numpy as np +import scipy.sparse as sp + +from microcosm.build.logbook import load_spool_rows + +A, B = Path(sys.argv[1]), Path(sys.argv[2]) +DATASET = "microcosm_uk_2024_25.h5" +GATES = "microcosm_uk_2024_25.terminal_gates.json" +OPERATIONAL = { + "build_id", + "created_at", + "code_pin", + "runtime", + "git_commit", + "git_dirty", + "staging_delivery", + "path", + "graph", + "rowwise_driver_parameters", + "certification", + "sha256", + "size_bytes", + "bytes", + "elapsed_seconds", + "seconds", + "evaluated_at", + "timestamp", +} + + +def sha(path: Path) -> str: + return hashlib.sha256(path.read_bytes()).hexdigest() + + +def strip(payload, drop=OPERATIONAL): + if isinstance(payload, dict): + return {k: strip(v, drop) for k, v in payload.items() if k not in drop} + if isinstance(payload, list): + return [strip(v, drop) for v in payload] + return payload + + +def diff_paths(a, b, prefix=""): + out = [] + if isinstance(a, dict) and isinstance(b, dict): + for key in sorted(set(a) | set(b)): + if key not in a or key not in b: + out.append( + f"{prefix}/{key}: {'only in A' if key in a else 'only in B'}" + ) + else: + out.extend(diff_paths(a[key], b[key], f"{prefix}/{key}")) + elif isinstance(a, list) and isinstance(b, list): + if len(a) != len(b): + out.append(f"{prefix}: list length {len(a)} vs {len(b)}") + else: + for i, (x, y) in enumerate(zip(a, b, strict=True)): + out.extend(diff_paths(x, y, f"{prefix}[{i}]")) + elif a != b: + out.append(f"{prefix}: {str(a)[:80]!r} vs {str(b)[:80]!r}") + return out + + +report = {"a": str(A), "b": str(B)} + +# 1. The solve, from the target-support sidecars. +va = np.load(A / "target_support_vectors.npz", allow_pickle=True) +vb = np.load(B / "target_support_vectors.npz", allow_pickle=True) +ma, mb = ( + sp.load_npz(A / "target_support_matrix.npz"), + sp.load_npz(B / "target_support_matrix.npz"), +) +fa, fb = va["final_weights"], vb["final_weights"] +report["solve"] = { + "targets": (int(ma.shape[0]), int(mb.shape[0])), + "households": (int(ma.shape[1]), int(mb.shape[1])), + "row_names_equal": bool(np.array_equal(va["names"], vb["names"])), + "target_vector_equal": bool( + np.array_equal(va["target_vector"], vb["target_vector"]) + ), + "matrix_identical": bool(ma.shape == mb.shape and (ma != mb).nnz == 0), + "design_weights_equal": bool( + np.array_equal(va["design_weights"], vb["design_weights"]) + ), + "household_ids_equal": bool( + np.array_equal(va["household_ids"], vb["household_ids"]) + ), + "final_weights_identical": bool(np.array_equal(fa, fb)), + "final_weights_max_abs_diff": float(np.max(np.abs(fa - fb))) + if fa.shape == fb.shape + else None, + "final_weight_totals": (float(fa.sum()), float(fb.sum())), +} + +# 2. The diagnostics. +da = json.loads((A / "calibration_diagnostics.json").read_text()) +db = json.loads((B / "calibration_diagnostics.json").read_text()) +report["diagnostics"] = { + "scalars": { + k: (da.get(k), db.get(k), da.get(k) == db.get(k)) + for k in ( + "schema_version", + "initial_loss", + "final_loss", + "n_nonzero", + "n_records", + "realized_max_weight_ratio", + "fraction_within_10pct", + ) + }, + "diff_minus_build": diff_paths( + strip(da, OPERATIONAL | {"build"}), strip(db, OPERATIONAL | {"build"}) + ), + "build_diff": diff_paths(strip(da.get("build", {})), strip(db.get("build", {}))), + "bytes_identical": sha(A / "calibration_diagnostics.json") + == sha(B / "calibration_diagnostics.json"), +} + +# 3. The gate report. +ga, gb = json.loads((A / GATES).read_text()), json.loads((B / GATES).read_text()) +report["gate_report"] = { + "blocked_at_phase": (ga.get("blocked_at_phase"), gb.get("blocked_at_phase")), + "statuses": { + k: (ga["gates"][k]["status"], gb["gates"][k]["status"]) for k in ga["gates"] + }, + "diff_minus_attestation": diff_paths( + strip(ga, OPERATIONAL | {"attestation", "release_evidence"}), + strip(gb, OPERATIONAL | {"attestation", "release_evidence"}), + ), + "signed": ( + bool(ga.get("attestation", {}).get("signature")), + bool(gb.get("attestation", {}).get("signature")), + ), +} + +# 4. The Logbook rows. +ra, rb = ( + load_spool_rows(A / "logbook-spool")[0].to_mapping(), + load_spool_rows(B / "logbook-spool")[0].to_mapping(), +) +report["logbook"] = { + k: (ra[k], rb[k], ra[k] == rb[k]) + for k in ( + "pipeline", + "identity_digest", + "input_pins_digest", + "disposition", + "rung", + "seed", + ) +} +report["logbook"]["phases"] = (ra["phases_reached"], rb["phases_reached"]) + +# 5. The H5 and the build record, when both sides wrote them. +if (A / DATASET).is_file() and (B / DATASET).is_file(): + from microcosm.build.uk_runtime.national_frame import load_uk_national_frame + + fra, _ = load_uk_national_frame(A / DATASET) + frb, _ = load_uk_national_frame(B / DATASET) + h5 = {"bytes_identical": sha(A / DATASET) == sha(B / DATASET), "tables": {}} + for entity in fra.entities: + ta, tb = fra.table(entity), frb.table(entity) + entry = { + "rows": (len(ta), len(tb)), + "columns_equal": list(ta.columns) == list(tb.columns), + } + unequal, dtype_only = [], [] + for col in [c for c in ta.columns if c in tb.columns]: + sa, sb = ta[col], tb[col] + if str(sa.dtype) != str(sb.dtype): + dtype_only.append(f"{col}: {sa.dtype} vs {sb.dtype}") + try: + same = np.array_equal(sa.to_numpy(), sb.to_numpy()) or sa.astype( + object + ).equals(sb.astype(object)) + except Exception: + same = sa.astype(str).equals(sb.astype(str)) + if not same: + unequal.append(col) + entry["value_unequal_columns"] = unequal + entry["dtype_only_differences"] = dtype_only + h5["tables"][entity] = entry + h5["weights_identical"] = bool( + np.array_equal( + fra.weights_for("household").values, frb.weights_for("household").values + ) + ) + h5["mass_log_identical"] = fra.mass_log == frb.mass_log + report["h5"] = h5 +else: + report["h5"] = {"written": ((A / DATASET).is_file(), (B / DATASET).is_file())} +if (A / "build_record.json").is_file() and (B / "build_record.json").is_file(): + bra, brb = ( + json.loads((A / "build_record.json").read_text()), + json.loads((B / "build_record.json").read_text()), + ) + report["build_record"] = {"diff": diff_paths(strip(bra), strip(brb))} +else: + report["build_record"] = { + "written": ( + (A / "build_record.json").is_file(), + (B / "build_record.json").is_file(), + ) + } + + +# 6. Wall time from the run logs. +def wall(path: Path): + for line in path.read_text().splitlines(): + if line.strip().endswith("real") or " real " in line: + return line.strip().split()[0] + return None + + +report["wall_seconds"] = {"a": wall(A / "run.log"), "b": wall(B / "run.log")} +print(json.dumps(report, indent=2, default=str)) diff --git a/experiments/901-uk-national-graph-path-receipts.md b/experiments/901-uk-national-graph-path-receipts.md index bdfc18919..d77417dbb 100644 --- a/experiments/901-uk-national-graph-path-receipts.md +++ b/experiments/901-uk-national-graph-path-receipts.md @@ -102,7 +102,8 @@ The one remaining difference, deliberate: `build.measure_resolution.provider.mod graph (the problem node exports the bound frame it holds to a scratch H5 for the engine), with the matching `source_path`. Both statements are true of what each did; the measures they produced are the same matrix. The comparison is committed as `docs/evidence/uk-901-national-ab/compare_a_vs_b2.json` -(aggregates and field-level differences only, machine paths omitted). Since the round-1 fix the +(aggregates and field-level differences only, machine paths omitted), and the script that wrote it +beside it as `scripts/compare_national_ab.py` (review round 2, item 10, folded into microcosm#1059). Since the round-1 fix the graph records that `source_path` relative to its scratch root, so a re-run would show the mode difference alone. The two shape differences the first run showed (target descriptors read as compiled-row callables on the household entity; `measure_resolution` carried the engine receipt instead of the From fd9b71300b4209fd9a46142aa6d7577c04e5cecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Juaristi?= <127882282+juaristi22@users.noreply.github.com> Date: Wed, 30 Sep 2026 15:09:51 +0100 Subject: [PATCH 12/17] Changelog: the #1057 review round 2 folds Co-Authored-By: Claude Opus 5.5 --- changelog.d/1057-review-round-2-folds.changed.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1057-review-round-2-folds.changed.md diff --git a/changelog.d/1057-review-round-2-folds.changed.md b/changelog.d/1057-review-round-2-folds.changed.md new file mode 100644 index 000000000..0b609df4c --- /dev/null +++ b/changelog.d/1057-review-round-2-folds.changed.md @@ -0,0 +1 @@ +Folded from microcosm#1057's review round 2 into microcosm#1059. The national line refuses an occupied `--out` with the other argument refusals, before the attempt opens, so a refused second run writes nothing into the first candidate's directory (no `failure.json`, no Logbook row, no staging run). The #931 atomic-assignment evidence withholds one more count per level that has suppressed counts, because every row lies in one area per level and the level total less the published counts recovered them. It also withholds the level and breach-table minima there, and computes its z summaries over published areas only. The harness applies the same pass (`resuppress_evidence`) and the committed file is its fixed point. The R5 national comparison script is committed beside its evidence. From fb87946f74b68b3f2c83f3df6dd648968548a05d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Juaristi?= <127882282+juaristi22@users.noreply.github.com> Date: Wed, 30 Sep 2026 15:20:12 +0100 Subject: [PATCH 13/17] Receipts: the measurement base after the rebase onto #1057 and #1045 Co-Authored-By: Claude Opus 5.5 --- experiments/1003-uk-lisa-receipts.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/experiments/1003-uk-lisa-receipts.md b/experiments/1003-uk-lisa-receipts.md index f156e630d..733507736 100644 --- a/experiments/1003-uk-lisa-receipts.md +++ b/experiments/1003-uk-lisa-receipts.md @@ -33,6 +33,12 @@ realisation deviation limit is raised from 1.0 to 2.0 in `uk/gates.json`. The bu - `spine-lisa-b`: the head with the four financial predictors removed from both models. This is measurement only and was not committed (Part F). +Rebased 2026-09-30 onto main `c5a1cba87`, after #932, #1057 and #1045. The licensed builds here +were measured before that, at `360e7846c` on main `5187fce25`. Every spine change in #1045 is +downstream of `was_lisa` (`cgt_support_split` replaces `cgt_band_donors`), so the stage-time +population and the stage evidence in Parts A to D and F stand. The H5 cross-check in Part C and +the twin in Part E describe the old base's downstream stages. + ## Part A. The donor audit The stage reads two licensed tabs, pinned in `uk/spec/sources.yaml` and checked by size and From 3c5999d742c885adb4d7faf315bca6d71beebffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Juaristi?= <127882282+juaristi22@users.noreply.github.com> Date: Wed, 30 Sep 2026 16:09:59 +0100 Subject: [PATCH 14/17] Receipts: the WAS donor against HMRC's LISA subscription counts (review round 1, item 2) HMRC's ISA statistics (September 2026, Table 9.4) count 553,000 Lifetime ISA accounts subscribed to in 2020-21 and 662,000 in 2021-22 across the UK; a person can pay into one LISA a year, so each is a distinct subscriber and a holder. The WAS donor implies about 447,000 holders in Great Britain over the same period, below the subscribers alone in either year, so the survey undercounts. For 2024-25 the provisional count is 1.14 million against the approved design's 660,000 spine holders (arm B 49%, option (c) 38%). Table 9.6 has no separate LISA market value, so the GBP 4.45 billion has no administrative check. Part F and the topic doc carry the comparison; a level fixed by these counts would go through Chronicle and is for the ruling. Co-Authored-By: Claude Opus 5.5 --- docs/uk-lisa-1003.md | 8 +++++++ experiments/1003-uk-lisa-receipts.md | 31 ++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/docs/uk-lisa-1003.md b/docs/uk-lisa-1003.md index 8bf38ace4..45151e07b 100644 --- a/docs/uk-lisa-1003.md +++ b/docs/uk-lisa-1003.md @@ -149,6 +149,14 @@ unknown type remain inside gross financial wealth only. - Balances are April 2020 to March 2022 pounds from a Great Britain donor and are not uprated to the spine year. LISA holdings have grown since; a published LISA stock or count series would be needed to uprate them. +- WAS undercounts LISA holders against HMRC's record. The donor implies about + 447,000 holders in Great Britain over April 2020 to March 2022. HMRC counts + 553,000 LISA accounts subscribed to in 2020-21 and 662,000 in 2021-22 across + the UK, and every subscriber is a holder (a person can pay into one LISA a + year). For 2024-25 HMRC's provisional count is 1.14 million, against the + candidate spine's 660,000 holders + ([Individual Savings Account statistics, September 2026](https://www.gov.uk/government/statistics/annual-savings-statistics-2026), + Table 9.4; receipts, Part F). - Northern Ireland adults are predicted from the Great Britain model. - Conditional ownership odds from 2020-22 are applied to the 2024-25 spine. A holder in 2024-25 can be up to about 47; the donor, interviewed earlier, diff --git a/experiments/1003-uk-lisa-receipts.md b/experiments/1003-uk-lisa-receipts.md index 733507736..999a8afc6 100644 --- a/experiments/1003-uk-lisa-receipts.md +++ b/experiments/1003-uk-lisa-receipts.md @@ -365,6 +365,37 @@ Three options, measured or implied on the same inputs: HMRC reports LISA subscriptions 20.1% (£472 million) higher in 2024 to 2025 ([annual savings statistics, September 2026 commentary](https://www.gov.uk/government/statistics/annual-savings-statistics-2026/commentary-for-annual-savings-statistics-september-2026)). +Against HMRC's administrative count (review round 1, item 2). HMRC's Individual Savings Account +statistics (September 2026 release, Table 9.4, adult ISAs) report the number of Lifetime ISA +accounts subscribed to in each tax year, across the UK. A person can pay into only one LISA a +year, so each subscribed account is a distinct subscriber, and every subscriber is a holder. + +| Tax year | LISA accounts subscribed to | Amount subscribed | +| --- | --- | --- | +| 2020 to 2021 | 553,000 | £1,482 million | +| 2021 to 2022 | 662,000 | £1,700 million | +| 2023 to 2024 | 964,000 | £2,346 million | +| 2024 to 2025 (provisional) | 1,136,000 | £2,818 million | + +- **The donor.** The WAS donor implies about 447,000 holders in Great Britain over April 2020 to + March 2022 (467,000 before the credibility rule). That is below the subscribers alone in either + fieldwork year: 81% of 2020-21's and 68% of 2021-22's. Northern Ireland is about 3% of UK + adults, so the survey undercounts LISA holders against the administrative record, by a margin + the non-subscribing holders only widen. +- **The spine year.** For 2024-25 the subscribers alone number 1.14 million. + - The approved design's 660,000 holders are 58% of that. + - Arm B's 560,000 are 49%. + - Option (c)'s 430,000 are 38%. +- **The stock.** The government reports over 1.3 million LISA accounts open in 2023-24 (its + response to the Treasury Committee, 11 September 2025, recommendation 2). A person can hold + several accounts. +- **Market value.** Table 9.6 publishes no separate LISA market value: LISAs sit inside the cash + and stocks-and-shares totals. So there is no administrative check on the £4.45 billion. +- **What follows for the options.** Every option leaves the spine below the administrative level, + and option (c), which re-anchors to the donor's rate, moves furthest from it. A level fixed by + HMRC's counts would need those counts vendored through Chronicle, as every calibration fact is. + That is a question for the ruling, not something this PR does. + Whichever option she picks, the `was_wealth` level is a follow-up in its own right: it moves every reader of the financial draws, not only this stage. From 61fe7da64190a9a994cf364c5f23d0f07ae283a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Juaristi?= <127882282+juaristi22@users.noreply.github.com> Date: Wed, 30 Sep 2026 16:17:22 +0100 Subject: [PATCH 15/17] Receipts: option (d), the donor's income predictors uprated to the spine year (review round 1, item 3) Arm D (measurement only, not committed) runs the house uprate_donor_columns step on the WAS person donor's employment_income and household_net_income, 2021 to 2024, by the engine's OBR average-earnings index (factor 1.185), as the LCFS and ETB stages do. The model's expected share falls from 1.36% to 1.32% and ownership from 1.25% to 1.23% (650,000 holders); the coefficients are unchanged because the standardisation absorbs the shift; balances stay as in (a); the cap binds on 10 households (0.6% of the LISA mass); 27 of 27 spine gates pass. The nominal income basis explains about 0.02 of the 0.36 points between the spine and the donor; the financial-wealth level carries the rest. Part F gains option (d); the evidence CSVs carry arm D beside arm B. Co-Authored-By: Claude Opus 5.5 --- docs/evidence/uk-lisa-1003/README.md | 10 ++++-- .../uk-lisa-1003/balance_quantiles.csv | 1 + docs/evidence/uk-lisa-1003/checks.csv | 30 ++++++++-------- .../uk-lisa-1003/ownership_realised.csv | 34 +++++++++---------- .../scripts/extract_lisa_1003_evidence.py | 28 +++++++++++---- experiments/1003-uk-lisa-receipts.md | 18 +++++++++- 6 files changed, 78 insertions(+), 43 deletions(-) diff --git a/docs/evidence/uk-lisa-1003/README.md b/docs/evidence/uk-lisa-1003/README.md index b2e2c92b2..b3042da56 100644 --- a/docs/evidence/uk-lisa-1003/README.md +++ b/docs/evidence/uk-lisa-1003/README.md @@ -20,6 +20,9 @@ the same pinned inputs: - `spine-lisa-2`: a rebuild of `spine-lisa`, for determinism. - `spine-lisa-b`: the head without the four financial predictors. This is measurement only and was never committed. +- `spine-lisa-d`: the head with the donor's income predictors uprated 2021 to 2024 by the engine's + OBR average-earnings index (review round 1, item 3). This is measurement only and was never + committed. Every tree carries the measurement-only PLAN_5 student-loan realisation relaxation (1.0 to 2.0) while #1049 is open. It is never committed. @@ -35,14 +38,15 @@ while #1049 is open. It is never committed. gate, the gate tuned for rare events and the age-group rates. - Each model's held-out weighted log loss. The folds are five, by household. - `ownership_realised.csv`: receipt Part C. - - Weighted ownership shares of adults on the donor, the candidate spine and arm B, from the - stage evidence, plus the model's expected share. + - Weighted ownership shares of adults on the donor, the candidate spine, arm B and arm D, from + the stage evidence, plus the model's expected share. - Co-holding within households. - `balance_quantiles.csv`: weighted owner balance quantiles and means for four populations: - the donor's credible holders; - the held-out forest draws; - the spine; - - arm B. + - arm B; + - arm D. - `financial_draws_by_age.csv`: receipt Part F, by age group. - The spine's WAS financial draws against the donor's, overall and by support channel. - Weighted medians of gross financial wealth, and weighted means of log(1 + x) for the diff --git a/docs/evidence/uk-lisa-1003/balance_quantiles.csv b/docs/evidence/uk-lisa-1003/balance_quantiles.csv index be8197b48..998deb64d 100644 --- a/docs/evidence/uk-lisa-1003/balance_quantiles.csv +++ b/docs/evidence/uk-lisa-1003/balance_quantiles.csv @@ -3,3 +3,4 @@ donor credible holders,500,1500,6000,10000,10000,6100 "donor credible holders, held-out draws (5-fold)",500,950,5000,8800,15000,5700 spine owners (stage evidence),1000,2400,6500,10000,15000,6700 "spine owners, arm B (stage evidence)",500,1400,5000,9000,10000,5600 +"spine owners, arm D (stage evidence)",1300,3000,6500,10000,15000,6700 diff --git a/docs/evidence/uk-lisa-1003/checks.csv b/docs/evidence/uk-lisa-1003/checks.csv index 9d6f7cca4..d64d3849b 100644 --- a/docs/evidence/uk-lisa-1003/checks.csv +++ b/docs/evidence/uk-lisa-1003/checks.csv @@ -1,15 +1,15 @@ -check,spine,spine_arm_b -cap: households over gross financial wealth,<10,76 -cap: owners cleared,0,<10 -cap: pct of weighted LISA mass removed,0.515,12.702 -support clip: rows clipped low / high,0 / 0,0 / 0 -H5: no household total above gross financial wealth,True,True -H5: household total equals the sum of its persons,True,True -H5: holds exactly where the balance is positive,True,True -H5: support gate on uk/was_lisa_support_bounds.json,True,True -H5: nonnegative,True,True -H5: on the export allow-list,True,True -H5: no degenerate cell,True,True -spine gates passed (control: 26 of 26),27 of 27,27 of 27 -"twin against main: only the three cells differ, mass log gains the conserved was_lisa record",True, -"determinism: second build payload-identical, equal mass log and stage evidence",True, +check,spine,spine_arm_b,spine_arm_d +cap: households over gross financial wealth,<10,76,10 +cap: owners cleared,0,<10,0 +cap: pct of weighted LISA mass removed,0.515,12.702,0.557 +support clip: rows clipped low / high,0 / 0,0 / 0,0 / 0 +H5: no household total above gross financial wealth,True,True,True +H5: household total equals the sum of its persons,True,True,True +H5: holds exactly where the balance is positive,True,True,True +H5: support gate on uk/was_lisa_support_bounds.json,True,True,True +H5: nonnegative,True,True,True +H5: on the export allow-list,True,True,True +H5: no degenerate cell,True,True,True +spine gates passed (control: 26 of 26),27 of 27,27 of 27,27 of 27 +"twin against main: only the three cells differ, mass log gains the conserved was_lisa record",True,, +"determinism: second build payload-identical, equal mass log and stage evidence",True,, diff --git a/docs/evidence/uk-lisa-1003/ownership_realised.csv b/docs/evidence/uk-lisa-1003/ownership_realised.csv index 862f24e80..4152db37e 100644 --- a/docs/evidence/uk-lisa-1003/ownership_realised.csv +++ b/docs/evidence/uk-lisa-1003/ownership_realised.csv @@ -1,17 +1,17 @@ -group,donor_pct,spine_pct,spine_arm_b_pct -all adults,0.890,1.251,1.062 -model expected share,,1.357,1.087 -18-24 (donor 16-24),2.092,4.141,2.912 -25-34,2.388,3.017,3.002 -35-44,1.700,2.613,2.153 -45-54,0.000,0.020,0.020 -55+,0.000,0.020,0.006 -female,0.723,1.070,0.911 -male,1.070,1.442,1.223 -private renters,2.736,4.012,3.534 -other tenures,0.537,0.677,0.549 -household net income tertiles 1-2,0.446,0.871,0.707 -household net income tertile 3,1.776,2.010,1.773 -FRS-channel rows,,1.382,1.122 -SPI-channel rows,,1.114,1.000 -co-holding: weighted share of holder households with 2+ holders,24.192,3.902,2.282 +group,donor_pct,spine_pct,spine_arm_b_pct,spine_arm_d_pct +all adults,0.890,1.251,1.062,1.229 +model expected share,,1.357,1.087,1.323 +18-24 (donor 16-24),2.092,4.141,2.912,4.065 +25-34,2.388,3.017,3.002,2.958 +35-44,1.700,2.613,2.153,2.575 +45-54,0.000,0.020,0.020,0.020 +55+,0.000,0.020,0.006,0.020 +female,0.723,1.070,0.911,1.054 +male,1.070,1.442,1.223,1.415 +private renters,2.736,4.012,3.534,3.952 +other tenures,0.537,0.677,0.549,0.664 +household net income tertiles 1-2,0.446,0.871,0.707,0.850 +household net income tertile 3,1.776,2.010,1.773,1.987 +FRS-channel rows,,1.382,1.122,1.358 +SPI-channel rows,,1.114,1.000,1.095 +co-holding: weighted share of holder households with 2+ holders,24.192,3.902,2.282,3.840 diff --git a/docs/evidence/uk-lisa-1003/scripts/extract_lisa_1003_evidence.py b/docs/evidence/uk-lisa-1003/scripts/extract_lisa_1003_evidence.py index 066803e70..8facb0311 100644 --- a/docs/evidence/uk-lisa-1003/scripts/extract_lisa_1003_evidence.py +++ b/docs/evidence/uk-lisa-1003/scripts/extract_lisa_1003_evidence.py @@ -287,6 +287,7 @@ def checks( gates: dict[str, dict[str, Any]], twin: dict[str, Any], determinism: dict[str, Any], + arm_name: str = "spine-lisa-b", ) -> list[list[Any]]: def coherence(receipt: dict[str, Any], key: str) -> Any: return receipt["evidence"]["financial_wealth_coherence"][key] @@ -350,7 +351,7 @@ def passed(name: str) -> str: [ "spine gates passed (control: " + passed("spine-ctl") + ")", passed("spine-lisa"), - passed("spine-lisa-b"), + passed(arm_name), ], [ "twin against main: only the three cells differ, mass log gains the conserved was_lisa record", @@ -374,13 +375,14 @@ def main() -> None: receipts = lane / "receipts" main_receipt = json.loads((receipts / "receipt-spine-lisa.json").read_text()) arm_b_receipt = json.loads((receipts / "receipt-spine-lisa-b.json").read_text()) + arm_d_receipt = json.loads((receipts / "receipt-spine-lisa-d.json").read_text()) comparison = json.loads((receipts / "model-comparison.json").read_text()) probe = json.loads( (receipts / "financial-wealth-probe-spine-lisa.json").read_text() ) gates = { name: json.loads((lane / name / f"{name}.spine_gates.json").read_text()) - for name in ("spine-ctl", "spine-lisa", "spine-lisa-b") + for name in ("spine-ctl", "spine-lisa", "spine-lisa-b", "spine-lisa-d") } twin = json.loads( (lane / "diff-spine-lisa-vs-spine-ctl" / "adjudication.json").read_text() @@ -392,21 +394,29 @@ def main() -> None: out.mkdir(parents=True, exist_ok=True) main_evidence = main_receipt["evidence"] arm_b_evidence = arm_b_receipt["evidence"] + arm_d_evidence = arm_d_receipt["evidence"] write(out / "donor_audit.csv", ["item", "value"], donor_audit(main_evidence)) write( out / "ownership_model_comparison.csv", ["group", "donor_pct"] + [f"{column}_pct" for _, column in MODELS], model_comparison(comparison), ) + # Arm D (review round 1, item 3) sits beside arm B: the same rows, one more column. + rows_b = realised(main_evidence, arm_b_evidence, comparison) + rows_d = realised(main_evidence, arm_d_evidence, comparison) + assert all(b[:3] == d[:3] for b, d in zip(rows_b, rows_d, strict=True)) write( out / "ownership_realised.csv", - ["group", "donor_pct", "spine_pct", "spine_arm_b_pct"], - realised(main_evidence, arm_b_evidence, comparison), + ["group", "donor_pct", "spine_pct", "spine_arm_b_pct", "spine_arm_d_pct"], + [b + [d[-1]] for b, d in zip(rows_b, rows_d, strict=True)], ) + owners = balances(main_evidence, arm_b_evidence, comparison) + arm_d_owners = balances(main_evidence, arm_d_evidence, comparison)[-1] + owners.append(["spine owners, arm D (stage evidence)"] + arm_d_owners[1:]) write( out / "balance_quantiles.csv", ["owners"] + [f"{q}_gbp" for q in QUANTILES] + ["weighted_mean_gbp"], - balances(main_evidence, arm_b_evidence, comparison), + owners, ) write( out / "financial_draws_by_age.csv", @@ -424,10 +434,14 @@ def main() -> None: ], financial_draws(probe), ) + checks_b = checks(main_receipt, arm_b_receipt, gates, twin, determinism) + checks_d = checks( + main_receipt, arm_d_receipt, gates, twin, determinism, arm_name="spine-lisa-d" + ) write( out / "checks.csv", - ["check", "spine", "spine_arm_b"], - checks(main_receipt, arm_b_receipt, gates, twin, determinism), + ["check", "spine", "spine_arm_b", "spine_arm_d"], + [b + [d[-1]] for b, d in zip(checks_b, checks_d, strict=True)], ) diff --git a/experiments/1003-uk-lisa-receipts.md b/experiments/1003-uk-lisa-receipts.md index 999a8afc6..6b8911ecb 100644 --- a/experiments/1003-uk-lisa-receipts.md +++ b/experiments/1003-uk-lisa-receipts.md @@ -32,6 +32,8 @@ realisation deviation limit is raised from 1.0 to 2.0 in `uk/gates.json`. The bu - `spine-lisa-2`: the same tree again, for determinism. - `spine-lisa-b`: the head with the four financial predictors removed from both models. This is measurement only and was not committed (Part F). +- `spine-lisa-d`: the head with the donor's income predictors uprated to the spine year (review + round 1, item 3). This is measurement only and was not committed (Part F). Rebased 2026-09-30 onto main `c5a1cba87`, after #932, #1057 and #1045. The licensed builds here were measured before that, at `360e7846c` on main `5187fce25`. Every spine change in #1045 is @@ -336,7 +338,7 @@ to the stage-time weight. income predictors. Spine households, whose incomes are 2024-25 pounds, therefore condition on richer donors. How much of the gap that explains is a question for the follow-up. -Three options, measured or implied on the same inputs: +Four options, measured or implied on the same inputs: - **(a) Keep the approved design.** On the spine: - Ownership is 1.25% (660,000 weighted holders on 52.7 million adults at stage time) and twice @@ -364,6 +366,19 @@ Three options, measured or implied on the same inputs: - It anchors the 2024-25 spine to the 2020-22 donor rate, and holdings have grown since: HMRC reports LISA subscriptions 20.1% (£472 million) higher in 2024 to 2025 ([annual savings statistics, September 2026 commentary](https://www.gov.uk/government/statistics/annual-savings-statistics-2026/commentary-for-annual-savings-statistics-september-2026)). +- **(d) Uprate the donor's income predictors to the spine year** (review round 1, item 3). This + is arm D, built and measured but not committed. The house `uprate_donor_columns` step moves + the WAS person donor's `employment_income` and `household_net_income` from 2021 to 2024 by the + engine's OBR average-earnings index (factor 1.185), as the LCFS and ETB stages do. + - The model's expected share falls from 1.36% to 1.32%, and ownership from 1.25% to 1.23% + (650,000 holders). The youngest group falls from 4.14% to 4.07%, 25–34 is 2.96% and 35–44 is + 2.58%. + - The coefficients are unchanged, since the standardisation absorbs the shift; only the + spine's incomes read lower against the donor's. + - Balances stay as in (a): median £6,500, p90 £15,000. The cap binds on 10 households and + removes 0.6% of the LISA mass. + - So the nominal income basis explains about 0.02 of the 0.36 points between the spine and + the donor. The financial-wealth level carries the rest. Against HMRC's administrative count (review round 1, item 2). HMRC's Individual Savings Account statistics (September 2026 release, Table 9.4, adult ISAs) report the number of Lifetime ISA @@ -386,6 +401,7 @@ year, so each subscribed account is a distinct subscriber, and every subscriber - The approved design's 660,000 holders are 58% of that. - Arm B's 560,000 are 49%. - Option (c)'s 430,000 are 38%. + - Arm D's 650,000 are 57%. - **The stock.** The government reports over 1.3 million LISA accounts open in 2023-24 (its response to the Treasury Committee, 11 September 2025, recommendation 2). A person can hold several accounts. From 23f7a914023330390a65d2f91b995650de296415 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Juaristi?= <127882282+juaristi22@users.noreply.github.com> Date: Wed, 30 Sep 2026 16:37:36 +0100 Subject: [PATCH 16/17] Render the #931 receipts' summary cells from the re-suppressed evidence (review round 2, item 7) Vahid's round 2 on #1059: the R1 table in the #931 receipts was hand-copied before the item-8 fold, so it still printed the K=15 constituency minimum (2 / 1.7 / 2) the evidence now withholds. With the JSON's cell total and published counts, that pins every suppressed K=15 constituency count again (all 2; the withheld count 4 keyed, 6 legacy). It also printed the K=1 LA max |z| (1.96, 1.94) that belonged to suppressed areas. The harness's new `level_summary_cells` renders a level's "min rows / ESS / sources" and "max abs z / share abs z>3 (n published)" cells from the re-suppressed evidence. The R1 table's four summary columns are regenerated from it: the minima read `withheld` at every level with suppressed counts, the K=1 LA maxima are now 1.78 and 1.50, and `n` counts the published areas behind the share. A test holds the R1 table to that rendering, so a receipts table cannot republish what the evidence withholds. The R2 f100 table has no committed per-area evidence and is unchanged. Co-Authored-By: Claude Opus 5.5 --- .../931-uk-atomic-assignment-receipts.md | 17 ++++++--- .../test_uk_atomic_assignment_measurement.py | 34 ++++++++++++++++++ tools/measure_uk_atomic_assignment.py | 36 +++++++++++++++++++ 3 files changed, 82 insertions(+), 5 deletions(-) diff --git a/experiments/931-uk-atomic-assignment-receipts.md b/experiments/931-uk-atomic-assignment-receipts.md index 86eaf256f..9a5bd640b 100644 --- a/experiments/931-uk-atomic-assignment-receipts.md +++ b/experiments/931-uk-atomic-assignment-receipts.md @@ -19,12 +19,19 @@ Disclosure: the committed 1 % evidence and this file report population aggregate Evidence: `docs/evidence/uk-931/atomic-assignment-cells.json`, sha256 `99013cc15c6d4368027dd64fa6a4133a6ba40011e96d25919c528f622b60dbf9` (4 cells × 1,011 areas; 985 area counts suppressed as `<3`, their z-scores blanked with them since the round-1 review of #932 found the counts recoverable from `expected_rows` and `z`). Round 2 of the #1057 review (item 8, folded into microcosm#1059) found the suppressed counts still recoverable at K=15 from the level totals, since every row lies in one area per level and the expected rows sum to the total, and the K=1 LA `max_abs_z` taken from a suppressed area. So `resuppress_evidence` in the harness now withholds one more count per level that has suppressed ones (`withheld`, chosen in a value-independent order among counts above the minimum), withholds the level and breach-table minima there and any breach quantile in the suppressed range, and computes the z summaries over published areas only. The file was re-suppressed in place (no cell regenerated) from sha256 `7d120d52…`, earlier `32f494df…`; the test checks it is a fixed point of the pass and that no suppressed count is determined by the level total. -| law | K | rows | source hh | gate | shared gate | London share | const. min rows / ESS / sources | const. max abs z / share abs z>3 (n) | const. breaches | LA min rows / ESS / sources | LA max abs z / share>3 (n) | LA breaches | identity stable | K-growth nested | +| law | K | rows | source hh | gate | shared gate | London share | const. min rows / ESS / sources | const. max abs z / share abs z>3 (n published) | const. breaches | LA min rows / ESS / sources | LA max abs z / share>3 (n published) | LA breaches | identity stable | K-growth nested | |---|---:|---:|---:|---|---|---:|---|---|---:|---|---|---:|---|---| -| legacy | 1 | 502 | 156 | pass | n/a | 0.1303 | 0 / 0.0 / 0 | n/a (0) | 650 | 0 / 0.0 / 0 | 1.96 / 0.0000 (8) | 361 | n/a | n/a | -| keyed | 1 | 502 | 156 | pass | pass | 0.1303 | 0 / 0.0 / 0 | n/a (0) | 650 | 0 / 0.0 / 0 | 1.94 / 0.0000 (8) | 361 | yes | yes | -| legacy | 15 | 7,530 | 156 | pass | n/a | 0.1303 | 2 / 1.7 / 2 | 3.67 / 0.0077 (649) | 650 | 0 / 0.0 / 0 | 2.92 / 0.0000 (355) | 361 | n/a | n/a | -| keyed | 15 | 7,530 | 156 | pass | pass | 0.1303 | 2 / 1.7 / 2 | 4.07 / 0.0031 (649) | 650 | 0 / 0.0 / 0 | 2.77 / 0.0000 (355) | 361 | yes | yes | +| legacy | 1 | 502 | 156 | pass | n/a | 0.1303 | withheld | n/a (0) | 650 | withheld | 1.78 / 0.0000 (7) | 361 | n/a | n/a | +| keyed | 1 | 502 | 156 | pass | pass | 0.1303 | withheld | n/a (0) | 650 | withheld | 1.50 / 0.0000 (7) | 361 | yes | yes | +| legacy | 15 | 7,530 | 156 | pass | n/a | 0.1303 | withheld | 3.67 / 0.0078 (644) | 650 | withheld | 2.92 / 0.0000 (352) | 361 | n/a | n/a | +| keyed | 15 | 7,530 | 156 | pass | pass | 0.1303 | withheld | 4.07 / 0.0031 (645) | 650 | withheld | 2.77 / 0.0000 (352) | 361 | yes | yes | + +The four summary columns are rendered from the re-suppressed evidence by the harness's +`level_summary_cells` (microcosm#1059 review round 2, item 7), so they withhold what the evidence withholds. +A test holds this table to that rendering. The minima are withheld at every level that has +suppressed counts. The z summaries cover published areas only; `n` counts those with at least five +expected rows. The earlier hand-copied table printed the K=15 constituency minimum, which pinned +the suppressed counts, and the K=1 LA maxima taken from suppressed areas. Every area breaches the 50 floors at 1 % by construction (the rung exists to exercise the path, not to measure support). The region weight mix is identical across laws at each K, the London share is identical, and the keyed law's production columns equal the in-process re-draw on the same, reversed and clone-0 rows. diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_atomic_assignment_measurement.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_atomic_assignment_measurement.py index 107a5ee51..2a2527538 100644 --- a/packages/microcosm-build/tests/engine_free/uk/test_uk_atomic_assignment_measurement.py +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_atomic_assignment_measurement.py @@ -311,3 +311,37 @@ def test_committed_931_evidence_is_internally_consistent(harness): # The committed file is a fixed point of the harness's disclosure pass. assert harness.resuppress_evidence(evidence) == evidence assert np.isfinite(sum(c["wall_seconds"] for c in evidence["cells"])) + + +def test_committed_931_receipts_render_the_level_summaries_from_the_evidence(harness): + # Round 2 of the microcosm#1059 review, item 7: a hand-copied receipts table + # printed the K=15 constituency minimum that the evidence withholds, which + # pinned the suppressed counts again. The R1 table's summary cells must be the + # harness's rendering of the committed evidence. + root = paths_for("microcosm-build").repository + evidence_path = root / "docs/evidence/uk-931/atomic-assignment-cells.json" + receipts_path = root / "experiments/931-uk-atomic-assignment-receipts.md" + if not evidence_path.is_file() or not receipts_path.is_file(): + pytest.skip("committed #931 evidence or receipts are not present") + evidence = json.loads(evidence_path.read_text(encoding="utf-8")) + section = receipts_path.read_text(encoding="utf-8").split("## R1", 1)[1] + section = section.split("## R2", 1)[0] + table = [line for line in section.splitlines() if line.startswith("|")] + header = [cell.strip() for cell in table[0].strip("|").split("|")] + columns = { + ("constituency", "min"): header.index("const. min rows / ESS / sources"), + ("constituency", "z"): header.index( + "const. max abs z / share abs z>3 (n published)" + ), + ("la", "min"): header.index("LA min rows / ESS / sources"), + ("la", "z"): header.index("LA max abs z / share>3 (n published)"), + } + cells = {(cell["law"], cell["n_clones"]): cell for cell in evidence["cells"]} + rows = [[cell.strip() for cell in line.strip("|").split("|")] for line in table[2:]] + assert {(row[0], int(row[1])) for row in rows} == set(cells) + for row in rows: + cell = cells[(row[0], int(row[1]))] + for level in ("constituency", "la"): + minima, z = harness.level_summary_cells(cell, level) + assert row[columns[(level, "min")]] == minima, (row[:2], level) + assert row[columns[(level, "z")]] == z, (row[:2], level) diff --git a/tools/measure_uk_atomic_assignment.py b/tools/measure_uk_atomic_assignment.py index ea90b520d..280dca2b3 100644 --- a/tools/measure_uk_atomic_assignment.py +++ b/tools/measure_uk_atomic_assignment.py @@ -570,6 +570,42 @@ def _published_z_summary( return max(z), sum(value > 3 for value in z) / len(z) +def level_summary_cells(cell: dict, level: str) -> tuple[str, str]: + """A receipts table's two summary cells for one level of a committed cell. + + Returns the "min rows / ESS / sources" cell and the "max abs z / share abs + z>3 (n published)" cell, rendered from the re-suppressed evidence, so a + receipts table cannot republish a minimum or a z summary that the evidence + withholds (microcosm#1059 review round 2, item 7). ``n`` counts the level's + published areas with at least five expected rows, the denominator of the + share. + """ + + summary = cell["levels"][level] + if summary["min_rows"] is None: + minima = "withheld" + else: + minima = ( + f"{summary['min_rows']:.0f} / {summary['min_ess']:.1f} / " + f"{summary['min_sources']:.0f}" + ) + published = sum( + 1 + for area in cell["areas"] + if area["level"] == level + and area["z"] is not None + and float(area["expected_rows"]) >= 5.0 + ) + if summary["max_abs_z"] is None: + z = f"n/a ({published})" + else: + z = ( + f"{summary['max_abs_z']:.2f} / {summary['share_abs_z_gt_3']:.4f} " + f"({published})" + ) + return minima, z + + def resuppress_evidence(evidence: dict) -> dict: """The committed disclosure rule applied to a written evidence payload. From 84a316953f5bcfcb83bd35a363b8335c05bc4872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Juaristi?= <127882282+juaristi22@users.noreply.github.com> Date: Wed, 30 Sep 2026 16:37:57 +0100 Subject: [PATCH 17/17] Receipts: arm D's coefficients move slightly, not at all (review round 2, item 8) Uprating two income predictors by 1.185 before log(1 + x) is close to a constant shift for positive incomes, but zero incomes stay at zero, so the donor's mean of log(1 + earnings) moves by 0.08 rather than 0.17 and its spread changes too; no coefficient moves by more than 0.002 (largest: the youngest age group, -0.0014). Part F now says "nearly unchanged" with the numbers. Co-Authored-By: Claude Opus 5.5 --- experiments/1003-uk-lisa-receipts.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/experiments/1003-uk-lisa-receipts.md b/experiments/1003-uk-lisa-receipts.md index 6b8911ecb..26d6faa4f 100644 --- a/experiments/1003-uk-lisa-receipts.md +++ b/experiments/1003-uk-lisa-receipts.md @@ -373,8 +373,11 @@ Four options, measured or implied on the same inputs: - The model's expected share falls from 1.36% to 1.32%, and ownership from 1.25% to 1.23% (650,000 holders). The youngest group falls from 4.14% to 4.07%, 25–34 is 2.96% and 35–44 is 2.58%. - - The coefficients are unchanged, since the standardisation absorbs the shift; only the - spine's incomes read lower against the donor's. + - The coefficients are nearly unchanged: none moves by more than 0.002. For positive incomes + the uprating is close to a constant shift of about 0.17 in log(1 + x), which the + standardisation absorbs. Zero incomes stay at zero, so the donor's mean of log(1 + earnings) + moves by only 0.08 and its spread changes too. The effect comes almost entirely from the + spine's incomes reading lower against the donor's. - Balances stay as in (a): median £6,500, p90 £15,000. The cap binds on 10 households and removes 0.6% of the LISA mass. - So the nominal income basis explains about 0.02 of the 0.36 points between the spine and