#' Count the number of states in a dataset
#'
#' @param data A dataset containing a `State` column.
#'
#' @examples
#' n_states(coronavirus_region)
#'
#' @export
n_states <- function(data) {
dplyr::n_distinct(data$State)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.