Get the core-based statistical area GEOID for each pharmacy based on BUYER_DEA_NO (Only includes retail and chain pharmacy designations)

pharm_cbsa(geoid = "26580", county = "Mingo", state = "WV", key = "WaPo")

Arguments

geoid

Filter the data to only this cbsa GEOD (e.g. '26580')

county

If geoid not included, filter the data to only this county (e.g. 'Mingo')

state

If geoid not included, filter the data to county within this state (e.g. 'WV')

key

Key needed to make query successful

See also

Examples

# \donttest{ library(arcos) mingo_wv <- pharm_cbsa(geoid="26580", key="WaPo") head(mingo_wv)
#> BUYER_DEA_NO CSAFP CBSAFP GEOID NAME #> 1 FM2277007 170 26580 26580 Huntington-Ashland, WV-KY-OH #> 2 BP4501753 170 26580 26580 Huntington-Ashland, WV-KY-OH #> 3 FA3684114 170 26580 26580 Huntington-Ashland, WV-KY-OH #> 4 BF1984055 170 26580 26580 Huntington-Ashland, WV-KY-OH #> 5 AR8853916 170 26580 26580 Huntington-Ashland, WV-KY-OH #> 6 BF5121049 170 26580 26580 Huntington-Ashland, WV-KY-OH #> NAMELSAD LSAD MEMI MTFCC BUYER_STATE #> 1 Huntington-Ashland, WV-KY-OH Metro Area M1 1 G3110 WV #> 2 Huntington-Ashland, WV-KY-OH Metro Area M1 1 G3110 WV #> 3 Huntington-Ashland, WV-KY-OH Metro Area M1 1 G3110 WV #> 4 Huntington-Ashland, WV-KY-OH Metro Area M1 1 G3110 WV #> 5 Huntington-Ashland, WV-KY-OH Metro Area M1 1 G3110 WV #> 6 Huntington-Ashland, WV-KY-OH Metro Area M1 1 G3110 WV #> BUYER_COUNTY #> 1 KANAWHA #> 2 PUTNAM #> 3 KANAWHA #> 4 PUTNAM #> 5 PUTNAM #> 6 PUTNAM
# }