knitr::opts_chunk$set( collapse = TRUE, echo = FALSE, eval = TRUE, comment = "#>" )
library(conflicted) suppressMessages(conflict_prefer("filter", "dplyr")) library(dplyr) library(DOPE)
data(dea_factsheets) #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)
This is a summary of the the drugs on the DEA website. It include drug class (i.e., stimulants, depressants, hallucinogens), categories (i.e., amphetamines, cocaine, barbiturates) and drug synonyms. Synonyms include brand/generic names (Adderall®, Vallium®, clonazepam) and street names (Apache, White Girl). Eventually the ontology needs to be expanded to add a grouping variable for related synonyms. For example, the generic clonazepam, the brand name Klonopin® and the street name k-pin all should be grouped with the general name clonazepam
Two files, dea_factsheets.rda and dea_brands.rda, were created by scraping the "fact sheets" on the DEA website on September 10th 2020. The fact had 12 records added because the DEA slang file has additional "categories" (e.g., crack cocaine, mushrooms, PCP, etc.). These extra "categories" are problematic for the DEA ontology because they also include a specific brand name (i.e., ritalin) and two benzodiazepines (i.e., alprazolam, clonazepam). Eventually these need to be added as part of a "generic name" level in the ontology.
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.). One extra class "benzodiazepine" was added because it is a grouping class in the DEA slang file.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.
dea_street_names.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("../inst/extdata/Drugs.jpg", error = FALSE)
There are several things (in the black box) that need to be placed in the tree. Things with the red call out are inconsistencies.
This is a summary of the the drugs on the no slang website.
One file, noslang_street_names.rda , was created by scraping the Drug Slang Dictionary October 12th 2020.
r nrow(noslang_street_names)
drug related terms.Additional drugs found while processing data from IQVIA. Thanks to Edward Nunes M.D. for providing notes on how to better classify these drugs. This data introduced new classes such as reversal agents and treatment drugs.
drug_stop_words.rda
This is a vector of drug-specific stop words that have been observed while processing data from the aforementioned data sources. This vector is primarily used with the parse()
function and is used to remove irrelevant words (i.e., "pills", "syringe") or strings such as units or dosages of drugs (i.e., "mg").
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.