library(completejourney)
## Welcome to the completejourney package! Learn more about these data
## sets at http://bit.ly/completejourney.
library(ggplot2)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(lubridate)
##
## Attaching package: 'lubridate'
## The following objects are masked from 'package:base':
##
## date, intersect, setdiff, union
ggplot(demographics,aes(x = household_comp, fill = income)) +
geom_bar(color = "black") +
labs(x = "Display Location", y = "Quantity", title = "Quantity v. Display Location by Family Size and Income")

transaction <- transactions_sample %>%
inner_join(products)
## Joining with `by = join_by(product_id)`
products <- products
transaction %>%
filter(product_category == "PNT BTR/JELLY/JAMS") %>%
ggplot(aes(x = quantity, y = sales_value)) +
geom_point(color = "red") +
scale_x_log10(name = "PNT BTR/JELLY/JAMS Quantity") +
labs(title = "Number of Transactions with PNT BTR/JELLY/JAMS for Product Category")

promotions <- promotions_sample
transactions_sample %>%
inner_join(promotions) %>%
ggplot(aes(x = mailer_location, y = quantity)) +
geom_col(color = "black") +
labs(x = "Mailer Location", y = "Quantity", title = "Comparison of Quantity by Mailer Location")
## Joining with `by = join_by(store_id, product_id, week)`
