R/data.R

#' Map of US Census Tracts in Utah
#' 
#' The map comes from the 2010 Cartographic Boundary Shapefiles - Census Tracts 
#' from the US Census Bureau website.
#' A column named "region" was added which is a duplicate of the column GEOID. 
#' The GEOID is the concatenation of the 5-character county FIPS code and the 
#' 6-character TRACTCE column.
#' A column named "county.fips.numeric" was added which is the numeric version
#' of the county FIPS code of the tract.
#'  
#' @seealso \link{ut.tract.regions}
#' @docType data
#' @name ut.tract.map
#' @usage data(ut.tract.map)
#' @references Taken from \url{https://www.census.gov/geo/maps-data/data/cbf/cbf_tracts.html}.
NULL

#' Metadata about the Utah Census Tracts map
#' 
#' In addition to the region/GEOID it contains the TRACTCE and county FIPS code
#' as both an integer and character
#' 
#' @seealso \link{ut.tract.map}
#'  
#' @docType data
#' @name ut.tract.regions
#' @usage data(ut.tract.regions)
NULL

#'  A data frame containing population estimates for Utah Census Tracts in 2013. 
#' 
#' @references Taken from the US American Community Survey (ACS) 5 year estimates.
#' @seealso \link{df_ut_tract_demographics}
#'  
#' @docType data
#' @name df_pop_ut_tract
#' @usage data(df_pop_ut_tract)
#' @examples
#' data(df_pop_ut_tract)
#'
#' # zoom in on Salt Lake City, which has FIPS code 49035
#' ut_tract_choropleth(df_pop_ut_tract, 
#'                     title  = "2013 Salt Lake County Census Tract\n Population Estimates", 
#'                     legend = "Population",
#'                     county_zoom = 49035)
#' \dontrun{
#' ut_tract_choropleth(df_pop_ut_tract, 
#'                     title  = "2013 Utah Census Tract\n Population Estimates", 
#'                     legend = "Population")
#' 
#' }
NULL

#' A data frame containing demographic statistics for each Census Tract in Utah.
#'       
#' @name df_ut_tract_demographics
#' @docType data
#' @references Data comes from the 2013 5-year American Community Survey (ACS). Data generated by
#' ?get_ut_tract_demographics. 
#' @keywords data
#' @usage data(df_ut_tract_demographics)
#' @examples
#'  # 2013 per capita income estimate
#'  data(df_ut_tract_demographics)
#'  colnames(df_ut_tract_demographics)
#'  
#'  df_ut_tract_demographics$value = df_ut_tract_demographics$per_capita
#'  ut_tract_choropleth(df_ut_tract_demographics,
#'                      title       = "2013 Salt Lake Census Tract\n Per Capita Income",
#'                      legend      = "Income",
#'                      num_colors  = 1,
#'                      county_zoom = 49035)
NULL
juliasilge/choroplethrUTCensusTract documentation built on May 20, 2019, 6:22 a.m.