Introduction

Opioid analgesics are pain relievers derived from opium or have an opium-like activity. There are no better drugs than opioids for treating severe pain and suffering, however, opioids are the main drugs associated with overdose deaths (Ballantyne J.C., 2012). Opioid prescription rates have increased almost threefold in association with an increase of opioid related overdoses and deaths in the last 15 years. New York has been greatly impacted by the opioid epidemic. The rate of deaths related to any opioid in New York increased by 210% from 2010 to 2016 (Stopka et al., 2019). The opioid overdose death rate in the overall state was 18 deaths per 100,000 residents, which was higher than 18 states in the United States. This project aimed to investigate the distribution of opioid related-deaths rate, and predict the prevalence of opioid-related deaths across New York State using spatial epidemiological analysis.

Materials and methods

The opioid-related death dataset was downloaded from vital Statistics: Opioid-Related Deaths by County in the Health Data New York Website. The opioid-related deaths include heroin and opioid analgesics mortalities (New York State Department of Health, 2019). Socio-economic and census data were directly downloaded from the American Community Survey in the United States Census Bureau (United State Census Bureau, 2019). Two datasets were joined into a data frame for preparing and analyzing data. The trend of opioid deaths in each county was presented from 2003 -2017 by a line plot. The prevalence rates were calculated by the overall number of opioid overdose deaths divided by the estimated population. The prevalence rates were presented across New York State using an interactive map. Moreover, crude rates of opioid deaths were calculated by the number of opioid deaths in each county in 2017 divided by the population of each county in 2017. The death rates were presented by an interactive map. Lastly, a random forest method was used to predict the prevalence rates of opioid poisoning deaths in New York State.

Download Packages and Libraries for the Project

library(tidyverse)
library(tidycensus)
# install.packages("mapview")
library(mapview) 
library(tidyr)
# install.packages("plotly")
library(plotly)
# install.packages("plyr")
library(plyr)
library(DT)
library(kableExtra)
library(sf)
library(ranger)
library(ggplot2)

knitr::opts_chunk$set(cache=TRUE)  # cache the results for quick compiling

Download and clean all required data

2. Download socio-economic data year 2017 from American Community Survey

# Download socio-economic data year 2017 from ACS
NY <- get_acs(geography = "county", 
              variables = c(medincome = "B19013_001", 
                            urban ="B08016_002", 
                            rural = "B08016_003", 
                            divorce = "B06008_004",
                            male = "B01001_002",
                            female = "B01001_026",
                            white = "B02001_002",
                            african = "B02001_003",
                            amindian = "B02001_004",
                            asian = "B02001_005",
                            hawaii = "B02001_006",
                            other = "B02001_007",
                            livealone = "B09021_002",
                            pop = "B01003_001"), 
              state = "NY", geometry = TRUE, cache_table=T)
## Getting data from the 2013-2017 5-year ACS
## Downloading feature geometry from the Census website.  To cache shapefiles for use in future sessions, set `options(tigris_use_cache = TRUE)`.
NY_nomoe <- NY %>%
  select(-moe)

NY2017_wide <- spread(NY_nomoe, variable, estimate)
#View(NY2017_wide)

# remove "new york" in county names
ny_2017_clean <- NY2017_wide %>%
    separate(NAME, c("County"))
#head(ny_2017_clean)

## Change the names of counties
ny_2017_clean[45,"County"] <- "St Lawrence"
ny_2017_clean[31,"County"] <- "New York"

vital_2017 <- vital %>%
    filter(Year == 2017)
    
vital_ny_2017 <- ny_2017_clean %>%
    left_join(vital_2017, by = "County")
#View(vital_ny_2017)

## Change values in ny_area dataframe
ny_area$Areas[ny_area$Areas==1]  <- "Urban" 
ny_area$Areas[ny_area$Areas==2]  <- "Rural"
ny_area$Regions[ny_area$Regions==1]  <- "Central" 
ny_area$Regions[ny_area$Regions==2]  <- "East"
ny_area$Regions[ny_area$Regions==3]   <- "Long Island"
ny_area$Regions[ny_area$Regions==4]  <- "West"



options(tigris_use_cache = TRUE)

3. Download estimated decennial population in 2010 (United State Census Bureau, 2010)

## get estmate population 2010
ny_pop_estimate_2010 <- get_decennial(geography = "county", variables =  "P001001", 
                  state = "NY", geometry = ,
                  summary_var = "P001001", cache_table=T) 
## Getting data from the 2010 decennial Census
# View(ny_pop_estimate_2010)

ny_pop_estimate_2010 <- ny_pop_estimate_2010 %>%
    separate(NAME, c("County"))


#View(ny_pop_estimate_2010)


## Change the names of counties
ny_pop_estimate_2010[28,"County"] <- "St Lawrence"
ny_pop_estimate_2010[14,"County"] <- "New York"


#View(ny_pop_estimate_2010)

## join population 10 years estimation to main dataset
vital_ny_2017 <- vital_ny_2017 %>%
    left_join(ny_pop_estimate_2010, by = "County")
#View(vital_ny_2017)

8. Prediction of Opioid Deaths using a random forest method

predict_deaths <- vital_ny_overall %>%
  left_join(ny_area, by = "County") %>%
  select(prevalence, male, female, white, divorce, african, amindian, asian, hawaii, other, livealone, pop, total, crude2017, Regions, Areas) %>%
 st_set_geometry(NULL)


train.idx <- sample(nrow(predict_deaths), 2/3 * nrow(predict_deaths))
vital.train <- predict_deaths[train.idx, ]
vital.test <- predict_deaths[-train.idx, ]
rf_vital <- ranger(prevalence ~ ., data = vital.train, write.forest = TRUE)
print(rf_vital)
## Ranger result
## 
## Call:
##  ranger(prevalence ~ ., data = vital.train, write.forest = TRUE) 
## 
## Type:                             Regression 
## Number of trees:                  500 
## Sample size:                      41 
## Number of independent variables:  15 
## Mtry:                             3 
## Target node size:                 5 
## Variable importance mode:         none 
## Splitrule:                        variance 
## OOB prediction error (MSE):       1138.502 
## R squared (OOB):                  0.3992683
pred.vital <- predict(rf_vital, data = vital.test)

Results

The number of opioid-related deaths dramatically increased in every county from 2003 to 2017. The plot illustrated that Suffolk County had the highest opioid-related deaths in New York State with 425 deaths in 2017. Kings County was more likely to have an increase in the number of opioid deaths over the last 5 years. In addition, a linear trend shows that opioid deaths generally increased throughout New York State.

Conclusions

Opioid-related deaths tend to increase every year across New York State. The study found that opioid deaths increased in almost all counties. The highest death rates were identified in the Central and Eastern New York regions. Schuyler County and Hamilton County had the lowest death rates among all counties. Additionally, rural areas had a higher risk of opioid-related death compared to urban areas. Health professionals should focus on these regions to prevent and control the opioid crisis in these areas.

References

Ballantyne JC. Opioids and Other Analgesics. In: Verster JC, Brady K, Galanter M, Conrod P, eds. Drug Abuse and Addiction in Medical Illness: Causes, Consequences and Treatment. New York, NY: Springer New York, 2012:241-50.

Office of Quality and Patient Safety. (2019). Vital Statistics: Opioid-Related Deaths by County: Beginning 2003. Vital Statistics. Retrieved from https://health.data.ny.gov/Health/Vital-Statistics-Opioid-Related-Deaths-by-County-B/sn5m-dv52

Stopka, T. J., Amaravadi, H., Kaplan, A. R., Hoh, R., Bernson, D., Chui, K. K. H., . . . Rose, A. J. (2019). Opioid overdose deaths and potentially inappropriate opioid prescribing practices (PIP): A spatial epidemiological study. International Journal of Drug Policy, 68, 37-45. doi:https://doi.org/10.1016/j.drugpo.2019.03.024

United State Census Bureau. (2019). American Community Survey (ACS). Retrieved from https://www.census.gov/programs-surveys/acs

U.S. Census Bureau. (2010). Decennial Census Datasets. Retrieved from https://www.census.gov/programs-surveys/decennial-census/decade.2010.html