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

Update demographics.py to handle data downloaded with forecasted values #38

Closed
wants to merge 1 commit into from

Conversation

SeaCelo
Copy link
Collaborator

@SeaCelo SeaCelo commented Mar 10, 2023

Added code to filter by forecast model variant. This is necessary as described by issue #37 . If the user specifies a data range that includes data generated by a forecasted model (currently, this means any year >2021), the returned data will have multiple model variants for each observation. This needs to be filtered. We default to only using the "median" forecast model.

Added adjustments to the following functions: get_un_fert_data(), get_un_mort_data(), get_un_pop_data().
The adjustments:

  • create an additional parameter called variant that defaults to "4" (median)
  • Adds a description of this parameter
  • Filters the results to only include observations where the variable VariantId matches the parameter variant

Added code to filter by forecast model variant.
@SeaCelo SeaCelo added the enhancement New feature or request label Mar 10, 2023
@SeaCelo SeaCelo self-assigned this Mar 10, 2023
@SeaCelo SeaCelo marked this pull request as draft October 23, 2023 16:25
@jdebacker
Copy link
Collaborator

@SeaCelo This is a nice addition. However, with PR #51, we'll move over to using the demographics.py module from OG-Core. Could you make this contribution to that project?

@SeaCelo
Copy link
Collaborator Author

SeaCelo commented Mar 18, 2024

This PR is no longer necessary. Will make any contributions to the new demographics.py in OG-CORE. Closing.

@SeaCelo SeaCelo closed this Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants