Skip to content

Code for Lim et al., Temporal and spatial trends of fentanyl co-occurrence in the illicit drug supply in the United States

License

Notifications You must be signed in to change notification settings

tseyanglim/NFLIS-analysis

Repository files navigation

NFLIS-analysis

Code for Lim et al. (2024) Temporal and spatial trends of fentanyl co-occurrence in the illicit drug supply in the United States: a serial cross-sectional analysis. The Lancet Regional Health – Americas, Volume 39, 100898. 10.1016/j.lana.2024.100898

For any questions please contact Tse Yang Lim

Main files

The main file used in this analysis is the R markdown notebook fentanyl_supply_analysis_v2.Rmd, which calls data cleaning, analysis, and graphing scripts as needed. The notebook specifies the following settings:

  • dat_folder is the file path to the local directory where csv raw data files are. Note that we are unable to share the raw, record-level NFLIS data files used in this analysis; these may be obtained by request to the DEA or FDA.
  • dat_years specifies the years to be included in the analysis.
  • update_raw_data is the switch for raw data intake - reading of separate raw data files to merge them into a single combined data file (also not shared).
  • update_clean_data is the switch for data processing - applying sample restrictions and defining substance categories as explained in the article.
  • update_analysis is the switch for rerunning the analysis - calculating and identifying trends in sample-level fentanyl co-occurrence with various substances.
  • druglist specifies the substance categories to include in the analysis.
  • fig_ext specifies the filetype (by file extension) to use for saving figures.

The root directory also contains the notebook's corresponding html file and an RStudio RProj file for convenience.

Additional files

auxiliary

Contains R scripts for data cleaning, analysis, and graphing, called by the main fentanyl_supply_analysis_v2.Rmd notebook

data-public

Contains information assembled from publicly available data:

  1. Most commonly reported substances in NFLIS annual reports from 2013-2022, and our corresponding substance category definitions, corresponding to Table S3
  2. State names and abbreviations

figures

Contains high-resolution versions of all figures in the article and its supplement, generated by the graphing code in auxiliary

outputs

Contains csv tabular versions of data presented in main article and supplementary figures, Mann-Kendall trend test results corresponding to Table S1 & S2, as well as intermediate data files produced in the course of data cleaning & analysis (in subdirectory processed)

About

Code for Lim et al., Temporal and spatial trends of fentanyl co-occurrence in the illicit drug supply in the United States

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •