Get annual total pills for each buyer (pharmacy, etc) in a county

combined_buyer_monthly(
  county = "Mingo",
  state = "WV",
  year = 2012,
  key = "WaPo"
)

Arguments

county

Filter the data to only this county (e.g. 'Mingo')

state

Filter the data to county within this state (e.g. 'WV')

year

Filter the data to county within this state (e.g. 'WV')

key

Key needed to make query successful

Examples

# \donttest{
library(arcos)

mingo_wv <- combined_buyer_monthly(county = "Mingo", state="WV", year=2012, key="WaPo")

head(mingo_wv)
#>   BUYER_DEA_NO   BUYER_BUS_ACT BUYER_COUNTY BUYER_STATE year month DOSAGE_UNIT
#> 1    AA8151728 RETAIL PHARMACY        MINGO          WV 2012    01       18800
#> 2    AA8151728 RETAIL PHARMACY        MINGO          WV 2012    02       20700
#> 3    AA8151728 RETAIL PHARMACY        MINGO          WV 2012    03       16100
#> 4    AA8151728 RETAIL PHARMACY        MINGO          WV 2012    04       23100
#> 5    AA8151728 RETAIL PHARMACY        MINGO          WV 2012    05       19400
#> 6    AA8151728 RETAIL PHARMACY        MINGO          WV 2012    06       17400
# }