R/summarized.R
combined_buyer_monthly.Rd
Get annual total pills for each buyer (pharmacy, etc) in a county
combined_buyer_monthly(
county = "Mingo",
state = "WV",
year = 2012,
key = "WaPo"
)
Filter the data to only this county (e.g. 'Mingo')
Filter the data to county within this state (e.g. 'WV')
Filter the data to county within this state (e.g. 'WV')
Key needed to make query successful
# \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
# }