Skip to content

This project analyzes opioid overdose data from the United States for all states for the year range including 2013 and 2022.

Notifications You must be signed in to change notification settings

madinalikes/Opioid_Drug_Overdose

 
 

Repository files navigation


Project 3: Opioid Drug Overdose Deaths

Project Description

This project analyzes opioid overdose data from the United States for all states for the year range including 2013 and 2022. The data used was obtained from multiple websites listed below:
"U.S. State Overdose Deaths 2014-2019" data was scraped from the CDC webpage: "U.S. State Opioid Dispensing Rate 2013-2019" data was scraped from the CDC webpage: "Provisional Drug Overdose Death Counts 2015-2022" data was downloaded in CSV format from the CDC webpage:


Website


  • Created header and footer.
  • Created boxed layout.
  • Added maps and charts via iframe embeds.
  • Added JS script and CSS to add light and dark mode toggle.


OnRender Website using SQLite Database ~ (Cody)
https://project-3-h7kg.onrender.com/

image

  • Provisional overdose death data sourced from CDC web page
  • Dataset was loaded in SQLite database. Using the app.py file in root folder, the proper data is pulled for the line graph showing the monthly overdose counts for up to 12 months for the state selected by the dropdown like the bar charts.
  • Render is used to host the site and SQLite database.


Interactive Visualizations


  • Interactivity: Hover over state to reveal deathes by year, total of all years and state abbreviation.
  • Color gradient shows the highest (dark) to lowest (light) death rates among states.

Extract

Transform

Load

  • OpioidsDeathAll-cleaned-3 imported via pandas into plotly-map.py
  • plotly-map.py coded with df to include specific data from OpioidsDeathAll-cleaned-3
  • Used plotly-map.py to read data, create dataframe, build map and output plotly-map.html file.


* Includes JavaScript library previously unintroduced during class
  • Interactivity: Hover over state to see total deaths for the five year range of the dataset.
  • Color gradient shows the highest (dark) to lowest (light) death rates among states.

Extract

  • Data copied from previous map into data.json file for AnyChart Choropleth Map

Transform

  • Data was already clean from previous map.

    Load

  • Javascript pulled from CDN into anychart.html
  • Data read from data.json

    Charts & Graph

    * Linegraph includes JavaScript library previously unintroduced during class

    • Interactivity: Data for each individual state can be viewed by selecting the state from the drop down list on the left.

    Extract

    Transform

    Load



    Presentation

  • About

    This project analyzes opioid overdose data from the United States for all states for the year range including 2013 and 2022.

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published

    Languages

    • HTML 85.3%
    • CSS 10.4%
    • Jupyter Notebook 3.8%
    • Other 0.5%