make_map: GLP Map

View source: R/map.R

make_mapR Documentation

GLP Map

Description

Creates a map of Louisville

Usage

make_map(
  maps,
  var,
  hover_name,
  legend_title,
  year = "",
  race = "total",
  sex = "total",
  units = "Percent",
  color_style = "sequential",
  palette = "",
  reverse_pal = F,
  continuous = T,
  var_bins,
  tiles = T,
  bold_nh = T
)

Arguments

maps

A list of map files

var

The variable name

hover_name

The title of the variable for the hover box

legend_title

The title for the legend, including <br> in place of line breaks

units

The units, defaults to Percent. Specific formatting is applied for Percent, Dollars, and none. Default blank formatting is applied for any other units.

color_style, palette

color_style creates a palette with sensible defaults: sequential for a purple palette or divergent for a red/green palette. palette can be used to replace color_style by providing a specific RColorBrewer::brewer.pal function.

reverse_pal

Reverses the palette (particularly useful for switching a red-green palette).

continuous, var_bins

Is the data continuous? Defaults to TRUE. If not, use var_bins to provide either the number of bins or a vector of cutpoints.

tiles

Include a map as a background for the leaflet map? Can also provide FALSE to use a grey background. Future: provide tile URL

bold_nh

If map of tracts, bold GLP neighborhood boundariess? Defaults to TRUE.

Details

The parameters are organized into six sections:

  • Required: df, var

  • Filter and Adjust Data: rollmean, xmin, xmax, peers, order

  • Demographics: cat, include_hispanic, include_asian

  • Add Text to Graph: plot_title, y_title, caption_text, subtitle_text

  • Graph Elements: zero_start, ylimits, pctiles, shading

  • Manipulate Labels: label_function, axis_function


greaterlouisvilleproject/glptools documentation built on Feb. 9, 2025, 11:21 a.m.