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

earnings_history vs base_period #12

Open
resultsmayterry opened this issue May 31, 2023 · 0 comments
Open

earnings_history vs base_period #12

resultsmayterry opened this issue May 31, 2023 · 0 comments

Comments

@resultsmayterry
Copy link

Hi! I'm a research assistant trying to use this code for our own project. However, our data is large, so I'm rewriting ui_calculator.py in a way that takes advantage of column/dataframe operations (as opposed to the current approach of calculating everything one row at a time via list comprehension).

Why is there a distinction made between earnings_history and base_period?

Per observation, earnings_history is a list [q1, q2, q3, q4, 0] . I interpret this as the earnings history (q1-q4) plus a 0 to represent the current quarter where the individual is unemployed. This is from the definition of calc_weekly_state_quarterly().

Then, in the definition of calc_weekly_state(), we create base_period = earnings_hist[-5:-1], which is the same as [q1, q2, q3, q4]. From here, we only use base_period. Why add the 0 just to ignore it completely?

Somewhat related, I notice we index [-5:-1] when [:4] is equivalent; is the intended result a reversing ordering like [q4, q3, q2, q1]?

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