Skip to contents

This is just done when Census FIPS or bounds or points change.

Usage

census2020_save_datasets(
  x,
  metadata = NULL,
  add_metadata = TRUE,
  save_as_data_for_package = FALSE,
  overwrite = TRUE,
  keep_pop = FALSE
)

Arguments

x

a single data.table called blocks that is from census2020_get_data(), with colnames blockfips, pop, area, lat, lon

metadata

default is Census 2020 related, tries to use EJAM package

add_metadata

logical, whether to add EJAM-related metadata about date and version

save_as_data_for_package

logical, whether to do usethis::use_data() here

overwrite

default is TRUE, but only relevant if save_as_data_for_package = TRUE

keep_pop

set to TRUE to keep the blockpop (population counts) column, but it is not used by EJAM except here to create the weights before it is dropped by default.

Value

A named list of these (large) data.tables for the EJAM package. They are created at run time and are not bundled with this package; see each help topic for its columns:

See also

census2020_save_datasets() creates individual data.tables, after census2020_get_data() has done these: