Task 1: Reflection


Working with Flexdahsboard is interesting because of the way that the files are set up and it requires some finagling at times but overall is relatively easy. Plotly also seems relatively easy to work with besides 1 point, which is the labels, I have not been able to get the labels to actually show up in the interactive graph, instead the best I could get was an unattached number, which is the default, it seems similar to the issue that you were having in class when you were demonstrating the tech. These technologies are very useful for showing data however, as they both present ways of demonstrating data far more clearly and digestible to the user, however they also present more opportunities for lying to the viewer, mainly by putting data behind other plots or hiding data behind tool tips, while claiming the graph to be technically truthful but instead highly misleading. ********

Task 2: Interactive plots

library(tidyverse)
library(plotly)

# Load data here

air_data <- read.csv("ad_aqi_tracker_data.csv")

Do the following:

  1. Make a plot. Any kind of plot will do (though it might be easiest to work with geom_point()).

  2. Make the plot interactive with ggplotly().

  3. Make sure the hovering tooltip is more informative than the default.

Good luck and have fun!

x <- ggplot(air_data,aes(x=Date %>% as.Date(), y=Ozone.AQI.Value)) + geom_point(aes(text=X20.year.High..2000.2019.))
## Warning in geom_point(aes(text = X20.year.High..2000.2019.)): Ignoring unknown
## aesthetics: text
ggplotly(x)

Task 3:

Install the {flexdashboard} package and create a new R Markdown file in your project by going to File > New File… > R Markdown… > From Template > Flexdashboard.

Using the documentation for {flexdashboard} online, create a basic dashboard that shows a plot (static or interactive) in at least three chart areas. Play with the layout if you’re feeling brave.