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

Issue with using the package #27

Open
adamramey opened this issue Mar 27, 2023 · 2 comments
Open

Issue with using the package #27

adamramey opened this issue Mar 27, 2023 · 2 comments

Comments

@adamramey
Copy link

Hello - I've been trying to use the package on my Mac to no avail (both CRAN and GitHub repo versions). Usage of nearly all the functions fail for me.

For example, trying to run the example provided on the GitHub page:

warrens <- candidates_get_by_lastname( "warren", election_years = 2012 )

returns the following error:

Error inmap(): ℹ In index: 1. Caused by error in purrr::modify_depth(): ! List not deep enough

Any help would be appreciated!

@aedobbyn
Copy link
Contributor

Hi! Thanks for letting us know about the issue.

Would you mind printing your devtools::session_info()?

Potential fix for that issue you can install with devtools::install_github("decktools/votesmart", ref = "no-depth") but there might be other things that don't work depending on which versions of certain packages you have.

@aedobbyn
Copy link
Contributor

aedobbyn commented May 2, 2023

There's a new version of the package on CRAN now that should work with the latest version of dplyr. Let us know if that solves your issue!

> warrens <-  candidates_get_by_lastname( "warren",  election_years = 2012 )
Requesting data for {last_name: warren, election_year: 2012, stage_id: }.
> warrens
# A tibble: 8 × 32
  candidate_id first_name nick_name middle_name last_name suffix title          ballot_name  stage_id
  <chr>        <chr>      <chr>     <chr>       <chr>     <chr>  <chr>          <chr>        <chr>   
1 139104       Adam       NA        Lee         Warren    NA     NA             Adam Lee Wa… ""      
2 103860       Dennis     NA        NA          Warren    NA     NA             Dennis C. W… ""      
3 141272       Elizabeth  NA        Ann         Warren    NA     Senator        Elizabeth A… ""      
4 117839       Harry      NA        Joseph      Warren    NA     Representative Harry Warren ""      
5 138202       Pete       NA        NA          Warren    NA     NA             Pete Warren  ""      
6 137066       Stephen    NA        NA          Warren    NA     NA             Stephen War… ""      
7 135832       Tom        NA        NA          Warren    NA     NA             Tom Warren   ""      
8 139311       Wesley     NA        G.          Warren    NA     NA             Wesley G. W… ""      
# ℹ 23 more variables: election_year <chr>, preferred_name <chr>, election_parties <chr>,
#   election_status <chr>, election_stage <chr>, election_district_id <chr>,
#   election_district_name <chr>, election_office <chr>, election_office_id <chr>,
#   election_state_id <chr>, election_office_type_id <chr>, election_special <lgl>,
#   election_date <chr>, office_parties <chr>, office_status <chr>, office_district_id <chr>,
#   office_district_name <chr>, office_state_id <chr>, office_id <chr>, office_name <chr>,
#   office_type_id <chr>, running_mate_id <chr>, running_mate_name <chr>
> packageVersion("dplyr")
[1] ‘1.1.2’

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

2 participants