This is an extension of the tidytuesday assignment you have already done. Complete the questions below, using the screencast you chose for the tidytuesday assigment.
library(tidyverse)
library(lubridate)
theme_set(theme_light())
brewing_materials <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-03-31/brewing_materials.csv') %>%
mutate(date = ymd(paste(year, month, 1))) %>%
filter(year < 2016)
beer_taxed <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-03-31/beer_taxed.csv')
brewer_size <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-03-31/brewer_size.csv')
beer_states <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-03-31/beer_states.csv')
The dataset is of US Beer Production. The variable used in my graph are Pounds of Total Non-Grain product an Total Grain Products used in pounds between 2008 annd 2016
library(lubridate)
brewing_materials %>%
filter(str_detect(material_type, "Total.*products")) %>%
mutate(type = fct_reorder(type, month_current, sum)) %>%
ggplot(aes(date, month_current, fill = type)) +
geom_col() +
scale_y_continuous(labels = scales::comma) +
labs(x = "Time",
y = "Pounds used in beer production",
fill = "Material")
The graph shows the amount of the total of all of the grain products used in US Beer production as well as the amount of the total of all of the non-grain products used in US Beer production. The graph includes many different brewing materials an simplifys them into two variables. The graph shows the total of eavh variable (in pounds) from 2008-2016.