Skip to content

m_viz: geo visualization for 4 cases: hawaii, illinois, texas, and wecc#490

Open
isatkaus wants to merge 1 commit into
ORNL:developfrom
isatkaus:pr/m-viz
Open

m_viz: geo visualization for 4 cases: hawaii, illinois, texas, and wecc#490
isatkaus wants to merge 1 commit into
ORNL:developfrom
isatkaus:pr/m-viz

Conversation

@isatkaus

Copy link
Copy Markdown

Description

Adds m_viz.ipynb, an interactive Plotly geo-visualization notebook for MATPOWER .m case files (ACOPF or PF solutions). The notebook parses bus, generator, and branch tables into normalized pandas DataFrames, merges geographic coordinates from .gic or .AUX files, and produces an interactive map showing bus loads, dispatched generation (fuel-colored, sized by MW), and branch loading percentage (viridis color scale).

Supported cases: Hawaii40, Illinois (ACTIVSg200), Texas (ACTIVSg2000), WECC (ACTIVSg10k).

Also adds setup_env.md with environment setup instructions and input file reference for all supported cases, and supporting utility files m_viz_utils.py and gridkit_utils.py.

Proposed changes

  • uq-usecase/notebooks/m_viz.ipynb — new notebook with geo visualization for all 4 TAMU synthetic cases
  • uq-usecase/notebooks/setup_env.md — conda environment setup and input file reference for all supported cases
  • uq-usecase/py-utils/m_viz_utils.py — MATPOWER .m parsing, colocated bus splitting, generator fan-out, geo merge, and Plotly map plotting
  • uq-usecase/py-utils/gridkit_utils.py — optional GridKit JSON ID augmentation for hover labels

Checklist

  • All tests pass.
  • Code compiles cleanly with flags -Wall -Wpedantic -Wconversion -Wextra.
  • The new code follows GridKit™ style guidelines.
  • There are unit tests for the new code.
  • The new code is documented.
  • The feature branch is rebased with respect to the target branch.
  • I have updated CHANGELOG.md to reflect the changes in this PR.

Further comments

This is a Python/notebook contribution; the C++ compile, unit test, and CHANGELOG checklist items are not applicable. The notebook is self-contained and adds visualization utilities for the uq-usecase use case without modifying any existing GridKit C++ code.

@isatkaus

Copy link
Copy Markdown
Author

@lukelowry @nkoukpaizan @pelesh please review when you get a chance.

@lukelowry

Copy link
Copy Markdown
Collaborator

I will review later, but I see you use pyarrow which reminds of a branch I made with a monitor implementation using Arrow library which would be useful in applciations such as this

@isatkaus

Copy link
Copy Markdown
Author

@lukelowry yes, pyarrow in used in gridkit result wrangling (from mon.csv to parquet). but for this PR, m_viz notebook itself, only uses attach_json_ids from gridkit_utils (it's optional in the notebook, displays json component ids next to .m IDs in map hovers). technically, I could move that one function to viz_utils and remove gridkit_utils.py from this PR (a lot of helper functions that are non needed for viz). gridkit_utils is mostly for my other notebooks where I setup/run/analyze gridkit uq runs.

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.

2 participants