knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Theming chart made in highchart with lbjdata

This is a basic example which shows you how to use lbjdata's highcharter theme. First, load the packages:

library(lbjdata)
library(tidyverse)
library(janitor)
library(highcharter)

Then, import some data:

provider_types <- read_csv("https://genesis.soc.texas.gov/files/accessibility/vaccineprovideraccessibilitydata.csv") %>% 
  clean_names() %>% 
  group_by(type) %>% 
  summarise(tot_shipped = sum(total_shipped),
            tot_avail = sum(vaccines_available)) %>% 
  drop_na() %>% 
  arrange(desc(tot_shipped))

Then, draw a chart with highcharter and add the theme:

provider_types %>% 
  hchart("column", hcaes(x=type, y = tot_shipped, colors=type),
         name = "Total Shipped: ") %>% 
  hc_title(text="Vaccine Supply, By Type of Provider") %>% 
  hc_subtitle(text="Source: Texas Department of State Health Services") %>% 
  hc_add_theme(hc_theme_lbj())


utexas-lbjp-data/lbjdata documentation built on Feb. 6, 2021, 12:30 a.m.