Giter Site home page Giter Site logo

ccesmrpprep's People

Contributors

kuriwaki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

jeffreyawright

ccesmrpprep's Issues

Encoding issues for some CCES dataverses not working

Probably same as IQSS/dataverse-client-r#80

> cc16_full <- get_cces_dataverse("2016")
Downloading and reading large dataset, can take about 3-5 minutes to complete. 
No encoding supplied: defaulting to UTF-8.
No encoding supplied: defaulting to UTF-8.
 Error in df_parse_dta_file(spec, encoding, cols_skip, n_max, skip, name_repair = .name_repair) : 
  Failed to parse /private/var/folders/58/bg0qcxrs7s7fgf3x_qlj8njw0000gn/T/Rtmptxtxw8/foo67d1310cd2b6: This version of the file format is not supported. 

citizen voting age population Census Variable is wrong

Hi @kuriwaki ,

For the get_acs_cvap() function, I think the Census variable code you chose are wrong. Citizen Voting Age population should be native or naturalized citizens aged 18 or above. Therefore, it should be the total of 009, 011, 020, 022 for each race category instead of the total of 004, 006, 015, and 017. Please check them again.

Let me know if I am wrong.

Thank you!

missing education codes

Hi there,
Any idea why acscodes_age_sex_educ only returns rows for "HS or Less" and "4-Year"?

acs_tab <- get_acs_cces(
varlist = acscodes_sex_educ_race,
varlab_df = acscodes_df,
year = 2021,dataset = "acs5"
)
Screenshot 2023-05-08 at 3 02 13 PM

thanks!

Use CRAN version of dataverse package

now that it is on CRAN. Rather than set the github remote.

Also this errors out, even though this function using add_file should have been backwards compatible

library(ccesMRPprep)
cc_y <- get_cces_dataverse(name = "2018")
#> Downloading and reading large dataset, can take about 3-5 minutes to complete.
#> Error in dataset_files(prepend_doi(x), key = key, server = server, ...): Not Found (HTTP 404).

Created on 2021-01-26 by the reprex package (v0.3.0)

pick age_5 and age_10 depending on acscodes

acscodes_sex_age_educ is given by 5-way age, but acscodes_sex_age_race is given by 10-way age. The function get_acs_cces should probably get both but rename the relevant one to age depending on the partition

Separate out synth* methods to another package

The emlogit dependency creates a hassle for new Mac users who need to install Rcpp. (basically, they need to go here to reinstall lgfortran). So if only for the convenience of installing and loading packages quickly, we can separate the two.

The synth* methods in R/synth_*.R also rely on @soichiroy's methods so it would be good to acknowledge that more explicitly.

get_poststrat tidyeval error

likely at filter_at(vars(matches(xvar_regex)), ~all_vars(!is.na(.x))) %>% group_by(!!!syms(xvars), add = TRUE)

library(ccesMRPprep)

fm_brm <- yes | responses(n_cell) ~  age + gender + educ + pct_trump + (1|cd)
acs_tab <- get_acs_cces(
  varlist = acscodes_age_sex_educ,
  varlab_df = acscodes_df,
  year = 2018)
#> The 1-year ACS provides data for geographies with populations of 65,000 and greater.
#> Getting data from the 2018 1-year ACS

poststrat <-  get_poststrat(acs_tab, cd_info_2018, fm_brm)
#> Joining, by = c("year", "cd")
#> Error: Problem with `filter()` input `..1`.
#> x Base operators are not defined for quosures.
#> Do you need to unquote the quosure?
#> 
#>   # Bad:
#>   myquosure1 & myquosure2
#> 
#>   # Good:
#>   !!myquosure1 & !!myquosure2
#> ℹ Input `..1` is `&...`.
head(poststrat)
#> Error in head(poststrat): object 'poststrat' not found

Created on 2021-01-08 by the reprex package (v0.3.0)

Reported by Arjun Vishwanath

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.