feat(analysis): visualize row-wise summary-bundle effect on Detail A electricity coefficients#452
Open
MoLi7 wants to merge 1 commit into
Open
feat(analysis): visualize row-wise summary-bundle effect on Detail A electricity coefficients#452MoLi7 wants to merge 1 commit into
MoLi7 wants to merge 1 commit into
Conversation
…ty coefficients Add bedrock/analysis/a_matrix_bundle_effect/ comparing the electricity (221100) input coefficient per detail commodity between the 2017 Detail A (derive_cornerstone_Aq) and the post scale+inflate Detail A (derive_cornerstone_Aq_scaled, model_base_year), grouped by parent BEA 2017 summary bundle. Renders per-bundle dispersion plots (detail dots vs output-weighted summary-bundle anchors for both years) and an all-commodity 2017-vs-scaled scatter, showing how scaling pulls within-bundle outliers toward the bundle anchor. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What changed? Why?
Adds a new analysis folder
bedrock/analysis/a_matrix_bundle_effect/that visualizes how scale+inflate moves detail-level electricity input coefficients, organized by BEA 2017 summary bundle.For each detail commodity j it compares
A[221100, j]between:derive_cornerstone_Aq()(BEA 2017 benchmark, pre-scaling)derive_cornerstone_Aq_scaled()atmodel_base_year(2023)with each year's summary-bundle anchor computed as the output-weighted mean of that year's coefficients within the bundle (the bundle-aggregate coefficient implied by the detail A).
Motivation: makes the "bundle crushing" effect of summary-based scaling visible — within-bundle outliers (e.g. industrial gases, cement, primary aluminum) get pulled toward the bundle anchor while the anchor itself barely moves. Supports the A-matrix method comparison in #337.
row-wise bundle effect if column-wise ABSR (does NOT reflect bedrock codepath)
row-wise bundle effect if cell-to-block ABSR via scaling (reflects bedrock codepath)
Run with:
Testing
black --check .,ruff check .,mypy bedrock(424 files clean),pytest(216 passed, 3 skipped, 1 xfailed).🤖 Generated with Claude Code