This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mapStates = map("state", fill = TRUE, plot = FALSE) | |
leaflet(data = mapStates) %>% addTiles() %>% | |
addPolygons(fillColor = topo.colors(10, alpha = NULL), stroke = FALSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Get the package | |
install.packages("getTBinR") | |
## Run the dashboard - if the dependencies are not installed you will be asked to install them. | |
getTBinR::run_tb_dashboard() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install.packages("getTBinR") | |
library(getTBinR) | |
# install.packages("tidyverse") | |
library(tidyverse) | |
# install.packages("gridExtra") | |
library(gridExtra) | |
# Get the data - WHO data | |
tb_df <- get_tb_burden() | |
dict <- get_data_dict() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install.packages("getTBinR") | |
library(getTBinR) | |
# install.packages("tidyverse") | |
library(tidyverse) | |
# install.packages("viridis") | |
library(viridis) | |
# install.packages("hrbrthemes") | |
library(hrbrthemes) | |
# install.packages("scales") | |
library(scales) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Get required packages, managed via pacman | |
if (!require(pacman)) install.packages("pacman"); library(pacman) | |
p_load("getTBinR") | |
p_load("tidyverse") | |
p_load("viridis") | |
p_load("hrbrthemes") | |
p_load("ggridges") | |
p_load_gh("thomasp85/patchwork", dependencies = TRUE) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Get packages | |
if (!require(pacman)) install.packages("pacman"); library(pacman) | |
p_load_gh("seabbs/getTBinR") | |
p_load_gh("thomasp85/patchwork") | |
p_load("tidyverse") | |
p_load("ggridges") | |
p_load("viridis") | |
## Get data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Adjust test size on a ggplot to make it visible in presentations | |
#' | |
#' Change the size of text on a \code{ggplot} so that a plot designed to look good in print is readable when included in a slide in a presentation (or vice verse) | |
#' @param g A \code{ggplot} graph | |
#' @param title_size The font size for the title, legend title and axes titles | |
#' @param text_size The font size for for the axis lables, legend text and facet text | |
#' @return A \code{ggplot} graph | |
#' @author Ella Kaye | |
#' @examples | |
#' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Load the package | |
library(Thresher) | |
#' Generate random data | |
set.seed(3928270) | |
ranData <- matrix(rnorm(100*12), ncol=12) | |
colnames(ranData) <- paste("G", 1:12, sep='') | |
#' Perform dim reduction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM seabbs/showmeperseus:latest | |
MAINTAINER "Sam Abbott" contact@samabbott.co.uk | |
WORKDIR /home/rstudio/ShowMePerseus | |
EXPOSE 3838 | |
CMD R -e 'shiny::runApp(port = 3838)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Get required packages - managed using pacman | |
if (!require(pacman)) install.packages("pacman"); library(pacman) | |
p_load("getTBinR") | |
p_load("ggplot2") | |
p_load("viridis") | |
p_load("dplyr") | |
p_load("forcats") | |
p_load("ggridges") | |
p_load_gh("thomasp85/patchwork") |