Learn R Programming

stevedata: Steve’s Toy Data for Teaching About a Variety of Methodological, Social, and Political Topics

{stevedata} is an R package full of toy data sets that you may find useful for various purposes. Namely, I’ve created probably over a hundred toy data sets along the way, either to riff on some topic on my blog, show my students something in one of my many classes, or just to entertain myself. I had stuffed a lot of these into {stevemisc}, but I want to keep that package mostly about the functions (and whatever data are necessary for showing off the functions). {stevedata} will have all my toy data going forward.

I anticipate two sets of R users may find these data useful. First, instructors may find these data useful for classes on a variety of topics, but prominently quantitative methods and international relations. Many of the toy data sets included in this R package are data I’ve acquired or assembled to teach about topics in quantitative methods or international relations in a reproducible way. Users should see my Github repositories for my classes on introduction to international relations, quantitative methods in political science, and foundations of social science research for public policy to see how I’ve used these data (or development versions of them). Topics here are diverse, including (but not limited to) carbon dioxide emissions over 800,000 years (as an illustration of climate change), coffee prices (as an illustration of the worsening terms of trade, the justifiability of bribe-taking (as an illustration of information-poor and discrete variables that a researcher may be tempted to treat as drawn from a normal distribution), the canonical case of illiteracy rates in the 1930 U.S. Census (as an illustration of an ecological fallacy), and many, many more topics.

Second, my students in these classes (but especially my methods classes) should find this R package useful. I will also be having my methods students (undergraduate and graduate) download this package to work through problem sets in the R programming language. It’d be a benefit to them (and less hassle/headache for myself) to have my students download this package from CRAN rather than work through potential curl issues by installing through Github.

In almost all instances, each data set has an underlying code/script that generates them. These are in a data-raw directory that is (increasingly) included in the Github repository (but not the R package).

Installation

This package is now on CRAN. You can download it as you would any other R package.

install.packages("stevedata")

You can also install the development version of {stevedata} from Github via the {devtools} package. I suppose using the {remotes} package would work as well.

devtools::install_github("svmiller/stevedata")

Usage

The data set already has a lot to offer those who might be curious about its contents. You can do this to see what is in it.

data(package = "stevedata")

You can also check the website for more information. There is an informal vignette that describes these data in some detail.

Copy Link

Version

Install

install.packages('stevedata')

Monthly Downloads

498

Version

1.6.0

License

GPL-2

Maintainer

Steve Miller

Last Published

July 18th, 2025

Functions in stevedata (1.6.0)

ESSBE5

Trust in the Police in Belgium (European Social Survey, Round 5)
Parvin73

Economic Determinants of Political Unrest (Parvin, 1973)
GHR04

Comparative Public Health: The Political Economy of Human Misery and Well-Being
ESS10NO

Norwegian Attitudes toward European Integration (2021-2022)
LTPT

Long-Term Price Trends for Computers, TVs, and Related Items
Guber99

School Expenditures and Test Scores for 50 States, 1994-95
clemson_temps

Daily Clemson Temperature Data
anes_prochoice

Abortion Attitudes (ANES, 2012)
anes_partytherms

Major Party (Democrat, Republican) Thermometer Index Data (1978-2012)
co2emissions

Carbon Dioxide Emissions Data
Lipset59

Democracy and Economic Development (Around) 1949-50
eq_passengercars

Export Quality Data for Passenger Cars, 1963-2014
Presidents

U.S. Presidents and Their Terms in Office
USFAHR

U.S. Foreign Aid and Human Rights in Assorted Years
PRDEG

Property Rights, Democracy, and Economic Growth
PPGE

Partisan Politics in the Global Economy
coffee_price

The Primary Commodity Price for Coffee (Arabica, Robustas)
coffee_imports

Coffee Imports for Select Importing Countries
epl_odds

Odds for 2024-25 English Premier League Clubs
Russett64

Inequality and Instability: The Relation of Land Tenure to Politics (Russett, 1964)
af_crime93

Statewide Crime Data (1993)
gatt_members

The 128 Countries That Had Signed GATT by 1994
african_coups

Modeling Coups in Africa, 1960 to 1975 (1982)
gas_demand

Gasoline Demand in the OECD, 1960-1978
eustates

EU Member States (Current as of 2019)
SBCD

Systemic Banking Crises Database II
gss_spending

Attitudes Toward National Spending in the General Social Survey (2018)
eight_schools

The Effect of Special Preparation on SAT-V Scores in Eight Randomized Experiments
aluminum_premiums

LME Aluminum Premiums Data
election_turnout

State-Level Education and Voter Turnout in 2016
chile88

Voting Intentions in the 1988 Chilean Plebiscite
china_peace

Drivers of China's Peace Engagement in Conflict-affected Countries
quartets

Anscombe's (1973) Quartets
fakeAPI

Hypothetical (Fake) Data on Academic Performance
ODGI

Ozone Depleting Gas Index Data, 1992-2022
Mitchell68

Inequality and Insurgency: A Statistical Study of South Vietnam (Mitchell, 1968)
pwt_sample

Penn World Table (10.0) Macroeconomic Data for Select Countries, 1950-2019
scb_regions

Region Codes in the Central Bureau of Statistics ("Statistiska centralbyrån") in Sweden
Newhouse77

Medical-Care Expenditure: A Cross-National Survey (Newhouse, 1977)
arg_tariff

Simple Mean Tariff Rate for Argentina
arcticseaice

Arctic Sea Ice Extent Data, 1901-2015
sealevels

Global Average Absolute Sea Level Change, 1880–2015
anes_vote84

Simple Data for a Simple Model of Individual Voter Turnout (ANES, 1984)
TV16

The Individual Correlates of the Trump Vote in 2016
OODTPT

Data for "Optimal Obfuscation: Democracy and Trade Policy Transparency"
gss_wages

The Gender Pay Gap in the General Social Survey
SCP16

South Carolina County GOP/Democratic Primary Data, 2016
uniondensity

Cross-National Rates of Trade Union Density
ukg_eeri

United Kingdom Effective Exchange Rate Index Data, 1990-2022
mvprod

Motor Vehicle Production by Country, 1950-2019
fakeTSD

Fake Data for a Time-Series
fakeTSCS

Fake Data for a Time-Series Cross-Section
yugo_sales

Yugo Sales in the United States, 1985-1992
asn_stats

Aviation Safety Network Statistics, 1942-2019
min_wage

History of Federal Minimum Wage Rates Under the Fair Labor Standards Act, 1938-2009
eu_ua_fta24

A Roll Call Vote on Extending Temporary Trade Liberalization Measures Applicable to Ukrainian products under the EU/Euratom/Ukraine Association Agreement
eurostat_codes

Eurostat Country Codes
mm_mlda

Minimum Legal Drinking Age Fatalities Data
nesarc_drinkspd

The Usual Daily Drinking Habits of Americans (NESARC, 2001-2)
country_isocodes

ISO 3166 Country Codes (Two-Character, Three-Character, Numeric)
steves_clothes

Steve's (Professional) Clothes, as of March 20, 2022
sugar_price

IMF Primary Commodity Price Data for Sugar
illiteracy30

Illiteracy in the Population 10 Years Old and Over, 1930
sweden_counties

The Counties of Sweden
thatcher_approval

Margaret Thatcher Satisfaction Ratings, 1980-1990
fakeHappiness

Fake Data on Happiness
commodity_prices

Select World Bank Commodity Price Data (Monthly)
gss_abortion

Abortion Opinions in the General Social Survey
fakeLogit

Fake Data for a Logistic Regression
usa_migration

U.S. Inbound/Outbound Migration Data, 1990-2017
usa_states

State Abbreviations, Names, and Regions/Divisions
inglehart03

"How Solid is Mass Support for Democracy---And How Can We Measure It?"
ghp100k

Gun Homicide Rate per 100,000 People, by Country
wb_groups

World Bank Country Groups
wvs_ccodes

Syncing Word Values Survey Country Codes with CoW Codes
recessions

United States Recessions, 1855-present
wvs_immig

Attitudes about Immigration in the World Values Survey
wbd_example

A Simple Panel drawn from World Bank Open Data
mm_nhis

Data from the 2009 National Health Interview Survey (NHIS)
rok_unga

The Correlates of Dyadic Voting Similiarities in the UN General Assembly for South Korea
mm_randhie

Data from the RAND Health Insurance Experiment (HIE)
usa_tradegdp

U.S. Trade and GDP, 1790-2018
turnips

Turnip prices in Animal Crossing (New Horizons)
therms

Thermometer Ratings for Donald Trump and Barack Obama
voteincome

Sample Turnout and Demographic Data from the 2000 Current Population Survey
so2concentrations

Sulfur Dioxide Emissions, 1980-2020
wvs_justifbribe

Attitudes about the Justifiability of Bribe-Taking in the World Values Survey
usa_chn_gdp_forecasts

United States-China GDP and GDP Forecasts, 1960-2050
usa_computers

Percentage of U.S. Households with Computer Access, by Year
states_war

State Performance in Inter-State Wars
wvs_usa_abortion

Attitudes on the Justifiability of Abortion in the United States (World Values Survey, 1982-2011)
wvs_usa_educat

Education Categories for the United States in the World Values Survey
wvs_usa_regions

Region Categories for the United States in the World Values Survey
Dee04

Are There Civics Returns to Education?
Arca

NYSE Arca Steel Index data, 2017–present
DST

Casualties/Fatalities in the U.S. for Drunk-Driving, Suicide, and Terrorism
DJIA

Dow Jones Industrial Average, 1885-Present
LTWT

"Let Them Watch TV"
CFT15

Randomization Inference in the Regression Discontinuity Design: An Application to Party Advantages in the U.S. Senate
CP77

Education Expenditure Data (Chatterjee and Price, 1977)
DCE12

Domestic Conflict Events, 2012
LOTI

Land-Ocean Temperature Index, 1880-2022
Datasaurus

The Datasaurus Dozen
DAPO

Determinants of Arab Public Opinion
AJR5

The Colonial Origins of Comparative Development (Table 5)
ESS9GB

British Attitudes Toward Immigration (2018-19)
EBJ

The Economic Benefits of Justice