Production quality output using Inkscape for rasterization & ImageMagick for JPEG compression. (SVG output is the same quality as other functions.)
c19_inkmagick( var = TRUE, eu = TRUE, r = TRUE, d_all = FALSE, dl = TRUE, rl = TRUE )
var | whether to output various data.egov.bg-sourced plots |
---|---|
eu | whether to output EUROSTAT/ECDC-sourced plots |
r | whether to plot r (incl. time-consuming calculation) |
d_all | whether to plot age band death plots for countries other than BG |
dl | whether to refresh all data sets from the Internet |
rl | whether to refresh all data sets from disk |
Using these programs yields slightly better results but is not really
necessary. c19_save_all() saves SVG of the same quality but produces
lower-quality PNG/JPEG. You can also save individual plots using
ggplot2::ggsave() or plot to screen (e.g. c19_heat()
or
print(c19_heat())
in non-interactive mode).
Output files will be stored in folders c19bg/plots/MMMDD (month-day). Downloaded and calculated data will be stored in c19bg/data.
Paths to Inkscape and ImageMagick can be set via options.
Other output funcs:
c19_eu_plots_save()
,
c19_heat_save()
,
c19_oblasts_save()
,
c19_r_plot_save()
,
c19_save_all()
,
c19_var_plot_save()
if (FALSE) { # set options options(c19bg.output = list( inkscape = "\"C:\\Program Files\\Inkscape\\bin\\inkscape.exe\"", inkopts = "-w %d --export-filename", magick = "magick", # works, if it's in PATH mgkopts = "-quality 100", pixwidth = 1375, width = 11, height = 7, )) options(c19bg.output_dir = "c19bg/plots") # standard run (download from Internet) c19_inkmagick() # include country-level age band plots from EUROSTAT demo mortality database c19_inkmagick(d_all = T) # don't download datasets already present in data dir c19_inkmagick(dl = F) }