Pew Research Center regularly makes the full datasets behind our survey reports available to the public for free. In this post, we’ll explain exactly how you can download these datasets and begin to analyze our survey findings yourself.
We typically do not publish datasets at the same time as we publish reports, and the lag time varies by study. That’s because it takes some time for us to complete all of our own reporting for a given study and to prepare the data for public release. We “clean” our survey datasets in this way to make them easier to use and to remove any information that could be used to identify individual poll respondents. Protecting confidentiality also means we never release some datasets of rare populations (for instance, surveys of scientists or foreign policy experts).
We release data from our phone surveys as well as data from polls conducted on our online, nationally representative American Trends Panel (ATP) – the main source of most of our U.S.-based survey research. You can go to this page to see the complete list of available ATP datasets and the topics that they cover. There are two ways to locate datasets that are available for download. You can go to the “Tools & Resources” tab at the top of our website, which provides links to all available datasets, with surveys organized by primary research area and listed in reverse chronological order. You can also find links to datasets alongside many of our published reports, as shown here:
To download datasets, you’ll need to create a Pew Research Center account (which will require you to fill out a short information sheet) and agree to our Terms & Conditions for using Center data. Your account will allow you to download datasets in the future, provide you with easy access to datasets that you have previously downloaded, and allow us to notify you when there is an update or change to the data. After you have signed up, you won’t have to complete the information sheet again for future downloads.
Once you have registered and logged in, click the “Download” button to access the dataset you’re looking for, as well as supporting documents.
It’s important to note that researchers who want to use Pew Research Center data files need to have experience working with these types of datasets, as well as statistical software such as SPSS, SAS, Stata or R. Most of our files are provided as SPSS .sav files, which can be converted for use with other types of statistical software. A few of our older files are provided as ASCII text files with a fixed layout. These can be read into any appropriate software.
SPSS .sav files can be converted into .csv format using R. R is a free, open-source program for statistical analysis that can be downloaded from the Comprehensive R Archive Network. The foreign package is part of the standard installation and can be used to read .sav files into R with the read.spss() function. The data can then either be analyzed in R or saved to a .csv file using the write.csv() function. (For researchers who use R, three posts on our methodology blog, Decoded, may be of interest: “How to analyze Pew Research Center survey data in R,” “Using tidyverse tools with Pew Research Center survey data in R” and “Introducing pewmethods: An R package for working with survey data.”)
Included with most datasets available for download is additional material related to the study. A “readme” file is included that describes the data and may include special notes about the data, or syntax for specific variables that are constructed. A full questionnaire provides question wording and ordering for the study and can be used as a codebook. In the case of ASCII datasets, the questionnaire and/or readme provide layout instructions. Most dataset releases also include a topline and a full methodology statement.
For questions about how to download datasets, you can contact us at email@example.com.
Note: This is an update of a post originally published on March 9, 2018.