Not-so-famous Last Words of Executed Offenders in Texas

Posted on Jul 24, 2015

In 1972 the Supreme Court of the United States suspended capital punishment on the grounds that the practice was being imposed unconstitutionally—violating the Bill of Rights’ eighth amendment which prohibits the federal government from (among other things) imposing “cruel and unusual punishment.” This clause and most provisions of the Bill of Rights have been incorporated and apply to states as well. In 1976, the Supreme Court reauthorized capital punishment but only for the crimes of murder and child rape (the latter later banned in 2008). The Texas Department of Criminal Justice has since published the last statements of executed offenders: I decided to scrape this table and analyze the statements.

import requests
from bs4 import BeautifulSoup
deathrow = requests.get('').text
stat = BeautifulSoup(deathrow)

#To obtain contents of each cell in the table:

for i in tab.findAll('tr'):
    td = i.findAll('td')
    for s, p in enumerate(td):
        if s==0:
        if s==1:
            for l in p.findAll('a'):
        if s==2:
            for l in p.findAll('a'):
        if s==3:
        if s==4:
        if s==5:
        if s==6:
        if s==7:
        if s==8:
        if s==9:

#To obtain statements from each link in the table:

root_url = ""

states = []

for link in LinkLS:
    obtain = requests.get(root_url+link)
    stat2 = BeautifulSoup(obtain.text)
    ps = stat2.find_all('p')
    temp = ""
    for i in range(6, len(ps)):
        temp = temp + ps[i].get_text()

Since the reauthorization of capital punishment, 527 individuals have been executed in Texas, accounting for almost 40% of executions in the United States ( The analysis revealed:

  • 108 of 527 offenders declined to make a statement (about 20.5%).
  • Most last statements included messages of love and mention of family and friends. The longest statement, which also mentioned innocence, was made by Gary Lee Graham (aka Shaka Sankofa) and was incidentally a very high profile case (google either name).


  • The average age of those executed was 39—a finding that surprised me as I expected the age to be older. Those executed young were often convicted of crimes they had committed when they were under the age of 18. In 2005, the Supreme Court abolished executions for individuals under the age of 18 at the time of the crime.
  • ageplotGrouped by race, a disproportionate number are minorities. African Americans only make up 12.4% of the population of Texas (







About Author

Leave a Comment

Toe Pain January 6, 2016
Hammertoes have long plagued the human foot, causing pain and discomfort in shoes. The mother will nurse them for 3-4 months until they are able to swim on their own. Sometimes, more than one viral culture test may be requested by the physician to diagnose herpes infection as the lesion may have very little active virus and the test may produce a 'false negative.
Toe Pain January 5, 2016
While some may experience gout pain by intermittent flashes of attack, some sufferers on the other hand experience the discomfort of gout during cold temperature or from immobility. If the injury is not severe, the recovery should be fast. The i - Pad 2S aka i - Pad HD aka i - Pad 3 is now known as just the i - Pad.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 airbnb Alex Baransky alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus API Application artist aws beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep Bundles California Cancer Research capstone Career Career Day citibike clustering Coding Course Demo Course Report D3.js data Data Analyst data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization Deep Learning Demo Day Discount dplyr employer networking feature engineering Finance Financial Data Science Flask gbm Get Hired ggplot2 googleVis Hadoop higgs boson Hiring hiring partner events Hiring Partners Industry Experts Instructor Blog Instructor Interview Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter lasso regression Lead Data Scienctist Lead Data Scientist leaflet linear regression Logistic Regression machine learning Maps matplotlib Medical Research Meet the team meetup Networking neural network Neural networks New Courses nlp NYC NYC Data Science nyc data science academy NYC Open Data NYCDSA NYCDSA Alumni Online Online Bootcamp Open Data painter pandas Part-time Portfolio Development prediction Prework Programming PwC python python machine learning python scrapy python web scraping python webscraping Python Workshop R R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn Selenium sentiment analysis Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau team TensorFlow Testimonial tf-idf Top Data Science Bootcamp twitter visualization web scraping Weekend Course What to expect word cloud word2vec XGBoost yelp