#' US CDC Social Vulnerability Index
#'
#' The CDC's Social Vulnerability Index (SVI), created and maintained
#' by the Geospatial Research, Analysis, and Services Program (GRASP),
#' uses US Census data to determine the social vulnerability of every
#' county and tract. This index ranks each county and tract based upon
#' 15 social factors including poverty, lack of vehicle access, and
#' crowded housing, and groups them into four related themes: 1)
#' Socioeconomic, 2) Housing Composition and Disability, 3) Minority
#' Status and Language, and 4) Housing and Transportation.
#'
#' @details
#'
#' Theme rankings: For each of the four themes, we summed the
#' percentiles for the variables comprising each theme. We ordered the
#' summed percentiles for each theme to determine theme-specific
#' percentile rankings. The four summary theme ranking variables,
#' detailed in the Data Dictionary below, are:
#'
#' - Socioeconomic - RPL_THEME1
#' - Household Composition & Disability - RPL_THEME2
#' - Minority Status & Language - RPL_THEME3
#' - Housing Type & Transportation - RPL_THEME4
#'
#' Overall tract rankings: We summed the sums for each theme, ordered
#' the tracts, and then calculated overall percentile rankings. Please
#' note; taking the sum of the sums for each theme is the same as
#' summing individual variable rankings. The overall tract summary
#' ranking variable is RPL_THEM
#'
#' For detailed documentation, see
#' \url{https://svi.cdc.gov/Documents/Data/2018_SVI_Data/SVI2018Documentation.pdf}
#'
#' @source \url{https://svi.cdc.gov/}
#'
#' @author Sean Davis <seandavi@gmail.com>
#'
#' @return a data.frame
#'
#' @section Download: -
#' \url{https://github.com/seandavi/UCCCReporter/raw/main/inst/extdata/SVI2018_US.csv.gz}
#'
#' @section Geographic level:
#'
#' - census tract
#'
#' @family Data resources
#'
#' @examples
#'
#' res = cdc_social_vulnerability_index()
#'
#' # column names
#' colnames(res)
#'
#' @export
cdc_social_vulnerability_index <- function() {
fname = system.file('extdata/SVI2018_US.csv.gz', package="UCCCReporter")
res = data.table::fread(fname,na.strings = c("-999","-999.0"))
return(res)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.