This is my report for the Management Committee. I’m creating a plot using highcharter.

Some Info

This is really important information that people should read before looking at my output.

Here is a key formula that the reader should know about: \(y = \alpha + \beta x\).

References:

These are the R packages I’m going to highlight:

#The report
library(rmarkdown)

#Tables
library(DT)
library(reactable)

#Plots
library(ggplot2)
library(plotly)
library(highcharter)

I’m going to get some unemployment data from FRED to demo.

source("../scripts/fred_script.R")
analyst_info <- data.frame(data_start_date = params$data_start_date, data_end_date = params$data_end_date)
df <- fred_function(start_date = params$data_start_date, end_date = params$data_end_date)
Analysts might want to know this information
##   data_start_date data_end_date
## 1      2005-01-01    2021-09-01

Interactive Tables

with DT

The R package DT provides an R interface to the JavaScript library DataTables. R data objects (matrices or data frames) can be displayed as tables on HTML pages, and DataTables provides filtering, pagination, sorting, and many other features in the tables.

with reactable

Interactive data tables for R, based on the React Table library and made with reactR.

  • Features
  • Sorting, filtering, pagination
  • Grouping and aggregation
  • Built-in column formatting
  • Custom rendering via R or JavaScript — use Shiny HTML tags and HTML widgets in tables
  • Expandable rows and nested tables
  • Conditional styling
  • Works seamlessly within R Markdown documents and Shiny apps

Interactive or Fixed Plot