knitr::opts_chunk$set(echo = FALSE)
library(conflicted) suppressMessages(conflict_prefer("filter", "dplyr")) library(dplyr) #suppressPackageStartupMessages(library(tidyverse))
This is a summary of the the drugs on the DEA website.
load("../../data/dea_factsheets.rda") class <- unique(dea_factsheets$class) # class category <- dea_factsheets %>% arrange(category) %>% # filter(category == "steroids") %>% select(category) load("../../data/dea_brands.rda") category2 <- unique(dea_brands$category) brands <- dea_brands %>% arrange(category) %>% #filter(type == "oxycodone") %>% pull(brands) load("../../data/dea_controlled.rda") load("../../data/dea_street_names.rda") #unique(slang$brand) #unique(slang$Category) duplicates <- dea_street_names %>% group_by(slang) %>% filter(n() > 1) %>% arrange(slang) # unique(duplicates)
Two files, dea_factsheets.rda and dea_brands.rda, were created by scraping the "fact sheets" on the DEA website on September 10th 2020.
r nrow(dea_factsheets)
records) has r length(class)
drug classes and r nrow(category)
categories (e.g., r category$category[1]
, r category$category[2]
, etc.)sort(class) %>% knitr::kable(col.names = "Class")
r nrow(dea_brands)
records) has r length(category2)
drug categories (e.g., r category2[1:3]
, etc.) and r length(brands)
brands (e.g., r brands[1]
, r brands[2]
, etc.)Two pdfs, with slang^[https://www.dea.gov/sites/default/files/resource-center/Publications/Intel%20Products/DIR-020-17%20Drug%20Slang%20Code%20Words.pdf] and controlled substances^[https://www.deadiversion.usdoj.gov/schedules/orangebook/c_cs_alpha.pdf] were download and processed to make slang.rda and controlled.rda.
slang.rda (N = r nrow(dea_street_names)
records) contains r length(unique(dea_street_names$category))
drug categories and r length(unique(dea_street_names$brand)) - 1
brands (e.g., r unique(dea_street_names$brand)[2:4]
).
r nrow(unique(duplicates$slang))
dpulicate terms (e.g., r unique(duplicates$slang)[1:3]
)r nrow(dea_controlled)
records) has these variablessubstance
: Chemical and/or brand namesNumber
:Schedule
: I, II, III, IV or VNarcotic
: Y or Nsynonym
: Chemical and/or brand namesParsing the SUBSTANCES
and names
variables will be very difficult because the delimiters between drugs are not at all consistent.
knitr::include_graphics("./Drugs.jpg", error = FALSE)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.