ejscreen.rollup.all: Aggregate EJSCREEN Dataset at Lower Resolutions (e.g., Tracts...

View source: R/ejscreen.rollup.all.R

ejscreen.rollup.allR Documentation

Aggregate EJSCREEN Dataset at Lower Resolutions (e.g., Tracts and Counties)

Description

Does what ejscreen.rollup does, but for more than one resolution - a batch of rollups done at once. Start with full EJSCREEN dataset at one resolution (typically block groups), and create aggregated data at higher geographic scales (e.g., tracts and counties)

Usage

ejscreen.rollup.all(
  bg,
  scalenames = c("tracts", "counties", "states", "regions"),
  fipsnames = c("FIPS.TRACT", "FIPS.COUNTY", "FIPS.ST", "REGION"),
  myfolder = getwd(),
  filenamebase = "EJSCREEN",
  filenames.R,
  filenames.csv,
  save.R = FALSE,
  save.csv = FALSE,
  assigning = FALSE,
  ...
)

Arguments

bg

Required, data.frame of raw data for environmental and demographic counts, one row per block group typically, one column per indicator.

scalenames

optional character vector of terms used to create filenames if saving files, default = c('tracts', 'counties', 'states', 'regions')

fipsnames

optional character vector of certain colnames in bg, used to select columns from bg to summarize by, default = c('FIPS.TRACT', 'FIPS.COUNTY', 'FIPS.ST', 'REGION'),

myfolder

optional folder path for saving files, default = getwd()

filenamebase

optional character element, default = 'EJSCREEN', used to construct filenames to save files if relevant.

filenames.R

optional vector of filenames, default has the word EJSCREEN and scalename .RData

filenames.csv

optional vector of filenames, default has the word EJSCREEN and scalename .csv

save.R

optional logical, default = FALSE, whether to save files as .RData

save.csv

optional logical, default = FALSE, whether to save files as .csv

assigning

optional logical, default = FALSE, whether to assign results to variable in calling environment, or just return list of data.frames as result.

...

Optional parameters to pass to ejscreen.create which uses formulas to create indicators from raw values. e.g. can pass clean=FALSE that is in turn passed eventually to clean.fips()

Details

**default fieldnames are assumed for now. Uses ejscreen.create.

Value

Returns a list of data.frames each like output of ejscreen.rollup, one per resolution (e.g., one for counties)

See Also

ejscreen.rollup

Examples

# (none)

ejanalysis/ejscreen documentation built on April 2, 2024, 10:15 a.m.