display_neighbourhood_profile: Plot a neighbourhood profile variable

Description Usage Arguments Examples

View source: R/display_neighbourhood_profile.R

Description

Plot a neighbourhood profile variable

Usage

1
2
3
4
5
6
7
8
9
display_neighbourhood_profile(
  data,
  variable,
  compare = TRUE,
  width = 20,
  dollar = FALSE,
  type = "plot",
  static = FALSE
)

Arguments

data

Neighbourhood profiles data for a given neighbourhood, from neighbourhood_aggregate, or for the city, from city_aggregate

variable

Variable to visualize.

compare

Whether to compare to City of Toronto values. Defaults to TRUE. FALSE is useful when you want to plot *just* the values for as neighbourhood or *just* the values for the city.

width

Passed along to str_wrap for wrapping y-axis labels. Defaults to a width of 20.

dollar

Whether the variable shown is in dollars. Defaults to FALSE.

type

Type of display, "plot" or "table". Defaults to "plot".

static

Whether the plot should be an interactive (FALSE) or static (TRUE) version. Defaults to FALSE.

Examples

1
2
3
4
5
6
7
{
  neighbourhood_aggregate[["Danforth"]] %>%
    display_neighbourhood_profile("household_size")

  neighbourhood_aggregate[["Danforth"]] %>%
    display_neighbourhood_profile("average_total_income")
}

purposeanalytics/lemr documentation built on Dec. 22, 2021, 10:51 a.m.