--- title: "Multi-Hospital Branding" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Multi-Hospital Branding} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r setup, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.width = 7, fig.height = 5 ) ``` ## Introduction BFHtheme supports both Bispebjerg og Frederiksberg Hospital and Region Hovedstaden branding. This vignette shows how to choose palettes, scales, and defaults that match the audience for each deliverable. You will learn how to: - access the hospital and regional colour systems, - apply sequential and infographic palettes, - switch defaults on the fly between organisations, - ensure accessibility and departmental consistency, - and document branding choices for multi-site reporting. | Need | Hospital focus | Region focus | | --- | --- | --- | | Core discrete palette | `palette = "hospital"` | `palette = "regionh"` | | Sequential gradients | `"hospital_blues_seq"` | `"regionh_blues_seq"` | | Infographics / many categories | `"hospital_infographic"` | `"regionh_infographic"` | | Default session styling | `set_bfh_defaults(palette = "hospital")` | `set_bfh_defaults(palette = "regionh")` | ```{r load, message=FALSE} library(BFHtheme) library(ggplot2) ``` ## Organisational Colour Palettes ### Bispebjerg og Frederiksberg Hospital Hospital-level materials emphasise bright blues with light neutrals. Use these palettes for BFH internal reports, departmental dashboards, and patient-facing content. ```{r hospital-colors} # Access hospital colours hospital_primary <- bfh_cols("hospital_primary") hospital_blue <- bfh_cols("hospital_blue") print(hospital_primary) print(hospital_blue) # View all hospital colours hospital_palette <- bfh_cols( "hospital_primary", "hospital_blue", "hospital_light_blue1", "hospital_light_blue2", "regionh_grey" ) print(hospital_palette) ``` Apply the hospital palette to discrete fills: ```{r hospital-plot} ggplot(mtcars, aes(x = factor(cyl), fill = factor(cyl))) + geom_bar() + labs( title = "Hospital Branding Example", x = "Cylinders", fill = "Cylinders" ) + scale_fill_bfh(palette = "hospital") + theme_bfh() ``` ### Region Hovedstaden Region-level communications lean on a deeper navy and cool neutrals. ```{r regionh-colors} # Access Region H colours regionh_primary <- bfh_cols("regionh_primary") regionh_blue <- bfh_cols("regionh_blue") print(regionh_primary) print(regionh_blue) # View all Region H colours regionh_palette <- bfh_cols( "regionh_primary", "regionh_blue", "regionh_light_grey1", "regionh_light_grey2", "regionh_grey" ) print(regionh_palette) ``` Switch to the Region H palette when preparing cross-hospital material: ```{r regionh-plot} ggplot(mtcars, aes(x = factor(cyl), fill = factor(cyl))) + geom_bar() + labs( title = "Region Hovedstaden Branding", x = "Cylinders", fill = "Cylinders" ) + scale_fill_bfh(palette = "regionh") + theme_bfh() ``` ## Sequential Palettes ### Hospital Sequential Palettes For visualisations that map magnitude or rank, use the hospital sequential palettes: ```{r hospital-sequential} # Create sample data set.seed(123) data <- expand.grid(x = 1:10, y = 1:10) data$z <- with(data, x + y + rnorm(100, 0, 2)) ggplot(data, aes(x = x, y = y, fill = z)) + geom_tile() + labs(title = "Hospital Blues Sequential Palette") + scale_fill_bfh_continuous(palette = "hospital_blues_seq") + theme_bfh() ``` ### Region H Sequential Palettes Regional gradients emphasise the darker navy tones while maintaining legible steps for heatmaps and surface plots. ```{r regionh-sequential} ggplot(data, aes(x = x, y = y, fill = z)) + geom_tile() + labs(title = "Region H Blues Sequential Palette") + scale_fill_bfh_continuous(palette = "regionh_blues_seq") + theme_bfh() ``` ## Infographic Palettes Use infographic palettes when you need many clearly differentiated categories. They balance the brand primaries with supportive neutrals. ### Hospital Infographic Palette ```{r hospital-infographic} # Sample categorical data category_data <- data.frame( category = LETTERS[1:5], value = c(23, 45, 12, 34, 28) ) ggplot(category_data, aes(x = reorder(category, value), y = value, fill = category)) + geom_col() + coord_flip() + labs( title = "Hospital Infographic Colours", x = "Category", y = "Value" ) + scale_fill_bfh(palette = "hospital_infographic") + theme_bfh() + theme(legend.position = "none") ``` ### Region H Infographic Palette ```{r regionh-infographic} ggplot(category_data, aes(x = reorder(category, value), y = value, fill = category)) + geom_col() + coord_flip() + labs( title = "Region H Infographic Colours", x = "Category", y = "Value" ) + scale_fill_bfh(palette = "regionh_infographic") + theme_bfh() + theme(legend.position = "none") ``` ## Combining Organisational Branding ### Consistent Theme with Different Palettes Use the same theme structure across organisations while swapping palettes: ```{r combined-hospital} # Hospital version p_hospital <- ggplot(mtcars, aes(x = wt, y = mpg, colour = hp)) + geom_point(size = 3) + labs( title = "Hospital Analysis", subtitle = "Vehicle Performance Data" ) + scale_color_bfh_continuous(palette = "hospital_blues") + theme_bfh() print(p_hospital) ``` ```{r combined-regionh} # Region H version p_regionh <- ggplot(mtcars, aes(x = wt, y = mpg, colour = hp)) + geom_point(size = 3) + labs( title = "Region Hovedstaden Analysis", subtitle = "Vehicle Performance Data" ) + scale_color_bfh_continuous(palette = "regionh_blues") + theme_bfh() print(p_regionh) ``` ### Setting Default Palette Set organisational defaults for a session: ```{r defaults-hospital, eval=FALSE} # Set hospital as default set_bfh_defaults(palette = "hospital") # All subsequent plots use hospital colours ggplot(mtcars, aes(x = factor(cyl))) + geom_bar() ``` ```{r defaults-regionh, eval=FALSE} # Switch to Region H defaults set_bfh_defaults(palette = "regionh") # All subsequent plots use Region H colours ggplot(mtcars, aes(x = factor(cyl))) + geom_bar() ``` ## Colour Accessibility ### Contrast and Readability Both hospital and Region H palettes are designed for adequate contrast: ```{r contrast} # Hospital primary on white background ggplot(mtcars, aes(x = wt, y = mpg)) + geom_point(colour = bfh_cols("hospital_primary"), size = 3) + labs(title = "Hospital Primary Colour") + theme_bfh() # Region H primary on white background ggplot(mtcars, aes(x = wt, y = mpg)) + geom_point(colour = bfh_cols("regionh_primary"), size = 3) + labs(title = "Region H Primary Colour") + theme_bfh() ``` ### Colourblind Considerations Check palette accessibility: ```{r colorblind, eval=FALSE} # Basic check check_colorblind_safe(bfh_cols("hospital_primary", "hospital_blue")) # For comprehensive testing, use specialised packages # install.packages("colorblindcheck") library(colorblindcheck) palette_check( bfh_palettes$hospital, plot = TRUE ) ``` ## Customising for Specific Departments ### Department-Specific Colours Extend the colour system for department use: ```{r department-colors} # Define department colours using base palette dept_emergency <- bfh_cols("hospital_primary") dept_surgery <- bfh_cols("hospital_blue") dept_pediatrics <- bfh_cols("hospital_light_blue1") dept_colors <- c( "Emergency" = dept_emergency, "Surgery" = dept_surgery, "Pediatrics" = dept_pediatrics ) # Use in plots dept_data <- data.frame( department = names(dept_colors), patients = c(120, 85, 95) ) ggplot(dept_data, aes(x = department, y = patients, fill = department)) + geom_col() + scale_fill_manual(values = dept_colors) + labs( title = "Patient Count by Department", x = "Department", y = "Number of Patients" ) + theme_bfh() + theme(legend.position = "none") ``` ## Multi-Site Comparisons ### Comparing Data Across Sites Maintain consistent styling when comparing multiple sites by mapping each site to a predefined brand colour: ```{r multi-site} # Sample multi-site data site_data <- data.frame( site = rep(c("BFH", "Rigshospitalet", "Hvidovre"), each = 4), quarter = rep(paste0("Q", 1:4), 3), value = c( 85, 88, 92, 90, # BFH 78, 82, 85, 83, # Rigshospitalet 82, 85, 88, 86 # Hvidovre ) ) ggplot(site_data, aes(x = quarter, y = value, group = site, colour = site)) + geom_line(linewidth = 1) + geom_point(size = 3) + labs( title = "Quarterly Performance Across Sites", x = "Quarter", y = "Performance Score", colour = "Site" ) + scale_colour_manual( values = c( "BFH" = bfh_cols("hospital_primary"), "Rigshospitalet" = bfh_cols("regionh_primary"), "Hvidovre" = bfh_cols("regionh_grey") ) ) + theme_bfh() ``` ## Brand Guidelines Reference ### Hospital Colours **Primary**: `hospital_primary` (#007dbb) - Use: Main brand colour, primary data series - Usage: Headers, primary chart elements **Secondary**: `hospital_blue` (#009ce8) - Use: Secondary data series, accents - Usage: Supporting chart elements **Light Blues**: `hospital_light_blue1`, `hospital_light_blue2` - Use: Backgrounds, fills, lighter emphasis - Usage: Sequential scales, area fills **Neutrals**: `regionh_grey`, `regionh_dark` - Use: Text, borders, secondary information - Usage: Axis labels, grid lines ### Region Hovedstaden Colours **Primary**: `regionh_primary` (#002555) - Use: Main brand colour for regional reporting - Usage: Headers, primary emphasis **Secondary**: `regionh_blue` (#007dbb) - Use: Secondary series, complements primary - Usage: Supporting elements **Light Greys**: `regionh_light_grey1`, `regionh_light_grey2` - Use: Backgrounds, subtle fills - Usage: Sequential scales, backgrounds **Neutrals**: `regionh_grey`, `regionh_dark_grey` - Use: Text, neutral elements - Usage: Labels, annotations ## Usage Guidelines ### When to Use Hospital vs Region H Branding **Hospital Branding**: - Internal BFH reports and presentations - Department-level analyses - Hospital-specific communications - Patient-facing materials for BFH **Region H Branding**: - Regional reports and comparisons - Cross-hospital analyses - Regional management presentations - Koncern-level communications ### Consistency Best Practices 1. Use one primary palette per document 2. Maintain consistent palette choice across related documents 3. Use infographic palettes for categorical data with many groups 4. Use sequential palettes for continuous data 5. Test colour combinations for accessibility 6. Document palette choice in analysis scripts ## Next Steps - See `vignette("getting-started")` for basic usage patterns - See `vignette("customization")` for advanced options - Review organisational brand guidelines for detailed specifications - Check `?bfh_cols` and `?bfh_palettes` for complete colour reference