Reproducible Retrieval of Pew Research Center Datasets

Reproducible, programmatic retrieval of survey datasets from the Pew Research Center.


pewdata

pewdata is an R package that provides reproducible, programmatic access to survey datasets from the Pew Research Center.

To install:

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

Note that pewdata depends on the Firefox browser; if you don't already have it installed on your machine, get it here.

For more details, check out the vignette.

News

  1. Faster
    • Revised the function to be more compact with the rvest functions.
    • Replaced the if-else if chains with the switch statements.
    • Overwrote the for loop by a sapply function.
  2. More user-friendly
    • Users do not need to set up the .Rprofile by themselves. If the informaiton is missing the function will automatically call an input request at the terminal to ask for required information for the downloading.
    • Users can reset the register information stored in the .Rprofile by switching the argument reset to TRUE.
    • The function no longer relies on the Firefox browser.

Allows nested directories to be automatically created if necessary if specified using the download_dir argument

First release.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("pewdata")

0.2.0 by Frederick Solt, 6 months ago


Browse source code at https://github.com/cran/pewdata


Authors: Frederick Solt [aut, cre], Yue Hu [aut], Eric Persson [ctb]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports rvest, magrittr, purrr, httr

Suggests knitr, rmarkdown


See at CRAN