Code Monkey home page Code Monkey logo

ropercenter's Introduction

CRAN version R-CMD-check


ropercenter

The Roper Center for Public Opinion Research, in its own words, works "to collect, preserve, and disseminate public opinion data; to serve as a resource to help improve the practice of survey research; and to broaden the understanding of public opinion through the use of survey data in the United States and around the world." It maintains the largest archive of public opinion data in existence, holding data dating back to the 1930s and from over 100 countries. Researchers taking advantage of these datasets, however, are caught in a bind. The terms and conditions for downloading any Roper Center dataset state that datasets "may not be resold or re-disseminated." But to ensure that one's work can be reproduced, assessed, and built upon by others, one must provide access to the raw data one employed.

The ropercenter package cuts this knot by providing programmatic, reproducible access to specified Roper Center datasets from within R for registered users at the Roper Center's member institutions.

The ropercenter package interacts with the Roper Center website using the Firefox browser. Get Firefox here. Once you have installed Firefox, to install ropercenter:

  • the latest released version: install.packages("ropercenter")
  • the latest development version:
if (!require(remotes)) install.packages("remotes")
remotes::install_github("fsolt/ropercenter")

For more details, check out the vignette.

Please recall that by using Roper Center services, you accept the Center's Terms and Conditions.

ropercenter's People

Contributors

fsolt avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

brc75 sbw78

ropercenter's Issues

Conversion from .por to .RData failed

Hi, this package has been a great help on my dissertation work.

I want to bring an issue with por -> Rdata conversion to your attention. I've noticed suddenly that conversion is just failing and I can't explain why.

If I prevent roper_download() from trying to convert the por file and instead try to read it directly into R using haven::read_por, I get error message "Failed to parse [file].por: Invalid file, or file has unsupported features." Traceback suggests there is an issue with df_parse_por_file() but I actually can't find where that function lives.

This likely is an issue with haven or something even farther up in the pipeline (others are running into similar issues and reporting them to haven here), but I wanted to bring it to your attention since this might be A Thing.

Identifying Dataset ID based on Question ID

I wanted to ask if you think there’s any way to input question IDs (rather than dataset IDs) and for the package to identify the dataset ID and download it? The reason I ask is I often use a topline csv file for descriptive trends and based on that, I return to roper to download the files that are available for individual analysis. At the moment, I still have to go into roper and manually identify the dataset that each question originated in to create the vector of files in R. If there’s any way the package can make the jump from question ID to dataset ID, that would shorten the time of work even more…

Thanks for taking the time! I love this package.

datasets without .por files

If passed a dataset that is not available in SPSS portable format, fxn creates a file with a .por extension that is filled with HTML. Need to either find a way to make Roper ASCII files usable or return an error.

This version of ChromeDriver only supports Chrome version 85

Hi:

I apologize for coming on here again.

I was trying to run the following:

roper_download(
    file_id = c(
      "USAIPOGNS2015-04",   # 2015
      "USAIPOGNS2014-04",   # 2014
      "USAIPOGNS2013-04",   # 2013
      "USAIPOGNS2012-05",   # 2012
      "USAIPOGNS2010-05"    # 2010
    ),
    download_dir = here::here("data/Gallup3")
  )

but I received this error:

Selenium message:session not created: This version of ChromeDriver only supports Chrome version 85
Build info: version: '4.0.0-alpha-2', revision: 'f148142cf8', time: '2019-07-01T21:30:10'
System info: host: 'Jennifers-MacBook-Pro.local', ip: '2601:586:8301:6690:0:0:0:d324%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.5', java.version: '12.0.1'
Driver info: driver.version: unknown
remote stacktrace: 0   chromedriver                        0x000000010095d6b9 chromedriver + 4904633
1   chromedriver                        0x00000001008fcde3 chromedriver + 4509155
2   chromedriver                        0x000000010056cc06 chromedriver + 773126
3   chromedriver                        0x00000001004c7e62 chromedriver + 97890
4   chromedriver                        0x00000001004c477f chromedriver + 83839
5   chromedriver                        0x00000001004f3166 chromedriver + 274790
6   chromedriver                        0x00000001004f0173 chromedriver + 262515
7   chromedriver                        0x00000001004ca130 chromedriver + 106800
8   chromedriver                        0x00000001004cb0a3 chromedriver + 110755
9   chromedriver                        0x0000000100926032 chromedriver + 4677682
10  chromedriver                        0x0000000100933eca chromedriver + 4734666
11  chromedriver                        0x0000000100933b81 chromedriver + 4733825
12  chromedriver                        0x000000010090920e chromedriver + 4559374
13  chromedriver                        0x00000001009343f1 chromedriver + 4735985
14  chromedriver                        0x000000010091adea chromedriver + 4632042
15  chromedriver                        0x000000010094d46a chromedriver + 4838506
16  chromedriver                        0x00000001009639d7 chromedriver + 4930007
17  libsystem_pthread.dylib             0x00007fff70ae5109 _pthread_start + 148
18  libsystem_pthread.dylib             0x00007fff70ae0b8b thread_start + 15


Could not open chrome browser.
Client error message:
	 Summary: SessionNotCreatedException
 	 Detail: A new session could not be created.
	 Further Details: run errorDetails method
Check server log for further details.
Error in checkError(res) : 
  Undefined error in httr call. httr output: length(url) == 1 is not TRUE

I have redownloaded the ropercenter package, reinstalled Chrome, quit R, and rebooted and have gotten this error each time.

I was wondering if you know if this is due to an error on the Roper Center, my code, or a bug in the package.

For reference, I've checked my login credentials and they work.

Thank you so much for doing this and I apologize, again, for coming on here with this after we seemed to have figured it out last week.

Thank you!

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.