
Plots and Tables from a City-Level Disease Burden Analysis
Source:R/sus_mod_plot_burden.R
sus_mod_plot_burden.RdProduces lollipop charts, Lorenz concentration curves, and stacked bar
charts from a climasus_burden object returned by sus_mod_burden().
Arguments
- x
A
climasus_burdenobject produced bysus_mod_burden().- type
Character. Plot type:
"lollipop"(default),"lorenz", or"stacked".- output_type
Character.
"plot"(default),"table", or"all"(named list$plot,$table,$data).- interactive
Logical.
TRUEconverts the ggplot2 output to an interactive plotly widget. DefaultFALSE.- base_size
Numeric. ggplot2 base font size. Default
12.- save_plot
Character or
NULL. File path to save the plot.- lang
Character. Language for labels:
"pt"(default),"en","es".- verbose
Logical. Print progress messages. Default
FALSE.
Value
Depending on output_type:
"plot"-> aggplotorplotlyobject."table"-> atibbleof the plotted data."all"-> a named list:$plot,$table,$data.
Plot types (type)
type | Description |
"lollipop" | Ranked lollipop chart of city AN or excess burden (default) |
"lorenz" | Lorenz concentration curve showing burden inequality across cities |
"stacked" | Stacked heat/cold bar by city (only for AF input with component = "all") |
Examples
if (FALSE) { # \dontrun{
burden <- sus_mod_burden(af_list, lang = "pt")
sus_mod_plot_burden(burden, type = "lollipop", lang = "pt")
sus_mod_plot_burden(burden, type = "lorenz", lang = "en")
sus_mod_plot_burden(burden, type = "stacked", lang = "es")
out <- sus_mod_plot_burden(burden, output_type = "all")
out$table
} # }