Skip to contents

Convenience wrapper used by the pipeline's ejscreen_export stage: it builds the four web-app threshold layers (issue #395 part b) directly from the per-block-group EJ-index percentile-rank columns that calc_ejscreen_export() already placed in the national export (ejscreen_export) and the state-percentile export (ejscreen_export_statepct).

Usage

calc_ejscreen_threshold_layers_from_exports(
  national = NULL,
  statepct = NULL,
  id_col = NULL
)

Arguments

national

The ejscreen_export (national-percentile) data.frame.

statepct

The ejscreen_export_statepct (state-percentile) data.frame. If NULL, only the US layers are built.

id_col

Optional id column name; auto-detected from c("ID","bgfips","bgid").

Value

A named list with the available members of us_ejindexes, us_supplemental, state_ejindexes, state_supplemental.

Details

The EJ-index percentile ranks are the P_D2_* columns (national/state EJ indexes) and the P_D5_* columns (supplemental). The national export supplies the US layers and the state-percentile export supplies the State layers (its P_D2_*/P_D5_* fields hold state percentiles). Each layer is passed through calc_ejscreen_threshold_layers() to add the P1..P100 hit-count columns.