Data Exploration on Mortality by Drug and Alcohol Use

Posted on Oct 15, 2017
The skills the author demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.
View Gwen's Mortality Visualization App


Over the past 30 days alone, data shows the New York Times has authored and posted about 30 articles related to the “opioid epidemic” that has swept across the US, taking lives indiscriminately. According to both the Center for Disease Control and the National Institute on Drug Abuse, more than 90 Americans die each day as a result of opioid induced overdoses. Similarly, between 2006 and 2010, excessive alcohol consumption was the primary cause for about 1 in 10 deaths among Americans aged 20-64 years.[1]

Even more striking than the numbers themselves are the accounts that have been widely disseminated in recent years, detailing the profound impact that substance abuse has had on individuals, families, and communities alike. One such account published by the New York Times describes the impact that widespread drug abuse has had on communities throughout the Bronx, one of New York City's five boroughs. The article can be found here. For more information on drug and alcohol abuse as a public health issue, please see the links below.

Substance abuse, particularly opioid abuse, is indisputably one of the largest public health issues in America right now. As a pre-med student turned public health enthusiast, I find the complexity of this issue quite compelling. Pulling from CDC data on drug and alcohol related mortality in the US, I created a shiny app that allows users to explore some of the key trends spanning across the years 1999 and 2015.

Research Questions

  • Which US states have the highest concentration of drug and/or alcohol related deaths? Has this changed over time?
  • In terms of basic demographics, which populations have been most affected by this phenomenon over the given time period? Does a given population suffer more drug versus alcohol related deaths than another?

The Data

              Using the CDC’s WONDER database query system, I pulled four datasets ranging in size from about 10,000 to 30,000 observations. These datasets provide information on the number of drug and alcohol related deaths that have occurred between 1999 and 2015 grouped according to the state and years in which they occurred, as well as the racial/ethnic group, sex and age group to which the deceased belonged.

App's Data

OverviewData Exploration on Mortality by Drug and Alcohol Use

The CDC obtains drug and alcohol related mortality data from death certificates in which the immediate cause of death can be linked directly to drug and/or alcohol use. Excluded from the data are deaths occurring due to medical conditions which may have been induced by drug use as well as deaths occurring within undocumented populations.

At the CDC’s suggestion, death counts of fewer than 9 were removed from the datasets used in creating this app. Mortality rates visualized throughout the app were calculated per 1,000 persons per year and were converted to percentages where appropriate.

The two charts within the application’s first tab visualize the total number of drug and alcohol related deaths that have occurred between 1999 and 2015 as well as the annual mortality rate for each year between the start and end points. Over half a million drug-induced deaths alone have been recorded over the 16-year period, with the rate of death for both causes increasing steadily each year.

Mapping Death Rates Across the USData Exploration on Mortality by Drug and Alcohol Use

This tab contains an interactive map displaying the percentages of drug and/or alcohol related deaths in each US state. The map visualization can be manipulated using the radio buttons and slider bar directly above to assess geographical differences over the given period in terms of the most prevalent cause of death and the states that are most affected. The map has an animation feature that allows users to easily observe the way the map changes over time from any desired start point. This feature can be utilized by clicking on the play button beneath the slider bar and is also made available within the two following tabs.

Racial Breakdown & Breakdown by Gender

Data Exploration on Mortality by Drug and Alcohol Use

The third and fourth tabs of my application provide a visual breakdown of rates and percentages of death by race/ethnicity, age group and gender. The three charts within the “Racial Breakdown” tab represent the annual mortality rate by drug and alcohol use, the percentage of deaths by drug versus alcohol use and the percentage of deaths within ten-year age groups and according to the cause of death. Each of these plots respond to the radio buttons specifying race/ethnicity whereas the year slider only affects the two charts on the bottom of the page. The charts within the “Breakdown by Gender” tab are set up identically, yet provide another angle for analysis at a more aggregated level.


[1]Fact Sheets - Alcohol Use and Your Health. (2016, July 25). Retrieved October 15, 2017, from

About Author

Related Articles

Leave a Comment

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans 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 boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis 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 seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI