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

improper row sums on geo data #153

Closed
ericmanning opened this issue May 28, 2024 · 2 comments
Closed

improper row sums on geo data #153

ericmanning opened this issue May 28, 2024 · 2 comments
Assignees

Comments

@ericmanning
Copy link

line 185 in R/census_helper_v2.R reads:

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

The current version omits all Asian and Other vars in the geo population total computation (because the Asian and Other variable name vectors in vars_ have length > 1). Pr(R|G) calculations are incorrect as a result, and worse in places that have high proportions of Asian and Other individuals.

It should read:

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

@1beb
Copy link
Collaborator

1beb commented Jun 2, 2024

Thank you for reporting, we will take a look.

1beb added a commit that referenced this issue Jun 7, 2024
1beb added a commit that referenced this issue Jun 14, 2024
@1beb
Copy link
Collaborator

1beb commented Jun 14, 2024

Closed by #154

@1beb 1beb closed this as completed Jun 14, 2024
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

3 participants