count: false .panel1-the_chunk-auto[ ``` r *oregon_population_pyramid_data ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 1,296 × 4 county age gender percent <chr> <chr> <chr> <dbl> 1 Baker 0-4 Men 0.0260 2 Benton 0-4 Men 0.0194 3 Clackamas 0-4 Men 0.0258 4 Clatsop 0-4 Men 0.0270 5 Columbia 0-4 Men 0.0278 6 Coos 0-4 Men 0.0220 7 Crook 0-4 Men 0.0253 8 Curry 0-4 Men 0.0149 9 Deschutes 0-4 Men 0.0245 10 Douglas 0-4 Men 0.0260 # ℹ 1,286 more rows ``` ] --- count: false .panel1-the_chunk-auto[ ``` r oregon_population_pyramid_data %>% * filter(county == "Baker") ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 36 × 4 county age gender percent <chr> <chr> <chr> <dbl> 1 Baker 0-4 Men 0.0260 2 Baker 5-9 Men 0.0232 3 Baker 10-14 Men 0.0424 4 Baker 15-19 Men 0.0227 5 Baker 20-24 Men 0.0229 6 Baker 25-29 Men 0.0276 7 Baker 30-34 Men 0.0321 8 Baker 35-39 Men 0.0247 9 Baker 40-44 Men 0.0366 10 Baker 45-49 Men 0.0287 # ℹ 26 more rows ``` ] --- count: false .panel1-the_chunk-auto[ ``` r oregon_population_pyramid_data %>% filter(county == "Baker") %>% * ggplot() ``` ] .panel2-the_chunk-auto[ ![](or_pyramid_chunk_flipbook_files/figure-html/the_chunk_auto_03_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r oregon_population_pyramid_data %>% filter(county == "Baker") %>% ggplot() + * aes(x = percent*100, * y = fct_inorder(age), * pyramid_cat = gender) ``` ] .panel2-the_chunk-auto[ ![](or_pyramid_chunk_flipbook_files/figure-html/the_chunk_auto_04_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r oregon_population_pyramid_data %>% filter(county == "Baker") %>% ggplot() + aes(x = percent*100, y = fct_inorder(age), pyramid_cat = gender) + * geom_rect(stat = StatPyramid, * sep = 1) ``` ] .panel2-the_chunk-auto[ ![](or_pyramid_chunk_flipbook_files/figure-html/the_chunk_auto_05_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r oregon_population_pyramid_data %>% filter(county == "Baker") %>% ggplot() + aes(x = percent*100, y = fct_inorder(age), pyramid_cat = gender) + geom_rect(stat = StatPyramid, sep = 1) + * aes(label = age) ``` ] .panel2-the_chunk-auto[ ![](or_pyramid_chunk_flipbook_files/figure-html/the_chunk_auto_06_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r oregon_population_pyramid_data %>% filter(county == "Baker") %>% ggplot() + aes(x = percent*100, y = fct_inorder(age), pyramid_cat = gender) + geom_rect(stat = StatPyramid, sep = 1) + aes(label = age) + * geom_text(stat = StatPyramidlabel) ``` ] .panel2-the_chunk-auto[ ![](or_pyramid_chunk_flipbook_files/figure-html/the_chunk_auto_07_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r oregon_population_pyramid_data %>% filter(county == "Baker") %>% ggplot() + aes(x = percent*100, y = fct_inorder(age), pyramid_cat = gender) + geom_rect(stat = StatPyramid, sep = 1) + aes(label = age) + geom_text(stat = StatPyramidlabel) + * scale_x_continuous(breaks = c(-10:0 - 1, 0:10 + 1), * labels = paste0(c(10:0, 0:10), "%"), * limits = c(-10,10)) ``` ] .panel2-the_chunk-auto[ ![](or_pyramid_chunk_flipbook_files/figure-html/the_chunk_auto_08_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r oregon_population_pyramid_data %>% filter(county == "Baker") %>% ggplot() + aes(x = percent*100, y = fct_inorder(age), pyramid_cat = gender) + geom_rect(stat = StatPyramid, sep = 1) + aes(label = age) + geom_text(stat = StatPyramidlabel) + scale_x_continuous(breaks = c(-10:0 - 1, 0:10 + 1), labels = paste0(c(10:0, 0:10), "%"), limits = c(-10,10)) + * labs(y = NULL, x = NULL, fill = NULL) ``` ] .panel2-the_chunk-auto[ ![](or_pyramid_chunk_flipbook_files/figure-html/the_chunk_auto_09_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r oregon_population_pyramid_data %>% filter(county == "Baker") %>% ggplot() + aes(x = percent*100, y = fct_inorder(age), pyramid_cat = gender) + geom_rect(stat = StatPyramid, sep = 1) + aes(label = age) + geom_text(stat = StatPyramidlabel) + scale_x_continuous(breaks = c(-10:0 - 1, 0:10 + 1), labels = paste0(c(10:0, 0:10), "%"), limits = c(-10,10)) + labs(y = NULL, x = NULL, fill = NULL) + * theme(axis.text.y = element_blank(), * axis.ticks.y = element_blank(), * legend.position = "top", * legend.justification = "left", * panel.grid = element_blank(), * panel.background = element_rect(fill = "whitesmoke") * ) ``` ] .panel2-the_chunk-auto[ ![](or_pyramid_chunk_flipbook_files/figure-html/the_chunk_auto_10_output-1.png)<!-- --> ] <style> .panel1-the_chunk-auto { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-the_chunk-auto { color: black; width: 59.3939393939394%; 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: 120%} @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>