```{r setup, include=FALSE} if (!require("tidyverse")) { install.packages("tidyverse") library(tidyverse) } if (!require("knitr")) { install.packages("knitr") library(knitr) } if (!require("cowplot")) { install.packages("cowplot") library(cowplot) } if (!require("latex2exp")) { install.packages("latex2exp") library(latex2exp) } if (!require("plotly")) { install.packages("plotly") library(plotly) } if (!require("gapminder")) { install.packages("gapminder") library(gapminder) } if (!require("png")) { install.packages("png") # Install png package library("png") } if (!require("RCurl")) { install.packages("RCurl") # Install RCurl package library("RCurl") } if (!require("colourpicker")) { install.packages("colourpicker") library("colourpicker") } if (!require("gganimate")) { install.packages("gganimate") library("gganimate") } if (!require("gifski")) { install.packages("gifski") library("gifski") } if (!require("magick")) { install.packages("magick") library("magick") } if (!require("grDevices")) { install.packages("grDevices") library("grDevices") } if (!require("jpeg")) { install.packages("jpeg") library("jpeg") } knitr::opts_chunk$set(echo = FALSE, warning = FALSE, result = TRUE, message = FALSE) ``` # Slide Title The number of hash-tags represents the level of the header. we can align these headers using CSS. For example, the CSS styles that used in creating my class notes. * You can include any images (including interactive images) in the HTML slide. ```{r} ## preparing data poc <- read.csv("https://github.com/pengdsci/datasets/raw/main/POC.csv")[,c(7,8,9, 17)] poc.site <- poc[poc$POC == 1,] # geo styling geostyle <- list(scope = 'usa', projection = list(type = 'albers usa'), showland = TRUE, landcolor = toRGB("gray95"), subunitcolor = toRGB("gray85"), countrycolor = toRGB("gray85"), countrywidth = 0.5, subunitwidth = 0.5 ) ## plotting map fig <- plot_geo(poc.site, lat = ~ycoord, lon = ~xcoord) %>% add_markers(text = ~ SITE_DESCRIPTION, color = "red", symbol = I("circle"), size = I(8), hoverinfo = "text" ) %>% layout( title = 'POC Risk Sites', geo = geostyle) fig ``` # External Images * You can include static images generated by other device into the HTML slide presentation through R Markdown. * Including an interactive images generated by other devices into R markdown may not be straightforward. * We can include animated gif images (it is not considered as an interactive image) in R markdown as usual. # Including Tableau Chars We cannot include a interactive plot hosted on a web server through R Markdown! One way to get this around is to add the code provided by Tableau into the knitted HTML directly.