50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

arcos

The Washington Post published a significant portion of a database that tracks the path of every opioid pain pill, from manufacturer to pharmacy, in the United States between 2006 and 2014. We have reported a number of stories using this data set, but we believe there are more stories to be told.

We are making this data accessible as an API for everyone to download and use in their reporting or research to promote a deeper understanding of the regional and local effects of the opioid crisis.

This ARCOS package is a wrapper to utilize the ARCOS API. There is also a Python wrapper: arcospy


Installation

Get the latest stable release from CRAN:

install.packages("arcos")

To install the development version from GitHub:

# install.packages("devtools")
devtools::install_github('wpinvestigative/arcos')

Tips on how to use the API in R

Guidelines for using this data

  • The API requires a key. Use "WaPo" as the key or use any of the keys listed here. We reserve the right to blacklist these and invite users to sign up for their own individual keys in the future if the need arises. To get one, fill out the form at the bottom of this page to establish a connection with our team and report any issues downloading the data. This will also allow us to update you with any additional information as it comes out and answer questions you may have. Because of the volume of requests, we ask you use this channel rather than emailing our reporters individually.

  • If you publish anything based on this data set, please credit The Washington Post, link to the original source, and send us an email when you’ve hit publish. We want to learn what you discover and will attempt to link to your work as part of cataloguing the impact of this project.

About this data

  • The Post gained access to the Drug Enforcement Administration’s Automation of Reports and Consolidated Orders System, known as ARCOS, as the result of a court order. The Post and HD Media, which publishes the Charleston Gazette-Mail in West Virginia, waged a year-long legal battle for access to the database, which the government and the drug industry had sought to keep secret.

  • There are two levels to this API:

    1. Raw data directly from the ARCOS database on shipments of oxycodone and hydrocodone pills to chain pharmacies, retail pharmacies and practitioners but sliced at the county- and pharmacy-level, which is easier to deal with than the 100+ gig unfiltered version (which is also available to download).

    2. Summarized and supplemental data gathered by The Washington Post journalists.

    • Supplemental data such as the latitude and longitude information for nearly 83,000 chain and retail pharmacies geocoded by Post journalists, as well as Census geolocation codes.
    • Summarized data such as on the largest distributors, manufacturers and pharmacies in your county and state, in addition to annual and monthly dosages ordered by pharmacies.
    • We have cleaned the data to include only information on shipments of oxycodone and hydrocodone pills. We did not include data on 10 other opioids because they were shipped in much lower quantities and were diverted at far lower rates over the seven years. Diversion refers to when pills do not go directly to a patient and end up at another source, such as the black market. The Post also removed shipments that did not wind up in the hands of consumers, such as shipments from distributors to themselves. The subset of the data is very similar to how experts working on the federal court case in Ohio analyzed the data.
  • There are Veterans Affairs Department distribution pharmacies in Charleston, S.C., and Leavenworth, Kan., that serve the region. The DEA considers these to be retail pharmacies. However, the pills are much more likely to be spread in the region than to those counties. This is why the per capita rate of pills in those counties is far higher.

  • It’s important to remember that the number of pills in each county does not necessarily mean those pills went to people who live in that county. The data only shows us what pharmacies the pills are shipped to and nothing else.

  • The best way to understand the definitions of the columns and variables in this data set is to refer to the DEA’s ARCOS handbook, which provides detailed descriptions of the records.

Alternate ways to download summarized data

  • Go to the DEA pain pills database page.

  • Enter the state and county (if applicable) for which you want data.

  • You can download graphics and/or analyzed data sets for distributors, manufacturers and pharmacies in the area by clicking “Get chart as image.” If you would like to do your own analysis, you can download the raw data file by clicking the bold and underlined link below each chart.

Download the raw data

  • Click here to download the national data from The Washington Post. Note: This is a very large file, so download times may be long.

  • If you want to download the full data set released by the Ohio federal court, click here. This includes information on shipments of other drugs, shipments between distributors, drugs distributed to mail order pharmacies, refunded shipments, and more.


Available datasets (Read the reference page for more info):

FunctionWhatTypeYearsDrugsBuyers
buyer_addresses()Get DEA designated addresses for each pharmacyRawAllAll
buyer_details()Get monthly summarized pill totals by countySummarized2006 - 2014Oxycodone & HydrocodoneRetail Pharmacy, Chain Pharmacy, and Practitioners
buyer_list()Get list of business types listed in the BUYER_BUS_ACT in the ARCOS databaseRaw2006 - 2014All
combined_buyer_annual()Get annual total pills for each buyer (pharmacy, etc) in a countySummarized2006 - 2014Oxycodone & HydrocodoneRetail Pharmacy, Chain Pharmacy, and Practitioners
combined_buyer_monthly()Get annual total pills for each buyer (pharmacy, etc) in a countySummarized2006 - 2014Oxycodone & HydrocodoneRetail Pharmacy, Chain Pharmacy, and Practitioners
county_list()Get list of counties and states and fips codes represented in the ARCOS dataRaw2006 - 2014
county_population()Get annual population for counties between 2006 and 2012Supplemental2006 - 2014Oxycodone & HydrocodoneRetail Pharmacy, Chain Pharmacy, and Practitioners
county_raw()Download raw prescription data for specified county (by state and county names)RawOxycodone & HydrocodoneRetail Pharmacy, Chain Pharmacy, and Practitioners
county_raw_fips()Download raw prescription data for specified county (by county FIPS code)RawOxycodone & HydrocodoneRetail Pharmacy, Chain Pharmacy, and Practitioners
drug_county_biz()Raw data by county and individual drug and business typeRaw2006 - 2014AllAll
drug_county_raw()Raw data by county and individual drug and business type via fips codeRaw2006 - 2014AllAll
drug_list()Get list of the 14 drugs tracked in the ARCOS dataRaw2006 - 2014All
not_pharmacies()Get list of misidentified pharmacies by BUYER_DEA_NOsSupplemental2006 - 2012Retail Pharmacy, Chain Pharmacy
pharm_cbsa()Get the core-based statistical area GEOID for each pharmacySupplemental2006 - 2014Retail Pharmacy, Chain Pharmacy
pharm_counties()Get county GEOID for each pharmacySupplemental2006 - 2014Retail Pharmacy, Chain Pharmacy
pharm_latlon()Get latitude and longitude data for each pharmacySupplemental2006 - 2014Retail Pharmacy, Chain Pharmacy
pharm_tracts()Get census tract GEOID for each pharmacySupplemental2006 - 2014Retail Pharmacy, Chain Pharmacy
pharmacy_raw()Download raw prescription data for specified pharmacy into RRaw2006 - 2014Oxycodone & HydrocodoneRetail Pharmacy, Chain Pharmacy
raw_data()Link to raw ARCOS dataRaw2006 - 2014AllAll
reporter_addresses()Get DEA designated addresses for each ReporterRaw2006 - 2014AllAll
state_population()Get annual population for states between 2006 and 2014Supplemental2006 - 2014
summarized_county_annual()Get annual summarized pill totals by countySummarized2006 - 2014Oxycodone & HydrocodoneRetail Pharmacy, Chain Pharmacy, and Practitioners
summarized_county_monthly()Get monthly summarized pill totals by countySummarized2006 - 2014Oxycodone & HydrocodoneRetail Pharmacy, Chain Pharmacy, and Practitioners
total_distributors_county()Get total pills for each distributor in a countySummarized2006 - 2014Oxycodone & Hydrocodone
total_distributors_state()Get total pills for each distributor in a stateSummarized2006 - 2014Oxycodone & Hydrocodone
total_manufacturers_county()Get total pills for each manufacturer in a countySummarized2006 - 2014Oxycodone & Hydrocodone
total_manufacturers_state()Get total pills for each manufacturer in a stateSummarized2006 - 2014Oxycodone & Hydrocodone
total_pharmacies_county()Get total pills for each pharmacy in a countySummarized2006 - 2014Oxycodone & HydrocodoneRetail Pharmacy, Chain Pharmacy, and Practitioners
total_pharmacies_state()Get total pills for each pharmacy in a stateSummarized2006 - 2014Oxycodone & HydrocodoneRetail Pharmacy, Chain Pharmacy, and Practitioners

Copy Link

Version

Install

install.packages('arcos')

Monthly Downloads

32

Version

1.27

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Andrew Ba Tran

Last Published

February 18th, 2021

Functions in arcos (1.27)

buyer_list

Get list of business types listed in the BUYER_BUS_ACT in the ARCOS database
drug_list

Get list of drugs available in the ARCOS database
arcos

arcos package
drug_fips_biz

Download raw prescription data for individual drugs and business type by county FIPS code into R
total_manufacturers_county

Get total pills for each manufacturer in a county
drug_county_biz

Download raw prescription data for individual drugs and business type by county into R
total_manufacturers_state

Get total pills for each manufacturer in a state
pharm_counties

Get county GEOID for each pharmacy based on BUYER_DEA_NO (Only includes retail and chain pharmacy designations)
total_pharmacies_county

Get total pills for each pharmacy in a county
pharm_cbsa

Get the core-based statistical area GEOID for each pharmacy based on BUYER_DEA_NO (Only includes retail and chain pharmacy designations)
pharmacy_raw

Download raw prescription data for specified pharmacy (by BUYER_DEA_NO) into R
not_pharmacies

Get list of misidentified pharmacies by BUYER_DEA_NOs
summarized_county_annual

Get annual summarized pill totals by county
pharm_latlon

Get latitude and longitude data for each pharmacy based on BUYER_DEA_NO (Only includes retail and chain pharmacy designations)
buyer_addresses

Get DEA designated addresses for each pharmacy based on BUYER_DEA_NO (Only includes retail and chain pharmacy designations)
total_distributors_county

Get total pills for each distributor in a county
total_distributors_state

Get total pills for each distributor in a state
total_pharmacies_state

Get total pills for each pharmacy in a state
summarized_county_monthly

Get monthly summarized pill totals by county
pharm_tracts

Get census tract GEOID for each pharmacy based on BUYER_DEA_NO (Only includes retail and chain pharmacy designations)
reporter_addresses

Get DEA designated addresses for each Reporter based on REPORTER_DEA_NO (Includes Manufacturers and Distributors)
raw_data

Raw ARCOS data (Warning 130+ GB file) Warning: May not fit on your memory.. If interested in the raw data, you can download via the link below.
state_population

Get annual population for states between 2006 and 2014
county_raw

Download raw prescription data for specified county (by state and county names) into R
combined_buyer_monthly

Get annual total pills for each buyer (pharmacy, etc) in a county
buyer_details

Get monthly summarized pill totals by county
county_list

Get dataframe of counties, states, and fips codes that are represented in the ARCOS data
combined_buyer_annual

Get annual total pills for each buyer (pharmacy, etc) in a county
county_raw_fips

Download raw prescription data for specified county (by county FIPS code) into R
county_population

Get annual population for counties between 2006 and 2014