Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

demographics.py missing an important functionality #899

Closed
jdebacker opened this issue Feb 8, 2024 · 1 comment
Closed

demographics.py missing an important functionality #899

jdebacker opened this issue Feb 8, 2024 · 1 comment

Comments

@jdebacker
Copy link
Member

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
@rickecon
Copy link
Member

This is implemented by PR #902. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants