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

Fix for wru #140

Merged
merged 6 commits into from
Sep 3, 2022
Merged

Fix for wru #140

merged 6 commits into from
Sep 3, 2022

Conversation

aridf
Copy link
Collaborator

@aridf aridf commented Sep 3, 2022

Thanks for opening a PR!

  • Have you followed the guidelines in our Contributing Guide?
  • Ensured you are not committing large data files or other sensitive information (e.g. voter files)

Please list any Issues this PR addresses

In 2-3 sentences or a brief list, describe changes implemented in this PR

  • Implements changes required by new version of wru (NAMESPACE error kosukeimai/wru#70)
    • For now, age and sex are not usable to inform bisg in wru. If the user sets these to TRUE, they will be warned and the values will be forced to FALSE
    • Addresses a small bug in the vignettes where census data objects are missing a year field
    • Cleans up a couple other small notes and warnings

@aridf aridf merged commit 149cb2a into master Sep 3, 2022
@aridf aridf deleted the fix-for-wru branch September 3, 2022 15:02
@1beb 1beb mentioned this pull request Sep 15, 2022
2 tasks
@@ -42,7 +42,7 @@ map_interactive <- function(voter_file,
latitude = "lat",
longitude = "lon") {

if (class(voter_file) == "data.frame" & any(colnames(voter_file) == "geometry")) {
if (is.data.frame(voter_file) & any(colnames(voter_file) == "geometry")) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

# Use surname only
if (surname_only) {
new_voter_file <- data.frame(surname = surnames)
# Calculate probabilities using surnames only
probabilities <- suppressWarnings(
wru::merge_surnames(
merge_surnames_copy(
voter.file = new_voter_file,
surname.year = 2010,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May wish to make this a parameter given the new data for 2020 is widely available.

Copy link

@1beb 1beb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

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

Successfully merging this pull request may close these issues.

2 participants