Repository navigation
v0.3: toggles (season, time of day ...), a signed log scale, thinner log legends - #4
Merged
Merged
Conversation
…log legends - Toggle and MapSpec.toggles: every combination of options is a slice. Columns named slice_key(key, option, ...) are sliced; metrics, cell fields that repeat a metric, the split, area fields and rankings switch with the toggles; legend and cards name the slice. - A sliced metric is one table of distinct values (3 significant figures by default) with text and colour, plus an index per cell and slice: 25 slices x 9 metrics x 1,700 hexagons is about 7 MB instead of about 40. - 3D heights scale to the tallest value over every slice. - colour.signed_log_norm: diverging, linear near zero, log beyond, for net flows. - Log legends label at most six doublings, both ends kept (0.2 labels overlapped). - examples/synthetic_toggles.py, tested end to end: every slice read back from the page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Stacked on #3 (v0.2, diverging). Merge #3 first; this PR then retargets to
main. Tagv0.3.0after merging:sear-labs/ercot-grid-analysispins this branch's commit until the tag exists.Asked for by Dr. Jones for the ERCOT maps: a demand tab, a net tab that can go negative (net consumers against net generators), and season and time of day as toggles that apply to every tab.
What's new
Toggle,MapSpec.toggles,slice_keyslice_key(key, option, ...)is sliced. These switch with the slice: metrics, cell fields that repeat a metric, the split, area fields and rankings. The legend and cards name the slice.slice_digits) with each value's text and colour. Each cell keeps one index per slice. The ERCOT page (25 slices, 9 metrics, 1,700 hexagons) is about 7 MB; stored plainly it would be about 40. The page copies the chosen slice into the fields the drawing code already reads, so the drawing code is unchanged.colour.signed_log_normIt is backwards compatible: a v0.2 spec draws the same pages, apart from the thinner legend labels.
Checks
examples/synthetic_toggles.pyis read back from both pages and matches the binned values to 3 significant figures. The test also covers mixed-radix slice order, heights across slices, and split shares.🤖 Generated with Claude Code