Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

How we put together the opioid epidemic data analysis

Trend CT spent several weeks pulling, requesting, cleaning and analyzing different data sets to better understand Connecticut's intractable drug-overdose problem. We generated hundreds, if not thousands, of exploratory charts and maps before attempting to publish the first story in our series.

Overdose data

We had to rely on overdose data from the following sources:

  • Published raw data from the Office of the Chief Medical Examiner
  • Data cleaned by the Connecticut Data Collaborative [individual] [by type]
  • Underlying raw map data specific to overdoses in 2014 from the state that contained specific address and latitude and longitude details
  • Accidental deaths from 1999 to 2013 by age group, gender, and race


The reproducible scripts detailing our methodology can be found on the Trend CT github repo.

One script marked the overdose deaths over time by town. Another created different combinations of small multiple charts for race, gender, and towns based on individual drugs. For the second half of the series, we used our own method of cleaning up the data to categorize deaths by prescription opioids, heroin, and fentanyl in a way that was more consistent than what was noted in the raw data.

Those who are interested in the analysis process can see the dozens of scripts in the repo to see how it was done and exploratory angles that never made it into the final series but might be revisited in the future. Please let us know if there are any suggestions to improve our analysis.

We'd like to extend our thanks to the many researchers and health officials who gave us ideas on how to approach our analysis.

RMarkdown files

Here's a list of some scripts that were turned into RMarkdown for web publishing/sharing during the analysis. Some files are really large so please don't open on a phone.

  • Town death timelines [28.4 mb]
  • Initial drug overdose deaths analysis [6.1 mb]
  • Individual drugs by town [56.8 mb]
  • Individual drugs by demographic [8.7 mb]
  • Geospatial analysis [15.4 mb]
  • Drug type by town [34 mb]
  • Drug type by demographic [5.5 mb]

Trend CT story links

  • Why Connecticut's drug overdose crisis isn't slowing down [link]
  • Who is dying in Connecticut’s opioid overdose crisis? [link]
  • Where drug abusers overdose in Connecticut [link]
  • What can be done to curb the drug overdose deaths [link]
  • How we put together the opioid epidemic data analysis[link]


Scripts detailing the data analysis behind the Trend CT series on opioid overdose deaths






No releases published


No packages published