Drug abuse and its related problems are among society’s most pervasive health and social concerns. Causes of drug-induced deaths include dependent and non-dependent use of drugs (both legal and illegal use) and also poisoning from medically prescribed drugs. Addicted persons frequently engage in self-destructive and criminal behavior, which can result in injury or death. In addition, recreational drug-use can lead to unintentional overdose and death.
## Objectives :
#Cautions: Two different coding classification systems were utilized:
Cause-of-death between 1999 to present were coded using the Tenth Revision of the International Classification of Diseases codes (ICD-10). Cause-of-death between 1989 and 1998 were coded using the Ninth Revision of the International Classification of Deseases Codes (ICD-9).
Total number and rate of opioid prescriptions dispensed, United States, 2006–2017
national_trend <- general %>%
group_by(YEAR) %>% na.omit %>%
summarise(Total = sum(VALUE))
kable(national_trend) %>%
kable_styling(bootstrap_options = c("striped", "hover"),full_width = F) %>%
row_spec(8,bold = T,color = "white",background = "maroon")
YEAR | Total |
---|---|
2010 | 32729 |
2011 | 35498 |
2012 | 35788 |
2013 | 38080 |
2014 | 41382 |
2015 | 46512 |
2016 | 58022 |
2017 | 64437 |
ggplot(data=national_trend,aes(x=YEAR,y=Total))+
geom_line(size=1)+
#geom_point(color="red",size=2)+
geom_col(stat = "identity",width = .75,fill= "blue",alpha=.5) +
labs(title = "Total Opioid Overdose Death, national ",
subtitle = "By year",
caption = "Data Source: CDC",
tag = "Figure 1",
x = "Year",
y = "Count")
## Warning: Ignoring unknown parameters: stat
#scale_y_continuous(labels = comma)
prescription <- read.csv("~/Datasets/Opioid_CA/presciption_byyear.csv")
kable(prescription) %>%
kable_styling(bootstrap_options = c("striped", "hover"),full_width = F) %>%
row_spec(c(5,6,7),bold = T,color = "white",background = "blue")
Year | Total.Number.of.Prescriptions | Prescribing.Rate.Per.100.Persons |
---|---|---|
2006 | 215917663 | 72.4 |
2007 | 228543773 | 75.9 |
2008 | 237860213 | 78.2 |
2009 | 243738090 | 79.5 |
2010 | 251088904 | 81.2 |
2011 | 252167963 | 80.9 |
2012 | 255207954 | 81.3 |
2013 | 247090443 | 78.1 |
2014 | 240993021 | 75.6 |
2015 | 226819924 | 70.6 |
2016 | 214881622 | 66.5 |
2017 | 191218272 | 58.7 |
ggplot(data=prescription,aes(x=as.factor(Year),y=Total.Number.of.Prescriptions))+
geom_bar(stat = "identity",fill="maroon",alpha=0.7)+
labs(title = "Number of Opioid prescription, national ",
subtitle = "By year",
caption = "Data Source: CDC",
tag = "Figure 2",
x = "Year",
y = "Count")+
scale_y_continuous(labels = comma)+
geom_hline( yintercept = max(prescription$Total.Number.of.Prescriptions), color="blue",size=1)
After a steady increase in the overall national opioid prescribing rate starting in 2006, the total number of prescriptions dispensed peaked in 2012 at more than 255 million and a prescribing rate of 81.3 prescriptions per 100 persons.
The overall national opioid prescribing rate declined from 2012 to 2017, and in 2017, the prescribing rate had fallen to the lowest it had been in more than 10 years at 58.7 prescriptions per 100 persons (total of more than 191 million total opioid prescriptions).
However, in 2017, prescribing rates continue to remain very high in certain areas across the country. In 16% of U.S. counties, enough opioid prescriptions were dispensed for every person to have one. While the overall opioid prescribing rate in 2017 was 58.7 prescriptions per 100 people, some counties had rates that were seven times higher than that.
#TOTAL COST ESTIMATES BY CATEGORY, 2015–2019 (BILLIONS)
colnames(costs) <- c("Cost_estimates","2015","2016","2017","2018","Total_2015_2018","2019Est","Grand_total")
costs$`2019` <- tstrsplit(costs$`2019Est`, " ")[[1]]
#rownames(costs) <- costs$Cost_estimates
costs <- select(costs, c(1:5,9,8))
costs_year <- t(costs)
costs_year <- as.data.frame(costs_year)
colnames(costs_year) <- c("Healthcare","Mortality","Criminal","Family_support","Education",
"Lost_Productivity")
costs_year <- costs_year[-1,]
costs_year$Healthcare <- as.numeric(gsub("\\$","",costs_year$Healthcare))
costs_year$Mortality <- as.numeric(gsub("\\$","",costs_year$Mortality))
costs_year$Criminal <- as.numeric(gsub("\\$","",costs_year$Criminal))
costs_year$Family_support <- as.numeric(gsub("\\$","",costs_year$Family_support))
costs_year$Education <- as.numeric(gsub("\\$","",costs_year$Education))
costs_year$Lost_Productivity <- as.numeric(gsub("\\$","",costs_year$Lost_Productivity))
costs_year$Total <- rowSums(costs_year[,1:6])
kable(costs_year) %>%
kable_styling(bootstrap_options = c("striped", "hover"),full_width = F) %>%
column_spec(8,bold = T,color = "white",background = "blue") %>%
row_spec(5,bold = T,color = "black",background = "#CC6600")
Healthcare | Mortality | Criminal | Family_support | Education | Lost_Productivity | Total | |
---|---|---|---|---|---|---|---|
2015 | 36.7 | 47.3 | 8.9 | 9.3 | 1.4 | 20.7 | 124.3 |
2016 | 51.7 | 62.2 | 9.2 | 8.5 | 1.3 | 23.5 | 156.4 |
2017 | 55.8 | 71.2 | 9.8 | 7.8 | 1.2 | 25.0 | 170.8 |
2018 | 60.4 | 72.6 | 10.9 | 7.8 | 1.2 | 26.5 | 179.4 |
2019 | 65.1 | 74.1 | 12.2 | 7.8 | 1.3 | 28.0 | 188.5 |
Grand_total | 269.7 | 327.4 | 50.9 | 41.1 | 6.5 | 123.7 | 819.3 |
costs_year <- costs_year[1:5,]
ggplot(data = costs_year,aes(x=rownames(costs_year), y=Total,fill=rownames(costs_year)))+
geom_bar(stat = "identity")+
labs(title = "Total Cost by Year", x="Year")
STATE | Count |
---|---|
California | 4011 |
Florida | 2978 |
Texas | 2043 |
Pennsylvania | 1801 |
Ohio | 1576 |
New York | 1388 |
Michigan | 1192 |
Illinois | 1135 |
Arizona | 1073 |
North Carolina | 863 |
library(choroplethr)
data("df_pop_state")
state_year <- general %>%
group_by(YEAR,STATE) %>%
na.omit(VALUE) %>%
summarise(Count=sum(VALUE))
#----------2017
state_2017 <- state_year %>%
filter(YEAR==2017)
df_state <- state_2017[,2:3]
df_state$STATE <- tolower(df_state$STATE)
colnames(df_state) <- c("region","value")
df_state$value[is.na(df_state$value)] <- 0
state_choropleth(df_state,
title = "Opioid Overdose Death _ 2017 ",
legend = "Year Count")
#---------------------
top_ten <- top_n(state_2017, n=10,Count)
top_ten <- top_ten[,2:3]
top_ten <- arrange(top_ten,-Count)
kable(top_ten) %>%
kable_styling(bootstrap_options = c("striped", "hover"),full_width = F) %>%
row_spec(1:4,bold = T,color = "white",background = "maroon")
STATE | Count |
---|---|
Pennsylvania | 5326 |
Florida | 5002 |
Ohio | 4984 |
California | 4805 |
New York | 3814 |
New Jersey | 2685 |
Texas | 2604 |
Illinois | 2550 |
Michigan | 2438 |
Maryland | 2237 |
ggplot(data=top_ten,aes(x=reorder(STATE,-Count),y=Count,fill=as.factor(STATE)))+
geom_bar(stat = "identity",alpha=0.8)+
labs(title = "2017 Opioid Overdose Death Count ",
subtitle = "Top ten states",
caption = "Data Source: CDC",
x = "State",
y = "Count")+
theme(axis.text.x = element_text(angle = 45, hjust = 1))
County | Rate per 100K |
---|---|
Trinity | 33.53 |
Lake | 23.01 |
Plumas | 18.11 |
Calaveras | 17.41 |
Amador | 15.69 |
San Francisco | 14.96 |
Mendocino | 14.64 |
Lassen | 14.53 |
Inyo | 14.45 |
Ventura | 10.66 |
Humboldt | 10.52 |
Nevada | 10.50 |
Kern | 10.32 |
Imperial | 10.23 |
Sutter | 10.05 |
Sonoma | 8.72 |
Santa Cruz | 8.22 |
Merced | 7.76 |
Orange | 7.37 |
San Diego | 7.32 |
YEAR | VALUE |
---|---|
2010 | 367 |
2011 | 415 |
2012 | 424 |
2013 | 428 |
2014 | 419 |
2015 | 419 |
2016 | 434 |
2017 | 483 |
For the first time, a database maintained by the Drug Enforcement Administration that tracks the path of every single pain pill sold in the United States — by manufacturers and distributors to pharmacies in every town and city — has been made public.
The Washington Post sifted through nearly 380 million transactions from 2006 through 2012 that are detailed in the DEA’s database and analyzed shipments of oxycodone and hydrocodone pills, which account for three-quarters of the total opioid pill shipments to pharmacies. The Post is making this data available at the county and state levels in order to help the public understand the impact of years of prescription pill shipments on their communities.
sdpharmacy <- read.delim("C:/Users/Joe/Downloads/arcos-ca-san-diego-06073-pharmacy.tsv")
sdmanufacturer <- read.delim("C:/Users/Joe/Downloads/arcos-ca-san-diego-06073-labeler.tsv")
sddistributor <- read.delim("C:/Users/Joe/Downloads/arcos-ca-san-diego-06073-distributor.tsv")
#----------
top_pharmany <- top_n(sdpharmacy,20,total_dosage_unit)
top_pharmany <- select(top_pharmany,c(4:6))
kable(top_pharmany) %>%
kable_styling(bootstrap_options = c("striped", "hover"),full_width = F) %>%
row_spec(1:6,bold = T,color = "black",background = "lightgreen") %>%
row_spec(7:13,bold = T,color = "black",background = "lightblue")
buyer_name | buyer_city | total_dosage_unit |
---|---|---|
OPTUMRX | CARLSBAD | 65887670 |
KAISER PERMANENTE PHRMCY 217 | SAN DIEGO | 8884400 |
RX SOLUTIONS, INC | CARLSBAD | 8165420 |
OMNICARE OF SAN DIEGO | SAN DIEGO | 6523160 |
KAISER PERMANENTE PHRMCY 230 | LA MESA | 5590820 |
WALGREEN CO. | EL CAJON | 5021730 |
KAISER FOUNDATION HEALTH | EL CAJON | 4937380 |
KAISER FOUND HEALTH PLAN INC | SAN MARCOS | 4663510 |
KAISER FOUND HLTH PLAN | SAN DIEGO | 4652610 |
GARFIELD BEACH CVS, L.L.C. | SANTEE | 4642589 |
MEDICAL CENTER PHARMACY | SAN DIEGO | 4338210 |
GARFIELD BEACH CVS, L.L.C. | ESCONDIDO | 4235700 |
GARFIELD BEACH CVS, L.L.C. | EL CAJON | 4042400 |
GARFIELD BEACH CVS, L.L.C. | CARLSBAD | 3848300 |
KAISER FDN HEALTH PLAN INC | SAN DIEGO | 3701590 |
GARFIELD BEACH CVS, L.L.C. | EL CAJON | 3519500 |
RON’S PHARMACY SERVICES | SAN DIEGO | 3516400 |
KAISER FDN HEALTH PLAN INC | BONITA | 3508500 |
GARFIELD BEACH CVS, L.L.C. | OCEANSIDE | 3100720 |
KAISER PERMANENTE PHRMCY 245 | LA MESA | 3094520 |
Data source : Washington Post.
a database maintained by the Drug Enforcement Administration that tracks the path of every single pain pill sold in the United States — by manufacturers and distributors to pharmacies in every town and city — has been made public.
The Washington Post sifted through nearly 380 million transactions from 2006 through 2012 that are detailed in the DEA’s database and analyzed shipments of oxycodone and hydrocodone pills, which account for three-quarters of the total opioid pill shipments to pharmacies. The Post is making this data available at the county and state levels in order to help the public understand the impact of years of prescription pill shipments on their communities.
library(hpackedbubble)
##
## Attaching package: 'hpackedbubble'
## The following object is masked from 'package:datasets':
##
## CO2
b1 <- filter(sdpharmacy, `total_dosage_unit` >=2500000 ) %>% select(c(4:7))
colnames(b1) <- c("Buyer","City","Dosage","Records")
hpackedbubble(b1$City,b1$Buyer, b1$Dosage,
title = "Prescription_ Over 2.5 millions _ Top Cities ",
pointFormat = "<b>{point.name}:City </b> {point.y} Prescriptions",
dataLabelsFilter = 100,
packedbubbleMinSize = "50%",
packedbubbleMaxSize = "100%",
packedbubbleZMin = 0,
packedbubbleZmax = 1000, split = 1,
gravitational = 0.02,
parentNodeLimit = 1,
dragBetweenSeries = 0,
seriesInteraction = 0,
theme = "sandsignika",
titleColor = "black",
width = "100%")
pinevalley <- sdpharmacy %>% filter(buyer_city=="PINE VALLEY") %>% select(buyer_name,total_dosage_unit)
kable(pinevalley,format = "html",caption = "City of Pine Valley with population of 2,000",
col.names = c("Pharmacy", "Count of Prescription ")) %>%
kable_styling(bootstrap_options = c("striped", "hover"),full_width = F) %>%
row_spec(1,bold = T,color = "black",background = "lightblue")
Pharmacy | Count of Prescription |
---|---|
GRIZZLE, REX E DDS | 12140 |
STARKEY, ALMEDA LOUISE DVM | 100 |
alpine <- sdpharmacy %>% filter(buyer_city=="ALPINE") %>% select(buyer_name,total_dosage_unit)
kable(alpine,format = "html",caption = "City of Alpine with population of 9,000",
col.names = c("Pharmacy", "Count of Prescription ")) %>%
kable_styling(bootstrap_options = c("striped", "hover"),full_width = F) %>%
row_spec(1:3,bold = T,color = "black",background = "lightgreen")
Pharmacy | Count of Prescription |
---|---|
THRIFTY PAYLESS INC. | 2551830 |
LONGS DRUG STORES CALIFORNIA, L.L.C. | 787800 |
NEW ALBERTSON’S, INC, | 548000 |
LONGS DRUG STORE #757 | 9300 |
CLARK, GEORGE WESLEY MD | 1400 |
HACKETT, JOHN D. DVM INC | 600 |
CLARK, GEORGE WESLEY, MD | 300 |
YANKOPOULOS, ALEXANDER R DVM | 300 |
GULLICK, NICOLE | 200 |
OROZCO, RODOLFO A DDS | 100 |
DIEP, BRIAN MD | 10 |