map_bgs: map_bgs

View source: R/map_bgs.R

map_bgsR Documentation

map_bgs

Description

Map the average block group mnrisks results with leaflet

Usage

map_bgs(
  data = NULL,
  result_col = "avg_risk",
  geoid_col = "geoid",
  colors = "viridis",
  reverse_colors = TRUE,
  signif_digits = 3,
  silent = FALSE
)

Arguments

data

The dataframe or sf object containing the modeling results for mapping.

result_col

Column name containing the modeling concentration/risk results.

geoid_col

Block group GEOID colulmn name for mapping results.

colors

Color palette to use for block group fill, ex. "viridis", "inferno", "Blues", "Greens"

reverse_colors

Flip the color palette order

signif_digits

Number of significant figures to show in map labels.

silent

Return map as object. Default = FALSE

Examples

## Not run: 
# For all block groups
map_bgs(data = mnrisk_results,
        result_col = "avg_cancer_risk", 
        colors = "Blues")

## End(Not run)

MPCA-air/mnrisks documentation built on March 21, 2023, 4:24 a.m.