arcos and arcospy
arcos and arcospy: R and Python packages for accessing the DEA ARCOS database from 2006 - 2014 - Published in JOSS (2020)
Science Score: 95.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in JOSS metadata -
○Academic publication links
-
✓Committers with academic emails
1 of 3 committers (33.3%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Repository
This is an informational landing page for the R arcos and Python arcospy software
Basic Info
- Host: GitHub
- Owner: jeffcsauer
- License: other
- Language: TeX
- Default Branch: master
- Size: 1.02 MB
Statistics
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
- Releases: 0
Metadata Files
README.md
arcos (R) and arcospy (Python): twin software packages to access the DEA ARCOS database from 2006 to 2014
Welcome to an informational landing page for the R arcos and Python arcospy software. This landing page acts as a home base for background information on the software and a high-level overview of its features. Specific information on the R or Python versions can be found at their Github repositories.
We recommend reading the vignette that provides an overview of the API, a quick start guide, and demonstration of R/Python dual functionality!
Motivation
The ongoing Opioid Crisis in the United States poses serious public health issues. Understanding how the United States arrived at the present crisis is crucial to avoid future crises. One powerful tool for understanding trends in prescription opioid distribution is the Drug Enforcement Agency's (DEA) Automation of Reports and Consolidated Orders System (ARCOS). In raw format, the available portion of the ARCOS database is more than 150 gigabytes and includes several hundred columns. Thus, arcos and arcospy are meant to simplify access to the available data so researchers and interested citizens can rapidly gather relevant measures of prescription opioid distribution. The data available in arcos and arcospy spans the years 2006 to 2014. These are the years leading up to the now widely recognized Opioid Crisis. The data has been featured in a series of investigative reporting articles by both national and regional newspapers. There are numerous potential applications of this data to the study of health sciences, criminology, medical sociology, and more.
Development history
arcos is the result of efforts by the data reporting team at The Washington Post to make a large portion of the DEA ARCOS more easily accessible to the public. arcos was released on CRAN in August of 2019 (note: arcos has been temporarily removed from CRAN due to COVID-19, there is intention to get the package back on CRAN as soon as possible - it remains devtools installable). Shortly thereafer, health geographers working at the University of Maryland translated the package to python under the name arcospy. Due to this development timeline and the fact that arcospy is a translation of arcos, at times we defer to the built-out documentation of arcos to avoid redundancy.
Build status
Build status is evaluated via CRAN for arcos and travis for arcospy.
arcos:
arcospy:
Dependencies
arcos: R (≥ 3.3.0), stringr, magrittr, jsonlite, dplyr, urltools, vroom
arcospy: Python (≥ 3.0.0), pandas, urltools
Features
arcos and arcospy offers nearly 30 functions for users to access DEA ARCOS data using pharmacies, distributors, counties, or states as the unit of analysis, as well as useful supplementary information. These functions have the exact same name in both R and Python, allowing users to rapidly switch between languages if the need arises (i.e. if a certain type of analysis is available only in R or Python).
Functions and the 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 BUYERBUSACT in the ARCOS database | Raw | 2006 - 2014 | | All | | combinedbuyerannual() | Get annual total pills for each buyer (pharmacy, etc) in a county | Summarized | 2006 - 2014 | Oxycodone & Hydrocodone | Retail Pharmacy, Chain Pharmacy, and Practitioners | | combinedbuyermonthly() | 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 | | countyrawfips() | Download raw prescription data for specified county (by county FIPS code) | Raw | | Oxycodone & Hydrocodone | Retail Pharmacy, Chain Pharmacy, and Practitioners | | drugcountybiz() | Raw data by county and individual drug and business type | Raw | 2006 - 2014 | All | All | | drugcountyraw() | 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 BUYERDEANOs | 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() | Download 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 | | | | summarizedcountyannual() | Get annual summarized pill totals by county | Summarized | 2006 - 2014 | Oxycodone & Hydrocodone | Retail Pharmacy, Chain Pharmacy, and Practitioners | | summarizedcountymonthly() | Get monthly summarized pill totals by county | Summarized | 2006 - 2014 | Oxycodone & Hydrocodone | Retail Pharmacy, Chain Pharmacy, and Practitioners | | totaldistributorscounty() | Get total pills for each distributor in a county | Summarized | 2006 - 2014 | Oxycodone & Hydrocodone | | | totaldistributorsstate() | Get total pills for each distributor in a state | Summarized | 2006 - 2014 | Oxycodone & Hydrocodone | | | totalmanufacturerscounty() | Get total pills for each manufacturer in a county | Summarized | 2006 - 2014 | Oxycodone & Hydrocodone | | | totalmanufacturersstate() | Get total pills for each manufacturer in a state | Summarized | 2006 - 2014 | Oxycodone & Hydrocodone | | | totalpharmaciescounty() | Get total pills for each pharmacy in a county | Summarized | 2006 - 2014 | Oxycodone & Hydrocodone | Retail Pharmacy, Chain Pharmacy, and Practitioners | | totalpharmaciesstate() | Get total pills for each pharmacy in a state | Summarized | 2006 - 2014 | Oxycodone & Hydrocodone | Retail Pharmacy, Chain Pharmacy, and Practitioners |
Examples
Several examples of using both arcos and arcospy are available on their respective Github pages. These examples include querying the data, combining the data with other census products at different geographic levels, and making the data spatial. Additional examples are provided to show how users can make use of base commands in loops to expand the functionality of the software.
Installation
R: installing arcos
```R
Get the latest stable release from CRAN:
install.packages("arcos")
...or via devtools:
install.packages("devtools")
devtools::install_github('wpinvestigative/arcos') ```
Python: installing arcospy
arcospy is available via PyPI:
python
pip install arcospy
Contribute
Contributing guidelines are outlined in contributing.md.
Credits
arcos: Steven Rich (The Washington Post), Andrew Ba Tran (The Washington Post), Aaron Williams (The Washington Post), Jason Hold (The Washington Post)
arcospy: Jeffery Sauer (University of Maryland, College Park), Dr. Taylor Oshan (University of Maryland, College Park)
License
MIT (2019); The Washington Post and The Charleston Gazette-Mail (2019)
Owner
- Name: Jeff Sauer
- Login: jeffcsauer
- Kind: user
- Location: New York, NY
- Company: NYC DOHMH
- Repositories: 15
- Profile: https://github.com/jeffcsauer
Senior Data Scientist on the Drug Checking Unit at the New York City Department of Health and Mental Hygiene
JOSS Publication
arcos and arcospy: R and Python packages for accessing the DEA ARCOS database from 2006 - 2014
Authors
The Washington Post
The Washington Post
The Washington Post
The Washington Post
University of Maryland, College Park, Department of Geographical Sciences
Tags
R Python API Open science HealthGitHub Events
Total
Last Year
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| jeffcsauer | 3****r | 28 |
| Jeffery Sauer | j****r@m****a | 20 |
| Taylor Oshan | t****n@g****m | 2 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 3
- Total pull requests: 0
- Average time to close issues: about 1 hour
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 0
- Average comments per issue: 0.33
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- jeffcsauer (3)
