Skip to content

Commit

Permalink
Merge pull request PSLmodels#930 from jdebacker/pct_diff_plot
Browse files Browse the repository at this point in the history
Merging
  • Loading branch information
rickecon authored May 16, 2024
2 parents e068b60 + 62eb7d7 commit 0261fbf
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
run: |
python -m pytest -m "not local" --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-latest' && contains(github.repository, 'PSLmodels/OG-Core')
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
Expand Down
21 changes: 19 additions & 2 deletions ogcore/output_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def plot_aggregates(
ylabel = r"Pct. change"
plt.plot(
year_vec,
plot_var[start_index : start_index + num_years_to_plot] * 100,
plot_var[start_index : start_index + num_years_to_plot],
label=VAR_LABELS[v],
)
elif plot_type == "diff":
Expand Down Expand Up @@ -883,7 +883,7 @@ def plot_all(base_output_path, reform_output_path, save_path):
base_params,
reform_tpi=reform_tpi,
reform_params=reform_params,
var_list=["D", "G", "TR", "total_tax_revenue"],
var_list=["D", "TR", "total_tax_revenue"],
plot_type="pct_diff",
num_years_to_plot=min(base_params.T, 150),
start_year=base_params.start_year,
Expand Down Expand Up @@ -930,6 +930,23 @@ def plot_all(base_output_path, reform_output_path, save_path):
path=os.path.join(save_path, "WageRates.png"),
)

# Gov't spending toGDP in base and reform-- vertical lines at tG1, tG2
plot_gdp_ratio(
base_tpi,
base_params,
reform_tpi,
reform_params,
var_list=["G"],
num_years_to_plot=min(base_params.T, 150),
start_year=base_params.start_year,
vertical_line_years=[
base_params.start_year + base_params.tG1,
base_params.start_year + base_params.tG2,
],
plot_title="Gov't Spending-to-GDP",
path=os.path.join(save_path, "SpendGDPratio.png"),
)

# Debt-GDP in base and reform-- vertical lines at tG1, tG2
plot_gdp_ratio(
base_tpi,
Expand Down

0 comments on commit 0261fbf

Please sign in to comment.