Wolfram Computation Meets Knowledge

Executions in the United States

A dataset about executions (the death penalty) in the United States since the 1976 Supreme Court decision in Gregg v. Georgia (428 U.S. 153)

Originator: The Death Penalty Information Center, with revisions by Seth J. Chandler

Examples

Basic Examples

Retrieve the resource:

In[1]:=
ResourceObject["Executions in the United States"]
Out[1]=

Retrieve the default content:

In[2]:=
ResourceData["Executions in the United States"]
Out[2]=

Generate a breakdown of executions by gender and race:

In[3]:=
Query[GroupBy[#Sex &], (GroupBy[#Race &]) /* (Merge[{#, <|"White" -> 
         0, "Latino" -> 0, "Black" -> 0, "Native American" -> 0, 
        "Asian" -> 0, "Other" -> 0|>}, First] &) /* KeySort, Length][
 ResourceData["Executions in the United States"]]
Out[3]=

Generate a breakdown of executions by state and race, but limit to the states with the five most executions:

In[4]:=
Query[GroupBy[#State &] /* 
   Query[SortBy[-Total[#] &]] /* (Take[#, 
      5] &), (GroupBy[#Race &]) /* (Merge[{#, <|"White" -> 0, 
        "Latino" -> 0, "Black" -> 0, "Native American" -> 0, 
        "Asian" -> 0, "Other" -> 0|>}, First] &) /* KeySort, Length][
 ResourceData["Executions in the United States"]]
Out[4]=

Get the data in transposed form:

In[5]:=
columnData = 
 Transpose[ResourceData["Executions in the United States"]]
Out[5]=

Put the data in a form suitable for machine learning: whether, for example, the method of execution affects the probability that a person will "volunteer":

In[6]:=
Short[columnData[#Method -> #Volunteer &], 5]
Out[6]=

Produce a map showing the locations of executions that have occurred since January 1, 2015:

In[7]:=
Query[Select[#Date > DateObject[{2015, 1, 1}] &] /* Counts /* 
   GeoRegionValuePlot, "FullCounty"][
 ResourceData["Executions in the United States"]]
Out[7]=

Show that the data will look like if the "CSV" is reimported (just the first five lines are shown here):

In[8]:=
Take[ImportString[
  ResourceData["Executions in the United States", "CSV"], "CSV"], 5]
Out[8]=

Seth J. Chandler, "Executions in the United States" from the Wolfram Data Repository (2018) 

License Information

Public domain

Data Resource History

Source Metadata

Data Downloads

Publisher Information