count: false .panel1-the_chunk-auto[ ```r *library(tidyverse) ``` ] .panel2-the_chunk-auto[ ] --- count: false .panel1-the_chunk-auto[ ```r library(tidyverse) *library(paletteer) ``` ] .panel2-the_chunk-auto[ ] --- count: false .panel1-the_chunk-auto[ ```r library(tidyverse) library(paletteer) *library(gt) ``` ] .panel2-the_chunk-auto[ ] --- count: false .panel1-the_chunk-auto[ ```r library(tidyverse) library(paletteer) library(gt) *pizzaplace ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 49,574 x 7 id date time name size type price <chr> <chr> <chr> <chr> <chr> <chr> <dbl> 1 2015-000001 2015-01-01 11:38:36 hawaiian M classic 13.2 2 2015-000002 2015-01-01 11:57:40 classic_dlx M classic 16 3 2015-000002 2015-01-01 11:57:40 mexicana M veggie 16 4 2015-000002 2015-01-01 11:57:40 thai_ckn L chicken 20.8 5 2015-000002 2015-01-01 11:57:40 five_cheese L veggie 18.5 6 2015-000002 2015-01-01 11:57:40 ital_supr L supreme 20.8 7 2015-000003 2015-01-01 12:12:28 prsc_argla L supreme 20.8 8 2015-000003 2015-01-01 12:12:28 ital_supr M supreme 16.5 9 2015-000004 2015-01-01 12:16:31 ital_supr M supreme 16.5 10 2015-000005 2015-01-01 12:21:30 ital_supr M supreme 16.5 # … with 49,564 more rows ``` ] --- count: false .panel1-the_chunk-auto[ ```r library(tidyverse) library(paletteer) library(gt) pizzaplace %>% * mutate(type = case_when( * type == "chicken" ~ "chicken (pizzas with chicken as a major ingredient)", * type == "classic" ~ "classic (classical pizzas)", * type == "supreme" ~ "supreme (pizzas that try a little harder)", * type == "veggie" ~ "chicken (pizzas without any meats whatsoever)", * )) ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 49,574 x 7 id date time name size type price <chr> <chr> <chr> <chr> <chr> <chr> <dbl> 1 2015-000… 2015-01… 11:38… hawaiian M classic (classical pizzas) 13.2 2 2015-000… 2015-01… 11:57… classic… M classic (classical pizzas) 16 3 2015-000… 2015-01… 11:57… mexicana M chicken (pizzas without any m… 16 4 2015-000… 2015-01… 11:57… thai_ckn L chicken (pizzas with chicken … 20.8 5 2015-000… 2015-01… 11:57… five_ch… L chicken (pizzas without any m… 18.5 6 2015-000… 2015-01… 11:57… ital_su… L supreme (pizzas that try a li… 20.8 7 2015-000… 2015-01… 12:12… prsc_ar… L supreme (pizzas that try a li… 20.8 8 2015-000… 2015-01… 12:12… ital_su… M supreme (pizzas that try a li… 16.5 9 2015-000… 2015-01… 12:16… ital_su… M supreme (pizzas that try a li… 16.5 10 2015-000… 2015-01… 12:21… ital_su… M supreme (pizzas that try a li… 16.5 # … with 49,564 more rows ``` ] --- count: false .panel1-the_chunk-auto[ ```r library(tidyverse) library(paletteer) library(gt) pizzaplace %>% mutate(type = case_when( type == "chicken" ~ "chicken (pizzas with chicken as a major ingredient)", type == "classic" ~ "classic (classical pizzas)", type == "supreme" ~ "supreme (pizzas that try a little harder)", type == "veggie" ~ "chicken (pizzas without any meats whatsoever)", )) %>% * mutate(size = factor(size, * levels = c("S", "M", "L", * "XL", "XXL"))) ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 49,574 x 7 id date time name size type price <chr> <chr> <chr> <chr> <fct> <chr> <dbl> 1 2015-000… 2015-01… 11:38… hawaiian M classic (classical pizzas) 13.2 2 2015-000… 2015-01… 11:57… classic… M classic (classical pizzas) 16 3 2015-000… 2015-01… 11:57… mexicana M chicken (pizzas without any m… 16 4 2015-000… 2015-01… 11:57… thai_ckn L chicken (pizzas with chicken … 20.8 5 2015-000… 2015-01… 11:57… five_ch… L chicken (pizzas without any m… 18.5 6 2015-000… 2015-01… 11:57… ital_su… L supreme (pizzas that try a li… 20.8 7 2015-000… 2015-01… 12:12… prsc_ar… L supreme (pizzas that try a li… 20.8 8 2015-000… 2015-01… 12:12… ital_su… M supreme (pizzas that try a li… 16.5 9 2015-000… 2015-01… 12:16… ital_su… M supreme (pizzas that try a li… 16.5 10 2015-000… 2015-01… 12:21… ital_su… M supreme (pizzas that try a li… 16.5 # … with 49,564 more rows ``` ] --- count: false .panel1-the_chunk-auto[ ```r library(tidyverse) library(paletteer) library(gt) pizzaplace %>% mutate(type = case_when( type == "chicken" ~ "chicken (pizzas with chicken as a major ingredient)", type == "classic" ~ "classic (classical pizzas)", type == "supreme" ~ "supreme (pizzas that try a little harder)", type == "veggie" ~ "chicken (pizzas without any meats whatsoever)", )) %>% mutate(size = factor(size, levels = c("S", "M", "L", "XL", "XXL"))) %>% * dplyr::group_by(type, size) ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 49,574 x 7 # Groups: type, size [14] id date time name size type price <chr> <chr> <chr> <chr> <fct> <chr> <dbl> 1 2015-000… 2015-01… 11:38… hawaiian M classic (classical pizzas) 13.2 2 2015-000… 2015-01… 11:57… classic… M classic (classical pizzas) 16 3 2015-000… 2015-01… 11:57… mexicana M chicken (pizzas without any m… 16 4 2015-000… 2015-01… 11:57… thai_ckn L chicken (pizzas with chicken … 20.8 5 2015-000… 2015-01… 11:57… five_ch… L chicken (pizzas without any m… 18.5 6 2015-000… 2015-01… 11:57… ital_su… L supreme (pizzas that try a li… 20.8 7 2015-000… 2015-01… 12:12… prsc_ar… L supreme (pizzas that try a li… 20.8 8 2015-000… 2015-01… 12:12… ital_su… M supreme (pizzas that try a li… 16.5 9 2015-000… 2015-01… 12:16… ital_su… M supreme (pizzas that try a li… 16.5 10 2015-000… 2015-01… 12:21… ital_su… M supreme (pizzas that try a li… 16.5 # … with 49,564 more rows ``` ] --- count: false .panel1-the_chunk-auto[ ```r library(tidyverse) library(paletteer) library(gt) pizzaplace %>% mutate(type = case_when( type == "chicken" ~ "chicken (pizzas with chicken as a major ingredient)", type == "classic" ~ "classic (classical pizzas)", type == "supreme" ~ "supreme (pizzas that try a little harder)", type == "veggie" ~ "chicken (pizzas without any meats whatsoever)", )) %>% mutate(size = factor(size, levels = c("S", "M", "L", "XL", "XXL"))) %>% dplyr::group_by(type, size) %>% * dplyr::summarize( * sold = n(), * income = sum(price) * ) ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 14 x 4 # Groups: type [4] type size sold income <chr> <fct> <int> <dbl> 1 chicken (pizzas with chicken as a major ingredient) S 2224 28356 2 chicken (pizzas with chicken as a major ingredient) M 3894 65224. 3 chicken (pizzas with chicken as a major ingredient) L 4932 102339 4 chicken (pizzas without any meats whatsoever) S 2663 32387. 5 chicken (pizzas without any meats whatsoever) M 3583 57101 6 chicken (pizzas without any meats whatsoever) L 5403 104203. 7 classic (classical pizzas) S 6139 69870. 8 classic (classical pizzas) M 4112 60582. 9 classic (classical pizzas) L 4057 74518. 10 classic (classical pizzas) XL 552 14076 11 classic (classical pizzas) XXL 28 1007. 12 supreme (pizzas that try a little harder) S 3377 47464. 13 supreme (pizzas that try a little harder) M 4046 66475 14 supreme (pizzas that try a little harder) L 4564 94258. ``` ] --- count: false .panel1-the_chunk-auto[ ```r library(tidyverse) library(paletteer) library(gt) pizzaplace %>% mutate(type = case_when( type == "chicken" ~ "chicken (pizzas with chicken as a major ingredient)", type == "classic" ~ "classic (classical pizzas)", type == "supreme" ~ "supreme (pizzas that try a little harder)", type == "veggie" ~ "chicken (pizzas without any meats whatsoever)", )) %>% mutate(size = factor(size, levels = c("S", "M", "L", "XL", "XXL"))) %>% dplyr::group_by(type, size) %>% dplyr::summarize( sold = n(), income = sum(price) ) %>% # table is kind of large, hard to make sense of * dplyr::filter(size != "S" & * size != "M" & * size != "XL") ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 5 x 4 # Groups: type [4] type size sold income <chr> <fct> <int> <dbl> 1 chicken (pizzas with chicken as a major ingredient) L 4932 102339 2 chicken (pizzas without any meats whatsoever) L 5403 104203. 3 classic (classical pizzas) L 4057 74518. 4 classic (classical pizzas) XXL 28 1007. 5 supreme (pizzas that try a little harder) L 4564 94258. ``` ] --- count: false .panel1-the_chunk-auto[ ```r library(tidyverse) library(paletteer) library(gt) pizzaplace %>% mutate(type = case_when( type == "chicken" ~ "chicken (pizzas with chicken as a major ingredient)", type == "classic" ~ "classic (classical pizzas)", type == "supreme" ~ "supreme (pizzas that try a little harder)", type == "veggie" ~ "chicken (pizzas without any meats whatsoever)", )) %>% mutate(size = factor(size, levels = c("S", "M", "L", "XL", "XXL"))) %>% dplyr::group_by(type, size) %>% dplyr::summarize( sold = n(), income = sum(price) ) %>% # table is kind of large, hard to make sense of dplyr::filter(size != "S" & size != "M" & size != "XL") -> *pizza_prep; pizza_prep ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 5 x 4 # Groups: type [4] type size sold income <chr> <fct> <int> <dbl> 1 chicken (pizzas with chicken as a major ingredient) L 4932 102339 2 chicken (pizzas without any meats whatsoever) L 5403 104203. 3 classic (classical pizzas) L 4057 74518. 4 classic (classical pizzas) XXL 28 1007. 5 supreme (pizzas that try a little harder) L 4564 94258. ``` ] <style> .panel1-the_chunk-auto { color: black; width: 49%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-the_chunk-auto { color: black; width: 49%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-the_chunk-auto { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> <style type="text/css"> .remark-code{line-height: 1.5; font-size: 90%} @media print { .has-continuation { display: block; } } code.r.hljs.remark-code{ position: relative; overflow-x: hidden; } code.r.hljs.remark-code:hover{ overflow-x:visible; width: 500px; border-style: solid; } </style>