-
Notifications
You must be signed in to change notification settings - Fork 17
📊 Plotly Sankey #3711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
📊 Plotly Sankey #3711
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3711 +/- ##
==========================================
- Coverage 46.67% 44.20% -2.48%
==========================================
Files 122 123 +1
Lines 27804 31084 +3280
==========================================
+ Hits 12977 13740 +763
- Misses 14827 17344 +2517 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ce node and link color definitions, and improve layout settings
8cf2a5a to
8ccfb67
Compare
…lanket neutron multiplication
…E' and enhance naming convention
… plot_plotly_sankey for improved visualization
6eabcbb to
a1b33fe
Compare
…s and example for `plot_plotly_sankey`
a1b33fe to
221e283
Compare
bd55934 to
c595579
Compare
c595579 to
07a2974
Compare
j-a-foster
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy with changes.
9248c3c to
3e189c5
Compare
timothy-nunn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old plot_sankey.py file still exists. If its wrong and not used anymore, should we delete it?
Since we cannot output numbers on top of the new Sankey atm then our old Sankey is the only one we can use to put in presentations etc. We should keep for now |
Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com>
Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com>
8466d25 to
41c8e06
Compare
timothy-nunn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing images in the docs
| ``` | ||
|
|
||
| <figure markdown> | ||
| { width="100%"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes reference to an image that does not exist
Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com>
3c03198 to
cfc8012
Compare
Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com>
* ✨ Add Sankey diagram plotting for power flow visualization * 🎨 Refactor Sankey diagram plotting: streamline data extraction, enhance node and link color definitions, and improve layout settings * ✨ Add alpha particles back to plasma in Sankey diagram plotting * ✨ Update Sankey diagram: refine alpha particle calculations and add blanket neutron multiplication * ✨ Update HTML output filename in Sankey diagram plotting: strip 'MFILE' and enhance naming convention * 🎨 Refactor node labels in Sankey diagram: simplify formatting and enhance readability * ✨ Update Sankey diagram plotting: replace deprecated plot_sankey with plot_plotly_sankey for improved visualization * 📝 Add interactive Sankey diagram section: introduce usage instructions and example for `plot_plotly_sankey` * ✨ Add kaleido dependency for improved image export in development requirements * 🎨 Refactor main function: remove unused code for saving Sankey diagram image * Make plotly an optional dependency * Update documentation/usage/plotting.md Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com> * Update requirements_dev.txt Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com> * Update process/main.py Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com> * Update process/io/plot_plotly_sankey.py Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com> --------- Co-authored-by: Timothy Nunn <timothy.nunn@ukaea.uk> Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com>
This pull request introduces a new interactive Sankey diagram plotting feature using Plotly and updates the documentation and codebase to use it instead of the previous Sankey plotting method. The most important changes are summarized below:
Documentation updates
documentation/usage/plotting.mddescribing how to use theplot_plotly_sankeyscript to generate an interactive HTML Sankey diagram for plant power balance, including usage instructions and an example figure.Codebase changes
process/main.pyto includeplot_plotly_sankeyand removed the import of the oldplot_sankeymodule.process/main.pyto callplot_plotly_sankey.main()for generating Sankey diagrams, commenting out the oldplot_sankey.main()call.Checklist
I confirm that I have completed the following checks: