-
Notifications
You must be signed in to change notification settings - Fork 16
1290 add abm visualization from paper to memilio plot #1291
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
base: main
Are you sure you want to change the base?
1290 add abm visualization from paper to memilio plot #1291
Conversation
…rove function structure, and add new plotting capabilities for location types.
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.
Pull Request Overview
This PR adds new visualization modules to support ABM simulation output analysis for infection states and ICU/death comparisons. Key changes include:
- Introduction of plotAbmInfectionStates.py for visualizing infection states and spatial location types.
- Introduction of plotAbmICUAndDeadComp.py for comparing ICU occupancy and deaths between simulation results and real-world data.
- Addition of helper functions for file loading and axis formatting to support the new visualizations.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
pycode/memilio-plot/memilio/plot/plotAbmInfectionStates.py | New module for plotting infection states and location types from simulation HDF5 data. |
pycode/memilio-plot/memilio/plot/plotAbmICUAndDeadComp.py | New module for plotting and comparing ICU occupancy and cumulative deaths with real-world data. |
Comments suppressed due to low confidence (2)
pycode/memilio-plot/memilio/plot/plotAbmICUAndDeadComp.py:71
- The variable 'age_grous_string' appears to be misspelled. Consider renaming it to 'age_groups_string' for clarity.
age_grous_string = ['Age 0-4', 'Age 5-14', 'Age 15-34', 'Age 35-59', 'Age 60-79', 'Age 80+'] # Adjust as needed
pycode/memilio-plot/memilio/plot/plotAbmICUAndDeadComp.py:30
- Consider using a context manager (e.g., 'with h5py.File(..., 'r') as f:') when opening HDF5 files to ensure they are properly closed after reading.
f_p50 = h5py.File(path+"/infection_state_per_age_group/0/p50/Results.h5", 'r')
… documentation, and improve function argument handling for better usability
…st cases for loading H5 results and plotting functions
…ments for clarity
…th comparison plots
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1291 +/- ##
=======================================
Coverage 97.20% 97.20%
=======================================
Files 167 167
Lines 14915 14915
=======================================
Hits 14498 14498
Misses 417 417 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…arguments for better flexibility
Thanks for bringing this close to our previous plot style from the assessment paper. @jubicker Could you have a look for the detailed review? |
Changes and Information
Please briefly list the changes (main added features, changed items, or corrected bugs) made:
If need be, add additional information and what the reviewer should look out for in particular:
Merge Request - Guideline Checklist
Please check our git workflow. Use the draft feature if the Pull Request is not yet ready to review.
Checks by code author
Checks by code reviewer(s)