-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.Rmd
58 lines (43 loc) · 6.59 KB
/
index.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
title: "Death Caused By Drug Use"
author: "Bryan Lin, Alex Chau, Winnie Hou, Kathy Lam"
date: "5/24/2019"
output: html_document
---
```{r setup, include=FALSE}
accidental_drug_deaths <- read.csv("data/Accidental_Drug_Related_Deaths_2012-2018.csv", stringsAsFactors = FALSE)
source("scripts/summary-info.R")
source("scripts/aggregate-table.R")
source("scripts/accidental_drug_related_deaths_plot.R")
source("scripts/drug_use_by_age_data_plot.R")
source("scripts/Drug_Overdose_Death.R")
library("knitr")
```
## Introduction
This project's goal is to see if there is a correlation between drug use and deaths. The data that we are using were obtained from [Data World](https://data.world/fivethirtyeight/drug-use-by-age), [Data.gov](https://catalog.data.gov/dataset/accidental-drug-related-deaths-january-2012-sept-2015), and the [CDC](https://www.cdc.gov/nchs/nvss/vsrr/drug-overdose-data.htm). Some questions that we are trying to answer is *if drug use increases as age increases* or *if the number of deaths have increased over the years for the younger generation*. Drug use has increased over the years, so by answering some of these questions, we believe we can adjust the healthcare approach of **addressing** and **preventing** further deaths by drug use.
## Summary Information
One of the datasets that we are using comes from [Data.gov](https://catalog.data.gov/dataset/accidental-drug-related-deaths-january-2012-sept-2015) which gives data about accidental drug related deaths from 2012 to 2018. The dataset has a length of `r get_summary_info(accidental_drug_deaths)$length`. From this dataset, it shows that the average age of those who died of drug use is `r get_summary_info(accidental_drug_deaths)$average_age_of_drug_used_death` years old. If we look at the percent of males who died of drug use in comparison to the percent of females, it shows that the percent of males was `r get_summary_info(accidental_drug_deaths)$male_percentage`% versus the percent of females was `r get_summary_info(accidental_drug_deaths)$female_percentage`%. Interestingly, the race that has the highest amounts of deaths due to drug use is `r get_summary_info(accidental_drug_deaths)$most_race`. Lastly, based from the percentages and the dataset, the sex that has the most deaths due to drug use is `r get_summary_info(accidental_drug_deaths)$most_sex`.
## Monthly Breakdown of Deaths Due To Opioids
Here are the number of deaths that have occurred just in 2018 from Janurary to September due to the use of opiods:
```{r drug_od_table, echo = FALSE}
drug_od_table(drug_od_df)
```
The reason we included the table was to answer the question of *"What is the monthly breakdown of the type of drug use and the number of deaths?"*. We wanted to see in just 2018 alone, by month, the number of people who died from drug overdose. By having this table, it gives a clear layout in which we are able to analyze whether there is a correlation between the number of deaths and the month for opioid usage. Based on the table, surprisingly, from January to September, the number of deaths are quite close to each other. Yet, there is a minuscule difference where January has the highest amount of deaths while September has the lowest. This shows that a specific month could play a factor in the amount of people who tend to use opioids. If we think about this in terms of seasons, we might interpret as the season gets better, the number of deaths decrease. January-March is winter and the most gloomy time of the year which could result in higher number of deaths, while June-September is summer which could result in slightly lower deaths. Another factor could be holidays and how it could influence the number of deaths as well.
## Drug Use By Age
Here is a histogram that shows the use of drugs by age:
```{r drug_age_plot, echo = FALSE}
drug_age_plot(drug_age_data)
```
The reason why we included this chart was to see the relationship between age and drugs. We wanted to know if there was a correlation between the two and how this could be linked to deaths at a certain age due to drug overdose. By including a histogram, it allows us to easily analyze the different ages and the number of people of that age group uses drugs, as position is the most perceptive form to the human eye. From this table, it shows that the highest age group who use the most drugs are from ages 35-49. This is surprising as we would assume teenagers would be the highest, but from the table, it reveals that ages 22-25 are the second highest when it comes to drug use. Other surprising information that was revealed was that from ages 12-17, there are more number of users of drugs than from ages 18-21.
## 9 Deadliest Drugs From 2015 - 2018
Here is a pie chart that shows the 9 deadliest drugs:
```{r plot_drug_overdose, echo = FALSE, results = "hide"}
plot_drug_overdose(drug_overdose)
```
The reason why we included a pie chart was to show the nine deadliest drugs from 2015-2018. By using a pie chart, we are able to see the different drugs that are used which can cause the most harm and lead to death. By knowing which drugs are the most deadliest, it can help prevent people from using these drugs, educate people about the effects of these drugs, and help them put drug-addled health in perspective which can better deter them away from the influence of using them. From the chart, it reveals that the most deadliest drug is synthetic opioids. Yet, if we look at all the values, all the values are very close to each other. The deadliest drug with the lowest value is psychostimulants. From this chart, this not only tell us which is the deadliest drug, but because their values are so close, it shows that these drugs should be taken seriously and could be as deadly despite the difference in value.
## Place of Death from Drug Overdose in Connecticut
Here is a map that shows the different places where people died from drug overdose in Connecticut:
```{r plot_accident_drug, echo = FALSE}
plot_accident_drug(accident_drug)
```
The reason we included this map was to show a how a state, specifically Connecticut, connects race, sex and the cause of death from drug use. By having the map, we are able to see which counties have more concentrated points, which means more deaths. By clicking on the points, we are able to get information about each specific person. Additionally, by including the color of the different races, we are able to visualize which race had the most deaths just in the state of Connecticut. From this data, it reveals that the majority of the deaths in Connecticut are of white descent and are mostly men. Finally, when you click on a specific point, it reveals what was the cause of the death of that specific person.