map_us: map_us

Description Usage Arguments Value

View source: R/choropleth.R

Description

Choropleth map of contiguous US on county level

Usage

1
2
map_us(dat, return_df = FALSE, vars = "n",
  map_provider = "CartoDB.Positron")

Arguments

dat

tibble, containing polyname (in the format of polyname in package "maps", e.g. "new york,new york"), numeric variable(s) to be plotted, and label (to be shown in hoverlabel)

return_df

#Boolean, whether to return table of results in addition to a plot (as a list)

vars

vector of variables to include, possibly named. If more than one, will add layer control, using vector names.

map_provider

provider of maptiles (see leaflet documentation). NULL will use leaflet default.

Value

leaflet object, or a list of a leaflet object and a tibble, depending on return_df


rushkin/bitsandends documentation built on Oct. 21, 2020, 11:43 a.m.