lindsayjorgenson / naccho.viz

Data Visualizations for NACCHO
1 stars 1 forks source link

naccho.viz

Create NACCHO-themed data visualizations using the {highcharter} package. For information on the highcharts license, visit their website.

Installation

You can install the development version of naccho.viz from GitHub with:

# install.packages("devtools")
devtools::install_github("lindsayjorgenson/naccho.viz")

Example

This is a basic example of a single bar chart:

#| message: FALSE
#| evaluate: FALSE

library(naccho.viz)
## basic example code

test_data <- data.frame(
  year = c("2019", "2022"),
  value = c(150, 200)
)

create_single_bar(
  data = test_data,
  x_variable = "year",
  y_variable = "value",
  y_label = "Number",
  title_text = "Test Bar Graph",
  y_max = 250,
  tooltip = "{point.value}"
)

Figure