We need to allow for demographics.py to be able to return path of population distributions when given (1) an initial distribution (2) paths of fertility, mortality, and immigration rates.
This could probably be best implemented in the demographics.get_pop() function with something like:
def get_pop(
E=20,
S=80,
min_age=0,
max_age=99,
infer_pop=False
fert_rates=None,
mort_rates=None,
infmort_rates=None,
imm_rates=None,
pre_pop_dist=None,
country_id=UN_COUNTRY_CODE,
start_year=START_YEAR,
end_year=END_YEAR,
):
if not infer_path:
do current functionality
else:
find implied pop path from fert, mort, imm rates + either(pre_pop or UN data if pre pop not given)
return pop_2D, pre_pop
We need to allow for
demographics.py
to be able to return path of population distributions when given (1) an initial distribution (2) paths of fertility, mortality, and immigration rates.This could probably be best implemented in the
demographics.get_pop()
function with something like: