wpinvestigative / arcos

https://wpinvestigative.github.io/arcos/
Other
30 stars 18 forks source link

arcos

CRAN Badge CRAN Downloads

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 (1.27):

install.packages("arcos")

To install the development version from GitHub (1.28):

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

Tips on how to use the API in R

Guidelines for using this data

About this data

Alternate ways to download summarized data

Download the raw data


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

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