-
Notifications
You must be signed in to change notification settings - Fork 30
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
Update code and documentation in R folder to incorporate 2020 Census data #47
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copy and paste the voters.RData from master branch. Delete the original voters.RData file in hwru branch.
Add stringr, dplyr, Rcpp to the Imports field of DESCRIPTION file. Add import(dplyr) in the NAMESPACE file.
Add default values to the arguments of merge_names function. Comment out the line of code require(dplyr).
Add a new argument year; Modify the parts of code with arguments age and sex equal to False; Substitute all 2010 census data links with variable census_data_url.
Add a new argument, year = "2010", to the get_census_data function.
Add argument year = "2010"; Update the part calculating probability Pr(Race|Geo).
Keep year argument; Drop two arguments age and sex.
Add year argument to census_helper.R.
Add a year argument; Add a warning saying that predictions other than having both age and sex equal to FALSE are not supported with 2020 census data.
Update the function description, parameter description of year, and add one more example.
Add description of parameter year and one more example with year equal to 2020.
Code 1. If census.data is provided, ensure that its elements sex and age are FALSE. Documentation 1. Add place as a geolocation level to function description and parameter description of geo. 2. Revise parameter description for census.data (both elements sex and age must be FALSE; year element of census.data must corresponds to the value of the year argument in the function). 3. Revise all examples from census_helper to census_helper_new. 4. Add one more example with year equal to "2020".
1. Add place as a geolocation level to function description and parameter description of geo. 2. Add parameter description for year. 3. Revise parameter description for census.data (year element of census.data must corresponds to the value of the year argument). 4. Add one more example with year equal to "2020".
Add a year argument to function predict_race_new.
Based on line 156 (surname.year %in% c(2000, 2010, 2021)), there are three available values for surname.year. The documentations of parameters census.surname, surname.year, and census.geo need to be revised to reflect the new value option 2021. 1. Revise the description for census.surname to include the 2021 Surname List. 2. Revise the description for surname.year to include the 2021 Surname List. 3. Revise the description for census.geo to not specify the year of the Census geogrphic data. 4. Add parameter description for year. 5. Add one more example for the function.
Take out the references to "USCensus2010" in the function description.
1. Add the description of use.census.surnames. 2. Add the description of census.surnames.
1. Revise the description of census.geo so as to not specify the year of the Census geographic data. 2. Add the description of census.surnames. 3. Add the description of year. 4. Change the function name of all examples from predict_race to predict_race_new. 5. Delete, modify and add examples to reflect the functionality of predict_race_new.
1. Modify the census_geo_api fucntion description. 2. Modify lines 23 & 34 of predict_race function so that the year of the Surname list should be 2020 instead of 2021. 3. Modify lines 156-157 of predict_race function to change the option 2021 to 2020 for surname.year. 4. Small revision for the census.surnames description in function predict_race_new.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update functions and their documentations to incorporate 2020 Census data as part of the package.