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

566

Version

1.5.0

License

GPL-2

Maintainer

Steve Miller

Last Published

January 24th, 2025

Functions in stevedata (1.5.0)

LOTI

Land-Ocean Temperature Index, 1880-2022
Lipset59

Democracy and Economic Development (Around) 1949-50
Guber99

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

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

British Attitudes Toward Immigration (2018-19)
LTWT

"Let Them Watch TV"
GHR04

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

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

South Carolina County GOP/Democratic Primary Data, 2016
aluminum_premiums

LME Aluminum Premiums Data
TV16

The Individual Correlates of the Trump Vote in 2016
arcticseaice

Arctic Sea Ice Extent Data, 1901-2015
USFAHR

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

U.S. Presidents and Their Terms in Office
ODGI

Ozone Depleting Gas Index Data, 1992-2022
Newhouse77

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

Partisan Politics in the Global Economy
Russett64

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

Simple Mean Tariff Rate for Argentina
SBCD

Systemic Banking Crises Database II
anes_vote84

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

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

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

Statewide Crime Data (1993)
anes_partytherms

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

Property Rights, Democracy, and Economic Growth
asn_stats

Aviation Safety Network Statistics, 1942-2019
anes_prochoice

Abortion Attitudes (ANES, 2012)
Parvin73

Economic Determinants of Political Unrest (Parvin, 1973)
chile88

Voting Intentions in the 1988 Chilean Plebiscite
co2emissions

Carbon Dioxide Emissions Data
country_isocodes

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

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

Eurostat Country Codes
mm_mlda

Minimum Legal Drinking Age Fatalities Data
eustates

EU Member States (Current as of 2019)
min_wage

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

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

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

Hypothetical (Fake) Data on Academic Performance
fakeHappiness

Fake Data on Happiness
pwt_sample

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

State-Level Education and Voter Turnout in 2016
commodity_prices

Select World Bank Commodity Price Data (Monthly)
fakeLogit

Fake Data for a Logistic Regression
epl_odds

Odds for 2024-25 English Premier League Clubs
quartets

Anscombe's (1973) Quartets
coffee_imports

Coffee Imports for Select Importing Countries
nesarc_drinkspd

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

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

Export Quality Data for Passenger Cars, 1963-2014
clemson_temps

Daily Clemson Temperature Data
mvprod

Motor Vehicle Production by Country, 1950-2019
sealevels

Global Average Absolute Sea Level Change, 1880–2015
gss_wages

The Gender Pay Gap in the General Social Survey
fakeTSD

Fake Data for a Time-Series
mm_nhis

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

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

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

Sulfur Dioxide Emissions, 1980-2020
gas_demand

Gasoline Demand in the OECD, 1960-1978
states_war

State Performance in Inter-State Wars
fakeTSCS

Fake Data for a Time-Series Cross-Section
wvs_immig

Attitudes about Immigration in the World Values Survey
steves_clothes

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

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

United States Recessions, 1855-present
gss_abortion

Abortion Opinions in the General Social Survey
wvs_justifbribe

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

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

State Abbreviations, Names, and Regions/Divisions
thatcher_approval

Margaret Thatcher Satisfaction Ratings, 1980-1990
mm_randhie

Data from the RAND Health Insurance Experiment (HIE)
sugar_price

IMF Primary Commodity Price Data for Sugar
scb_regions

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

Cross-National Rates of Trade Union Density
wvs_usa_regions

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

Yugo Sales in the United States, 1985-1992
usa_chn_gdp_forecasts

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

Thermometer Ratings for Donald Trump and Barack Obama
wb_groups

World Bank Country Groups
usa_computers

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

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

The Counties of Sweden
usa_migration

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

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

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

Turnip prices in Animal Crossing (New Horizons)
wbd_example

A Simple Panel drawn from World Bank Open Data
wvs_ccodes

Syncing Word Values Survey Country Codes with CoW Codes
wvs_usa_educat

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

The Datasaurus Dozen
Arca

NYSE Arca Steel Index data, 2017–present
CP77

Education Expenditure Data (Chatterjee and Price, 1977)
DST

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

The Economic Benefits of Justice
CFT15

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

Dow Jones Industrial Average, 1885-Present
Dee04

Are There Civics Returns to Education?
DAPO

Determinants of Arab Public Opinion
DCE12

Domestic Conflict Events, 2012
Mitchell68

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

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

Norwegian Attitudes toward European Integration (2021-2022)