-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function Not Found "drug_county_raw" #12
Comments
@MLSun-A I think you are referencing an older version (<1.0) of the docs. Could you try the following? This currently works for me: library(arcos)
test <- county_raw(state="WV", county="Mingo", key="WaPo")
head(test)
# A tibble: 6 x 42
REPORTER_DEA_NO REPORTER_BUS_ACT REPORTER_NAME REPORTER_ADDL_C~ REPORTER_ADDRES~
<chr> <chr> <chr> <chr> <chr>
1 PH0035964 DISTRIBUTOR H D SMITH WH~ null 4650 INDUSTRIAL~
2 PH0035964 DISTRIBUTOR H D SMITH WH~ null 4650 INDUSTRIAL~
3 PH0035964 DISTRIBUTOR H D SMITH WH~ null 4650 INDUSTRIAL~
4 PH0035964 DISTRIBUTOR H D SMITH WH~ null 4650 INDUSTRIAL~
5 PH0035964 DISTRIBUTOR H D SMITH WH~ null 4650 INDUSTRIAL~
6 RD0277409 DISTRIBUTOR MASTERS PHAR~ DBA: RIVER CITY~ 11930 KEMPER SP~ |
@jeffcsauer Sorry for not making it clear. What I want to look at is different drug disperses at a county-year level. For example, the disperse of Oxycontin at county Mingo in the year 2009 is needed. And I want to collect the disperse of Oxycontin for every county from 2006 to 2014. The function "drug_county_raw" is perfect for data requirement since it reports the disperse for every drug at a county level across years. However, the function cannot be found when I followed the arcos API wrappers. Would you mind taking a look at this?
I also tried the function "county_raw", while it seems the server is overwhelmed.
|
@MLSun-A no need to apologize, all good! If you examine the core R file that contains all the available functions in I believe you can get the data you want using the drug_fips_biz(drug="Fentanyl", fips="01001", key="WaPo") You can get the date of the shipment from the TRANSACTION_DATE field. Regarding the 'Sorry, our server must be overwhelmed. Try again in a little bit. If it persists, let us know at https://github.com/wpinvestigative/arcos/issues', other users have also recently started reporting this issue. I'm not sure why this is happening, but it may be that the server is being queried too frequently. If you are using a loop of sorts, definitely build in a pause between queries. |
Hi, drug_county_raw in the api is drug_county_biz (or drug_fips_biz) in the R wrapper because there's the added functionality of being able to query by business type. Well, the filtering is in process. At the moment it will give you all businesses. https://wpinvestigative.github.io/arcos/reference/drug_county_biz.html The server is overwhelmed messages seem inconsistent and I'm still trying to figure out what's happening. On my laptop, it loads but when I remotely log in to another computer and run that query, I get that overwhelmed error and it won't go away. I'm literally running the functions repeatedly in one window locally and in another window over a vpn and one works and one doesn't. It's so weird. |
Thanks for the quick reply! Totally understand - no worries. I have not yet received the 'overwhelmed' error. If it keeps popping up perhaps I could type up some simple instructions to access the arcos_all.tsv file as a SQLite database via R. It's just a few lines of code and so long as people have some free space on their drive (100-200GB) it could be an alternative solution. |
@andrewbtran @jeffcsauer |
Hi!
I want to get county-level data for the use of Oxycodone only and tried the function "drug_county_raw" to filter for it. However, it reminds me that the function can not be found in R. I was wondering whether I did something wrong. Did anyone else meet the same problem and could guide me through it?
Thanks in advance!
The text was updated successfully, but these errors were encountered: