PSLmodels / OG-Core

An overlapping generations model framework for evaluating fiscal policies.
https://pslmodels.github.io/OG-Core/
Creative Commons Zero v1.0 Universal
65 stars 111 forks source link

Parameter plot fixes and extensions #914

Closed jdebacker closed 5 months ago

jdebacker commented 5 months ago

This PR updates the parameter_plots.py module to:

  1. Work with the 2D chi_n matrix (Issue #912)
  2. Allow for comparisons of alternative parameterizations in the same plot through the use of lists of parameter objects in the arguments to plotting functions
  3. Allows one to plot the ability profiles in levels or logs (Issue #913)
  4. Adds plots of cumulative survival rates
codecov-commenter commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 73.46%. Comparing base (5a811f6) to head (7de7a7c).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/914/graphs/tree.svg?width=650&height=150&src=pr&token=98mQCVhspd&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels)](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/914?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) ```diff @@ Coverage Diff @@ ## master #914 +/- ## ========================================== + Coverage 73.21% 73.46% +0.24% ========================================== Files 19 19 Lines 4563 4613 +50 ========================================== + Hits 3341 3389 +48 - Misses 1222 1224 +2 ``` | [Flag](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/914/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/914/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | `73.46% <100.00%> (+0.24%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/914?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | Coverage Δ | | |---|---|---| | [ogcore/output\_plots.py](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/914?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-b2djb3JlL291dHB1dF9wbG90cy5weQ==) | `96.51% <100.00%> (+0.02%)` | :arrow_up: | | [ogcore/output\_tables.py](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/914?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-b2djb3JlL291dHB1dF90YWJsZXMucHk=) | `96.81% <100.00%> (+0.05%)` | :arrow_up: | | [ogcore/parameter\_plots.py](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/914?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-b2djb3JlL3BhcmFtZXRlcl9wbG90cy5weQ==) | `82.41% <100.00%> (+1.55%)` | :arrow_up: | | [ogcore/utils.py](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/914?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-b2djb3JlL3V0aWxzLnB5) | `88.47% <100.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/914/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels)