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

write_all_mapping_tables() potentially writes mapping table 1 year into the future #52

Open
TSchiefer opened this issue Dec 2, 2021 · 1 comment · May be fixed by #53
Open

write_all_mapping_tables() potentially writes mapping table 1 year into the future #52

TSchiefer opened this issue Dec 2, 2021 · 1 comment · May be fixed by #53
Labels
Milestone

Comments

@TSchiefer
Copy link
Member

write_all_mapping_tables() determines the latest target year by:

MAX_YEAR <- lubridate::year(
    max(swc_get_municipality_mutations()$mAbolitionDate, na.rm = TRUE)
  ) + 1L

which means in case the last abolition happened during the current year, the target year will be 1 year in the future.

I would suggest

lubridate::year(
    max(swc_get_municipality_mutations()$mAdmissionDate, na.rm = TRUE)
)
@TSchiefer TSchiefer added the bug label Dec 2, 2021
@TSchiefer TSchiefer added this to the 0.1.1 milestone Dec 2, 2021
@TSchiefer TSchiefer linked a pull request Dec 2, 2021 that will close this issue
@krlmlr
Copy link
Collaborator

krlmlr commented May 23, 2022

It seems ok -- #58 created a table that would be valid, to the best of our knowledge, for the municipality level of 2023. Can you please double-check?

@krlmlr krlmlr modified the milestones: 0.1.1, 0.4.0 May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants