A simple script in R to produce infographics style PDFs for Healthcare Associated Infection (HCAI) reports.
This script requires R/R studio to be already installed. Additionally, the following packages need to be installed and loaded:
- useful
- grid
- magick
- ggplot2
- cowplot
- stringr
- RColorBrewer
- Cairo
- gridExtra
- ggrepel
To produce PDFs the user need to configure the script variables.
As an example to get the following:
the user would need to provide the following details:
-
- Info_type <- 1
-
- rate_number <- 24
-
- plot_data <- data.frame(years = c("2007/08", "2008/09", "2009/10", "2010/11", "2011/12", "2012/13", "2013/14", "2014/15", "2015/16", "2016/17", "2017/18"), rate = c(100, 07, 60, 50, 40, 30, 20, 22, 20, 18, 20))
-
- rhigh_factor <- 7
-
- rlow_factor <- 4
-
- rhigh_malenumber <- 269
-
- rhigh_femnumber <- 250
-
- rlow_malenumber <-13
-
- rlow_femnumber <-16
-
- previous_year <- "2007/08"
-
- community_percent_old <- 40
-
- hospital_percent_old <- 60
-
- community_percent_new <- 64
-
- hospital_percent_new <- 36
For description of the type of data/what should be inserted please see comments in the source code.