#' This function returns cbsa code by matching fuzzy metro names
#' @param msa name of a metro
#' @return 5 digit CBSA code
#' @export
find_cbsa_code <- function(msa){
metro.data::county_cbsa_st %>%
dplyr::filter(grepl(!!msa,cbsa_name,ignore.case = T)) %>%
dplyr::select(cbsa_code, cbsa_name) %>%
unique()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.