Skip to content

Document domestic and overseas carbon flows - #2482

Merged
juaristi22 merged 2 commits into
mainfrom
fix-478-carbon-flow-docs
Oct 21, 2026
Merged

juaristi22 merged 2 commits into
mainfrom
fix-478-carbon-flow-docs

Conversation

@juaristi22

@juaristi22 juaristi22 commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #478.

The existing carbon-tax page mixed production location with owner residence and described tax and border-adjustment mechanisms the household formulas do not implement. It now explains the four UK/overseas production and consumption combinations, the consumer/shareholder allocation, and which flows remain undifferentiated or unrepresented. The existing notebook is linked in the documentation navigation; its appendix identifies the twelve fixed values as the 2019 DEFRA fallback intensities. The consumption-based footprint explanation explicitly includes imported emissions and retains the model's missing production-origin split.

Only the first Markdown cell, navigation and a changelog fragment change. All notebook code, saved outputs, and cell/notebook metadata are unchanged. No variable, parameter, dataset or numerical result changes.

Initial validation: make format passed (1,740 Python files unchanged); notebook schema, unchanged code/output/metadata, navigation and local source-link checks passed; make documentation passed in 12.24 seconds with notebook execution off, and the rendered carbon-tax page contains the table and incidence explanation. The first sandbox build could not resolve the template host; the network-enabled rerun passed. No model tests or private microsimulation were needed for this documentation-only change.

Reproducer: n/a: documentation and navigation only; model source and dependencies are unchanged.

axiom: n/a: documentation of existing model mechanics; no statutory calculation change or encoded-parity claim.

Review follow-up: notebook schema, unchanged code/output/metadata, source links and the twelve 2019 fallback values passed static validation. No notebook or model calculations were executed. Integrated documentation-build results will be recorded in the review reply.

@juaristi22 juaristi22 self-assigned this Oct 17, 2026

@vahid-ahmadi vahid-ahmadi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine once the two source points are fixed.

@juaristi22, the page now matches the code. I checked the formula block against carbon_tax.py, the intensity fallback against carbon.py, and the two denominators against shareholding.py. All three agree. The old table's claims about border adjustment and taxing owners directly have gone, which is right, because no formula implements them.

  1. should: carbon-tax.ipynb, first cell, table row "Outside the UK / UK households". It says that any overseas production in the intensity inputs "remains combined" and that the formulas "cannot identify its share". We do know more than that. The sector emissions in parameters/household/consumption/carbon/emissions.yaml come from DEFRA's "UK's carbon footprint" statistics. That series is consumption-based, so it includes emissions embedded in imports. Please say so plainly: imported emissions are in the footprint, but with no UK/overseas split. That is the direct answer to the second bullet of #478.
  2. should: carbon-tax.ipynb, the appendix text says the chart uses "fixed illustrative intensities". The 12 numbers in the code cell are exactly the 2019-01-01 values in parameters/household/consumption/carbon/intensity.yaml (for example 7.7e-05 for alcohol and tobacco, 0.0012 for housing, water and electricity). Please label them as the 2019 DEFRA fallback intensities, not as illustrative. Otherwise a reader may think they were made up.
  3. nit: myst.yml:39 puts a contributed-reform notebook first under "Programmes", ahead of all the gov/* pages. That is a little odd for a hypothetical tax. Placing it after the pattern line would keep the statutory programmes first. This is your call.
  4. nit: #2187 also edits myst.yml, two lines above this hunk. I checked with git merge-tree and the two branches merge cleanly.

What I checked

  • Read the full diff, the PR body and #478. Compared the new text with carbon_tax.py, carbon.py, shareholding.py and the five carbon parameter files.
  • Confirmed that only the first notebook cell changes. The code cell and its outputs are unchanged.
  • No law to check: this changes documentation only.
  • Hosted CI: 5 checks pass and 4 are skipped, as usual for a docs-only PR. I did not build the docs locally.
  • The changelog fragment is changed. The Reproducer and axiom lines are n/a with reasons, and the Fix evidence check passes.

🤖 Generated with Claude Code

@juaristi22
juaristi22 force-pushed the fix-478-carbon-flow-docs branch from b1d06c5 to 00b8e9b Compare October 19, 2026 12:11
@juaristi22

Copy link
Copy Markdown
Collaborator Author

Addressed both requested documentation fixes in 00b8e9bad43e: the DEFRA consumption-based footprint explicitly includes imported emissions, and the appendix labels its twelve fixed values as the 2019 DEFRA fallback intensities. The missing production-origin split remains qualified. Notebook code, saved outputs and metadata are unchanged.

Schema, source/value preservation, formatting, lint, Fix evidence and offline page-render checks pass. Independent CODE and POLICY verification found no findings or material gaps in this scope. The full local MyST build required an npm installation, which remained blocked; the full-site documentation check still needs to pass on this head in hosted CI. No numerical calculation, new empirical estimate or parity claim is added.

@vahid-ahmadi vahid-ahmadi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. Both source points are fixed.

@juaristi22, thanks. I reviewed the change since my last review at b1d06c57e. The branch was rebased onto main, so the commit range pulls in many main commits. The PR's own changes are still only the changelog fragment, the first notebook cell and the myst.yml line, and I compared those three files directly.

Earlier points

  1. should (imported emissions): Fixed. The "Outside the UK / UK households" row now says DEFRA's consumption-based footprint includes emissions embedded in imports, with no UK/overseas split. The link is the same page that emissions.yaml cites, and it resolves.
  2. should (illustrative intensities): Fixed. The appendix is now headed "2019 DEFRA fallback intensities" and links intensity.yaml. I checked the 12 values in the code cell again: they match the 2019-01-01 entries exactly.
  3. nit (contrib notebook first under "Programmes"): not changed. That was your call, and it is fine as it is.
  4. nit (#2187 also edits myst.yml): no longer relevant. #2187 merged on 18 Oct, and the vat-coverage.md line now comes from main. The PR merges cleanly.

New findings: none.

What I checked

  • The diff of the three PR files from b1d06c57e to 00b8e9bad. The code cell and its outputs are unchanged.
  • The new wording against emissions.yaml, intensity.yaml and the DEFRA statistics page.
  • The PR body still has the Reproducer: n/a and axiom: n/a lines with reasons. The fragment is changed, and the Fix evidence check passes.
  • Hosted CI on 00b8e9bad: 5 checks pass and 4 are skipped, the same as last round. "Test documentation builds" passes. The full "Documentation build" job is skipped for this PR, so it has not run on this head. I did not build the docs locally.

🤖 Generated with Claude Code

@juaristi22
juaristi22 added this pull request to the merge queue Oct 20, 2026
Merged via the queue into main with commit 7b6980b Oct 21, 2026
9 of 10 checks passed
@juaristi22
juaristi22 deleted the fix-478-carbon-flow-docs branch October 21, 2026 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document domestic/foreign consumption/production handling

2 participants