Skip to contents

Prints the site (its site_id and name), the variable of the third map, and the four elements of the list, x$isochrone, x$intersection, x$weighted, and x$rates, with a short note on each. No map is drawn; printing one of the elements draws that map.

Usage

# S3 method for class 'cacs_site_plot_pipeline'
print(x, ...)

Arguments

x

A list of class "cacs_site_plot_pipeline", as returned by cacs_plot_site_pipeline().

...

Not used.

Value

x, invisibly.

Details

The summary is written with the cli package as messages, so capture.output(print(x), type = "message") captures it and capture.output(print(x)) does not.

Examples

if (requireNamespace("leaflet", quietly = TRUE)) {
  fx <- readRDS(system.file("extdata", "visual_walkthrough_fixture.rds",
                            package = "catchmentACS"))
  maps <- cacs_plot_site_pipeline(
    site_id = "AL_BHM_01", iso_sf = fx$iso_sf, tract_sf = fx$tract_sf,
    acs_sf = fx$acs_sf, run_result = fx$run_result, sites_df = fx$sites_df
  )
  # Lists the four maps and the variable of the third, without drawing a map
  print(maps)
}
#> 
#> ── catchmentACS site plot pipeline ─────────────────────────────────────────────
#> Site: AL_BHM_01 (Birmingham_Vulcan)
#> Variable (Stage 3): B17001_002
#> 
#> ── 4 leaflet widgets returned ──
#> 
#> • `x$isochrone` - Stage 1: site point + isochrone polygon
#> • `x$intersection` - Stage 2: tracts colored by area_wt
#> • `x$weighted` - Stage 3: tract choropleth on `B17001_002`
#> • `x$rates` - Stage 4: 5-rate popup summary
#> ℹ Show a map by typing its name, such as `x$isochrone`, in the console.