feat(analysis): name the sectors in the N/D comparison CSV, and give it a sortable magnitude - #878
Open
WesIngwersen wants to merge 1 commit into
Open
feat(analysis): name the sectors in the N/D comparison CSV, and give it a sortable magnitude#878WesIngwersen wants to merge 1 commit into
WesIngwersen wants to merge 1 commit into
Conversation
…it a sortable magnitude The CSV carried bare codes and percent differences only, which made the obvious question - which sectors moved most - awkward to answer. Sorting on the percent column answers a different question: it puts near-zero sectors on top, because a small absolute move on a small base is a large percent. Adds the Cornerstone commodity description, the level change, and its absolute value for both N and D. Sorting on N_abs_change now gives the sectors that actually moved the model. Names come from the CORNERSTONE taxonomy, not BEA 2017. The model runs on the 405-sector Cornerstone axis and COMMODITY_DESC has exactly those 405; the BEA 2017 dictionary is a different 408 and would leave the Cornerstone-specific codes blank. The script counts and reports unnamed sectors rather than silently writing empty cells - it reports none. What it shows on the current build: the largest absolute movers are chemicals, all down hard - synthetic dyes and pigments -37%, pesticides -38%, adhesives -38%, processed aluminum -42% - against cement +10% and solid waste incinerators +6%. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Member
|
see comment on #877 about the shifting the comparison to v0.3.2 instead of v0.3.1 (that change is really outside both of these PRs) |
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.
The
n_d_nowcast_<year>_vs_v03.csvcarried bare sector codes and percent differences only, which made the obvious question — which sectors moved most — awkward to answer.Sorting on the percent column answers a different question. It puts near-zero sectors on top, because a small absolute move on a small base is a large percent. The magnitude of the move is what "moved most" means, and there was no column for it.
What is added
sector_nameN_change/D_changeN_abs_change/D_abs_changecornerstone.commodities.COMMODITY_DESChas exactly those 405; the BEA 2017 dictionary is a different 408 and would leave the Cornerstone-specific codes blank. The script counts unnamed sectors and prints a note rather than silently writing empty cells — on the current build it reports none, 405 of 405 named.What it shows
Top movers by
N_abs_changeon the current build — chemicals, all down hard:On
D_abs_changethe same chemicals lead and fall further still — adhesives −70%, pesticides −62%, dyes −49% — so these are direct-intensity moves rather than something arriving through the supply chain.Testing
Analysis script, no unit tests per repo convention.
🤖 Generated with Claude Code