From 86d076416137f410b89121f54d7dd967e4794f00 Mon Sep 17 00:00:00 2001 From: jdebacker Date: Thu, 21 Mar 2024 14:05:44 -0400 Subject: [PATCH 1/3] move legend for mort rates plot --- ogcore/parameter_plots.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ogcore/parameter_plots.py b/ogcore/parameter_plots.py index 963eafbfb..15f18b3fd 100644 --- a/ogcore/parameter_plots.py +++ b/ogcore/parameter_plots.py @@ -107,7 +107,7 @@ def plot_mort_rates( title = "Survival Rates" else: plt.ylabel(r"Mortality Rates $\rho_{s}$") - plt.legend(loc="upper right") + plt.legend(loc="upper left") title = "Mortality Rates" vals = ax.get_yticks() ax.set_yticklabels(["{:,.0%}".format(x) for x in vals]) From fe8103994844cea20be262dfc6b70b82d69781e7 Mon Sep 17 00:00:00 2001 From: jdebacker Date: Thu, 21 Mar 2024 17:04:04 -0400 Subject: [PATCH 2/3] remove print commands --- ogcore/utils.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/ogcore/utils.py b/ogcore/utils.py index 623ec67f1..c26034a4f 100644 --- a/ogcore/utils.py +++ b/ogcore/utils.py @@ -1123,10 +1123,8 @@ def shift_bio_clock( final_effect_period - initial_effect_period + 1 ) # number of periods transition over transition_path = np.linspace(0, 1.0, t) - print("Transition path = ", transition_path) transition_arr = np.zeros_like(param_in, dtype=float) for i in range(t): - print("TRANS = ", transition_path[i] * np.ones_like(param_in[0, ...])) transition_arr[initial_effect_period + i, ...] = transition_path[ i ] * np.ones_like(param_in[0, ...]) @@ -1141,7 +1139,6 @@ def shift_bio_clock( pct_effect = total_effect / total_effect_ru else: pct_effect = 0 - print("Pct effect = ", pct_effect) # apply the transition path to the initial parameters # find diff from shifting bio clock back total_effect years param_shift[:, min_age_effect_felt:, ...] = param_in[ From ae3983c816ffc6e229ae4c3761fc88e8fc3c7bc7 Mon Sep 17 00:00:00 2001 From: jdebacker Date: Sat, 23 Mar 2024 15:52:46 -0400 Subject: [PATCH 3/3] change demog start year --- ogcore/demographics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ogcore/demographics.py b/ogcore/demographics.py index ea3ec7948..d4fa9fe95 100644 --- a/ogcore/demographics.py +++ b/ogcore/demographics.py @@ -17,8 +17,8 @@ from ogcore.utils import get_legacy_session from ogcore import parameter_plots as pp -START_YEAR = 2023 -END_YEAR = 2023 +START_YEAR = 2024 +END_YEAR = 2024 UN_COUNTRY_CODE = "840" # UN code for USA # create output director for figures CUR_PATH = os.path.split(os.path.abspath(__file__))[0]