plot_neighbourhood_profile_distribution: Plot the distribution of a neighbourhood profile variable

Description Usage Arguments Examples

View source: R/display_neighbourhood_profile.R

Description

Plot the distribution of a variable, across neighbourhoods, with an optional line showing the current neighbourhood's value

Usage

1
2
3
4
5
6
7
plot_neighbourhood_profile_distribution(
  data,
  variable,
  binwidth,
  compare = TRUE,
  static = FALSE
)

Arguments

data

Neighbourhood profiles data for a given neighbourhood, from neighbourhood_aggregate.

variable

Variable to visualize

binwidth

Bin width for geom_histogram

compare

Whether to show a line with the current neighbourhood's value. Defaults to TRUE - FALSE is useful in the City of Toronto view.

static

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
neighbourhood_aggregate[["Danforth"]] %>%
  plot_neighbourhood_profile_distribution("population_density", binwidth = 1000)

neighbourhood_aggregate[["Danforth"]] %>%
  plot_neighbourhood_profile_distribution("population_change", binwidth = 0.025)

neighbourhood_aggregate[["Danforth"]] %>%
  plot_neighbourhood_profile_distribution("unaffordable_housing", binwidth = 0.025)

neighbourhood_aggregate[["Danforth"]] %>%
  plot_neighbourhood_profile_distribution("average_renter_shelter_cost", binwidth = 50)

neighbourhood_aggregate[["Danforth"]] %>%
  plot_neighbourhood_profile_distribution("lim_at", binwidth = 0.025)

purposeanalytics/lemur documentation built on Dec. 22, 2021, 10:52 a.m.