Package: arcospy
arcospyIntroductionWelcome toarcospy, the python version of theRarcospackagemaintained byThe Washington Post.arcospyis the result of a R-to-python translation project carried out at the University of Maryland in the Fall of 2019. The project was motivated aWashington Postdata-drivenstoryon a large pain pill database recently made publicly available.Thearcospymodule was built to offer the exact same functionality asarcos, with the only difference being the ability to run the API calls inpython! All of the commands inarcospyinherit the names from the original commands inarcos. Botharcosandarcospyact as wrappers for theDEA ARCOS dataset.Installationarcospyis hosted on PyPI and ispipinstallable. To installarcospyon your machine, start a new terminal and run the following commands:$ pip install arcospyRequirementsarcospyrequirespandas>=0.20.0andrequests>=2.0.0. You may need to manually install these requirements if the build does not trigger.UpdatesUpdates (will be posted periodically):1/22/2024: Fixed install issues.11/25/2023: Updated mainurlwhere the Washington Post is storing the data. Reorganized repo for readability. All commands should be back up and running.5/20/2021: Changes in API payload required a minor update to certain raw data commands.9/14/2020: Updated docs to reflect forthcoming publication ofarcosandarcospyinJOSS.8/1/2020: Renamed demos to docs for development consistency. Added another example notebook demonstrating acquisition and manipulation of pharmacy-level data. Planning gathering of additional ARCOS reports.3/18/2020: Added four new commands for business-level data, as well as updating documentation to reflect additional years now present in the data (up to 2014).3/1/2020: Re-organized repository for readability. Updated testing documents. Fixed two small parameter issues with state-level query commands.  1.0.8 live and stable.1/22/2020: Carried out PEP8 styling for commands, added help information, and package header. Re-published package as 1.0.6 as the package is now considered stable.1/14/2020: ReformattedREADME.mdto provide more specific headers, installation instructions, requirements, and additional information.12/10/2019: added a new folder calleddemos. Inculdes a basic getting started guide as well as an introduction to making the data spatial.UseAll functions are available onThe Washington Postreference pagehere. Example notebooks in python are available in thedocsfolder. Additional example use cases are available in Rhere.Data can be gathered at the pharmacy, distributor, county, or state as the geographic unit of analysis. Depending on the geographic level, there may be raw, summarized, or supplemental data available. For example, thecounty_raw()command returns each individual ARCOS record for a given county from 2006 to 2014. However, thesummarized_county_annual()command returns the annual summarized totals for a given county for each year of 2006 to 2014.ContributingThe following is lifted directly fromcontributing.mdContributions are welcome to botharcosandarcospy. For major contributions, please fork the masterarcosorarcospybranch and then open a pull request with the suggested changes. We will then review the change and determine if there is a generalizable solution to bothRandPython. If there is no generalizable solution, we will still strive to make your contribution visible on the respective Github page.DocumentationImprovements to the documentation forarcosandarcospyare welcome. As stated above, we will try to generalize all contributions to both packages. For example, if the wording around a specific command is unclear, we can improve the wording in both packages. Additionally, if there are features of a command that you believe should be included in the primary documentation, please let us know so we can improve the user experience.CodePresently, the core functionality of the API is maintained by the Data Reporting Team atThe Washington Post. There is ample room for users to suggest functions that can be added toarcosandarcospy. For example, users might suggest functions that download national or regional sets of data by looping existing commands.IssuesTrackable issue pages are available on both the masterarcosorarcospyGithub pages. Issues may be related to anything from malfunctioning commands to inconsistent data. We encourage an active discussion and hope to readily address any errors. We recommend that when submitting an issue users provide specific tags and examples of the aberrant behavior. If you are able to solve an issue with the code independently, please open a pull request with the corrected code and a short explanation as to the bug fix.Disclaimer: please note that the author of this package, Jeff Sauer, is not affiliated withThe Washington Postin any official capacity.