inst/text/shiny/setup.R

####################### Setup #######################

# Shiny packages ----
library(shiny)
library(shinycssloaders)

# Data wrangling packages ----
library(dplyr)
library(magrittr)

# Plotting packages ----
library(plotly)

# PHS styling packages ----
library(phsstyles)

# Load core functions ----
source("functions/core_functions.R")

## Plotting ----
# Style of x and y axis
xaxis_plots <- list(
  title = FALSE,
  tickfont = list(size = 14),
  titlefont = list(size = 14),
  showline = TRUE,
  fixedrange = TRUE
)

yaxis_plots <- list(
  title = FALSE,
  rangemode = "tozero",
  fixedrange = TRUE,
  size = 4,
  tickfont = list(size = 14),
  titlefont = list(size = 14)
)

# Buttons to remove from plotly plots
bttn_remove <- list(
  'select2d',
  'lasso2d',
  'zoomIn2d',
  'zoomOut2d',
  'autoScale2d',
  'toggleSpikelines',
  'hoverCompareCartesian',
  'hoverClosestCartesian'
)

# LOAD IN DATA HERE ----
Public-Health-Scotland/phstemplates documentation built on July 16, 2025, 9:08 p.m.