We are going to try to knit and send an html document.
This will be a pretty cool trelliscope graph!
library(ggplot2)
library(trelliscopejs)
## This package is no longer maintained. Please use the 'trelliscope' package instead (see https://github.com/trelliscope/).
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ lubridate 1.9.4 ✔ tibble 3.2.1
## ✔ purrr 1.0.4 ✔ tidyr 1.3.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
# Reading in the data
tx <- read.csv("tx.csv")
tx <- as_tibble(tx)
tx |>
filter(tip_amount <= 12) |>
ggplot(aes(x = tip_amount)) +
geom_histogram() +
ylim(0, 1200) +
facet_trelliscope(~ pick_day,
name = "Date",
desc = "Route data from 7/01/2016 to 12/31/2016",
nrow = 2, ncol = 3,
scales = c("same", "same"),
path = ".", # Specifies same folder as RMD folder
self_contained = TRUE) # Makes sure we can send html file in its own html