Skip to content

Commit

Permalink
Adjustments for #153, #151
Browse files Browse the repository at this point in the history
  • Loading branch information
1beb committed Jun 7, 2024
1 parent 55254d3 commit cf1bf92
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 922 deletions.
3 changes: 2 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ Date Version Comment
2024-02-15 3.0.0 Adding back age and sex functionality. Other improvements.
2024-02-27 3.0.1 Github has changed their policy on binary formats in releases, need to refer to older version
2024-04-02 3.0.2 Fixes a bug that led to overestimation of black and hispanic populations (see issue #145)
2024-05-24 3.0.3 Fixes a bug that pushed NaN into small population tracts (see issue #151)
2024-05-24 3.0.3 Fixes a bug that pushed NaN into small population tracts (see issue #151)
2024-06-07 3.0.4 Fixes a bug related to a list of variables not being unnested properly (issue #151, #153)
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: wru
Title: Who are You? Bayesian Prediction of Racial Category Using Surname,
First Name, Middle Name, and Geolocation
Version: 3.0.3
Date: 2024-05-24
Version: 3.0.4
Date: 2024-06-07
Authors@R: c(
person("Kabir", "Khanna", , "[email protected]", role = "aut"),
person("Brandon", "Bertelsen", , "[email protected]", role = c("aut", "cre")),
Expand Down
2 changes: 1 addition & 1 deletion R/census_helper_v2.R
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ census_helper_new <- function(
}
drop <- match(c("state", unlist(vars_)), names(census))

geoPopulations <- rowSums(census[,names(census) %in% vars_])
geoPopulations <- rowSums(census[,names(census) %in% unlist(vars_)])

census$r_whi <- rowSums(census[, vars_[["r_whi"]], drop = FALSE]) / (geoPopulations) #Pr(White | Geo)
census$r_bla <- rowSums(census[, vars_[["r_bla"]], drop = FALSE]) / (geoPopulations) #Pr(Black | Geo)
Expand Down
Loading

0 comments on commit cf1bf92

Please sign in to comment.