Skip to content

Commit

Permalink
use ogcore demographics
Browse files Browse the repository at this point in the history
  • Loading branch information
jdebacker committed Mar 17, 2024
1 parent f8fc0b1 commit c65aa4e
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions ogzaf/calibrate.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
from ogzaf import demographics
from ogzaf import macro_params
from ogzaf import income
from ogzaf import macro_params, income
from ogzaf import input_output as io
import os
import numpy as np
from ogcore import txfunc
from ogcore import txfunc, demographics
from ogcore.utils import safe_read_pickle, mkdirs
import pkg_resources

Expand Down Expand Up @@ -71,10 +69,26 @@ def __init__(

# demographics
self.demographic_params = demographics.get_pop_objs(
p.E, p.S, p.T, p.start_year
p.E,
p.S,
p.T,
0,
99,
country_id="710", # UN code for ZAF
initial_data_year=p.start_year - 1,
final_data_year=p.start_year,
)
# demographics for 80 period lives (needed for getting e below)
demog80 = demographics.get_pop_objs(20, 80, p.T, p.start_year)
demog80 = demographics.get_pop_objs(
20,
80,
p.T,
0,
99,
country_id="710", # UN code for ZAF
initial_data_year=p.start_year - 1,
final_data_year=p.start_year,
)

# earnings profiles
self.e = income.get_e_interp(
Expand Down

0 comments on commit c65aa4e

Please sign in to comment.