map_bgs: map_bgs

Description Usage Arguments Examples

View source: R/map_bgs.R

Description

Map the average block group mnrisks results with leaflet

Usage

1
2
3
4
5
6
7
8
map_bgs(
  data = NULL,
  result_col = "avg_risk",
  geoid_col = "geoid",
  colors = "viridis",
  reverse_colors = T,
  signif_digits = 3
)

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.

Examples

1
2
3
4
# For all block groups
map_bgs(data = mnrisk_results,
        result_col = "avg_cancer_risk", 
        colors = "Blues")

dKvale/mnrisks2011 documentation built on Feb. 18, 2022, 5:43 a.m.