Help Center

Querying Data from Revelio in WRDS Using R

Subscribers to Revelio Labs on WRDS-Wharton Research Data Services can extract data on user profiles, companies, and job postings to LinkedIn both through the WRDS website and programmatically through R.

The Baker Research and Data Services Git Repository provides sample code and tutorials for extracting Revelio data.

Connecting to WRDS and Set Up

The file SetConnection.R loads required libraries and establishes a connection with WRDS to allow you to extract data using SQL queries. SetConnection pulls username and password data from the file LogOn/Credentials.csv. Make sure to update this file with your username and password. For more information, see the LogOn folder.

Queries

The Sample Queries folder contains sample scripts for pulling data from WRDS. They all begin by calling the SetConnection.R file. The script MetaData.R is a good starting point. It demonstrates how to pull names of tables in the Revelio database in WRDS and creates an Excel codebook that lists table names and provides 20 sample rows for each table in the database.

External Sources

The following resources provide a good background for querying data from WRDS using R and understanding the Revelio database structure:

Still need help?

Our expert librarians are here to help you find what you’re looking for.

Interior shot of inside Baker Library hall with students
Shot of inside of Baker Library with students studying