R/summarized.R
total_distributors_county.Rd
Get total pills for each distributor in a county
total_distributors_county(county = "Mingo", state = "WV", key = "WaPo")
Filter the data to only this county (e.g. 'Mingo')
Filter the data to county within this state (e.g. 'WV')
Key needed to make query successful
# \donttest{
library(arcos)
mingo_wv <- total_distributors_county(county = "Mingo", state="WV", key="WaPo")
head(mingo_wv)
#> BUYER_STATE buyer_county Reporter_family total_dosage_unit
#> 1 WV MINGO AmerisourceBergen Drug 3701200
#> 2 WV MINGO Anda, Inc 82400
#> 3 WV MINGO Associated Pharmacies Inc 1500
#> 4 WV MINGO Auburn Pharmaceutical 17700
#> 5 WV MINGO Butler Animal Health Supply 700
#> 6 WV MINGO Cardinal Health 3979150
#> total_records
#> 1 4292
#> 2 89
#> 3 1
#> 4 10
#> 5 4
#> 6 5915
# }