Skip to contents

Compare EJScreen API vs EJAM stats at tested sites (after results already run)

Usage

ejscreen_vs_ejam_alreadyrun(
  apisite,
  ejamsite,
  nadrop = FALSE,
  x100fix = TRUE,
  x100varnames = names_pct_as_fraction_ejamit
)

Arguments

apisite

table output of ejscreenit()$table, or ejscreenapi_plus(), and also see ejscreenit_for_ejam()

ejamsite

table output of ejamit()$results_bysite

nadrop

optional, whether to drop indicators for which EJScreen API returns NA

x100fix

optional, whether to multiply x100 the names_d and names_d_subgroups indicator scores to convert fractions 0 to 1 into percentages of 0 to 100, prior to rounding and reporting EJAM results here.

x100varnames

optional, if x100fix = T, a vector of colnames of x$EJAM to convert from being scaled as 0 to 1 into rescaled values of 0 to 100, because some outputs of EJSCREEN were reported as percentages 0 to 100 but as 0 to 1 in EJAM.

Value

prints summary to console, but returns invisible a list of tables (data frames or matrix/arrays), with names EJSCREEN, EJAM, EJSCREEN_shown, EJAM_shown, same_shown, ratio, diff, absdiff, pctdiff, etc.

For each table, colnames are indicators like pop, blockcount_near_site, etc. and rows represent sites analyzed. @details See ejscreen_vs() for a more complete, interactive way to do this.

Examples

  vs = ejscreen_vs_ejam_alreadyrun(
    apisite = testoutput_ejscreenapi_plus_5,
    ejamsite = ejamit(testpoints_5, radius = 1, include_ejindexes = TRUE)$results_bysite)
  ejscreen_vs_ejam_see1(vs, mysite = 1)
 vsum = ejscreen_vs_ejam_summary(vs)