this is practice for knitting trelliscope plots to html files

# load libraries
library(ggplot2)
library(trelliscopejs)
library(tidyverse)
# load in data
tx <- read.csv("tx.csv")

# make it a tibble 
tx <- as_tibble(tx)
# trelliscope plot
tx %>% 
  filter(tip_amount < 12) %>% 
  ggplot( aes(x = tip_amount)) + 
  geom_histogram() + 
  ylim(c(0, 1200)) + 
  facet_trelliscope(~ pick_day,
                    name = "Date", 
                    desc = "Route dat from 7/01/2016 - 12/31/2016", 
                    nrow = 2, ncol = 3, 
                    path = ".", # will specify the same folder that the markdown is in
                    self_contained = TRUE) # will knit just the trelliscope graph (not the whole doc) straight to a webpage 
                                           # then knit and it will have the graph as an html embedded in the knitted file

can’t just send the web address because it is stored locally on your computer

if you open it straigh from the email it will open as a text file

and if you download it it will show up as html but the graph will not show up