Description Usage Arguments Examples
View source: R/display_neighbourhood_profile.R
Plot the distribution of a variable, across neighbourhoods, with an optional line showing the current neighbourhood's value
1 2 3 4 5 6 7 | plot_neighbourhood_profile_distribution(
data,
variable,
binwidth,
compare = TRUE,
static = FALSE
)
|
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. |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.