Closed jdebacker closed 7 months ago
Attention: 54 lines
in your changes are missing coverage. Please review.
Comparison is base (
4b894bd
) 80.26% compared to head (974eac0
) 80.38%.
@rickecon All tests passing, including new ones. According to output from demographics.py
pop distribution seems to converge. But I do see some odd stuff regarding immigration rates. A few plots to illustrate:
I believe the uptick in the adjusted population distribution are a result of the high immigration rates at older ages. I will review the code that backs out these rates as residuals from the transition in the actual population distribution.
With the latest commits, we are looking a lot better. Issue was that the UN data has a bin of 100+, who were being counted as age 100, creating a mass there. The module now drops those over age 99.
Updated plots:
Plots looking good:
@rickecon This PR is ready for your review. We'll want to merge this one before #897
@jdebacker. This is great. Merging.
This PR creates a demographic module in OG-Core. Such a module exists in the various country calibration repositories, but since all of those now use the UN population data, much of the code is repeated. Thus, moving the module here will remove redundant code across these country-specific repos.
In addition to this, the PR will add the following functionality:
demographics.py
purely for filling out demographic variables over the transition path and in the SS).