Tokens
Claude, Cursor 등 AI 코딩 도우미 토큰 사용량을 추적·시각화·경쟁
에너지 가격 충격이 영국 가계 생활 수준에 미치는 영향을 시뮬레이션하는 대시보드
Interactive dashboard modelling the impact of energy price shocks from Middle East supply disruption on UK household living standards using PolicyEngine microsimulation.
데이터Python · JavaScriptGitHub @PolicyEngine온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기How an Iran conflict would affect UK living standards — microsimulation analysis with interactive dashboard
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
Impact of the Middle East War on UK Living Standards
Microsimulation-based analysis of how energy price rises from the ongoing Middle East conflict (active since late February 2026, with recurrent Strait of Hormuz disruption) affect UK households in 2027-28 — modelling impacts through energy bills, fuel costs and food inflation across 31.6 million weighted households using policyengine.py 5.3.0.README 전문 보기 ↗Microsimulation-based analysis of what energy, motor fuel and food price rises would cost UK households in 2027-28, with the ongoing Middle East conflict (active since late February 2026, with recurrent Strait of Hormuz disruption) as the context — modelling impacts through energy bills, fuel costs and food inflation across 31.6 million weighted households using policyengine.py 5.3.0.
These are stress tests, not forecasts. Each scenario applies a set of price assumptions as full-year 2027-28 amounts, including where the cited source describes a 2026 disruption lasting a few months. No time path, quarterly profile or shock duration is modelled, and the pass-through coefficients implied by the percentages are judgements anchored to the cited sources rather than equations derived from them. The results file records the definition, source, reference period, derivation and uncertainty range of every parameter under parameters.registry.
Calibrated to conditions as of August 2026 (Brent ~$85/bbl after a ~$109 peak). Anchors: observed path (low), Goldman Sachs extended Hormuz-closure Brent >$100 (central), Goldman extreme-adverse and the Oxford Economics escalation case (high).
| Scenario | Energy bills | Fuel price | Food price | CPI |
|---|---|---|---|---|
| Summer 2026 prices | +15% | +22% | +2.0% | +1.3pp |
| Sustained escalation | +45% | +46% | +4.0% | +3.1pp |
| Severe escalation | +90% | +62% | +6.5% | +5.3pp |
The CPI column is not a forecast of inflation. It is the addition each scenario's own energy, fuel and food prices imply on ONS 2026 basket weights, measured against a no-conflict path, and it is used only to size the benefit uprating shortfall and the accelerated-uprating option. It never enters the household cost.
The Ofgem cap (£1,663 for July–September 2026 on the new typical-consumption basis, £1,723 for October–December) is reported as context and does not enter the calculation: the energy percentage is applied to each household's own baseline gas and electricity expenditure in the microdata. The model does not represent unit rates, standing charges, the gas/electricity split, region, payment method, quarterly cap periods or fixed-tariff coverage.
The pipeline applies price increases through three transmission channels and computes household-level impacts for the 2027-28 tax year:
Plus a separately reported uprating compensation shortfall — CPI-uprated benefit rates are uprated each April from the previous September's annual CPI rate. The conflict began in late February 2026, so the September 2026 rate already carries part of the shock (about 0.9pp from the conflict to the annual rate on ONS energy and fuel indices, a proxy on August 2026 data with food omitted, so a lower bound) and April 2027 uprating passes it on. The gain from uprating is modelled by raising every CPI-uprated benefit rate, and the reported ESA, contribution-based JSA, industrial injuries, incapacity benefit and armed forces compensation awards, and the CPI-uprated additional State Pension, in PolicyEngine UK at each scenario's residual and running the benefit rules, so tapers, the benefit cap and housing costs apply; UC work allowances, the childcare cap and the non-dependant deduction (which lowers awards) and Scotland's Pension Age Winter Heating Payment are uprated too. Left alone because they are not CPI-uprated: the triple-locked basic and new State Pension, the Pension Credit minimum guarantee, UC's frozen LCWRA element, frozen earnings disregards and tax credits. The savings credit maximum and the partly CPI-linked maternity allowance and statutory maternity, paternity and sick pay are not raised; r% of their total bounds that omission. Only the residual addition goes unindexed, for the whole of 2027-28. This is reported as the compensation an immediate uprating would deliver, and is not added to the cost channels: the household's loss is the price rise itself, and adding an uprating term on top would count the same shock twice. It is what the accelerated-uprating policy pays.
Poverty is measured as people below 60% of the person-weighted median of equivalised HBAI household net income (BHC); the post-shock figure holds that baseline line fixed and nets modelled costs off income, so it is an anchored, consumption-adjusted measure rather than official HBAI poverty.
No fuel poverty figure is reported. The study previously published an indicative 10%-of-income energy-spend ratio; its level was not comparable with any official statistic (England's LILEE measure adds an energy-efficiency test, and DESNZ's own 10% indicator uses after-housing-costs income and modelled required rather than actual energy costs), so it was withdrawn rather than published alongside figures it invited comparison with. See #22.
The results file breaks impacts down by income quintile, region, country, tenure type and household composition. The dashboard presents all of these except the regional breakdown.
All three scenarios, 2027-28, across 31.6 million weighted households. Regenerate with iran-impact-build --sync-dashboard; these figures are pinned as a regression test in tests/test_committed_output.py.
If energy and fuel stayed near their summer 2026 levels through 2027-28 (energy +15%, anchored to the July cap; fuel +22%, the August pump-price rise; food +2%, a judgement; mid-September pump prices and the October cap are higher), the direct cost would be £538 a household (£17.0bn). If gas stayed at about twice its pre-conflict price through 2027-28, as in sustained escalation, it would be £1,334 a household (£42.1bn). Quote the escalation figures as conditionals, not as the estimate of the war's effect.
| Summer 2026 prices | Sustained escalation | Severe escalation | |
|---|---|---|---|
| Mean cost per household | £538 | £1,334 | £2,304 |
| Total cost | £17.0bn | £42.1bn | £72.7bn |
| People newly below the anchored poverty line | 379,109 | 1,508,923 | 2,337,905 |
| Mean of per-household cost/income ratios | 1.8% | 4.5% | 7.9% |
| Total cost ÷ total net income | 0.9% | 2.3% | 4.0% |
The last two rows are different statistics, not two estimates of one thing. The mean of ratios weights every household equally and so is pulled up by households with very low incomes; it is the figure the dashboard reports as mean_net_impact_pct, and it excludes households with non-positive income, for whom the ratio is undefined. The aggregate ratio is total cost divided by total income.
Sustained-escalation cost by channel, per household: energy £713, fuel £474, food £147. The uprating compensation shortfall is a further £115, reported separately rather than added (see above).
The shock is regressive on either basis. Under sustained escalation the poorest fifth of households bear a cost equal to 4.2% of their mean net income against 1.5% for the richest fifth (10.3% against 1.7% as a mean of ratios), even though the cash amounts run the other way — £981 against £1,613.
Only the sustained-escalation column's cost, total and poverty count, plus the baseline aggregates and the combined package, are pinned as a regression test in tests/test_committed_output.py. The other figures here are read from the generated output and are not test-guarded.
Aligned to the live Autumn Budget 2026 decisions where applicable:
Every cost is a gross modelled household transfer, not an Exchequer costing: it excludes tax and benefit interactions, take-up, behavioural responses, administration, non-household fuel use and financing. Each policy is assessed on gross outlay (unclipped government spending), household protection and residual impact, targeting efficiency (share of spending reaching the bottom two quintiles), and the number of people lifted back above the anchored poverty line.
src/iran_impact/ # Python microsimulation pipeline
config.py # Scenario parameters, parameter registry, limitations
pipeline.py # Core engine (baseline, shocks, policy responses)
inputs.py # Loader for the committed spending input tables
inputs/ # Versioned source data (ONS Family Spending A6 extract)
cli.py # CLI entry point
provenance.py # Run provenance: revision, versions, bundle, hashes
scripts/
extract_ons_a6.py # Regenerates the A6 extract from the ONS workbook
run_pipeline.py # Runs pipeline, writes JSON output
data/ # CLI output, and where the certified dataset materializes
tests/ # Unit tests (synthetic) and integration tests (managed data)
requirements.lock # Fully pinned Python environment
.github/workflows/ # CI: tests, lockfile check, dashboard lint and build
dashboard/ # Next.js interactive dashboard
app/ # App Router entry (layout, page, global styles)
src/components/ # React components (scenarios, policy, methodology tabs)
src/lib/ # Data helpers, formatters, chart utils
public/data/ # Pipeline JSON output consumed by frontend
# Install the Python package. The `uk` extra pulls policyengine[uk]==5.3.0,
# which brings the UK country package the pipeline needs. Installing plain
# `policyengine` is not enough — the managed-simulation import fails.
pip install -e ".[uk,dev]"
# Or, to pin every dependency exactly (see Reproducibility below). The lock
# holds third-party pins only, so the project itself is installed separately:
# uv pip sync requirements.lock
# uv pip install -e . --no-deps
# Authenticate for the managed microdata (see Data access below)
export HF_TOKEN=... # or: hf auth login
# Run the analysis pipeline and refresh the dashboard's copy of the results
iran-impact-build --sync-dashboard
# Launch dashboard
cd dashboard && bun install && bun run dev
Run the unit tests with pytest. They use synthetic households and need no
data access. The end-to-end checks in tests/test_integration.py require the
managed dataset and skip themselves without it — run them locally before
pushing any change to the calculation.
The pipeline runs against policyengine.py's managed UK microsimulation, so the model version and data build are certified by the release bundle rather than chosen by this repository. The current bundle resolves to:
| Bundle | uk-5.3.0 |
| Model | policyengine-uk 2.90.2 (certified by the bundle — do not pin separately) |
| Dataset | enhanced_frs_2024_25 |
| Data build | policyengine-uk-data-1.56.16 |
The microdata lives in the Hugging Face repository
policyengine/policyengine-uk-data-private, which is gated: access is
granted per account rather than being public. Running the pipeline requires a
token from an account that has been granted access, supplied either through
HUGGING_FACE_TOKEN, HF_TOKEN or HUGGINGFACE_HUB_TOKEN in the
environment, or by hf auth login. Without it the
managed_microsimulation() call fails when it tries to fetch the dataset.
A populated Hugging Face hub cache is not sufficient on its own:
policyengine.py reuses only a SHA-verified artifact at its own
materialization target (./data/enhanced_frs_2024_25.h5 relative to the
working directory), and otherwise downloads it.
Do not pin policyengine-uk or the dataset directly. policyengine.py's
release bundle selects both, and pinning them here could contradict it — the
5.3.0 bundle selects policyengine-uk 2.90.2, which is not the newest
release of that package.
Every generated results file carries a provenance block recording the git
revision, the versions of every package that can move a number, the certified
release bundle (model version, dataset, data build ID and artifact hash), and
SHA-256 hashes of the source files that define the calculation.
Two runs of the same revision against the same certified data build produce identical output apart from the run timestamp and git revision.
requirements.lock pins the complete Python environment, including the
policyengine-uk version the release bundle certifies. It is a compiled
requirements file, so it contains third-party pins only — installing it takes
two steps, the second of which puts iran_impact and the iran-impact-build
console script on the path:
uv pip sync requirements.lock # exact third-party versions
uv pip install -e . --no-deps # this project, without touching those pins
CI checks that the lock still matches pyproject.toml.
CI also compares the source hashes recorded in the committed output against the
working tree. A change to config.py, pipeline.py, provenance.py,
pyproject.toml or requirements.lock that lands without a regenerated
results file fails the build — a dependency change can move a number without
touching any calculation source. Regenerate with
iran-impact-build --sync-dashboard.
enhanced_frs_2024_25; see Data access) — household incomes, benefits, energy and road-fuel consumption, vehicle ownership, council tax band, region, tenure and family typesrc/iran_impact/inputs/parameters.registry in the output for which figure each supportsBuilt with PolicyEngine.
AGPL-3.0, matching the PolicyEngine model packages this project builds on.