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

Refactor age-related variables #167

Open
MaxGhenis opened this issue Aug 27, 2021 · 2 comments
Open

Refactor age-related variables #167

MaxGhenis opened this issue Aug 27, 2021 · 2 comments

Comments

@MaxGhenis
Copy link
Collaborator

variables/demographic/person.py includes four age-related variables:

One issue is that over_16 is inconsistently defined with over_64 (>= vs >). I think a couple of these can also use between().

But more generally, terms like young_child and even child can be ambiguous (sometimes a person under 18 isn't a child if they're not in a family). Can we remove or rename the variables that don't specify their criteria? We could also set a standard around only defining under_* and between_*_* to avoid redundancy. For example, all the above could be shrunk down to:

  • under_14
  • between_15_17
  • under_17
  • under_18
  • between_18_SPA
  • between_18_64
  • under_65
@MaxGhenis
Copy link
Collaborator Author

@nikhilwoodruff wdyt here? This is mostly unimportant but I think over_16 = person("age", period) >= 16 is sort of a naming bug.

@MaxGhenis MaxGhenis changed the title Rename age-related variables to include age in name Refactor age-related variables Feb 7, 2025
@MaxGhenis
Copy link
Collaborator Author

Renaming and shifting gears on this. We should instead align the age-level classifications to the law, and avoid parameter values in these variables.

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

1 participant