Instructions
Use this template for the in-class activity. Create a graph to addresses each of the following insights from the global superstore data set. Where applicable, your graph and/or description should clearly explain any relevant definitions. For example, if you are discussing the “most important” market, then you should explain how you are measuring “most important”. For each graph, include a 1-2 sentence description with a deeper analysis of the main insight of the graph.

orders <- read.csv("Global Superstore Orders.csv")

Insight #1: The most profitable sub-categories are in Technology.
Create a graph to describe the most profitable subcategories and fill the color by category. The graph should look like this:

Your description here

# INSERT CODE HERE

Insight #2: There is seasonality in our global sales.

Your description here

library(lubridate)
## 
## Attaching package: 'lubridate'
## The following object is masked from 'package:base':
## 
##     date
library(zoo)
## 
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
library(tidyverse)
## Loading tidyverse: ggplot2
## Loading tidyverse: tibble
## Loading tidyverse: tidyr
## Loading tidyverse: readr
## Loading tidyverse: purrr
## Loading tidyverse: dplyr
## Conflicts with tidy packages ----------------------------------------------
## as.difftime(): lubridate, base
## date():        lubridate, base
## filter():      dplyr, stats
## intersect():   lubridate, base
## lag():         dplyr, stats
## setdiff():     lubridate, base
## union():       lubridate, base
orders$Date <- as.Date(orders$Order.Date, format = "%m/%d/%Y") 
orders$qtr <- as.yearqtr(orders$Order.Date)

orders %>% group_by(qtr) %>% summarise(totalProfit = sum(Sales)) %>% 
  ggplot(aes(x = qtr, y = totalProfit)) + geom_line()
## Don't know how to automatically pick scale for object of type yearqtr. Defaulting to continuous.
## geom_path: Each group consists of only one observation. Do you need to
## adjust the group aesthetic?

* Insight #3:** The most important market is…

Your description here. Remember to explain the measure of importance and narrate your graph.

orders %>% group_by(Market) %>% summarise(totalProfit = sum(Profit)) %>% 
  ggplot(aes(x = Market, y = totalProfit)) + geom_bar(stat = "identity")

* Insight #4:** (Find your own)

Your description here

# INSERT CODE HERE