News and Articles

Opioids and the Art of Data Analysis

Bill had a swagger. He always entered a room like John Wayne, or perhaps more like Nathan Lane’s portrayal of it in Bird Cage. We worked together for years 15 years ago in North Carolina. Recently he was in Minneapolis for a conference and we got together for happy hour. He still had that swagger; we spoke of everything from Trump to the Hollywood sex scandal. Somehow, we flitted across the subject of the opioid crisis and he turned a more somber hue. For the next 10 minutes, he stared into his beer as he told me the story of his wife. She had been rear ended at a stoplight about five years back and needed back surgery. She took painkillers for a long while after that; when those prescriptions ran out she managed to find more. She swapped doctors, went to the dark web, bought them illicitly. The saving grace, he told me, was that the kids were out of the house. It was tearing them apart. He was trying to be supportive and not isolating her in her addiction…it wasn’t working. He feared the worst. He feared an overdose.

Two things went through my head during his story. First, I’m like the main character in Knut Hansen’s novel Growth of the Soil. You know, the man who loved his wife so much he almost told her. I thought to myself, “Oh-oh, I think we’re doing feelings.” Secondly, as a data scientist I started to wonder where I could get data to look more closely into this. I had read somewhere that physical touch helped in these situations so I reached over, patted him on the shoulder exactly twice and said, “Don’t worry, things will work out.” He looked up at me, chuckled and said, “Oh Greg, you’ve not changed a bit.” I’m not sure if that was a compliment or not, but it didn’t matter, I was already thinking about FDA, CDC and CMS data. After we parted I turned to watch Bill walked away, he still had that cool swagger except now, it was a little less like Nathan Lane.

As I started to research this subject it became immediately apparent that there was enough already written about “Deaths from Opioids”. Stats such as this are common:

“Drug overdose is the leading cause of accidental death in the US, with 52,404 lethal drug overdoses in 2015. Opioid addiction is driving this epidemic, with 20,101 overdose deaths related to prescription pain relievers, and 12,990 overdose deaths related to heroin in 2015.”1

We at Blue Diesel wanted to take a look at this from a unique perspective. While we do not have access to prescription data directly, we do have access to Medicaid data and that is a representation of prescriptions.

Other articles may base their information on DEA shipping records or actual pharmacy reporting such as IMS. Our research is based on Medicaid data which, is just as valuable if you consider we care more about trends and correlations than the actual pill count.

Here are some of the angles I decided to take.

  1. Number of drug manufacturers in the opioid market from 2010 to 2016.
  2. Opioid Agonists. Drugs that activate receptors and are used to treat pain.
  3. Opioid Antagonists. Drugs that deactivate receptors and are used to treat addiction.
  4. Opioid Agonists/Antagonists. Drugs that are marked as both by the FDA.
  5. Number of prescriptions and Medicaid reimbursements for opioids by Substance.
  6. Number of prescriptions and Medicaid reimbursement dollars over time broken down by each category of opioid.

The FDA has six categories for ‘Established Pharmacologic Classes’ related to opioids.

  1. Mu-opioid receptor agonist
  2. Opioid agonist
  3. Opioid agonist/antagonist
  4. Opioid antagonist
  5. Partial opioid agonist
  6. Partial opioid agonist/antagonist

We grouped them in categories of ‘Agonist’ and ‘Antagonist’ and ‘Agonist/Antagonist’ based on their description. If a substance was listed as both an agonist and antagonist we merged that into ‘Agonist/Antagonist.’ The simplest breakdown was a count of firms with reported Medicaid reimbursements.

Count of firms by year

Top 10

Top 10

2010 to 2016 % Increase in Number of Firms
Agonist 113.63%
Antagonist 400%
Agonist/Antagonist 20%

There were 78 substances in the FDA data that were associated with opioid agonists and 16 associated with opioid antagonists. However, upon review some of these were variations of one another. For instance, Codeine and Codeine Sulfate were both listed. For our purposes, we are interested in the active ingredient and not the detail such as Sulfate, Bitartrate or Tartrate so these words were removed. We also needed to remove non-opioid drugs from the substance. For instance, Acetaminophen is often paired with an opioid so we removed these. This reduced our unique count to 30. If there were two opioids in a drug, we concatenated them with an ‘&’.

Some of these substances do not seem at first glance to be opioids, but we did not judge the FDA data. For instance, we were about to throw out Loperamide (the active ingredient in Imodium) until we read this article. After that, we adhered to the FDA categorizations.

Here are those final categories:

Agonist Antagonist Agonist/Antagonist

Now that the data is organized in a somewhat coherent manner we can investigate further. We can see when comparing Medicaid prescriptions with Medicaid reimbursements that the % difference between 2016 and 2010 was greater than a 100%. There is an obvious correlation between the two however, the reimbursements being so much greater would indicate price increases.

Medicaid Prescriptions
Medicaid Reimbursements

Because we have broken out the substances, we can also isolate which drugs are increasing the most in this market. The greatest increase is a shocking 13,153.53% increase between 2010 and 2016 of Buprenorphine & Naloxone. But to be fair, we may not be seeing a full reported year for 2010. It would be more prudent to take the difference between 2016 and 2011, which is still a 672.48% increase. It should be no surprise that as the sale of opioids and addictions rise, the sale of the drugs that deal with addiction to opioids, rise as quickly. We see here that they are rising significantly faster.

Most of the opioid agonists seem to have a stagnant or even declining number of prescriptions. However, three stood out quickly as having a strong increase in prescriptions.

Opioid Agonist % Increase
Oxymorphone 651.85%
Hydrocodone 165.77%
Remifentanil 569.80%

Hydrocodone my not have the startling % increase however, look at the prescription counts. That kind of increase with those base numbers is worth noting. Another observation worth noting is the nearly %70 increase in the number of Medicaid prescriptions for Hydrocodone between 2013 and 2014. I thought perhaps this was when the generic became available, but that happened in 1983. On top of that, the DEA changed the classification of Hydrocodone from a Schedule III to a Schedule II drug in 2014, making it harder to obtain. We would love to hear opinions as to what could have caused such a jump. And that change is not just for Hydrocodone. The overall opioid agonist market jumped from 2013 to 2014 by 39.49% (inclusive of Hydrocodone, 24.66% when you take Hydrocodone out). Remember these are numbers represented by Medicaid Reimbursements.


We want this to be an organic discussion about drug pricing and transparency in the overall drug market as well as the opioid market. Recently, Governor Brown of CA signed a bill to make drug pricing more transparent. However, that bill didn’t go far enough to get data into the hands of data scientists. It is not only for the health and benefit of consumers, it also benefits the manufacturers and wholesalers. Last December Bernie Sanders called for an investigation of the big three wholesale distributors because of the flood of opioids to West Virginia. The numbers are quite shocking and the conclusion drawn is that everyone turned a blind eye to people dying while fattening their wallets. This may be true, but a less cynical data approach would be to ask if they had a suspicious order monitoring system in place. Were the big three simply buried under so much data they didn’t notice? Did they, or do they now have a data driven approach to solving this problem?

I’m glad Bill felt comfortable enough to talk with me. Addiction, affects not just the addict, but everyone around them. Silence, isolation and shaming make the matter worse. Here is a fascinating Ted Talk by Johann Hari that redefines how we should look at addiction. He also has a clever infographic.

We’ve decided to create a dashboard for free public use so people can dive into this data on their own. Please comment on your findings and give us feedback if there is something you’d like added to this or if you have questions.

Thanks for reading!


Agonist/Antagonist Dashboard

Dashboard Powered By

1Rudd RA, Seth P, David F, Scholl L. Increases in Drug and Opioid-Involved Overdose Deaths — United States, 2010–2015. MMWR Morb Mortal Wkly Rep 2016;65:1445–1452. DOI:

One thought on “Opioids and the Art of Data Analysis

  1. Comment from Facebook that adds to this discussion:
    Noting the opioid epidemic in this town, I found this article fascinating. The author makes a good point. Why the drastic jump in prescriptions 2013-2014. Here you have it: 15 million able-bodied adults were added to Medicaid through Obamacare, and the drug problem only grew worse. The number of opioid abusers in America has quadrupled since 1999.

Leave a Reply

Your email address will not be published. Required fields are marked *