Skip to content

Commit

Permalink
use diff method to get yyyyq
Browse files Browse the repository at this point in the history
  • Loading branch information
jdebacker committed Aug 5, 2024
1 parent 79e926b commit fce9545
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ogzaf/macro_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ def get_macro_params(
# initialize a dictionary of parameters
macro_parameters = {}
# baseline date formatted for World Bank data
baseline_YYYYQ = data_end_date.strftime(r"%YQ%q")
baseline_YYYYQ = (
str(data_end_date.year)
+ "Q"
+ str(pd.Timestamp(data_end_date).quarter)
)

"""
Retrieve data from the World Bank World Development Indicators.
Expand Down

0 comments on commit fce9545

Please sign in to comment.