class: center, middle, inverse, title-slide # {ggplot2} and extensions geoms ### Gina Reynolds --- --- - ggplot2 - ggforce - ggbump - ggpointdensity - ggrepel - packcircles - waffle --- --- # 'Nouns': The geom_*() line up --- class: inverse, center, middle name: cc # continous x and y --- class: split-40 count: false .left-code-continuous_continuous_build-auto[ ```r *ggplot(data = gapminder_2002) ``` ] .right-output-continuous_continuous_build-auto[ <img src="geoms_files/figure-html/continuous_continuous_build_auto_1_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous_build-auto[ ```r ggplot(data = gapminder_2002) + * aes(x = gdpPercap/1000) ``` ] .right-output-continuous_continuous_build-auto[ <img src="geoms_files/figure-html/continuous_continuous_build_auto_2_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous_build-auto[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + * aes(y = lifeExp) ``` ] .right-output-continuous_continuous_build-auto[ <img src="geoms_files/figure-html/continuous_continuous_build_auto_3_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous_build-auto[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + * coord_cartesian(xlim = c(0,50), ylim = c(35,90)) ``` ] .right-output-continuous_continuous_build-auto[ <img src="geoms_files/figure-html/continuous_continuous_build_auto_4_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous_build-auto[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + * geom_point() ``` ] .right-output-continuous_continuous_build-auto[ <img src="geoms_files/figure-html/continuous_continuous_build_auto_5_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous_build-auto[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * theme_minimal() ``` ] .right-output-continuous_continuous_build-auto[ <img src="geoms_files/figure-html/continuous_continuous_build_auto_6_output-1.png" width="100%" /> ] <style> .left-code-continuous_continuous_build-auto { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-continuous_continuous_build-auto { width: 60%; float: right; padding-left: 1%; } </style> --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + geom_rug() + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_1_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_tile(width = 3, height = 3, fill = "green", alpha = .25) + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_2_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_segment(aes(xend = 0, yend = 40), alpha = .2) + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_3_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_curve(aes(xend = 0, yend = 40), linetype = "dotted") + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_4_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_rect(aes(xmin = 20, xmax = gdpPercap/1000, ymin = 40, ymax = lifeExp), alpha = .02, fill = "magenta", color = "grey") + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_5_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_text(aes(label = country)) + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_6_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_label(aes(label = country)) + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_7_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * stat_density_2d(aes(fill = ..density..), geom = "raster", contour = FALSE, alpha = .5) + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_8_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_density2d() + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_9_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggalt::stat_bkde2d(bandwidth=c(0.5, 4), aes(fill = ..level..), geom = "polygon") + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_10_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggalt::geom_bkde2d(bandwidth=c(0.5, 4)) + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_11_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_smooth() + # theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_12_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_smooth(method = lm) + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_13_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_hex(alpha = .5,color = "white") + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_14_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_hex(bins = 12, alpha = .9, color = "white") + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_15_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_voronoi_segment() + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_16_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_voronoi_tile(fill = "green", color = "white", alpha = .5) + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_17_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_voronoi_tile(aes(fill = continent, group = -1L), color = "white", alpha = .5, normalize = TRUE) + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_18_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_voronoi_tile(aes(fill = continent, group = -1L), colour = 'black', max.radius = 3, alpha = .5) + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_19_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_delaunay_tile(fill = "magenta", alpha = 0.3, colour = 'black') + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_20_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_delaunay_segment2(aes(color = continent, group = -1L), size = 3, lineend = 'round') + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_21_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_bspline_closed(alpha = 0.5, fill = "cadetblue") + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_22_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_bspline_closed(alpha = 0.5, fill = "cadetblue") + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_23_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_diagonal(aes(xend = 20, yend = lifeExp - 3), color = "goldenrod4") + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_24_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggbump::geom_sigmoid(aes(group = country, xend = 20, yend = lifeExp - 3), color = "firebrick") + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_25_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_path(color = "plum4") + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_26_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_polygon(alpha = 0.5, fill = "plum4") + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_27_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggalt::geom_encircle(s_shape=0.5, expand=0.1, colour="purple") + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_28_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggalt::geom_encircle(aes(color = continent), s_shape=0.5, expand=0.1) + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_29_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggalt::geom_encircle(s_shape=1, expand=0.1, colour="purple") + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_30_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggalt::geom_encircle(aes(color = continent), s_shape=1, expand=0.1) + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_31_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_mark_hull() + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_32_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_mark_hull(concavity = 7) + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_33_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_mark_hull(aes(fill = continent)) + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_34_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_mark_hull(aes(fill = continent, filter = continent == "Europe")) + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_35_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_mark_circle() + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_36_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_mark_circle(aes(fill = continent)) + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_37_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_mark_ellipse(aes(fill = continent, filter = continent == "Europe")) + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_38_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_mark_rect() + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_39_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_mark_rect(aes(fill = continent)) + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_40_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggpointdensity::geom_pointdensity() + theme_minimal() ``` ] .right-output-continuous_continuous-rotate[ <img src="geoms_files/figure-html/continuous_continuous_rotate_41_output-1.png" width="100%" /> ] <style> .left-code-continuous_continuous-rotate { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-continuous_continuous-rotate { width: 60%; float: right; padding-left: 1%; } </style> --- x and y dense --- class: split-40 count: false .left-code-dense-auto[ ```r *set.seed(2022) ``` ] .right-output-dense-auto[ ] --- class: split-40 count: false .left-code-dense-auto[ ```r set.seed(2022) *tibble(my_x = rnorm(2000), * my_y = my_x + rnorm(2000)) ``` ] .right-output-dense-auto[ ``` # A tibble: 2,000 x 2 my_x my_y <dbl> <dbl> 1 0.900 0.355 2 -1.17 -0.387 3 -0.897 -0.599 4 -1.44 0.0747 5 -0.331 0.582 6 -2.90 -2.70 7 -1.06 1.40 8 0.278 -0.248 9 0.749 -0.0528 10 0.242 0.926 # … with 1,990 more rows ``` ] --- class: split-40 count: false .left-code-dense-auto[ ```r set.seed(2022) tibble(my_x = rnorm(2000), my_y = my_x + rnorm(2000)) %>% * ggplot() ``` ] .right-output-dense-auto[ <img src="geoms_files/figure-html/dense_auto_3_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-dense-auto[ ```r set.seed(2022) tibble(my_x = rnorm(2000), my_y = my_x + rnorm(2000)) %>% ggplot() + * aes(x = my_x) ``` ] .right-output-dense-auto[ <img src="geoms_files/figure-html/dense_auto_4_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-dense-auto[ ```r set.seed(2022) tibble(my_x = rnorm(2000), my_y = my_x + rnorm(2000)) %>% ggplot() + aes(x = my_x) + * aes(y = my_y) ``` ] .right-output-dense-auto[ <img src="geoms_files/figure-html/dense_auto_5_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-dense-auto[ ```r set.seed(2022) tibble(my_x = rnorm(2000), my_y = my_x + rnorm(2000)) %>% ggplot() + aes(x = my_x) + aes(y = my_y) + * ggpointdensity::geom_pointdensity() ``` ] .right-output-dense-auto[ <img src="geoms_files/figure-html/dense_auto_6_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-dense-auto[ ```r set.seed(2022) tibble(my_x = rnorm(2000), my_y = my_x + rnorm(2000)) %>% ggplot() + aes(x = my_x) + aes(y = my_y) + ggpointdensity::geom_pointdensity() + * scale_color_viridis_c() ``` ] .right-output-dense-auto[ <img src="geoms_files/figure-html/dense_auto_7_output-1.png" width="100%" /> ] <style> .left-code-dense-auto { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-dense-auto { width: 60%; float: right; padding-left: 1%; } </style> --- ## Questions - How is geom_tile() different from geom_point()? Look at the help. - What aesthetics are required for geom_rect? - How many geometric layers are in the final plot? - Does order of the geom_*() statements matter to the end result? How? --- name: single_series ## Single series --- class: split-40 count: false .left-code-time_series-rotate[ ```r gapminder %>% filter(country == "New Zealand") %>% ggplot() + aes(x = year) + aes(y = pop * gdpPercap) + aes(group = country) + geom_point() + geom_col() + theme_minimal() ``` ] .right-output-time_series-rotate[ <img src="geoms_files/figure-html/time_series_rotate_1_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series-rotate[ ```r gapminder %>% filter(country == "New Zealand") %>% ggplot() + aes(x = year) + aes(y = pop * gdpPercap) + aes(group = country) + geom_point() + * geom_segment(aes(xend = year, yend = 0)) + theme_minimal() ``` ] .right-output-time_series-rotate[ <img src="geoms_files/figure-html/time_series_rotate_2_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series-rotate[ ```r gapminder %>% filter(country == "New Zealand") %>% ggplot() + aes(x = year) + aes(y = pop * gdpPercap) + aes(group = country) + geom_point() + * geom_segment(aes(xend = year, yend = 0), arrow = arrow()) + theme_minimal() ``` ] .right-output-time_series-rotate[ <img src="geoms_files/figure-html/time_series_rotate_3_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series-rotate[ ```r gapminder %>% filter(country == "New Zealand") %>% ggplot() + aes(x = year) + aes(y = pop * gdpPercap) + aes(group = country) + geom_point() + * geom_line() + theme_minimal() ``` ] .right-output-time_series-rotate[ <img src="geoms_files/figure-html/time_series_rotate_4_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series-rotate[ ```r gapminder %>% filter(country == "New Zealand") %>% ggplot() + aes(x = year) + aes(y = pop * gdpPercap) + aes(group = country) + geom_point() + * ggforce::geom_link2(aes(color = year, size = year, group = 1), lineend = 'round', alpha = .5) + theme_minimal() ``` ] .right-output-time_series-rotate[ <img src="geoms_files/figure-html/time_series_rotate_5_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series-rotate[ ```r gapminder %>% filter(country == "New Zealand") %>% ggplot() + aes(x = year) + aes(y = pop * gdpPercap) + aes(group = country) + geom_point() + * geom_line(aes(color = year, group = 1)) + theme_minimal() ``` ] .right-output-time_series-rotate[ <img src="geoms_files/figure-html/time_series_rotate_6_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series-rotate[ ```r gapminder %>% filter(country == "New Zealand") %>% ggplot() + aes(x = year) + aes(y = pop * gdpPercap) + aes(group = country) + geom_point() + * geom_area(alpha = .4, fill = "plum1", color = "plum1") + theme_minimal() ``` ] .right-output-time_series-rotate[ <img src="geoms_files/figure-html/time_series_rotate_7_output-1.png" width="100%" /> ] <style> .left-code-time_series-rotate { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-time_series-rotate { width: 60%; float: right; padding-left: 1%; } </style> --- class: split-40 count: false .left-code-jagged-rotate[ ```r set.seed(2022) tibble(my_x = 1990:2010, my_y = rnorm(21)) %>% ggplot() + aes(x = my_x) + aes(y = my_y) + geom_point() + aes(color = my_y) + geom_line() + scale_color_viridis_c() ``` ] .right-output-jagged-rotate[ <img src="geoms_files/figure-html/jagged_rotate_1_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-jagged-rotate[ ```r set.seed(2022) tibble(my_x = 1990:2010, my_y = rnorm(21)) %>% ggplot() + aes(x = my_x) + aes(y = my_y) + geom_point() + aes(color = my_y) + * geom_smooth() + scale_color_viridis_c() ``` ] .right-output-jagged-rotate[ <img src="geoms_files/figure-html/jagged_rotate_2_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-jagged-rotate[ ```r set.seed(2022) tibble(my_x = 1990:2010, my_y = rnorm(21)) %>% ggplot() + aes(x = my_x) + aes(y = my_y) + geom_point() + aes(color = my_y) + * ggforce::geom_link() + scale_color_viridis_c() ``` ] .right-output-jagged-rotate[ <img src="geoms_files/figure-html/jagged_rotate_3_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-jagged-rotate[ ```r set.seed(2022) tibble(my_x = 1990:2010, my_y = rnorm(21)) %>% ggplot() + aes(x = my_x) + aes(y = my_y) + geom_point() + aes(color = my_y) + * ggforce::geom_bspline() + scale_color_viridis_c() ``` ] .right-output-jagged-rotate[ <img src="geoms_files/figure-html/jagged_rotate_4_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-jagged-rotate[ ```r set.seed(2022) tibble(my_x = 1990:2010, my_y = rnorm(21)) %>% ggplot() + aes(x = my_x) + aes(y = my_y) + geom_point() + aes(color = my_y) + * ggforce::geom_bezier(aes(group = 1)) + scale_color_viridis_c() ``` ] .right-output-jagged-rotate[ <img src="geoms_files/figure-html/jagged_rotate_5_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-jagged-rotate[ ```r set.seed(2022) tibble(my_x = 1990:2010, my_y = rnorm(21)) %>% ggplot() + aes(x = my_x) + aes(y = my_y) + geom_point() + aes(color = my_y) + * ggalt::geom_xspline(spline_shape = 0.4) + scale_color_viridis_c() ``` ] .right-output-jagged-rotate[ <img src="geoms_files/figure-html/jagged_rotate_6_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-jagged-rotate[ ```r set.seed(2022) tibble(my_x = 1990:2010, my_y = rnorm(21)) %>% ggplot() + aes(x = my_x) + aes(y = my_y) + geom_point() + aes(color = my_y) + * ggalt::geom_xspline(spline_shape = 0.8) + scale_color_viridis_c() ``` ] .right-output-jagged-rotate[ <img src="geoms_files/figure-html/jagged_rotate_7_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-jagged-rotate[ ```r set.seed(2022) tibble(my_x = 1990:2010, my_y = rnorm(21)) %>% ggplot() + aes(x = my_x) + aes(y = my_y) + geom_point() + aes(color = my_y) + * ggalt::geom_xspline(spline_shape = 0.1) + scale_color_viridis_c() ``` ] .right-output-jagged-rotate[ <img src="geoms_files/figure-html/jagged_rotate_8_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-jagged-rotate[ ```r set.seed(2022) tibble(my_x = 1990:2010, my_y = rnorm(21)) %>% ggplot() + aes(x = my_x) + aes(y = my_y) + geom_point() + aes(color = my_y) + * ggalt::geom_xspline(spline_shape = -1, size = 0.5) + scale_color_viridis_c() ``` ] .right-output-jagged-rotate[ <img src="geoms_files/figure-html/jagged_rotate_9_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-jagged-rotate[ ```r set.seed(2022) tibble(my_x = 1990:2010, my_y = rnorm(21)) %>% ggplot() + aes(x = my_x) + aes(y = my_y) + geom_point() + aes(color = my_y) + * ggforce::geom_link2(aes(size = my_y, group = 1), lineend = 'round', alpha = .5) + scale_color_viridis_c() ``` ] .right-output-jagged-rotate[ <img src="geoms_files/figure-html/jagged_rotate_10_output-1.png" width="100%" /> ] <style> .left-code-jagged-rotate { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-jagged-rotate { width: 60%; float: right; padding-left: 1%; } </style> --- class: split-40 count: false .left-code-polar_bar-auto[ ```r *gapminder ``` ] .right-output-polar_bar-auto[ ``` # A tibble: 1,704 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Afghanistan Asia 1952 28.8 8425333 779. 2 Afghanistan Asia 1957 30.3 9240934 821. 3 Afghanistan Asia 1962 32.0 10267083 853. 4 Afghanistan Asia 1967 34.0 11537966 836. 5 Afghanistan Asia 1972 36.1 13079460 740. 6 Afghanistan Asia 1977 38.4 14880372 786. 7 Afghanistan Asia 1982 39.9 12881816 978. 8 Afghanistan Asia 1987 40.8 13867957 852. 9 Afghanistan Asia 1992 41.7 16317921 649. 10 Afghanistan Asia 1997 41.8 22227415 635. # … with 1,694 more rows ``` ] --- class: split-40 count: false .left-code-polar_bar-auto[ ```r gapminder %>% * filter(continent == "Oceania") ``` ] .right-output-polar_bar-auto[ ``` # A tibble: 24 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Australia Oceania 1952 69.1 8691212 10040. 2 Australia Oceania 1957 70.3 9712569 10950. 3 Australia Oceania 1962 70.9 10794968 12217. 4 Australia Oceania 1967 71.1 11872264 14526. 5 Australia Oceania 1972 71.9 13177000 16789. 6 Australia Oceania 1977 73.5 14074100 18334. 7 Australia Oceania 1982 74.7 15184200 19477. 8 Australia Oceania 1987 76.3 16257249 21889. 9 Australia Oceania 1992 77.6 17481977 23425. 10 Australia Oceania 1997 78.8 18565243 26998. # … with 14 more rows ``` ] --- class: split-40 count: false .left-code-polar_bar-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% * mutate(pop_millions = pop/1000000) ``` ] .right-output-polar_bar-auto[ ``` # A tibble: 24 x 7 country continent year lifeExp pop gdpPercap pop_millions <fct> <fct> <int> <dbl> <int> <dbl> <dbl> 1 Australia Oceania 1952 69.1 8691212 10040. 8.69 2 Australia Oceania 1957 70.3 9712569 10950. 9.71 3 Australia Oceania 1962 70.9 10794968 12217. 10.8 4 Australia Oceania 1967 71.1 11872264 14526. 11.9 5 Australia Oceania 1972 71.9 13177000 16789. 13.2 6 Australia Oceania 1977 73.5 14074100 18334. 14.1 7 Australia Oceania 1982 74.7 15184200 19477. 15.2 8 Australia Oceania 1987 76.3 16257249 21889. 16.3 9 Australia Oceania 1992 77.6 17481977 23425. 17.5 10 Australia Oceania 1997 78.8 18565243 26998. 18.6 # … with 14 more rows ``` ] --- class: split-40 count: false .left-code-polar_bar-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) %>% * arrange(-pop) ``` ] .right-output-polar_bar-auto[ ``` # A tibble: 24 x 7 country continent year lifeExp pop gdpPercap pop_millions <fct> <fct> <int> <dbl> <int> <dbl> <dbl> 1 Australia Oceania 2007 81.2 20434176 34435. 20.4 2 Australia Oceania 2002 80.4 19546792 30688. 19.5 3 Australia Oceania 1997 78.8 18565243 26998. 18.6 4 Australia Oceania 1992 77.6 17481977 23425. 17.5 5 Australia Oceania 1987 76.3 16257249 21889. 16.3 6 Australia Oceania 1982 74.7 15184200 19477. 15.2 7 Australia Oceania 1977 73.5 14074100 18334. 14.1 8 Australia Oceania 1972 71.9 13177000 16789. 13.2 9 Australia Oceania 1967 71.1 11872264 14526. 11.9 10 Australia Oceania 1962 70.9 10794968 12217. 10.8 # … with 14 more rows ``` ] --- class: split-40 count: false .left-code-polar_bar-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) %>% arrange(-pop) %>% * ggplot() ``` ] .right-output-polar_bar-auto[ <img src="geoms_files/figure-html/polar_bar_auto_5_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-polar_bar-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) %>% arrange(-pop) %>% ggplot() + * aes(x = year) ``` ] .right-output-polar_bar-auto[ <img src="geoms_files/figure-html/polar_bar_auto_6_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-polar_bar-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) %>% arrange(-pop) %>% ggplot() + aes(x = year) + * aes(y = pop_millions) ``` ] .right-output-polar_bar-auto[ <img src="geoms_files/figure-html/polar_bar_auto_7_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-polar_bar-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) %>% arrange(-pop) %>% ggplot() + aes(x = year) + aes(y = pop_millions) + * geom_col(width = 4, position = "dodge") ``` ] .right-output-polar_bar-auto[ <img src="geoms_files/figure-html/polar_bar_auto_8_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-polar_bar-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) %>% arrange(-pop) %>% ggplot() + aes(x = year) + aes(y = pop_millions) + geom_col(width = 4, position = "dodge") + * coord_polar() ``` ] .right-output-polar_bar-auto[ <img src="geoms_files/figure-html/polar_bar_auto_9_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-polar_bar-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) %>% arrange(-pop) %>% ggplot() + aes(x = year) + aes(y = pop_millions) + geom_col(width = 4, position = "dodge") + coord_polar() + * scale_y_continuous(limits = c(-10, 25)) ``` ] .right-output-polar_bar-auto[ <img src="geoms_files/figure-html/polar_bar_auto_10_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-polar_bar-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) %>% arrange(-pop) %>% ggplot() + aes(x = year) + aes(y = pop_millions) + geom_col(width = 4, position = "dodge") + coord_polar() + scale_y_continuous(limits = c(-10, 25)) + * scale_x_continuous(breaks = seq(1952, 2007, by = 5), * limits = c(1950, 2010)) ``` ] .right-output-polar_bar-auto[ <img src="geoms_files/figure-html/polar_bar_auto_11_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-polar_bar-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) %>% arrange(-pop) %>% ggplot() + aes(x = year) + aes(y = pop_millions) + geom_col(width = 4, position = "dodge") + coord_polar() + scale_y_continuous(limits = c(-10, 25)) + scale_x_continuous(breaks = seq(1952, 2007, by = 5), limits = c(1950, 2010)) + * aes(fill = country) ``` ] .right-output-polar_bar-auto[ <img src="geoms_files/figure-html/polar_bar_auto_12_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-polar_bar-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) %>% arrange(-pop) %>% ggplot() + aes(x = year) + aes(y = pop_millions) + geom_col(width = 4, position = "dodge") + coord_polar() + scale_y_continuous(limits = c(-10, 25)) + scale_x_continuous(breaks = seq(1952, 2007, by = 5), limits = c(1950, 2010)) + aes(fill = country) + * geom_text(data = . %>% filter(country == "Australia"), * aes(label = year, * y = pop_millions + 3), * fontface = "bold", * color = "navy") ``` ] .right-output-polar_bar-auto[ <img src="geoms_files/figure-html/polar_bar_auto_13_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-polar_bar-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) %>% arrange(-pop) %>% ggplot() + aes(x = year) + aes(y = pop_millions) + geom_col(width = 4, position = "dodge") + coord_polar() + scale_y_continuous(limits = c(-10, 25)) + scale_x_continuous(breaks = seq(1952, 2007, by = 5), limits = c(1950, 2010)) + aes(fill = country) + geom_text(data = . %>% filter(country == "Australia"), aes(label = year, y = pop_millions + 3), fontface = "bold", color = "navy") + * theme_void() ``` ] .right-output-polar_bar-auto[ <img src="geoms_files/figure-html/polar_bar_auto_14_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-polar_bar-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) %>% arrange(-pop) %>% ggplot() + aes(x = year) + aes(y = pop_millions) + geom_col(width = 4, position = "dodge") + coord_polar() + scale_y_continuous(limits = c(-10, 25)) + scale_x_continuous(breaks = seq(1952, 2007, by = 5), limits = c(1950, 2010)) + aes(fill = country) + geom_text(data = . %>% filter(country == "Australia"), aes(label = year, y = pop_millions + 3), fontface = "bold", color = "navy") + theme_void() + * theme(legend.position = c(.8,.8)) ``` ] .right-output-polar_bar-auto[ <img src="geoms_files/figure-html/polar_bar_auto_15_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-polar_bar-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) %>% arrange(-pop) %>% ggplot() + aes(x = year) + aes(y = pop_millions) + geom_col(width = 4, position = "dodge") + coord_polar() + scale_y_continuous(limits = c(-10, 25)) + scale_x_continuous(breaks = seq(1952, 2007, by = 5), limits = c(1950, 2010)) + aes(fill = country) + geom_text(data = . %>% filter(country == "Australia"), aes(label = year, y = pop_millions + 3), fontface = "bold", color = "navy") + theme_void() + theme(legend.position = c(.8,.8)) + * labs(fill = NULL) ``` ] .right-output-polar_bar-auto[ <img src="geoms_files/figure-html/polar_bar_auto_16_output-1.png" width="100%" /> ] <style> .left-code-polar_bar-auto { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-polar_bar-auto { width: 60%; float: right; padding-left: 1%; } </style> --- class: split-40 count: false .left-code-pie_donut-auto[ ```r *gapminder ``` ] .right-output-pie_donut-auto[ ``` # A tibble: 1,704 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Afghanistan Asia 1952 28.8 8425333 779. 2 Afghanistan Asia 1957 30.3 9240934 821. 3 Afghanistan Asia 1962 32.0 10267083 853. 4 Afghanistan Asia 1967 34.0 11537966 836. 5 Afghanistan Asia 1972 36.1 13079460 740. 6 Afghanistan Asia 1977 38.4 14880372 786. 7 Afghanistan Asia 1982 39.9 12881816 978. 8 Afghanistan Asia 1987 40.8 13867957 852. 9 Afghanistan Asia 1992 41.7 16317921 649. 10 Afghanistan Asia 1997 41.8 22227415 635. # … with 1,694 more rows ``` ] --- class: split-40 count: false .left-code-pie_donut-auto[ ```r gapminder %>% * filter(year == 2002) ``` ] .right-output-pie_donut-auto[ ``` # A tibble: 142 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Afghanistan Asia 2002 42.1 25268405 727. 2 Albania Europe 2002 75.7 3508512 4604. 3 Algeria Africa 2002 71.0 31287142 5288. 4 Angola Africa 2002 41.0 10866106 2773. 5 Argentina Americas 2002 74.3 38331121 8798. 6 Australia Oceania 2002 80.4 19546792 30688. 7 Austria Europe 2002 79.0 8148312 32418. 8 Bahrain Asia 2002 74.8 656397 23404. 9 Bangladesh Asia 2002 62.0 135656790 1136. 10 Belgium Europe 2002 78.3 10311970 30486. # … with 132 more rows ``` ] --- class: split-40 count: false .left-code-pie_donut-auto[ ```r gapminder %>% filter(year == 2002) %>% * count(continent) ``` ] .right-output-pie_donut-auto[ ``` # A tibble: 5 x 2 continent n <fct> <int> 1 Africa 52 2 Americas 25 3 Asia 33 4 Europe 30 5 Oceania 2 ``` ] --- class: split-40 count: false .left-code-pie_donut-auto[ ```r gapminder %>% filter(year == 2002) %>% count(continent) %>% * mutate(text_pos_y = sum(n) - cumsum(n)) ``` ] .right-output-pie_donut-auto[ ``` # A tibble: 5 x 3 continent n text_pos_y <fct> <int> <int> 1 Africa 52 90 2 Americas 25 65 3 Asia 33 32 4 Europe 30 2 5 Oceania 2 0 ``` ] --- class: split-40 count: false .left-code-pie_donut-auto[ ```r gapminder %>% filter(year == 2002) %>% count(continent) %>% mutate(text_pos_y = sum(n) - cumsum(n)) %>% * mutate(text_pos_y = (lag(text_pos_y, * default = sum(n)) + * text_pos_y) / 2) ``` ] .right-output-pie_donut-auto[ ``` # A tibble: 5 x 3 continent n text_pos_y <fct> <int> <dbl> 1 Africa 52 116 2 Americas 25 77.5 3 Asia 33 48.5 4 Europe 30 17 5 Oceania 2 1 ``` ] --- class: split-40 count: false .left-code-pie_donut-auto[ ```r gapminder %>% filter(year == 2002) %>% count(continent) %>% mutate(text_pos_y = sum(n) - cumsum(n)) %>% mutate(text_pos_y = (lag(text_pos_y, default = sum(n)) + text_pos_y) / 2) %>% * ggplot() ``` ] .right-output-pie_donut-auto[ <img src="geoms_files/figure-html/pie_donut_auto_6_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-pie_donut-auto[ ```r gapminder %>% filter(year == 2002) %>% count(continent) %>% mutate(text_pos_y = sum(n) - cumsum(n)) %>% mutate(text_pos_y = (lag(text_pos_y, default = sum(n)) + text_pos_y) / 2) %>% ggplot() + * aes(x = 1) ``` ] .right-output-pie_donut-auto[ <img src="geoms_files/figure-html/pie_donut_auto_7_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-pie_donut-auto[ ```r gapminder %>% filter(year == 2002) %>% count(continent) %>% mutate(text_pos_y = sum(n) - cumsum(n)) %>% mutate(text_pos_y = (lag(text_pos_y, default = sum(n)) + text_pos_y) / 2) %>% ggplot() + aes(x = 1) + * aes(y = n) ``` ] .right-output-pie_donut-auto[ <img src="geoms_files/figure-html/pie_donut_auto_8_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-pie_donut-auto[ ```r gapminder %>% filter(year == 2002) %>% count(continent) %>% mutate(text_pos_y = sum(n) - cumsum(n)) %>% mutate(text_pos_y = (lag(text_pos_y, default = sum(n)) + text_pos_y) / 2) %>% ggplot() + aes(x = 1) + aes(y = n) + * geom_col(width = 2) ``` ] .right-output-pie_donut-auto[ <img src="geoms_files/figure-html/pie_donut_auto_9_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-pie_donut-auto[ ```r gapminder %>% filter(year == 2002) %>% count(continent) %>% mutate(text_pos_y = sum(n) - cumsum(n)) %>% mutate(text_pos_y = (lag(text_pos_y, default = sum(n)) + text_pos_y) / 2) %>% ggplot() + aes(x = 1) + aes(y = n) + geom_col(width = 2) + * aes(fill = continent) ``` ] .right-output-pie_donut-auto[ <img src="geoms_files/figure-html/pie_donut_auto_10_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-pie_donut-auto[ ```r gapminder %>% filter(year == 2002) %>% count(continent) %>% mutate(text_pos_y = sum(n) - cumsum(n)) %>% mutate(text_pos_y = (lag(text_pos_y, default = sum(n)) + text_pos_y) / 2) %>% ggplot() + aes(x = 1) + aes(y = n) + geom_col(width = 2) + aes(fill = continent) + * geom_text(aes(label = continent, * y = text_pos_y, * x = 2.3 + c(.3,.1,.2,.3,0)), * color = "navy", * fontface = "bold") ``` ] .right-output-pie_donut-auto[ <img src="geoms_files/figure-html/pie_donut_auto_11_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-pie_donut-auto[ ```r gapminder %>% filter(year == 2002) %>% count(continent) %>% mutate(text_pos_y = sum(n) - cumsum(n)) %>% mutate(text_pos_y = (lag(text_pos_y, default = sum(n)) + text_pos_y) / 2) %>% ggplot() + aes(x = 1) + aes(y = n) + geom_col(width = 2) + aes(fill = continent) + geom_text(aes(label = continent, y = text_pos_y, x = 2.3 + c(.3,.1,.2,.3,0)), color = "navy", fontface = "bold") + * coord_polar(theta = "y") ``` ] .right-output-pie_donut-auto[ <img src="geoms_files/figure-html/pie_donut_auto_12_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-pie_donut-auto[ ```r gapminder %>% filter(year == 2002) %>% count(continent) %>% mutate(text_pos_y = sum(n) - cumsum(n)) %>% mutate(text_pos_y = (lag(text_pos_y, default = sum(n)) + text_pos_y) / 2) %>% ggplot() + aes(x = 1) + aes(y = n) + geom_col(width = 2) + aes(fill = continent) + geom_text(aes(label = continent, y = text_pos_y, x = 2.3 + c(.3,.1,.2,.3,0)), color = "navy", fontface = "bold") + coord_polar(theta = "y") + * theme_void() ``` ] .right-output-pie_donut-auto[ <img src="geoms_files/figure-html/pie_donut_auto_13_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-pie_donut-auto[ ```r gapminder %>% filter(year == 2002) %>% count(continent) %>% mutate(text_pos_y = sum(n) - cumsum(n)) %>% mutate(text_pos_y = (lag(text_pos_y, default = sum(n)) + text_pos_y) / 2) %>% ggplot() + aes(x = 1) + aes(y = n) + geom_col(width = 2) + aes(fill = continent) + geom_text(aes(label = continent, y = text_pos_y, x = 2.3 + c(.3,.1,.2,.3,0)), color = "navy", fontface = "bold") + coord_polar(theta = "y") + theme_void() + * scale_x_continuous(limits = c(-3, 2.8)) ``` ] .right-output-pie_donut-auto[ <img src="geoms_files/figure-html/pie_donut_auto_14_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-pie_donut-auto[ ```r gapminder %>% filter(year == 2002) %>% count(continent) %>% mutate(text_pos_y = sum(n) - cumsum(n)) %>% mutate(text_pos_y = (lag(text_pos_y, default = sum(n)) + text_pos_y) / 2) %>% ggplot() + aes(x = 1) + aes(y = n) + geom_col(width = 2) + aes(fill = continent) + geom_text(aes(label = continent, y = text_pos_y, x = 2.3 + c(.3,.1,.2,.3,0)), color = "navy", fontface = "bold") + coord_polar(theta = "y") + theme_void() + scale_x_continuous(limits = c(-3, 2.8)) + * theme(legend.position = "none") ``` ] .right-output-pie_donut-auto[ <img src="geoms_files/figure-html/pie_donut_auto_15_output-1.png" width="100%" /> ] <style> .left-code-pie_donut-auto { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-pie_donut-auto { width: 60%; float: right; padding-left: 1%; } </style> --- class: split-40 count: false .left-code-circle_pack-auto[ ```r *gapminder ``` ] .right-output-circle_pack-auto[ ``` # A tibble: 1,704 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Afghanistan Asia 1952 28.8 8425333 779. 2 Afghanistan Asia 1957 30.3 9240934 821. 3 Afghanistan Asia 1962 32.0 10267083 853. 4 Afghanistan Asia 1967 34.0 11537966 836. 5 Afghanistan Asia 1972 36.1 13079460 740. 6 Afghanistan Asia 1977 38.4 14880372 786. 7 Afghanistan Asia 1982 39.9 12881816 978. 8 Afghanistan Asia 1987 40.8 13867957 852. 9 Afghanistan Asia 1992 41.7 16317921 649. 10 Afghanistan Asia 1997 41.8 22227415 635. # … with 1,694 more rows ``` ] --- class: split-40 count: false .left-code-circle_pack-auto[ ```r gapminder %>% * filter(continent == "Americas") ``` ] .right-output-circle_pack-auto[ ``` # A tibble: 300 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Argentina Americas 1952 62.5 17876956 5911. 2 Argentina Americas 1957 64.4 19610538 6857. 3 Argentina Americas 1962 65.1 21283783 7133. 4 Argentina Americas 1967 65.6 22934225 8053. 5 Argentina Americas 1972 67.1 24779799 9443. 6 Argentina Americas 1977 68.5 26983828 10079. 7 Argentina Americas 1982 69.9 29341374 8998. 8 Argentina Americas 1987 70.8 31620918 9140. 9 Argentina Americas 1992 71.9 33958947 9308. 10 Argentina Americas 1997 73.3 36203463 10967. # … with 290 more rows ``` ] --- class: split-40 count: false .left-code-circle_pack-auto[ ```r gapminder %>% filter(continent == "Americas") %>% * filter(year == 2002) ``` ] .right-output-circle_pack-auto[ ``` # A tibble: 25 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Argentina Americas 2002 74.3 38331121 8798. 2 Bolivia Americas 2002 63.9 8445134 3413. 3 Brazil Americas 2002 71.0 179914212 8131. 4 Canada Americas 2002 79.8 31902268 33329. 5 Chile Americas 2002 77.9 15497046 10779. 6 Colombia Americas 2002 71.7 41008227 5755. 7 Costa Rica Americas 2002 78.1 3834934 7723. 8 Cuba Americas 2002 77.2 11226999 6341. 9 Dominican Republic Americas 2002 70.8 8650322 4564. 10 Ecuador Americas 2002 74.2 12921234 5773. # … with 15 more rows ``` ] --- class: split-40 count: false .left-code-circle_pack-auto[ ```r gapminder %>% filter(continent == "Americas") %>% filter(year == 2002) %>% * select(country, pop) ``` ] .right-output-circle_pack-auto[ ``` # A tibble: 25 x 2 country pop <fct> <int> 1 Argentina 38331121 2 Bolivia 8445134 3 Brazil 179914212 4 Canada 31902268 5 Chile 15497046 6 Colombia 41008227 7 Costa Rica 3834934 8 Cuba 11226999 9 Dominican Republic 8650322 10 Ecuador 12921234 # … with 15 more rows ``` ] --- class: split-40 count: false .left-code-circle_pack-auto[ ```r gapminder %>% filter(continent == "Americas") %>% filter(year == 2002) %>% select(country, pop) -> *prep ``` ] .right-output-circle_pack-auto[ ] --- class: split-40 count: false .left-code-circle_pack-auto[ ```r gapminder %>% filter(continent == "Americas") %>% filter(year == 2002) %>% select(country, pop) -> prep *packcircles::circleProgressiveLayout(prep$pop, * sizetype = 'area') ``` ] .right-output-circle_pack-auto[ ``` x y radius 1 -3493.0180 0.0000 3493.0180 2 1639.5639 0.0000 1639.5639 3 2732.7743 -9142.0260 7567.5936 4 1150.7522 4801.4069 3186.6608 5 5273.8171 1302.3806 2221.0049 6 10562.3302 -1160.6508 3612.9384 7 -4573.1172 -4469.2048 1104.8518 8 -7453.2262 -3646.6547 1890.4139 9 -8636.6596 -299.9554 1659.3622 10 -7908.2513 3314.7888 2028.0425 11 -4769.2005 4746.5765 1422.1250 12 -3084.4567 7593.9564 1886.3390 13 -133.6785 9366.9797 1556.1460 14 2869.9023 9116.0827 1457.8956 15 4409.2334 7302.3944 920.9708 16 10986.7220 8154.0495 5711.4249 17 -5728.2786 -6555.5701 1279.9580 18 -7982.0775 -6463.5726 975.7177 19 -6893.5704 6556.3419 1368.6094 20 -6631.4420 10836.0023 2919.0711 21 -2614.0309 10551.5165 1108.4001 22 -1083.9386 11293.7595 592.2196 23 -18526.1513 -6598.5236 9569.2196 24 -11041.9619 913.3993 1034.6512 25 4129.4010 13162.9819 2780.4686 ``` ] --- class: split-40 count: false .left-code-circle_pack-auto[ ```r gapminder %>% filter(continent == "Americas") %>% filter(year == 2002) %>% select(country, pop) -> prep packcircles::circleProgressiveLayout(prep$pop, sizetype = 'area') -> *pack ``` ] .right-output-circle_pack-auto[ ] --- class: split-40 count: false .left-code-circle_pack-auto[ ```r gapminder %>% filter(continent == "Americas") %>% filter(year == 2002) %>% select(country, pop) -> prep packcircles::circleProgressiveLayout(prep$pop, sizetype = 'area') -> pack *pack ``` ] .right-output-circle_pack-auto[ ``` x y radius 1 -3493.0180 0.0000 3493.0180 2 1639.5639 0.0000 1639.5639 3 2732.7743 -9142.0260 7567.5936 4 1150.7522 4801.4069 3186.6608 5 5273.8171 1302.3806 2221.0049 6 10562.3302 -1160.6508 3612.9384 7 -4573.1172 -4469.2048 1104.8518 8 -7453.2262 -3646.6547 1890.4139 9 -8636.6596 -299.9554 1659.3622 10 -7908.2513 3314.7888 2028.0425 11 -4769.2005 4746.5765 1422.1250 12 -3084.4567 7593.9564 1886.3390 13 -133.6785 9366.9797 1556.1460 14 2869.9023 9116.0827 1457.8956 15 4409.2334 7302.3944 920.9708 16 10986.7220 8154.0495 5711.4249 17 -5728.2786 -6555.5701 1279.9580 18 -7982.0775 -6463.5726 975.7177 19 -6893.5704 6556.3419 1368.6094 20 -6631.4420 10836.0023 2919.0711 21 -2614.0309 10551.5165 1108.4001 22 -1083.9386 11293.7595 592.2196 23 -18526.1513 -6598.5236 9569.2196 24 -11041.9619 913.3993 1034.6512 25 4129.4010 13162.9819 2780.4686 ``` ] --- class: split-40 count: false .left-code-circle_pack-auto[ ```r gapminder %>% filter(continent == "Americas") %>% filter(year == 2002) %>% select(country, pop) -> prep packcircles::circleProgressiveLayout(prep$pop, sizetype = 'area') -> pack pack %>% * packcircles::circleLayoutVertices(npoints = 50) ``` ] .right-output-circle_pack-auto[ ``` x y id 1 0.00000 0.000000e+00 1 2 -27.54349 4.377912e+02 1 3 -109.73958 8.686783e+02 1 4 -245.29200 1.285866e+03 1 5 -432.06299 1.682774e+03 1 6 -667.10708 2.053144e+03 1 7 -946.71746 2.391135e+03 1 8 -1266.48453 2.691417e+03 1 9 -1621.36536 2.949253e+03 1 10 -2005.76327 3.160577e+03 1 11 -2413.61608 3.322058e+03 1 12 -2838.49170 3.431147e+03 1 13 -3273.68959 3.486125e+03 1 14 -3712.34642 3.486125e+03 1 15 -4147.54431 3.431147e+03 1 16 -4572.41993 3.322058e+03 1 17 -4980.27273 3.160577e+03 1 18 -5364.67064 2.949253e+03 1 19 -5719.55147 2.691417e+03 1 20 -6039.31854 2.391135e+03 1 21 -6318.92893 2.053144e+03 1 22 -6553.97301 1.682774e+03 1 23 -6740.74401 1.285866e+03 1 24 -6876.29642 8.686783e+02 1 25 -6958.49251 4.377912e+02 1 26 -6986.03600 -1.123440e-12 1 27 -6958.49251 -4.377912e+02 1 28 -6876.29642 -8.686783e+02 1 29 -6740.74401 -1.285866e+03 1 30 -6553.97301 -1.682774e+03 1 31 -6318.92893 -2.053144e+03 1 32 -6039.31854 -2.391135e+03 1 33 -5719.55147 -2.691417e+03 1 34 -5364.67064 -2.949253e+03 1 35 -4980.27273 -3.160577e+03 1 36 -4572.41993 -3.322058e+03 1 37 -4147.54431 -3.431147e+03 1 38 -3712.34642 -3.486125e+03 1 39 -3273.68959 -3.486125e+03 1 40 -2838.49170 -3.431147e+03 1 41 -2413.61608 -3.322058e+03 1 42 -2005.76327 -3.160577e+03 1 43 -1621.36536 -2.949253e+03 1 44 -1266.48453 -2.691417e+03 1 45 -946.71746 -2.391135e+03 1 46 -667.10708 -2.053144e+03 1 47 -432.06299 -1.682774e+03 1 48 -245.29200 -1.285866e+03 1 49 -109.73958 -8.686783e+02 1 50 -27.54349 -4.377912e+02 1 51 0.00000 -8.555427e-13 1 52 3279.12771 0.000000e+00 2 53 3266.19926 2.054918e+02 2 54 3227.61780 4.077430e+02 2 55 3163.99178 6.035637e+02 2 56 3076.32462 7.898659e+02 2 57 2965.99888 9.637115e+02 2 58 2834.75447 1.122359e+03 2 59 2684.66119 1.263306e+03 2 60 2518.08610 1.384330e+03 2 61 2337.65620 1.483522e+03 2 62 2146.21695 1.559318e+03 2 63 1946.78749 1.610523e+03 2 64 1742.51292 1.636329e+03 2 65 1536.61479 1.636329e+03 2 66 1332.34023 1.610523e+03 2 67 1132.91076 1.559318e+03 2 68 941.47152 1.483522e+03 2 69 761.04161 1.384330e+03 2 70 594.46652 1.263306e+03 2 71 444.37324 1.122359e+03 2 72 313.12883 9.637115e+02 2 73 202.80310 7.898659e+02 2 74 115.13594 6.035637e+02 2 75 51.50991 4.077430e+02 2 76 12.92845 2.054918e+02 2 77 0.00000 -5.273240e-13 2 78 12.92845 -2.054918e+02 2 79 51.50991 -4.077430e+02 2 80 115.13594 -6.035637e+02 2 81 202.80310 -7.898659e+02 2 82 313.12883 -9.637115e+02 2 83 444.37324 -1.122359e+03 2 84 594.46652 -1.263306e+03 2 85 761.04161 -1.384330e+03 2 86 941.47152 -1.483522e+03 2 87 1132.91076 -1.559318e+03 2 88 1332.34023 -1.610523e+03 2 89 1536.61479 -1.636329e+03 2 90 1742.51292 -1.636329e+03 2 91 1946.78749 -1.610523e+03 2 92 2146.21695 -1.559318e+03 2 93 2337.65620 -1.483522e+03 2 94 2518.08610 -1.384330e+03 2 95 2684.66119 -1.263306e+03 2 96 2834.75447 -1.122359e+03 2 97 2965.99888 -9.637115e+02 2 98 3076.32462 -7.898659e+02 2 99 3163.99178 -6.035637e+02 2 100 3227.61780 -4.077430e+02 2 101 3266.19926 -2.054918e+02 2 102 3279.12771 -4.015773e-13 2 103 10300.36784 -9.142026e+03 3 104 10240.69510 -8.193555e+03 3 105 10062.61797 -7.260042e+03 3 106 9768.94482 -6.356209e+03 3 107 9364.30706 -5.496310e+03 3 108 8855.08607 -4.693906e+03 3 109 8249.31257 -3.961652e+03 3 110 7556.53995 -3.311095e+03 3 111 6787.69368 -2.752495e+03 3 112 5954.89890 -2.294663e+03 3 113 5071.28929 -1.944817e+03 3 114 4150.79990 -1.708475e+03 3 115 3207.94740 -1.589365e+03 3 116 2257.60114 -1.589365e+03 3 117 1314.74864 -1.708475e+03 3 118 394.25925 -1.944817e+03 3 119 -489.35035 -2.294663e+03 3 120 -1322.14513 -2.752495e+03 3 121 -2090.99141 -3.311095e+03 3 122 -2783.76402 -3.961652e+03 3 123 -3389.53753 -4.693906e+03 3 124 -3898.75852 -5.496310e+03 3 125 -4303.39628 -6.356209e+03 3 126 -4597.06942 -7.260042e+03 3 127 -4775.14656 -8.193555e+03 3 128 -4834.81929 -9.142026e+03 3 129 -4775.14656 -1.009050e+04 3 130 -4597.06942 -1.102401e+04 3 131 -4303.39628 -1.192784e+04 3 132 -3898.75852 -1.278774e+04 3 133 -3389.53753 -1.359015e+04 3 134 -2783.76402 -1.432240e+04 3 135 -2090.99141 -1.497296e+04 3 136 -1322.14513 -1.553156e+04 3 137 -489.35035 -1.598939e+04 3 138 394.25925 -1.633924e+04 3 139 1314.74864 -1.657558e+04 3 140 2257.60114 -1.669469e+04 3 141 3207.94740 -1.669469e+04 3 142 4150.79990 -1.657558e+04 3 143 5071.28929 -1.633924e+04 3 144 5954.89890 -1.598939e+04 3 145 6787.69368 -1.553156e+04 3 146 7556.53995 -1.497296e+04 3 147 8249.31257 -1.432240e+04 3 148 8855.08607 -1.359015e+04 3 149 9364.30706 -1.278774e+04 3 150 9768.94482 -1.192784e+04 3 151 10062.61797 -1.102401e+04 3 152 10240.69510 -1.009050e+04 3 153 10300.36784 -9.142026e+03 3 154 4337.41301 4.801407e+03 4 155 4312.28524 5.200801e+03 4 156 4237.29820 5.593897e+03 4 157 4113.63449 5.974495e+03 4 158 3943.24435 6.336592e+03 4 159 3728.81495 6.674479e+03 4 160 3473.72795 6.982826e+03 4 161 3182.00624 7.256771e+03 4 162 2858.25044 7.491994e+03 4 163 2507.56637 7.684784e+03 4 164 2135.48453 7.832101e+03 4 165 1747.87287 7.931623e+03 4 166 1350.84426 7.981780e+03 4 167 950.66009 7.981780e+03 4 168 553.63148 7.931623e+03 4 169 166.01982 7.832101e+03 4 170 -206.06202 7.684784e+03 4 171 -556.74609 7.491994e+03 4 172 -880.50189 7.256771e+03 4 173 -1172.22360 6.982826e+03 4 174 -1427.31060 6.674479e+03 4 175 -1641.74000 6.336592e+03 4 176 -1812.13014 5.974495e+03 4 177 -1935.79385 5.593897e+03 4 178 -2010.78089 5.200801e+03 4 179 -2035.90866 4.801407e+03 4 180 -2010.78089 4.402012e+03 4 181 -1935.79385 4.008917e+03 4 182 -1812.13014 3.628319e+03 4 183 -1641.74000 3.266221e+03 4 184 -1427.31060 2.928335e+03 4 185 -1172.22360 2.619987e+03 4 186 -880.50189 2.346042e+03 4 187 -556.74609 2.110820e+03 4 188 -206.06202 1.918030e+03 4 189 166.01982 1.770712e+03 4 190 553.63148 1.671191e+03 4 191 950.66009 1.621034e+03 4 192 1350.84426 1.621034e+03 4 193 1747.87287 1.671191e+03 4 194 2135.48453 1.770712e+03 4 195 2507.56637 1.918030e+03 4 196 2858.25044 2.110820e+03 4 197 3182.00624 2.346042e+03 4 198 3473.72795 2.619987e+03 4 199 3728.81495 2.928335e+03 4 200 3943.24435 3.266221e+03 4 201 4113.63449 3.628319e+03 4 202 4237.29820 4.008917e+03 4 203 4312.28524 4.402012e+03 4 204 4337.41301 4.801407e+03 4 205 7494.82200 1.302381e+03 5 206 7477.30871 1.580746e+03 5 207 7425.04505 1.854722e+03 5 208 7338.85523 2.119987e+03 5 209 7220.09852 2.372358e+03 5 210 7070.64780 2.607855e+03 5 211 6892.85998 2.822763e+03 5 212 6689.53889 3.013694e+03 5 213 6463.89102 3.177637e+03 5 214 6219.47497 3.312006e+03 5 215 5960.14533 3.414682e+03 5 216 5689.99188 3.484045e+03 5 217 5413.27511 3.519003e+03 5 218 5134.35900 3.519003e+03 5 219 4857.64223 3.484045e+03 5 220 4587.48879 3.414682e+03 5 221 4328.15915 3.312006e+03 5 222 4083.74310 3.177637e+03 5 223 3858.09523 3.013694e+03 5 224 3654.77414 2.822763e+03 5 225 3476.98632 2.607855e+03 5 226 3327.53559 2.372358e+03 5 227 3208.77889 2.119987e+03 5 228 3122.58907 1.854722e+03 5 229 3070.32540 1.580746e+03 5 230 3052.81212 1.302381e+03 5 231 3070.32540 1.024015e+03 5 232 3122.58907 7.500391e+02 5 233 3208.77889 4.847741e+02 5 234 3327.53559 2.324033e+02 5 235 3476.98632 -3.093392e+00 5 236 3654.77414 -2.180019e+02 5 237 3858.09523 -4.089332e+02 5 238 4083.74310 -5.728759e+02 5 239 4328.15915 -7.072448e+02 5 240 4587.48879 -8.099207e+02 5 241 4857.64223 -8.792843e+02 5 242 5134.35900 -9.142417e+02 5 243 5413.27511 -9.142417e+02 5 244 5689.99188 -8.792843e+02 5 245 5960.14533 -8.099207e+02 5 246 6219.47497 -7.072448e+02 5 247 6463.89102 -5.728759e+02 5 248 6689.53889 -4.089332e+02 5 249 6892.85998 -2.180019e+02 5 250 7070.64780 -3.093392e+00 5 251 7220.09852 2.324033e+02 5 252 7338.85523 4.847741e+02 5 253 7425.04505 7.500391e+02 5 254 7477.30871 1.024015e+03 5 255 7494.82200 1.302381e+03 5 256 14175.26866 -1.160651e+03 6 257 14146.77956 -7.078296e+02 6 258 14061.76155 -2.621496e+02 6 259 13921.55543 1.693605e+02 6 260 13728.37231 5.798955e+02 6 261 13485.25882 9.629811e+02 6 262 13196.04900 1.312576e+03 6 263 12865.30386 1.623166e+03 6 264 12498.23945 1.889854e+03 6 265 12100.64460 2.108434e+03 6 266 11678.78961 2.275458e+03 6 267 11239.32738 2.388293e+03 6 268 10789.18851 2.445158e+03 6 269 10335.47195 2.445158e+03 6 270 9885.33308 2.388293e+03 6 271 9445.87086 2.275458e+03 6 272 9024.01587 2.108434e+03 6 273 8626.42101 1.889854e+03 6 274 8259.35661 1.623166e+03 6 275 7928.61147 1.312576e+03 6 276 7639.40165 9.629811e+02 6 277 7396.28815 5.798955e+02 6 278 7203.10504 1.693605e+02 6 279 7062.89891 -2.621496e+02 6 280 6977.88090 -7.078296e+02 6 281 6949.39181 -1.160651e+03 6 282 6977.88090 -1.613472e+03 6 283 7062.89891 -2.059152e+03 6 284 7203.10504 -2.490662e+03 6 285 7396.28815 -2.901197e+03 6 286 7639.40165 -3.284283e+03 6 287 7928.61147 -3.633877e+03 6 288 8259.35661 -3.944468e+03 6 289 8626.42101 -4.211156e+03 6 290 9024.01587 -4.429735e+03 6 291 9445.87086 -4.596759e+03 6 292 9885.33308 -4.709594e+03 6 293 10335.47195 -4.766460e+03 6 294 10789.18851 -4.766460e+03 6 295 11239.32738 -4.709594e+03 6 296 11678.78961 -4.596759e+03 6 297 12100.64460 -4.429735e+03 6 298 12498.23945 -4.211156e+03 6 299 12865.30386 -3.944468e+03 6 300 13196.04900 -3.633877e+03 6 301 13485.25882 -3.284283e+03 6 302 13728.37231 -2.901197e+03 6 303 13921.55543 -2.490662e+03 6 304 14061.76155 -2.059152e+03 6 305 14146.77956 -1.613472e+03 6 306 14175.26866 -1.160651e+03 6 307 -3468.26547 -4.469205e+03 7 308 -3476.97756 -4.330730e+03 7 309 -3502.97642 -4.194439e+03 7 310 -3545.85205 -4.062482e+03 7 311 -3604.92825 -3.936938e+03 7 312 -3679.27338 -3.819789e+03 7 313 -3767.71496 -3.712882e+03 7 314 -3868.85822 -3.617902e+03 7 315 -3981.10805 -3.536348e+03 7 316 -4102.69423 -3.469505e+03 7 317 -4231.69926 -3.418428e+03 7 318 -4366.08866 -3.383923e+03 7 319 -4503.74301 -3.366533e+03 7 320 -4642.49145 -3.366533e+03 7 321 -4780.14580 -3.383923e+03 7 322 -4914.53520 -3.418428e+03 7 323 -5043.54023 -3.469505e+03 7 324 -5165.12641 -3.536348e+03 7 325 -5277.37625 -3.617902e+03 7 326 -5378.51950 -3.712882e+03 7 327 -5466.96108 -3.819789e+03 7 328 -5541.30621 -3.936938e+03 7 329 -5600.38241 -4.062482e+03 7 330 -5643.25804 -4.194439e+03 7 331 -5669.25690 -4.330730e+03 7 332 -5677.96899 -4.469205e+03 7 333 -5669.25690 -4.607679e+03 7 334 -5643.25804 -4.743970e+03 7 335 -5600.38241 -4.875928e+03 7 336 -5541.30621 -5.001471e+03 7 337 -5466.96108 -5.118620e+03 7 338 -5378.51950 -5.225528e+03 7 339 -5277.37625 -5.320508e+03 7 340 -5165.12641 -5.402062e+03 7 341 -5043.54023 -5.468905e+03 7 342 -4914.53520 -5.519981e+03 7 343 -4780.14580 -5.554487e+03 7 344 -4642.49145 -5.571876e+03 7 345 -4503.74301 -5.571876e+03 7 346 -4366.08866 -5.554487e+03 7 347 -4231.69926 -5.519981e+03 7 348 -4102.69423 -5.468905e+03 7 349 -3981.10805 -5.402062e+03 7 350 -3868.85822 -5.320508e+03 7 351 -3767.71496 -5.225528e+03 7 352 -3679.27338 -5.118620e+03 7 353 -3604.92825 -5.001471e+03 7 354 -3545.85205 -4.875928e+03 7 355 -3502.97642 -4.743970e+03 7 356 -3476.97756 -4.607679e+03 7 357 -3468.26547 -4.469205e+03 7 358 -5562.81228 -3.646655e+03 8 359 -5577.71876 -3.409723e+03 8 360 -5622.20311 -3.176528e+03 8 361 -5695.56379 -2.950747e+03 8 362 -5796.64385 -2.735941e+03 8 363 -5923.84921 -2.535497e+03 8 364 -6075.17376 -2.352577e+03 8 365 -6248.23102 -2.190066e+03 8 366 -6440.29177 -2.050525e+03 8 367 -6648.32710 -1.936157e+03 8 368 -6869.05617 -1.848764e+03 8 369 -7098.99795 -1.789725e+03 8 370 -7334.52612 -1.759971e+03 8 371 -7571.92627 -1.759971e+03 8 372 -7807.45444 -1.789725e+03 8 373 -8037.39622 -1.848764e+03 8 374 -8258.12529 -1.936157e+03 8 375 -8466.16063 -2.050525e+03 8 376 -8658.22138 -2.190066e+03 8 377 -8831.27863 -2.352577e+03 8 378 -8982.60318 -2.535497e+03 8 379 -9109.80854 -2.735941e+03 8 380 -9210.88860 -2.950747e+03 8 381 -9284.24928 -3.176528e+03 8 382 -9328.73363 -3.409723e+03 8 383 -9343.64011 -3.646655e+03 8 384 -9328.73363 -3.883586e+03 8 385 -9284.24928 -4.116781e+03 8 386 -9210.88860 -4.342562e+03 8 387 -9109.80854 -4.557369e+03 8 388 -8982.60318 -4.757812e+03 8 389 -8831.27863 -4.940732e+03 8 390 -8658.22138 -5.103244e+03 8 391 -8466.16063 -5.242784e+03 8 392 -8258.12529 -5.357152e+03 8 393 -8037.39622 -5.444545e+03 8 394 -7807.45444 -5.503584e+03 8 395 -7571.92627 -5.533338e+03 8 396 -7334.52612 -5.533338e+03 8 397 -7098.99795 -5.503584e+03 8 398 -6869.05617 -5.444545e+03 8 399 -6648.32710 -5.357152e+03 8 400 -6440.29177 -5.242784e+03 8 401 -6248.23102 -5.103244e+03 8 402 -6075.17376 -4.940732e+03 8 403 -5923.84921 -4.757812e+03 8 404 -5796.64385 -4.557369e+03 8 405 -5695.56379 -4.342562e+03 8 406 -5622.20311 -4.116781e+03 8 407 -5577.71876 -3.883586e+03 8 408 -5562.81228 -3.646655e+03 8 409 -6977.29736 -2.999554e+02 9 410 -6990.38193 -9.198215e+01 9 411 -7029.42928 1.127112e+02 9 412 -7093.82361 3.108966e+02 9 413 -7182.54939 4.994485e+02 9 414 -7294.20735 6.753933e+02 9 415 -7427.03659 8.359562e+02 9 416 -7578.94230 9.786052e+02 9 417 -7747.52885 1.101090e+03 9 418 -7930.13752 1.201480e+03 9 419 -8123.88846 1.278192e+03 9 420 -8325.72612 1.330015e+03 9 421 -8532.46738 1.356132e+03 9 422 -8740.85181 1.356132e+03 9 423 -8947.59307 1.330015e+03 9 424 -9149.43072 1.278192e+03 9 425 -9343.18167 1.201480e+03 9 426 -9525.79034 1.101090e+03 9 427 -9694.37689 9.786052e+02 9 428 -9846.28260 8.359562e+02 9 429 -9979.11184 6.753933e+02 9 430 -10090.76980 4.994485e+02 9 431 -10179.49558 3.108966e+02 9 432 -10243.88991 1.127112e+02 9 433 -10282.93726 -9.198215e+01 9 434 -10296.02182 -2.999554e+02 9 435 -10282.93726 -5.079286e+02 9 436 -10243.88991 -7.126220e+02 9 437 -10179.49558 -9.108074e+02 9 438 -10090.76980 -1.099359e+03 9 439 -9979.11184 -1.275304e+03 9 440 -9846.28260 -1.435867e+03 9 441 -9694.37689 -1.578516e+03 9 442 -9525.79034 -1.701001e+03 9 443 -9343.18167 -1.801391e+03 9 444 -9149.43072 -1.878103e+03 9 445 -8947.59307 -1.929926e+03 9 446 -8740.85181 -1.956043e+03 9 447 -8532.46738 -1.956043e+03 9 448 -8325.72612 -1.929926e+03 9 449 -8123.88846 -1.878103e+03 9 450 -7930.13752 -1.801391e+03 9 451 -7747.52885 -1.701001e+03 9 452 -7578.94230 -1.578516e+03 9 453 -7427.03659 -1.435867e+03 9 454 -7294.20735 -1.275304e+03 9 455 -7182.54939 -1.099359e+03 9 456 -7093.82361 -9.108074e+02 9 457 -7029.42928 -7.126220e+02 9 458 -6990.38193 -5.079286e+02 9 459 -6977.29736 -2.999554e+02 9 460 -5880.20875 3.314789e+03 10 461 -5896.20047 3.568970e+03 10 462 -5943.92344 3.819142e+03 10 463 -6022.62502 4.061361e+03 10 464 -6131.06406 4.291806e+03 10 465 -6267.53041 4.506842e+03 10 466 -6429.87190 4.703079e+03 10 467 -6615.52832 4.877422e+03 10 468 -6821.57175 5.027122e+03 10 469 -7044.75277 5.149817e+03 10 470 -7281.55168 5.243572e+03 10 471 -7528.23401 5.306909e+03 10 472 -7780.90944 5.338829e+03 10 473 -8035.59313 5.338829e+03 10 474 -8288.26856 5.306909e+03 10 475 -8534.95089 5.243572e+03 10 476 -8771.74980 5.149817e+03 10 477 -8994.93082 5.027122e+03 10 478 -9200.97425 4.877422e+03 10 479 -9386.63067 4.703079e+03 10 480 -9548.97216 4.506842e+03 10 481 -9685.43851 4.291806e+03 10 482 -9793.87755 4.061361e+03 10 483 -9872.57913 3.819142e+03 10 484 -9920.30210 3.568970e+03 10 485 -9936.29382 3.314789e+03 10 486 -9920.30210 3.060608e+03 10 487 -9872.57913 2.810435e+03 10 488 -9793.87755 2.568217e+03 10 489 -9685.43851 2.337772e+03 10 490 -9548.97216 2.122735e+03 10 491 -9386.63067 1.926498e+03 10 492 -9200.97425 1.752155e+03 10 493 -8994.93082 1.602456e+03 10 494 -8771.74980 1.479761e+03 10 495 -8534.95089 1.386006e+03 10 496 -8288.26856 1.322668e+03 10 497 -8035.59313 1.290748e+03 10 498 -7780.90944 1.290748e+03 10 499 -7528.23401 1.322668e+03 10 500 -7281.55168 1.386006e+03 10 501 -7044.75277 1.479761e+03 10 502 -6821.57175 1.602456e+03 10 503 -6615.52832 1.752155e+03 10 504 -6429.87190 1.926498e+03 10 505 -6267.53041 2.122735e+03 10 506 -6131.06406 2.337772e+03 10 507 -6022.62502 2.568217e+03 10 508 -5943.92344 2.810435e+03 10 509 -5896.20047 3.060608e+03 10 510 -5880.20875 3.314789e+03 10 511 -3347.07554 4.746577e+03 11 512 -3358.28942 4.924816e+03 11 513 -3391.75421 5.100245e+03 11 514 -3446.94215 5.270096e+03 11 515 -3522.98290 5.431690e+03 11 516 -3618.67724 5.582481e+03 11 517 -3732.51602 5.720088e+03 11 518 -3862.70394 5.842343e+03 11 519 -4007.18785 5.947316e+03 11 520 -4163.68915 6.033354e+03 11 521 -4329.73973 6.099098e+03 11 522 -4502.72087 6.143512e+03 11 523 -4679.90456 6.165895e+03 11 524 -4858.49649 6.165895e+03 11 525 -5035.68017 6.143512e+03 11 526 -5208.66131 6.099098e+03 11 527 -5374.71189 6.033354e+03 11 528 -5531.21320 5.947316e+03 11 529 -5675.69710 5.842343e+03 11 530 -5805.88502 5.720088e+03 11 531 -5919.72380 5.582481e+03 11 532 -6015.41815 5.431690e+03 11 533 -6091.45889 5.270096e+03 11 534 -6146.64684 5.100245e+03 11 535 -6180.11163 4.924816e+03 11 536 -6191.32551 4.746577e+03 11 537 -6180.11163 4.568337e+03 11 538 -6146.64684 4.392908e+03 11 539 -6091.45889 4.223057e+03 11 540 -6015.41815 4.061463e+03 11 541 -5919.72380 3.910672e+03 11 542 -5805.88502 3.773065e+03 11 543 -5675.69710 3.650810e+03 11 544 -5531.21320 3.545837e+03 11 545 -5374.71189 3.459799e+03 11 546 -5208.66131 3.394055e+03 11 547 -5035.68017 3.349641e+03 11 548 -4858.49649 3.327258e+03 11 549 -4679.90456 3.327258e+03 11 550 -4502.72087 3.349641e+03 11 551 -4329.73973 3.394055e+03 11 552 -4163.68915 3.459799e+03 11 553 -4007.18785 3.545837e+03 11 554 -3862.70394 3.650810e+03 11 555 -3732.51602 3.773065e+03 11 556 -3618.67724 3.910672e+03 11 557 -3522.98290 4.061463e+03 11 558 -3446.94215 4.223057e+03 11 559 -3391.75421 4.392908e+03 11 560 -3358.28942 4.568337e+03 11 561 -3347.07554 4.746577e+03 11 562 -1198.11772 7.593956e+03 12 563 -1212.99206 7.830377e+03 12 564 -1257.38053 8.063070e+03 12 565 -1330.58307 8.288364e+03 12 566 -1431.44525 8.502707e+03 12 567 -1558.37641 8.702719e+03 12 568 -1709.37477 8.885244e+03 12 569 -1882.05899 9.047406e+03 12 570 -2073.70574 9.186645e+03 12 571 -2281.29263 9.300767e+03 12 572 -2501.54591 9.387971e+03 12 573 -2730.99203 9.446883e+03 12 574 -2966.01251 9.476573e+03 12 575 -3202.90092 9.476573e+03 12 576 -3437.92140 9.446883e+03 12 577 -3667.36752 9.387971e+03 12 578 -3887.62080 9.300767e+03 12 579 -4095.20769 9.186645e+03 12 580 -4286.85444 9.047406e+03 12 581 -4459.53866 8.885244e+03 12 582 -4610.53702 8.702719e+03 12 583 -4737.46818 8.502707e+03 12 584 -4838.33036 8.288364e+03 12 585 -4911.53290 8.063070e+03 12 586 -4955.92136 7.830377e+03 12 587 -4970.79571 7.593956e+03 12 588 -4955.92136 7.357535e+03 12 589 -4911.53290 7.124843e+03 12 590 -4838.33036 6.899549e+03 12 591 -4737.46818 6.685206e+03 12 592 -4610.53702 6.485194e+03 12 593 -4459.53866 6.302669e+03 12 594 -4286.85444 6.140507e+03 12 595 -4095.20769 6.001268e+03 12 596 -3887.62080 5.887146e+03 12 597 -3667.36752 5.799941e+03 12 598 -3437.92140 5.741030e+03 12 599 -3202.90092 5.711340e+03 12 600 -2966.01251 5.711340e+03 12 601 -2730.99203 5.741030e+03 12 602 -2501.54591 5.799941e+03 12 603 -2281.29263 5.887146e+03 12 604 -2073.70574 6.001268e+03 12 605 -1882.05899 6.140507e+03 12 606 -1709.37477 6.302669e+03 12 607 -1558.37641 6.485194e+03 12 608 -1431.44525 6.685206e+03 12 609 -1330.58307 6.899549e+03 12 610 -1257.38053 7.124843e+03 12 611 -1212.99206 7.357535e+03 12 612 -1198.11772 7.593956e+03 12 613 1422.46751 9.366980e+03 13 614 1410.19684 9.562016e+03 13 615 1373.57832 9.753977e+03 13 616 1313.18947 9.939835e+03 13 617 1229.98264 1.011666e+04 13 618 1125.27006 1.028166e+04 13 619 1000.70311 1.043223e+04 13 620 858.24629 1.056601e+04 13 621 700.14621 1.068088e+04 13 622 528.89623 1.077502e+04 13 623 347.19704 1.084696e+04 13 624 157.91416 1.089556e+04 13 625 -35.96732 1.092006e+04 13 626 -231.38975 1.092006e+04 13 627 -425.27123 1.089556e+04 13 628 -614.55411 1.084696e+04 13 629 -796.25330 1.077502e+04 13 630 -967.50329 1.068088e+04 13 631 -1125.60336 1.056601e+04 13 632 -1268.06018 1.043223e+04 13 633 -1392.62713 1.028166e+04 13 634 -1497.33971 1.011666e+04 13 635 -1580.54654 9.939835e+03 13 636 -1640.93539 9.753977e+03 13 637 -1677.55391 9.562016e+03 13 638 -1689.82458 9.366980e+03 13 639 -1677.55391 9.171943e+03 13 640 -1640.93539 8.979982e+03 13 641 -1580.54654 8.794124e+03 13 642 -1497.33971 8.617301e+03 13 643 -1392.62713 8.452300e+03 13 644 -1268.06018 8.301724e+03 13 645 -1125.60336 8.167949e+03 13 646 -967.50329 8.053082e+03 13 647 -796.25330 7.958937e+03 13 648 -614.55411 7.886997e+03 13 649 -425.27123 7.838397e+03 13 650 -231.38975 7.813904e+03 13 651 -35.96732 7.813904e+03 13 652 157.91416 7.838397e+03 13 653 347.19704 7.886997e+03 13 654 528.89623 7.958937e+03 13 655 700.14621 8.053082e+03 13 656 858.24629 8.167949e+03 13 657 1000.70311 8.301724e+03 13 658 1125.27006 8.452300e+03 13 659 1229.98264 8.617301e+03 13 660 1313.18947 8.794124e+03 13 661 1373.57832 8.979982e+03 13 662 1410.19684 9.171943e+03 13 663 1422.46751 9.366980e+03 13 664 4327.79784 9.116083e+03 14 665 4316.30190 9.298805e+03 14 666 4281.99537 9.478647e+03 14 667 4225.41929 9.652770e+03 14 668 4147.46590 9.818429e+03 14 669 4049.36456 9.973012e+03 14 670 3932.66240 1.011408e+04 14 671 3799.19988 1.023941e+04 14 672 3651.08178 1.034702e+04 14 673 3490.64401 1.043523e+04 14 674 3320.41677 1.050262e+04 14 675 3143.08465 1.054815e+04 14 676 2961.44429 1.057110e+04 14 677 2778.36024 1.057110e+04 14 678 2596.71987 1.054815e+04 14 679 2419.38776 1.050262e+04 14 680 2249.16052 1.043523e+04 14 681 2088.72275 1.034702e+04 14 682 1940.60465 1.023941e+04 14 683 1807.14213 1.011408e+04 14 684 1690.43997 9.973012e+03 14 685 1592.33863 9.818429e+03 14 686 1514.38524 9.652770e+03 14 687 1457.80916 9.478647e+03 14 688 1423.50263 9.298805e+03 14 689 1412.00669 9.116083e+03 14 690 1423.50263 8.933360e+03 14 691 1457.80916 8.753519e+03 14 692 1514.38524 8.579396e+03 14 693 1592.33863 8.413736e+03 14 694 1690.43997 8.259153e+03 14 695 1807.14213 8.118084e+03 14 696 1940.60465 7.992755e+03 14 697 2088.72275 7.885141e+03 14 698 2249.16052 7.796939e+03 14 699 2419.38776 7.729542e+03 14 700 2596.71987 7.684010e+03 14 701 2778.36024 7.661064e+03 14 702 2961.44429 7.661064e+03 14 703 3143.08465 7.684010e+03 14 704 3320.41677 7.729542e+03 14 705 3490.64401 7.796939e+03 14 706 3651.08178 7.885141e+03 14 707 3799.19988 7.992755e+03 14 708 3932.66240 8.118084e+03 14 709 4049.36456 8.259153e+03 14 710 4147.46590 8.413736e+03 14 711 4225.41929 8.579396e+03 14 712 4281.99537 8.753519e+03 14 713 4316.30190 8.933360e+03 14 714 4327.79784 9.116083e+03 14 715 5330.20420 7.302394e+03 15 716 5322.94207 7.417823e+03 15 717 5301.27021 7.531431e+03 15 718 5265.53039 7.641426e+03 15 719 5216.28626 7.746075e+03 15 720 5154.31442 7.843727e+03 15 721 5080.59221 7.932842e+03 15 722 4996.28227 8.012015e+03 15 723 4902.71421 8.079996e+03 15 724 4801.36367 8.135714e+03 15 725 4693.82900 8.178290e+03 15 726 4581.80608 8.207052e+03 15 727 4467.06159 8.221548e+03 15 728 4351.40512 8.221548e+03 15 729 4236.66063 8.207052e+03 15 730 4124.63771 8.178290e+03 15 731 4017.10304 8.135714e+03 15 732 3915.75250 8.079996e+03 15 733 3822.18444 8.012015e+03 15 734 3737.87450 7.932842e+03 15 735 3664.15229 7.843727e+03 15 736 3602.18045 7.746075e+03 15 737 3552.93632 7.641426e+03 15 738 3517.19650 7.531431e+03 15 739 3495.52464 7.417823e+03 15 740 3488.26251 7.302394e+03 15 741 3495.52464 7.186966e+03 15 742 3517.19650 7.073358e+03 15 743 3552.93632 6.963362e+03 15 744 3602.18045 6.858713e+03 15 745 3664.15229 6.761061e+03 15 746 3737.87450 6.671946e+03 15 747 3822.18444 6.592774e+03 15 748 3915.75250 6.524793e+03 15 749 4017.10304 6.469075e+03 15 750 4124.63771 6.426499e+03 15 751 4236.66063 6.397736e+03 15 752 4351.40512 6.383241e+03 15 753 4467.06159 6.383241e+03 15 754 4581.80608 6.397736e+03 15 755 4693.82900 6.426499e+03 15 756 4801.36367 6.469075e+03 15 757 4902.71421 6.524793e+03 15 758 4996.28227 6.592774e+03 15 759 5080.59221 6.671946e+03 15 760 5154.31442 6.761061e+03 15 761 5216.28626 6.858713e+03 15 762 5265.53039 6.963362e+03 15 763 5301.27021 7.073358e+03 15 764 5322.94207 7.186966e+03 15 765 5330.20420 7.302394e+03 15 766 16698.14682 8.154050e+03 16 767 16653.11053 8.869881e+03 16 768 16518.71190 9.574423e+03 16 769 16297.07049 1.025657e+04 16 770 15991.68171 1.090555e+04 16 771 15607.36173 1.151114e+04 16 772 15150.17150 1.206379e+04 16 773 14627.32118 1.255478e+04 16 774 14047.05644 1.297637e+04 16 775 13418.52839 1.332190e+04 16 776 12751.64930 1.358594e+04 16 777 12056.93626 1.376431e+04 16 778 11345.34529 1.385420e+04 16 779 10628.09863 1.385420e+04 16 780 9916.50766 1.376431e+04 16 781 9221.79462 1.358594e+04 16 782 8554.91553 1.332190e+04 16 783 7926.38748 1.297637e+04 16 784 7346.12274 1.255478e+04 16 785 6823.27242 1.206379e+04 16 786 6366.08219 1.151114e+04 16 787 5981.76220 1.090555e+04 16 788 5676.37343 1.025657e+04 16 789 5454.73202 9.574423e+03 16 790 5320.33339 8.869881e+03 16 791 5275.29710 8.154050e+03 16 792 5320.33339 7.438218e+03 16 793 5454.73202 6.733676e+03 16 794 5676.37343 6.051534e+03 16 795 5981.76220 5.402550e+03 16 796 6366.08219 4.796958e+03 16 797 6823.27242 4.244310e+03 16 798 7346.12274 3.753321e+03 16 799 7926.38748 3.331734e+03 16 800 8554.91553 2.986198e+03 16 801 9221.79462 2.722162e+03 16 802 9916.50766 2.543790e+03 16 803 10628.09863 2.453895e+03 16 804 11345.34529 2.453895e+03 16 805 12056.93626 2.543790e+03 16 806 12751.64930 2.722162e+03 16 807 13418.52839 2.986198e+03 16 808 14047.05644 3.331734e+03 16 809 14627.32118 3.753321e+03 16 810 15150.17150 4.244310e+03 16 811 15607.36173 4.796958e+03 16 812 15991.68171 5.402550e+03 16 813 16297.07049 6.051534e+03 16 814 16518.71190 6.733676e+03 16 815 16653.11053 7.438218e+03 16 816 16698.14682 8.154050e+03 16 817 -4448.32055 -6.555570e+03 17 818 -4458.41340 -6.395149e+03 17 819 -4488.53278 -6.237257e+03 17 820 -4538.20370 -6.084386e+03 17 821 -4606.64281 -5.938946e+03 17 822 -4692.77078 -5.803230e+03 17 823 -4795.22933 -5.679379e+03 17 824 -4912.40263 -5.569345e+03 17 825 -5042.44278 -5.474866e+03 17 826 -5183.29896 -5.397429e+03 17 827 -5332.74981 -5.338258e+03 17 828 -5488.43837 -5.298284e+03 17 829 -5647.90936 -5.278138e+03 17 830 -5808.64783 -5.278138e+03 17 831 -5968.11882 -5.298284e+03 17 832 -6123.80738 -5.338258e+03 17 833 -6273.25823 -5.397429e+03 17 834 -6414.11441 -5.474866e+03 17 835 -6544.15456 -5.569345e+03 17 836 -6661.32786 -5.679379e+03 17 837 -6763.78641 -5.803230e+03 17 838 -6849.91438 -5.938946e+03 17 839 -6918.35349 -6.084386e+03 17 840 -6968.02441 -6.237257e+03 17 841 -6998.14379 -6.395149e+03 17 842 -7008.23664 -6.555570e+03 17 843 -6998.14379 -6.715991e+03 17 844 -6968.02441 -6.873883e+03 17 845 -6918.35349 -7.026754e+03 17 846 -6849.91438 -7.172195e+03 17 847 -6763.78641 -7.307911e+03 17 848 -6661.32786 -7.431762e+03 17 849 -6544.15456 -7.541795e+03 17 850 -6414.11441 -7.636274e+03 17 851 -6273.25823 -7.713711e+03 17 852 -6123.80738 -7.772883e+03 17 853 -5968.11882 -7.812857e+03 17 854 -5808.64783 -7.833002e+03 17 855 -5647.90936 -7.833002e+03 17 856 -5488.43837 -7.812857e+03 17 857 -5332.74981 -7.772883e+03 17 858 -5183.29896 -7.713711e+03 17 859 -5042.44278 -7.636274e+03 17 860 -4912.40263 -7.541795e+03 17 861 -4795.22933 -7.431762e+03 17 862 -4692.77078 -7.307911e+03 17 863 -4606.64281 -7.172195e+03 17 864 -4538.20370 -7.026754e+03 17 865 -4488.53278 -6.873883e+03 17 866 -4458.41340 -6.715991e+03 17 867 -4448.32055 -6.555570e+03 17 868 -7006.35981 -6.463573e+03 18 869 -7014.05363 -6.341283e+03 18 870 -7037.01377 -6.220922e+03 18 871 -7074.87814 -6.104387e+03 18 872 -7127.04957 -5.993517e+03 18 873 -7192.70531 -5.890060e+03 18 874 -7270.80992 -5.795648e+03 18 875 -7360.13165 -5.711769e+03 18 876 -7459.26183 -5.639747e+03 18 877 -7566.63713 -5.580717e+03 18 878 -7680.56417 -5.535610e+03 18 879 -7799.24626 -5.505138e+03 18 880 -7920.81171 -5.489780e+03 18 881 -8043.34336 -5.489780e+03 18 882 -8164.90880 -5.505138e+03 18 883 -8283.59089 -5.535610e+03 18 884 -8397.51794 -5.580717e+03 18 885 -8504.89324 -5.639747e+03 18 886 -8604.02342 -5.711769e+03 18 887 -8693.34515 -5.795648e+03 18 888 -8771.44976 -5.890060e+03 18 889 -8837.10549 -5.993517e+03 18 890 -8889.27693 -6.104387e+03 18 891 -8927.14129 -6.220922e+03 18 892 -8950.10143 -6.341283e+03 18 893 -8957.79526 -6.463573e+03 18 894 -8950.10143 -6.585862e+03 18 895 -8927.14129 -6.706224e+03 18 896 -8889.27693 -6.822758e+03 18 897 -8837.10549 -6.933628e+03 18 898 -8771.44976 -7.037085e+03 18 899 -8693.34515 -7.131497e+03 18 900 -8604.02342 -7.215376e+03 18 901 -8504.89324 -7.287398e+03 18 902 -8397.51794 -7.346428e+03 18 903 -8283.59089 -7.391535e+03 18 904 -8164.90880 -7.422008e+03 18 905 -8043.34336 -7.437365e+03 18 906 -7920.81171 -7.437365e+03 18 907 -7799.24626 -7.422008e+03 18 908 -7680.56417 -7.391535e+03 18 909 -7566.63713 -7.346428e+03 18 910 -7459.26183 -7.287398e+03 18 911 -7360.13165 -7.215376e+03 18 912 -7270.80992 -7.131497e+03 18 913 -7192.70531 -7.037085e+03 18 914 -7127.04957 -6.933628e+03 18 915 -7074.87814 -6.822758e+03 18 916 -7037.01377 -6.706224e+03 18 917 -7014.05363 -6.585862e+03 18 918 -7006.35981 -6.463573e+03 18 919 -5524.96104 6.556342e+03 19 920 -5535.75293 6.727874e+03 19 921 -5567.95842 6.896701e+03 19 922 -5621.06960 7.060161e+03 19 923 -5694.24888 7.215675e+03 19 924 -5786.34218 7.360790e+03 19 925 -5895.89712 7.493220e+03 19 926 -6021.18597 7.610874e+03 19 927 -6160.23285 7.711897e+03 19 928 -6310.84489 7.794697e+03 19 929 -6470.64687 7.857967e+03 19 930 -6637.11860 7.900709e+03 19 931 -6807.63474 7.922251e+03 19 932 -6979.50612 7.922251e+03 19 933 -7150.02226 7.900709e+03 19 934 -7316.49399 7.857967e+03 19 935 -7476.29597 7.794697e+03 19 936 -7626.90801 7.711897e+03 19 937 -7765.95489 7.610874e+03 19 938 -7891.24374 7.493220e+03 19 939 -8000.79868 7.360790e+03 19 940 -8092.89198 7.215675e+03 19 941 -8166.07126 7.060161e+03 19 942 -8219.18244 6.896701e+03 19 943 -8251.38793 6.727874e+03 19 944 -8262.17982 6.556342e+03 19 945 -8251.38793 6.384810e+03 19 946 -8219.18244 6.215983e+03 19 947 -8166.07126 6.052523e+03 19 948 -8092.89198 5.897009e+03 19 949 -8000.79868 5.751894e+03 19 950 -7891.24374 5.619464e+03 19 951 -7765.95489 5.501810e+03 19 952 -7626.90801 5.400787e+03 19 953 -7476.29597 5.317987e+03 19 954 -7316.49399 5.254717e+03 19 955 -7150.02226 5.211974e+03 19 956 -6979.50612 5.190433e+03 19 957 -6807.63474 5.190433e+03 19 958 -6637.11860 5.211974e+03 19 959 -6470.64687 5.254717e+03 19 960 -6310.84489 5.317987e+03 19 961 -6160.23285 5.400787e+03 19 962 -6021.18597 5.501810e+03 19 963 -5895.89712 5.619464e+03 19 964 -5786.34218 5.751894e+03 19 965 -5694.24888 5.897009e+03 19 966 -5621.06960 6.052523e+03 19 967 -5567.95842 6.215983e+03 19 968 -5535.75293 6.384810e+03 19 969 -5524.96104 6.556342e+03 19 970 -3712.37092 1.083600e+04 20 971 -3735.38867 1.120186e+04 20 972 -3804.07891 1.156195e+04 20 973 -3917.35835 1.191058e+04 20 974 -4073.44051 1.224228e+04 20 975 -4269.86389 1.255179e+04 20 976 -4503.53077 1.283424e+04 20 977 -4770.75607 1.308519e+04 20 978 -5067.32551 1.330066e+04 20 979 -5388.56200 1.347726e+04 20 980 -5729.39945 1.361220e+04 20 981 -6084.46264 1.370337e+04 20 982 -6448.15203 1.374931e+04 20 983 -6814.73202 1.374931e+04 20 984 -7178.42141 1.370337e+04 20 985 -7533.48460 1.361220e+04 20 986 -7874.32205 1.347726e+04 20 987 -8195.55854 1.330066e+04 20 988 -8492.12798 1.308519e+04 20 989 -8759.35328 1.283424e+04 20 990 -8993.02016 1.255179e+04 20 991 -9189.44354 1.224228e+04 20 992 -9345.52570 1.191058e+04 20 993 -9458.80515 1.156195e+04 20 994 -9527.49538 1.120186e+04 20 995 -9550.51313 1.083600e+04 20 996 -9527.49538 1.047015e+04 20 997 -9458.80515 1.011006e+04 20 998 -9345.52570 9.761421e+03 20 999 -9189.44354 9.429729e+03 20 1000 -8993.02016 9.120215e+03 20 1001 -8759.35328 8.837761e+03 20 1002 -8492.12798 8.586819e+03 20 1003 -8195.55854 8.371349e+03 20 1004 -7874.32205 8.194748e+03 20 1005 -7533.48460 8.059801e+03 20 1006 -7178.42141 7.968636e+03 20 1007 -6814.73202 7.922691e+03 20 1008 -6448.15203 7.922691e+03 20 1009 -6084.46264 7.968636e+03 20 1010 -5729.39945 8.059801e+03 20 1011 -5388.56200 8.194748e+03 20 1012 -5067.32551 8.371349e+03 20 1013 -4770.75607 8.586819e+03 20 1014 -4503.53077 8.837761e+03 20 1015 -4269.86389 9.120215e+03 20 1016 -4073.44051 9.429729e+03 20 1017 -3917.35835 9.761421e+03 20 1018 -3804.07891 1.011006e+04 20 1019 -3735.38867 1.047015e+04 20 1020 -3712.37092 1.083600e+04 20 1021 -1505.63083 1.055152e+04 21 1022 -1514.37090 1.069044e+04 21 1023 -1540.45326 1.082716e+04 21 1024 -1583.46658 1.095955e+04 21 1025 -1642.73252 1.108549e+04 21 1026 -1717.31641 1.120302e+04 21 1027 -1806.04203 1.131027e+04 21 1028 -1907.51011 1.140555e+04 21 1029 -2020.12045 1.148737e+04 21 1030 -2142.09711 1.155443e+04 21 1031 -2271.51645 1.160567e+04 21 1032 -2406.33745 1.164028e+04 21 1033 -2544.43390 1.165773e+04 21 1034 -2683.62793 1.165773e+04 21 1035 -2821.72438 1.164028e+04 21 1036 -2956.54538 1.160567e+04 21 1037 -3085.96472 1.155443e+04 21 1038 -3207.94138 1.148737e+04 21 1039 -3320.55172 1.140555e+04 21 1040 -3422.01980 1.131027e+04 21 1041 -3510.74542 1.120302e+04 21 1042 -3585.32931 1.108549e+04 21 1043 -3644.59525 1.095955e+04 21 1044 -3687.60857 1.082716e+04 21 1045 -3713.69093 1.069044e+04 21 1046 -3722.43100 1.055152e+04 21 1047 -3713.69093 1.041260e+04 21 1048 -3687.60857 1.027587e+04 21 1049 -3644.59525 1.014349e+04 21 1050 -3585.32931 1.001754e+04 21 1051 -3510.74542 9.900015e+03 21 1052 -3422.01980 9.792764e+03 21 1053 -3320.55172 9.697480e+03 21 1054 -3207.94138 9.615663e+03 21 1055 -3085.96472 9.548606e+03 21 1056 -2956.54538 9.497365e+03 21 1057 -2821.72438 9.462749e+03 21 1058 -2683.62793 9.445304e+03 21 1059 -2544.43390 9.445304e+03 21 1060 -2406.33745 9.462749e+03 21 1061 -2271.51645 9.497365e+03 21 1062 -2142.09711 9.548606e+03 21 1063 -2020.12045 9.615663e+03 21 1064 -1907.51011 9.697480e+03 21 1065 -1806.04203 9.792764e+03 21 1066 -1717.31641 9.900015e+03 21 1067 -1642.73252 1.001754e+04 21 1068 -1583.46658 1.014349e+04 21 1069 -1540.45326 1.027587e+04 21 1070 -1514.37090 1.041260e+04 21 1071 -1505.63083 1.055152e+04 21 1072 -491.71902 1.129376e+04 22 1073 -496.38885 1.136798e+04 22 1074 -510.32469 1.144104e+04 22 1075 -533.30676 1.151177e+04 22 1076 -564.97263 1.157906e+04 22 1077 -604.82290 1.164186e+04 22 1078 -652.22910 1.169916e+04 22 1079 -706.44363 1.175007e+04 22 1080 -766.61148 1.179379e+04 22 1081 -831.78376 1.182962e+04 22 1082 -900.93268 1.185699e+04 22 1083 -972.96771 1.187549e+04 22 1084 -1046.75282 1.188481e+04 22 1085 -1121.12437 1.188481e+04 22 1086 -1194.90947 1.187549e+04 22 1087 -1266.94450 1.185699e+04 22 1088 -1336.09342 1.182962e+04 22 1089 -1401.26571 1.179379e+04 22 1090 -1461.43355 1.175007e+04 22 1091 -1515.64808 1.169916e+04 22 1092 -1563.05429 1.164186e+04 22 1093 -1602.90456 1.157906e+04 22 1094 -1634.57042 1.151177e+04 22 1095 -1657.55249 1.144104e+04 22 1096 -1671.48833 1.136798e+04 22 1097 -1676.15816 1.129376e+04 22 1098 -1671.48833 1.121953e+04 22 1099 -1657.55249 1.114648e+04 22 1100 -1634.57042 1.107575e+04 22 1101 -1602.90456 1.100846e+04 22 1102 -1563.05429 1.094566e+04 22 1103 -1515.64808 1.088836e+04 22 1104 -1461.43355 1.083745e+04 22 1105 -1401.26571 1.079373e+04 22 1106 -1336.09342 1.075790e+04 22 1107 -1266.94450 1.073053e+04 22 1108 -1194.90947 1.071203e+04 22 1109 -1121.12437 1.070271e+04 22 1110 -1046.75282 1.070271e+04 22 1111 -972.96771 1.071203e+04 22 1112 -900.93268 1.073053e+04 22 1113 -831.78376 1.075790e+04 22 1114 -766.61148 1.079373e+04 22 1115 -706.44363 1.083745e+04 22 1116 -652.22910 1.088836e+04 22 1117 -604.82290 1.094566e+04 22 1118 -564.97263 1.100846e+04 22 1119 -533.30676 1.107575e+04 22 1120 -510.32469 1.114648e+04 22 1121 -496.38885 1.121953e+04 22 1122 -491.71902 1.129376e+04 22 1123 -8956.93169 -6.598524e+03 23 1124 -9032.38785 -5.399182e+03 23 1125 -9257.56632 -4.218755e+03 23 1126 -9628.91592 -3.075859e+03 23 1127 -10140.58024 -1.988517e+03 23 1128 -10784.49002 -9.738774e+02 23 1129 -11550.49042 -4.794200e+01 23 1130 -12426.50116 7.746868e+02 23 1131 -13398.70703 1.481036e+03 23 1132 -14451.77576 2.059965e+03 23 1133 -15569.09982 2.502345e+03 23 1134 -16733.05835 2.801199e+03 23 1135 -17925.29503 2.951813e+03 23 1136 -19127.00757 2.951813e+03 23 1137 -20319.24425 2.801199e+03 23 1138 -21483.20279 2.502345e+03 23 1139 -22600.52685 2.059965e+03 23 1140 -23653.59558 1.481036e+03 23 1141 -24625.80145 7.746868e+02 23 1142 -25501.81219 -4.794200e+01 23 1143 -26267.81259 -9.738774e+02 23 1144 -26911.72237 -1.988517e+03 23 1145 -27423.38668 -3.075859e+03 23 1146 -27794.73628 -4.218755e+03 23 1147 -28019.91476 -5.399182e+03 23 1148 -28095.37091 -6.598524e+03 23 1149 -28019.91476 -7.797865e+03 23 1150 -27794.73628 -8.978292e+03 23 1151 -27423.38668 -1.012119e+04 23 1152 -26911.72237 -1.120853e+04 23 1153 -26267.81259 -1.222317e+04 23 1154 -25501.81219 -1.314911e+04 23 1155 -24625.80145 -1.397173e+04 23 1156 -23653.59558 -1.467808e+04 23 1157 -22600.52685 -1.525701e+04 23 1158 -21483.20279 -1.569939e+04 23 1159 -20319.24425 -1.599825e+04 23 1160 -19127.00757 -1.614886e+04 23 1161 -17925.29503 -1.614886e+04 23 1162 -16733.05835 -1.599825e+04 23 1163 -15569.09982 -1.569939e+04 23 1164 -14451.77576 -1.525701e+04 23 1165 -13398.70703 -1.467808e+04 23 1166 -12426.50116 -1.397173e+04 23 1167 -11550.49042 -1.314911e+04 23 1168 -10784.49002 -1.222317e+04 23 1169 -10140.58024 -1.120853e+04 23 1170 -9628.91592 -1.012119e+04 23 1171 -9257.56632 -8.978292e+03 23 1172 -9032.38785 -7.797865e+03 23 1173 -8956.93169 -6.598524e+03 23 1174 -10007.31062 9.133993e+02 24 1175 -10015.46915 1.043075e+03 24 1176 -10039.81609 1.170707e+03 24 1177 -10079.96746 1.294280e+03 24 1178 -10135.29006 1.411846e+03 24 1179 -10204.91142 1.521552e+03 24 1180 -10287.73356 1.621667e+03 24 1181 -10382.45034 1.710612e+03 24 1182 -10487.56800 1.786984e+03 24 1183 -10601.42879 1.849580e+03 24 1184 -10722.23704 1.897411e+03 24 1185 -10848.08755 1.929724e+03 24 1186 -10976.99557 1.946009e+03 24 1187 -11106.92815 1.946009e+03 24 1188 -11235.83617 1.929724e+03 24 1189 -11361.68668 1.897411e+03 24 1190 -11482.49494 1.849580e+03 24 1191 -11596.35572 1.786984e+03 24 1192 -11701.47339 1.710612e+03 24 1193 -11796.19016 1.621667e+03 24 1194 -11879.01231 1.521552e+03 24 1195 -11948.63366 1.411846e+03 24 1196 -12003.95626 1.294280e+03 24 1197 -12044.10764 1.170707e+03 24 1198 -12068.45458 1.043075e+03 24 1199 -12076.61311 9.133993e+02 24 1200 -12068.45458 7.837231e+02 24 1201 -12044.10764 6.560920e+02 24 1202 -12003.95626 5.325188e+02 24 1203 -11948.63366 4.149523e+02 24 1204 -11879.01231 3.052466e+02 24 1205 -11796.19016 2.051318e+02 24 1206 -11701.47339 1.161868e+02 24 1207 -11596.35572 3.981436e+01 24 1208 -11482.49494 -2.278113e+01 24 1209 -11361.68668 -7.061250e+01 24 1210 -11235.83617 -1.029254e+02 24 1211 -11106.92815 -1.192103e+02 24 1212 -10976.99557 -1.192103e+02 24 1213 -10848.08755 -1.029254e+02 24 1214 -10722.23704 -7.061250e+01 24 1215 -10601.42879 -2.278113e+01 24 1216 -10487.56800 3.981436e+01 24 1217 -10382.45034 1.161868e+02 24 1218 -10287.73356 2.051318e+02 24 1219 -10204.91142 3.052466e+02 24 1220 -10135.29006 4.149523e+02 24 1221 -10079.96746 5.325188e+02 24 1222 -10039.81609 6.560920e+02 24 1223 -10015.46915 7.837231e+02 24 1224 -10007.31062 9.133993e+02 24 1225 6909.86962 1.316298e+04 25 1226 6887.94479 1.351147e+04 25 1227 6822.51609 1.385446e+04 25 1228 6714.61534 1.418654e+04 25 1229 6565.94423 1.450248e+04 25 1230 6378.84737 1.479730e+04 25 1231 6156.27541 1.506634e+04 25 1232 5901.73842 1.530537e+04 25 1233 5619.25061 1.551061e+04 25 1234 5313.26699 1.567883e+04 25 1235 4988.61309 1.580736e+04 25 1236 4650.40890 1.589420e+04 25 1237 4303.98811 1.593796e+04 25 1238 3954.81398 1.593796e+04 25 1239 3608.39319 1.589420e+04 25 1240 3270.18901 1.580736e+04 25 1241 2945.53511 1.567883e+04 25 1242 2639.55148 1.551061e+04 25 1243 2357.06368 1.530537e+04 25 1244 2102.52669 1.506634e+04 25 1245 1879.95472 1.479730e+04 25 1246 1692.85787 1.450248e+04 25 1247 1544.18675 1.418654e+04 25 1248 1436.28601 1.385446e+04 25 1249 1370.85730 1.351147e+04 25 1250 1348.93248 1.316298e+04 25 1251 1370.85730 1.281450e+04 25 1252 1436.28601 1.247151e+04 25 1253 1544.18675 1.213942e+04 25 1254 1692.85787 1.182348e+04 25 1255 1879.95472 1.152866e+04 25 1256 2102.52669 1.125962e+04 25 1257 2357.06368 1.102059e+04 25 1258 2639.55148 1.081535e+04 25 1259 2945.53511 1.064714e+04 25 1260 3270.18901 1.051860e+04 25 1261 3608.39319 1.043176e+04 25 1262 3954.81398 1.038800e+04 25 1263 4303.98811 1.038800e+04 25 1264 4650.40890 1.043176e+04 25 1265 4988.61309 1.051860e+04 25 1266 5313.26699 1.064714e+04 25 1267 5619.25061 1.081535e+04 25 1268 5901.73842 1.102059e+04 25 1269 6156.27541 1.125962e+04 25 1270 6378.84737 1.152866e+04 25 1271 6565.94423 1.182348e+04 25 1272 6714.61534 1.213942e+04 25 1273 6822.51609 1.247151e+04 25 1274 6887.94479 1.281450e+04 25 1275 6909.86962 1.316298e+04 25 ``` ] --- class: split-40 count: false .left-code-circle_pack-auto[ ```r gapminder %>% filter(continent == "Americas") %>% filter(year == 2002) %>% select(country, pop) -> prep packcircles::circleProgressiveLayout(prep$pop, sizetype = 'area') -> pack pack %>% packcircles::circleLayoutVertices(npoints = 50) -> *circle_outlines ``` ] .right-output-circle_pack-auto[ ] --- class: split-40 count: false .left-code-circle_pack-auto[ ```r gapminder %>% filter(continent == "Americas") %>% filter(year == 2002) %>% select(country, pop) -> prep packcircles::circleProgressiveLayout(prep$pop, sizetype = 'area') -> pack pack %>% packcircles::circleLayoutVertices(npoints = 50) -> circle_outlines *circle_outlines ``` ] .right-output-circle_pack-auto[ ``` x y id 1 0.00000 0.000000e+00 1 2 -27.54349 4.377912e+02 1 3 -109.73958 8.686783e+02 1 4 -245.29200 1.285866e+03 1 5 -432.06299 1.682774e+03 1 6 -667.10708 2.053144e+03 1 7 -946.71746 2.391135e+03 1 8 -1266.48453 2.691417e+03 1 9 -1621.36536 2.949253e+03 1 10 -2005.76327 3.160577e+03 1 11 -2413.61608 3.322058e+03 1 12 -2838.49170 3.431147e+03 1 13 -3273.68959 3.486125e+03 1 14 -3712.34642 3.486125e+03 1 15 -4147.54431 3.431147e+03 1 16 -4572.41993 3.322058e+03 1 17 -4980.27273 3.160577e+03 1 18 -5364.67064 2.949253e+03 1 19 -5719.55147 2.691417e+03 1 20 -6039.31854 2.391135e+03 1 21 -6318.92893 2.053144e+03 1 22 -6553.97301 1.682774e+03 1 23 -6740.74401 1.285866e+03 1 24 -6876.29642 8.686783e+02 1 25 -6958.49251 4.377912e+02 1 26 -6986.03600 -1.123440e-12 1 27 -6958.49251 -4.377912e+02 1 28 -6876.29642 -8.686783e+02 1 29 -6740.74401 -1.285866e+03 1 30 -6553.97301 -1.682774e+03 1 31 -6318.92893 -2.053144e+03 1 32 -6039.31854 -2.391135e+03 1 33 -5719.55147 -2.691417e+03 1 34 -5364.67064 -2.949253e+03 1 35 -4980.27273 -3.160577e+03 1 36 -4572.41993 -3.322058e+03 1 37 -4147.54431 -3.431147e+03 1 38 -3712.34642 -3.486125e+03 1 39 -3273.68959 -3.486125e+03 1 40 -2838.49170 -3.431147e+03 1 41 -2413.61608 -3.322058e+03 1 42 -2005.76327 -3.160577e+03 1 43 -1621.36536 -2.949253e+03 1 44 -1266.48453 -2.691417e+03 1 45 -946.71746 -2.391135e+03 1 46 -667.10708 -2.053144e+03 1 47 -432.06299 -1.682774e+03 1 48 -245.29200 -1.285866e+03 1 49 -109.73958 -8.686783e+02 1 50 -27.54349 -4.377912e+02 1 51 0.00000 -8.555427e-13 1 52 3279.12771 0.000000e+00 2 53 3266.19926 2.054918e+02 2 54 3227.61780 4.077430e+02 2 55 3163.99178 6.035637e+02 2 56 3076.32462 7.898659e+02 2 57 2965.99888 9.637115e+02 2 58 2834.75447 1.122359e+03 2 59 2684.66119 1.263306e+03 2 60 2518.08610 1.384330e+03 2 61 2337.65620 1.483522e+03 2 62 2146.21695 1.559318e+03 2 63 1946.78749 1.610523e+03 2 64 1742.51292 1.636329e+03 2 65 1536.61479 1.636329e+03 2 66 1332.34023 1.610523e+03 2 67 1132.91076 1.559318e+03 2 68 941.47152 1.483522e+03 2 69 761.04161 1.384330e+03 2 70 594.46652 1.263306e+03 2 71 444.37324 1.122359e+03 2 72 313.12883 9.637115e+02 2 73 202.80310 7.898659e+02 2 74 115.13594 6.035637e+02 2 75 51.50991 4.077430e+02 2 76 12.92845 2.054918e+02 2 77 0.00000 -5.273240e-13 2 78 12.92845 -2.054918e+02 2 79 51.50991 -4.077430e+02 2 80 115.13594 -6.035637e+02 2 81 202.80310 -7.898659e+02 2 82 313.12883 -9.637115e+02 2 83 444.37324 -1.122359e+03 2 84 594.46652 -1.263306e+03 2 85 761.04161 -1.384330e+03 2 86 941.47152 -1.483522e+03 2 87 1132.91076 -1.559318e+03 2 88 1332.34023 -1.610523e+03 2 89 1536.61479 -1.636329e+03 2 90 1742.51292 -1.636329e+03 2 91 1946.78749 -1.610523e+03 2 92 2146.21695 -1.559318e+03 2 93 2337.65620 -1.483522e+03 2 94 2518.08610 -1.384330e+03 2 95 2684.66119 -1.263306e+03 2 96 2834.75447 -1.122359e+03 2 97 2965.99888 -9.637115e+02 2 98 3076.32462 -7.898659e+02 2 99 3163.99178 -6.035637e+02 2 100 3227.61780 -4.077430e+02 2 101 3266.19926 -2.054918e+02 2 102 3279.12771 -4.015773e-13 2 103 10300.36784 -9.142026e+03 3 104 10240.69510 -8.193555e+03 3 105 10062.61797 -7.260042e+03 3 106 9768.94482 -6.356209e+03 3 107 9364.30706 -5.496310e+03 3 108 8855.08607 -4.693906e+03 3 109 8249.31257 -3.961652e+03 3 110 7556.53995 -3.311095e+03 3 111 6787.69368 -2.752495e+03 3 112 5954.89890 -2.294663e+03 3 113 5071.28929 -1.944817e+03 3 114 4150.79990 -1.708475e+03 3 115 3207.94740 -1.589365e+03 3 116 2257.60114 -1.589365e+03 3 117 1314.74864 -1.708475e+03 3 118 394.25925 -1.944817e+03 3 119 -489.35035 -2.294663e+03 3 120 -1322.14513 -2.752495e+03 3 121 -2090.99141 -3.311095e+03 3 122 -2783.76402 -3.961652e+03 3 123 -3389.53753 -4.693906e+03 3 124 -3898.75852 -5.496310e+03 3 125 -4303.39628 -6.356209e+03 3 126 -4597.06942 -7.260042e+03 3 127 -4775.14656 -8.193555e+03 3 128 -4834.81929 -9.142026e+03 3 129 -4775.14656 -1.009050e+04 3 130 -4597.06942 -1.102401e+04 3 131 -4303.39628 -1.192784e+04 3 132 -3898.75852 -1.278774e+04 3 133 -3389.53753 -1.359015e+04 3 134 -2783.76402 -1.432240e+04 3 135 -2090.99141 -1.497296e+04 3 136 -1322.14513 -1.553156e+04 3 137 -489.35035 -1.598939e+04 3 138 394.25925 -1.633924e+04 3 139 1314.74864 -1.657558e+04 3 140 2257.60114 -1.669469e+04 3 141 3207.94740 -1.669469e+04 3 142 4150.79990 -1.657558e+04 3 143 5071.28929 -1.633924e+04 3 144 5954.89890 -1.598939e+04 3 145 6787.69368 -1.553156e+04 3 146 7556.53995 -1.497296e+04 3 147 8249.31257 -1.432240e+04 3 148 8855.08607 -1.359015e+04 3 149 9364.30706 -1.278774e+04 3 150 9768.94482 -1.192784e+04 3 151 10062.61797 -1.102401e+04 3 152 10240.69510 -1.009050e+04 3 153 10300.36784 -9.142026e+03 3 154 4337.41301 4.801407e+03 4 155 4312.28524 5.200801e+03 4 156 4237.29820 5.593897e+03 4 157 4113.63449 5.974495e+03 4 158 3943.24435 6.336592e+03 4 159 3728.81495 6.674479e+03 4 160 3473.72795 6.982826e+03 4 161 3182.00624 7.256771e+03 4 162 2858.25044 7.491994e+03 4 163 2507.56637 7.684784e+03 4 164 2135.48453 7.832101e+03 4 165 1747.87287 7.931623e+03 4 166 1350.84426 7.981780e+03 4 167 950.66009 7.981780e+03 4 168 553.63148 7.931623e+03 4 169 166.01982 7.832101e+03 4 170 -206.06202 7.684784e+03 4 171 -556.74609 7.491994e+03 4 172 -880.50189 7.256771e+03 4 173 -1172.22360 6.982826e+03 4 174 -1427.31060 6.674479e+03 4 175 -1641.74000 6.336592e+03 4 176 -1812.13014 5.974495e+03 4 177 -1935.79385 5.593897e+03 4 178 -2010.78089 5.200801e+03 4 179 -2035.90866 4.801407e+03 4 180 -2010.78089 4.402012e+03 4 181 -1935.79385 4.008917e+03 4 182 -1812.13014 3.628319e+03 4 183 -1641.74000 3.266221e+03 4 184 -1427.31060 2.928335e+03 4 185 -1172.22360 2.619987e+03 4 186 -880.50189 2.346042e+03 4 187 -556.74609 2.110820e+03 4 188 -206.06202 1.918030e+03 4 189 166.01982 1.770712e+03 4 190 553.63148 1.671191e+03 4 191 950.66009 1.621034e+03 4 192 1350.84426 1.621034e+03 4 193 1747.87287 1.671191e+03 4 194 2135.48453 1.770712e+03 4 195 2507.56637 1.918030e+03 4 196 2858.25044 2.110820e+03 4 197 3182.00624 2.346042e+03 4 198 3473.72795 2.619987e+03 4 199 3728.81495 2.928335e+03 4 200 3943.24435 3.266221e+03 4 201 4113.63449 3.628319e+03 4 202 4237.29820 4.008917e+03 4 203 4312.28524 4.402012e+03 4 204 4337.41301 4.801407e+03 4 205 7494.82200 1.302381e+03 5 206 7477.30871 1.580746e+03 5 207 7425.04505 1.854722e+03 5 208 7338.85523 2.119987e+03 5 209 7220.09852 2.372358e+03 5 210 7070.64780 2.607855e+03 5 211 6892.85998 2.822763e+03 5 212 6689.53889 3.013694e+03 5 213 6463.89102 3.177637e+03 5 214 6219.47497 3.312006e+03 5 215 5960.14533 3.414682e+03 5 216 5689.99188 3.484045e+03 5 217 5413.27511 3.519003e+03 5 218 5134.35900 3.519003e+03 5 219 4857.64223 3.484045e+03 5 220 4587.48879 3.414682e+03 5 221 4328.15915 3.312006e+03 5 222 4083.74310 3.177637e+03 5 223 3858.09523 3.013694e+03 5 224 3654.77414 2.822763e+03 5 225 3476.98632 2.607855e+03 5 226 3327.53559 2.372358e+03 5 227 3208.77889 2.119987e+03 5 228 3122.58907 1.854722e+03 5 229 3070.32540 1.580746e+03 5 230 3052.81212 1.302381e+03 5 231 3070.32540 1.024015e+03 5 232 3122.58907 7.500391e+02 5 233 3208.77889 4.847741e+02 5 234 3327.53559 2.324033e+02 5 235 3476.98632 -3.093392e+00 5 236 3654.77414 -2.180019e+02 5 237 3858.09523 -4.089332e+02 5 238 4083.74310 -5.728759e+02 5 239 4328.15915 -7.072448e+02 5 240 4587.48879 -8.099207e+02 5 241 4857.64223 -8.792843e+02 5 242 5134.35900 -9.142417e+02 5 243 5413.27511 -9.142417e+02 5 244 5689.99188 -8.792843e+02 5 245 5960.14533 -8.099207e+02 5 246 6219.47497 -7.072448e+02 5 247 6463.89102 -5.728759e+02 5 248 6689.53889 -4.089332e+02 5 249 6892.85998 -2.180019e+02 5 250 7070.64780 -3.093392e+00 5 251 7220.09852 2.324033e+02 5 252 7338.85523 4.847741e+02 5 253 7425.04505 7.500391e+02 5 254 7477.30871 1.024015e+03 5 255 7494.82200 1.302381e+03 5 256 14175.26866 -1.160651e+03 6 257 14146.77956 -7.078296e+02 6 258 14061.76155 -2.621496e+02 6 259 13921.55543 1.693605e+02 6 260 13728.37231 5.798955e+02 6 261 13485.25882 9.629811e+02 6 262 13196.04900 1.312576e+03 6 263 12865.30386 1.623166e+03 6 264 12498.23945 1.889854e+03 6 265 12100.64460 2.108434e+03 6 266 11678.78961 2.275458e+03 6 267 11239.32738 2.388293e+03 6 268 10789.18851 2.445158e+03 6 269 10335.47195 2.445158e+03 6 270 9885.33308 2.388293e+03 6 271 9445.87086 2.275458e+03 6 272 9024.01587 2.108434e+03 6 273 8626.42101 1.889854e+03 6 274 8259.35661 1.623166e+03 6 275 7928.61147 1.312576e+03 6 276 7639.40165 9.629811e+02 6 277 7396.28815 5.798955e+02 6 278 7203.10504 1.693605e+02 6 279 7062.89891 -2.621496e+02 6 280 6977.88090 -7.078296e+02 6 281 6949.39181 -1.160651e+03 6 282 6977.88090 -1.613472e+03 6 283 7062.89891 -2.059152e+03 6 284 7203.10504 -2.490662e+03 6 285 7396.28815 -2.901197e+03 6 286 7639.40165 -3.284283e+03 6 287 7928.61147 -3.633877e+03 6 288 8259.35661 -3.944468e+03 6 289 8626.42101 -4.211156e+03 6 290 9024.01587 -4.429735e+03 6 291 9445.87086 -4.596759e+03 6 292 9885.33308 -4.709594e+03 6 293 10335.47195 -4.766460e+03 6 294 10789.18851 -4.766460e+03 6 295 11239.32738 -4.709594e+03 6 296 11678.78961 -4.596759e+03 6 297 12100.64460 -4.429735e+03 6 298 12498.23945 -4.211156e+03 6 299 12865.30386 -3.944468e+03 6 300 13196.04900 -3.633877e+03 6 301 13485.25882 -3.284283e+03 6 302 13728.37231 -2.901197e+03 6 303 13921.55543 -2.490662e+03 6 304 14061.76155 -2.059152e+03 6 305 14146.77956 -1.613472e+03 6 306 14175.26866 -1.160651e+03 6 307 -3468.26547 -4.469205e+03 7 308 -3476.97756 -4.330730e+03 7 309 -3502.97642 -4.194439e+03 7 310 -3545.85205 -4.062482e+03 7 311 -3604.92825 -3.936938e+03 7 312 -3679.27338 -3.819789e+03 7 313 -3767.71496 -3.712882e+03 7 314 -3868.85822 -3.617902e+03 7 315 -3981.10805 -3.536348e+03 7 316 -4102.69423 -3.469505e+03 7 317 -4231.69926 -3.418428e+03 7 318 -4366.08866 -3.383923e+03 7 319 -4503.74301 -3.366533e+03 7 320 -4642.49145 -3.366533e+03 7 321 -4780.14580 -3.383923e+03 7 322 -4914.53520 -3.418428e+03 7 323 -5043.54023 -3.469505e+03 7 324 -5165.12641 -3.536348e+03 7 325 -5277.37625 -3.617902e+03 7 326 -5378.51950 -3.712882e+03 7 327 -5466.96108 -3.819789e+03 7 328 -5541.30621 -3.936938e+03 7 329 -5600.38241 -4.062482e+03 7 330 -5643.25804 -4.194439e+03 7 331 -5669.25690 -4.330730e+03 7 332 -5677.96899 -4.469205e+03 7 333 -5669.25690 -4.607679e+03 7 334 -5643.25804 -4.743970e+03 7 335 -5600.38241 -4.875928e+03 7 336 -5541.30621 -5.001471e+03 7 337 -5466.96108 -5.118620e+03 7 338 -5378.51950 -5.225528e+03 7 339 -5277.37625 -5.320508e+03 7 340 -5165.12641 -5.402062e+03 7 341 -5043.54023 -5.468905e+03 7 342 -4914.53520 -5.519981e+03 7 343 -4780.14580 -5.554487e+03 7 344 -4642.49145 -5.571876e+03 7 345 -4503.74301 -5.571876e+03 7 346 -4366.08866 -5.554487e+03 7 347 -4231.69926 -5.519981e+03 7 348 -4102.69423 -5.468905e+03 7 349 -3981.10805 -5.402062e+03 7 350 -3868.85822 -5.320508e+03 7 351 -3767.71496 -5.225528e+03 7 352 -3679.27338 -5.118620e+03 7 353 -3604.92825 -5.001471e+03 7 354 -3545.85205 -4.875928e+03 7 355 -3502.97642 -4.743970e+03 7 356 -3476.97756 -4.607679e+03 7 357 -3468.26547 -4.469205e+03 7 358 -5562.81228 -3.646655e+03 8 359 -5577.71876 -3.409723e+03 8 360 -5622.20311 -3.176528e+03 8 361 -5695.56379 -2.950747e+03 8 362 -5796.64385 -2.735941e+03 8 363 -5923.84921 -2.535497e+03 8 364 -6075.17376 -2.352577e+03 8 365 -6248.23102 -2.190066e+03 8 366 -6440.29177 -2.050525e+03 8 367 -6648.32710 -1.936157e+03 8 368 -6869.05617 -1.848764e+03 8 369 -7098.99795 -1.789725e+03 8 370 -7334.52612 -1.759971e+03 8 371 -7571.92627 -1.759971e+03 8 372 -7807.45444 -1.789725e+03 8 373 -8037.39622 -1.848764e+03 8 374 -8258.12529 -1.936157e+03 8 375 -8466.16063 -2.050525e+03 8 376 -8658.22138 -2.190066e+03 8 377 -8831.27863 -2.352577e+03 8 378 -8982.60318 -2.535497e+03 8 379 -9109.80854 -2.735941e+03 8 380 -9210.88860 -2.950747e+03 8 381 -9284.24928 -3.176528e+03 8 382 -9328.73363 -3.409723e+03 8 383 -9343.64011 -3.646655e+03 8 384 -9328.73363 -3.883586e+03 8 385 -9284.24928 -4.116781e+03 8 386 -9210.88860 -4.342562e+03 8 387 -9109.80854 -4.557369e+03 8 388 -8982.60318 -4.757812e+03 8 389 -8831.27863 -4.940732e+03 8 390 -8658.22138 -5.103244e+03 8 391 -8466.16063 -5.242784e+03 8 392 -8258.12529 -5.357152e+03 8 393 -8037.39622 -5.444545e+03 8 394 -7807.45444 -5.503584e+03 8 395 -7571.92627 -5.533338e+03 8 396 -7334.52612 -5.533338e+03 8 397 -7098.99795 -5.503584e+03 8 398 -6869.05617 -5.444545e+03 8 399 -6648.32710 -5.357152e+03 8 400 -6440.29177 -5.242784e+03 8 401 -6248.23102 -5.103244e+03 8 402 -6075.17376 -4.940732e+03 8 403 -5923.84921 -4.757812e+03 8 404 -5796.64385 -4.557369e+03 8 405 -5695.56379 -4.342562e+03 8 406 -5622.20311 -4.116781e+03 8 407 -5577.71876 -3.883586e+03 8 408 -5562.81228 -3.646655e+03 8 409 -6977.29736 -2.999554e+02 9 410 -6990.38193 -9.198215e+01 9 411 -7029.42928 1.127112e+02 9 412 -7093.82361 3.108966e+02 9 413 -7182.54939 4.994485e+02 9 414 -7294.20735 6.753933e+02 9 415 -7427.03659 8.359562e+02 9 416 -7578.94230 9.786052e+02 9 417 -7747.52885 1.101090e+03 9 418 -7930.13752 1.201480e+03 9 419 -8123.88846 1.278192e+03 9 420 -8325.72612 1.330015e+03 9 421 -8532.46738 1.356132e+03 9 422 -8740.85181 1.356132e+03 9 423 -8947.59307 1.330015e+03 9 424 -9149.43072 1.278192e+03 9 425 -9343.18167 1.201480e+03 9 426 -9525.79034 1.101090e+03 9 427 -9694.37689 9.786052e+02 9 428 -9846.28260 8.359562e+02 9 429 -9979.11184 6.753933e+02 9 430 -10090.76980 4.994485e+02 9 431 -10179.49558 3.108966e+02 9 432 -10243.88991 1.127112e+02 9 433 -10282.93726 -9.198215e+01 9 434 -10296.02182 -2.999554e+02 9 435 -10282.93726 -5.079286e+02 9 436 -10243.88991 -7.126220e+02 9 437 -10179.49558 -9.108074e+02 9 438 -10090.76980 -1.099359e+03 9 439 -9979.11184 -1.275304e+03 9 440 -9846.28260 -1.435867e+03 9 441 -9694.37689 -1.578516e+03 9 442 -9525.79034 -1.701001e+03 9 443 -9343.18167 -1.801391e+03 9 444 -9149.43072 -1.878103e+03 9 445 -8947.59307 -1.929926e+03 9 446 -8740.85181 -1.956043e+03 9 447 -8532.46738 -1.956043e+03 9 448 -8325.72612 -1.929926e+03 9 449 -8123.88846 -1.878103e+03 9 450 -7930.13752 -1.801391e+03 9 451 -7747.52885 -1.701001e+03 9 452 -7578.94230 -1.578516e+03 9 453 -7427.03659 -1.435867e+03 9 454 -7294.20735 -1.275304e+03 9 455 -7182.54939 -1.099359e+03 9 456 -7093.82361 -9.108074e+02 9 457 -7029.42928 -7.126220e+02 9 458 -6990.38193 -5.079286e+02 9 459 -6977.29736 -2.999554e+02 9 460 -5880.20875 3.314789e+03 10 461 -5896.20047 3.568970e+03 10 462 -5943.92344 3.819142e+03 10 463 -6022.62502 4.061361e+03 10 464 -6131.06406 4.291806e+03 10 465 -6267.53041 4.506842e+03 10 466 -6429.87190 4.703079e+03 10 467 -6615.52832 4.877422e+03 10 468 -6821.57175 5.027122e+03 10 469 -7044.75277 5.149817e+03 10 470 -7281.55168 5.243572e+03 10 471 -7528.23401 5.306909e+03 10 472 -7780.90944 5.338829e+03 10 473 -8035.59313 5.338829e+03 10 474 -8288.26856 5.306909e+03 10 475 -8534.95089 5.243572e+03 10 476 -8771.74980 5.149817e+03 10 477 -8994.93082 5.027122e+03 10 478 -9200.97425 4.877422e+03 10 479 -9386.63067 4.703079e+03 10 480 -9548.97216 4.506842e+03 10 481 -9685.43851 4.291806e+03 10 482 -9793.87755 4.061361e+03 10 483 -9872.57913 3.819142e+03 10 484 -9920.30210 3.568970e+03 10 485 -9936.29382 3.314789e+03 10 486 -9920.30210 3.060608e+03 10 487 -9872.57913 2.810435e+03 10 488 -9793.87755 2.568217e+03 10 489 -9685.43851 2.337772e+03 10 490 -9548.97216 2.122735e+03 10 491 -9386.63067 1.926498e+03 10 492 -9200.97425 1.752155e+03 10 493 -8994.93082 1.602456e+03 10 494 -8771.74980 1.479761e+03 10 495 -8534.95089 1.386006e+03 10 496 -8288.26856 1.322668e+03 10 497 -8035.59313 1.290748e+03 10 498 -7780.90944 1.290748e+03 10 499 -7528.23401 1.322668e+03 10 500 -7281.55168 1.386006e+03 10 501 -7044.75277 1.479761e+03 10 502 -6821.57175 1.602456e+03 10 503 -6615.52832 1.752155e+03 10 504 -6429.87190 1.926498e+03 10 505 -6267.53041 2.122735e+03 10 506 -6131.06406 2.337772e+03 10 507 -6022.62502 2.568217e+03 10 508 -5943.92344 2.810435e+03 10 509 -5896.20047 3.060608e+03 10 510 -5880.20875 3.314789e+03 10 511 -3347.07554 4.746577e+03 11 512 -3358.28942 4.924816e+03 11 513 -3391.75421 5.100245e+03 11 514 -3446.94215 5.270096e+03 11 515 -3522.98290 5.431690e+03 11 516 -3618.67724 5.582481e+03 11 517 -3732.51602 5.720088e+03 11 518 -3862.70394 5.842343e+03 11 519 -4007.18785 5.947316e+03 11 520 -4163.68915 6.033354e+03 11 521 -4329.73973 6.099098e+03 11 522 -4502.72087 6.143512e+03 11 523 -4679.90456 6.165895e+03 11 524 -4858.49649 6.165895e+03 11 525 -5035.68017 6.143512e+03 11 526 -5208.66131 6.099098e+03 11 527 -5374.71189 6.033354e+03 11 528 -5531.21320 5.947316e+03 11 529 -5675.69710 5.842343e+03 11 530 -5805.88502 5.720088e+03 11 531 -5919.72380 5.582481e+03 11 532 -6015.41815 5.431690e+03 11 533 -6091.45889 5.270096e+03 11 534 -6146.64684 5.100245e+03 11 535 -6180.11163 4.924816e+03 11 536 -6191.32551 4.746577e+03 11 537 -6180.11163 4.568337e+03 11 538 -6146.64684 4.392908e+03 11 539 -6091.45889 4.223057e+03 11 540 -6015.41815 4.061463e+03 11 541 -5919.72380 3.910672e+03 11 542 -5805.88502 3.773065e+03 11 543 -5675.69710 3.650810e+03 11 544 -5531.21320 3.545837e+03 11 545 -5374.71189 3.459799e+03 11 546 -5208.66131 3.394055e+03 11 547 -5035.68017 3.349641e+03 11 548 -4858.49649 3.327258e+03 11 549 -4679.90456 3.327258e+03 11 550 -4502.72087 3.349641e+03 11 551 -4329.73973 3.394055e+03 11 552 -4163.68915 3.459799e+03 11 553 -4007.18785 3.545837e+03 11 554 -3862.70394 3.650810e+03 11 555 -3732.51602 3.773065e+03 11 556 -3618.67724 3.910672e+03 11 557 -3522.98290 4.061463e+03 11 558 -3446.94215 4.223057e+03 11 559 -3391.75421 4.392908e+03 11 560 -3358.28942 4.568337e+03 11 561 -3347.07554 4.746577e+03 11 562 -1198.11772 7.593956e+03 12 563 -1212.99206 7.830377e+03 12 564 -1257.38053 8.063070e+03 12 565 -1330.58307 8.288364e+03 12 566 -1431.44525 8.502707e+03 12 567 -1558.37641 8.702719e+03 12 568 -1709.37477 8.885244e+03 12 569 -1882.05899 9.047406e+03 12 570 -2073.70574 9.186645e+03 12 571 -2281.29263 9.300767e+03 12 572 -2501.54591 9.387971e+03 12 573 -2730.99203 9.446883e+03 12 574 -2966.01251 9.476573e+03 12 575 -3202.90092 9.476573e+03 12 576 -3437.92140 9.446883e+03 12 577 -3667.36752 9.387971e+03 12 578 -3887.62080 9.300767e+03 12 579 -4095.20769 9.186645e+03 12 580 -4286.85444 9.047406e+03 12 581 -4459.53866 8.885244e+03 12 582 -4610.53702 8.702719e+03 12 583 -4737.46818 8.502707e+03 12 584 -4838.33036 8.288364e+03 12 585 -4911.53290 8.063070e+03 12 586 -4955.92136 7.830377e+03 12 587 -4970.79571 7.593956e+03 12 588 -4955.92136 7.357535e+03 12 589 -4911.53290 7.124843e+03 12 590 -4838.33036 6.899549e+03 12 591 -4737.46818 6.685206e+03 12 592 -4610.53702 6.485194e+03 12 593 -4459.53866 6.302669e+03 12 594 -4286.85444 6.140507e+03 12 595 -4095.20769 6.001268e+03 12 596 -3887.62080 5.887146e+03 12 597 -3667.36752 5.799941e+03 12 598 -3437.92140 5.741030e+03 12 599 -3202.90092 5.711340e+03 12 600 -2966.01251 5.711340e+03 12 601 -2730.99203 5.741030e+03 12 602 -2501.54591 5.799941e+03 12 603 -2281.29263 5.887146e+03 12 604 -2073.70574 6.001268e+03 12 605 -1882.05899 6.140507e+03 12 606 -1709.37477 6.302669e+03 12 607 -1558.37641 6.485194e+03 12 608 -1431.44525 6.685206e+03 12 609 -1330.58307 6.899549e+03 12 610 -1257.38053 7.124843e+03 12 611 -1212.99206 7.357535e+03 12 612 -1198.11772 7.593956e+03 12 613 1422.46751 9.366980e+03 13 614 1410.19684 9.562016e+03 13 615 1373.57832 9.753977e+03 13 616 1313.18947 9.939835e+03 13 617 1229.98264 1.011666e+04 13 618 1125.27006 1.028166e+04 13 619 1000.70311 1.043223e+04 13 620 858.24629 1.056601e+04 13 621 700.14621 1.068088e+04 13 622 528.89623 1.077502e+04 13 623 347.19704 1.084696e+04 13 624 157.91416 1.089556e+04 13 625 -35.96732 1.092006e+04 13 626 -231.38975 1.092006e+04 13 627 -425.27123 1.089556e+04 13 628 -614.55411 1.084696e+04 13 629 -796.25330 1.077502e+04 13 630 -967.50329 1.068088e+04 13 631 -1125.60336 1.056601e+04 13 632 -1268.06018 1.043223e+04 13 633 -1392.62713 1.028166e+04 13 634 -1497.33971 1.011666e+04 13 635 -1580.54654 9.939835e+03 13 636 -1640.93539 9.753977e+03 13 637 -1677.55391 9.562016e+03 13 638 -1689.82458 9.366980e+03 13 639 -1677.55391 9.171943e+03 13 640 -1640.93539 8.979982e+03 13 641 -1580.54654 8.794124e+03 13 642 -1497.33971 8.617301e+03 13 643 -1392.62713 8.452300e+03 13 644 -1268.06018 8.301724e+03 13 645 -1125.60336 8.167949e+03 13 646 -967.50329 8.053082e+03 13 647 -796.25330 7.958937e+03 13 648 -614.55411 7.886997e+03 13 649 -425.27123 7.838397e+03 13 650 -231.38975 7.813904e+03 13 651 -35.96732 7.813904e+03 13 652 157.91416 7.838397e+03 13 653 347.19704 7.886997e+03 13 654 528.89623 7.958937e+03 13 655 700.14621 8.053082e+03 13 656 858.24629 8.167949e+03 13 657 1000.70311 8.301724e+03 13 658 1125.27006 8.452300e+03 13 659 1229.98264 8.617301e+03 13 660 1313.18947 8.794124e+03 13 661 1373.57832 8.979982e+03 13 662 1410.19684 9.171943e+03 13 663 1422.46751 9.366980e+03 13 664 4327.79784 9.116083e+03 14 665 4316.30190 9.298805e+03 14 666 4281.99537 9.478647e+03 14 667 4225.41929 9.652770e+03 14 668 4147.46590 9.818429e+03 14 669 4049.36456 9.973012e+03 14 670 3932.66240 1.011408e+04 14 671 3799.19988 1.023941e+04 14 672 3651.08178 1.034702e+04 14 673 3490.64401 1.043523e+04 14 674 3320.41677 1.050262e+04 14 675 3143.08465 1.054815e+04 14 676 2961.44429 1.057110e+04 14 677 2778.36024 1.057110e+04 14 678 2596.71987 1.054815e+04 14 679 2419.38776 1.050262e+04 14 680 2249.16052 1.043523e+04 14 681 2088.72275 1.034702e+04 14 682 1940.60465 1.023941e+04 14 683 1807.14213 1.011408e+04 14 684 1690.43997 9.973012e+03 14 685 1592.33863 9.818429e+03 14 686 1514.38524 9.652770e+03 14 687 1457.80916 9.478647e+03 14 688 1423.50263 9.298805e+03 14 689 1412.00669 9.116083e+03 14 690 1423.50263 8.933360e+03 14 691 1457.80916 8.753519e+03 14 692 1514.38524 8.579396e+03 14 693 1592.33863 8.413736e+03 14 694 1690.43997 8.259153e+03 14 695 1807.14213 8.118084e+03 14 696 1940.60465 7.992755e+03 14 697 2088.72275 7.885141e+03 14 698 2249.16052 7.796939e+03 14 699 2419.38776 7.729542e+03 14 700 2596.71987 7.684010e+03 14 701 2778.36024 7.661064e+03 14 702 2961.44429 7.661064e+03 14 703 3143.08465 7.684010e+03 14 704 3320.41677 7.729542e+03 14 705 3490.64401 7.796939e+03 14 706 3651.08178 7.885141e+03 14 707 3799.19988 7.992755e+03 14 708 3932.66240 8.118084e+03 14 709 4049.36456 8.259153e+03 14 710 4147.46590 8.413736e+03 14 711 4225.41929 8.579396e+03 14 712 4281.99537 8.753519e+03 14 713 4316.30190 8.933360e+03 14 714 4327.79784 9.116083e+03 14 715 5330.20420 7.302394e+03 15 716 5322.94207 7.417823e+03 15 717 5301.27021 7.531431e+03 15 718 5265.53039 7.641426e+03 15 719 5216.28626 7.746075e+03 15 720 5154.31442 7.843727e+03 15 721 5080.59221 7.932842e+03 15 722 4996.28227 8.012015e+03 15 723 4902.71421 8.079996e+03 15 724 4801.36367 8.135714e+03 15 725 4693.82900 8.178290e+03 15 726 4581.80608 8.207052e+03 15 727 4467.06159 8.221548e+03 15 728 4351.40512 8.221548e+03 15 729 4236.66063 8.207052e+03 15 730 4124.63771 8.178290e+03 15 731 4017.10304 8.135714e+03 15 732 3915.75250 8.079996e+03 15 733 3822.18444 8.012015e+03 15 734 3737.87450 7.932842e+03 15 735 3664.15229 7.843727e+03 15 736 3602.18045 7.746075e+03 15 737 3552.93632 7.641426e+03 15 738 3517.19650 7.531431e+03 15 739 3495.52464 7.417823e+03 15 740 3488.26251 7.302394e+03 15 741 3495.52464 7.186966e+03 15 742 3517.19650 7.073358e+03 15 743 3552.93632 6.963362e+03 15 744 3602.18045 6.858713e+03 15 745 3664.15229 6.761061e+03 15 746 3737.87450 6.671946e+03 15 747 3822.18444 6.592774e+03 15 748 3915.75250 6.524793e+03 15 749 4017.10304 6.469075e+03 15 750 4124.63771 6.426499e+03 15 751 4236.66063 6.397736e+03 15 752 4351.40512 6.383241e+03 15 753 4467.06159 6.383241e+03 15 754 4581.80608 6.397736e+03 15 755 4693.82900 6.426499e+03 15 756 4801.36367 6.469075e+03 15 757 4902.71421 6.524793e+03 15 758 4996.28227 6.592774e+03 15 759 5080.59221 6.671946e+03 15 760 5154.31442 6.761061e+03 15 761 5216.28626 6.858713e+03 15 762 5265.53039 6.963362e+03 15 763 5301.27021 7.073358e+03 15 764 5322.94207 7.186966e+03 15 765 5330.20420 7.302394e+03 15 766 16698.14682 8.154050e+03 16 767 16653.11053 8.869881e+03 16 768 16518.71190 9.574423e+03 16 769 16297.07049 1.025657e+04 16 770 15991.68171 1.090555e+04 16 771 15607.36173 1.151114e+04 16 772 15150.17150 1.206379e+04 16 773 14627.32118 1.255478e+04 16 774 14047.05644 1.297637e+04 16 775 13418.52839 1.332190e+04 16 776 12751.64930 1.358594e+04 16 777 12056.93626 1.376431e+04 16 778 11345.34529 1.385420e+04 16 779 10628.09863 1.385420e+04 16 780 9916.50766 1.376431e+04 16 781 9221.79462 1.358594e+04 16 782 8554.91553 1.332190e+04 16 783 7926.38748 1.297637e+04 16 784 7346.12274 1.255478e+04 16 785 6823.27242 1.206379e+04 16 786 6366.08219 1.151114e+04 16 787 5981.76220 1.090555e+04 16 788 5676.37343 1.025657e+04 16 789 5454.73202 9.574423e+03 16 790 5320.33339 8.869881e+03 16 791 5275.29710 8.154050e+03 16 792 5320.33339 7.438218e+03 16 793 5454.73202 6.733676e+03 16 794 5676.37343 6.051534e+03 16 795 5981.76220 5.402550e+03 16 796 6366.08219 4.796958e+03 16 797 6823.27242 4.244310e+03 16 798 7346.12274 3.753321e+03 16 799 7926.38748 3.331734e+03 16 800 8554.91553 2.986198e+03 16 801 9221.79462 2.722162e+03 16 802 9916.50766 2.543790e+03 16 803 10628.09863 2.453895e+03 16 804 11345.34529 2.453895e+03 16 805 12056.93626 2.543790e+03 16 806 12751.64930 2.722162e+03 16 807 13418.52839 2.986198e+03 16 808 14047.05644 3.331734e+03 16 809 14627.32118 3.753321e+03 16 810 15150.17150 4.244310e+03 16 811 15607.36173 4.796958e+03 16 812 15991.68171 5.402550e+03 16 813 16297.07049 6.051534e+03 16 814 16518.71190 6.733676e+03 16 815 16653.11053 7.438218e+03 16 816 16698.14682 8.154050e+03 16 817 -4448.32055 -6.555570e+03 17 818 -4458.41340 -6.395149e+03 17 819 -4488.53278 -6.237257e+03 17 820 -4538.20370 -6.084386e+03 17 821 -4606.64281 -5.938946e+03 17 822 -4692.77078 -5.803230e+03 17 823 -4795.22933 -5.679379e+03 17 824 -4912.40263 -5.569345e+03 17 825 -5042.44278 -5.474866e+03 17 826 -5183.29896 -5.397429e+03 17 827 -5332.74981 -5.338258e+03 17 828 -5488.43837 -5.298284e+03 17 829 -5647.90936 -5.278138e+03 17 830 -5808.64783 -5.278138e+03 17 831 -5968.11882 -5.298284e+03 17 832 -6123.80738 -5.338258e+03 17 833 -6273.25823 -5.397429e+03 17 834 -6414.11441 -5.474866e+03 17 835 -6544.15456 -5.569345e+03 17 836 -6661.32786 -5.679379e+03 17 837 -6763.78641 -5.803230e+03 17 838 -6849.91438 -5.938946e+03 17 839 -6918.35349 -6.084386e+03 17 840 -6968.02441 -6.237257e+03 17 841 -6998.14379 -6.395149e+03 17 842 -7008.23664 -6.555570e+03 17 843 -6998.14379 -6.715991e+03 17 844 -6968.02441 -6.873883e+03 17 845 -6918.35349 -7.026754e+03 17 846 -6849.91438 -7.172195e+03 17 847 -6763.78641 -7.307911e+03 17 848 -6661.32786 -7.431762e+03 17 849 -6544.15456 -7.541795e+03 17 850 -6414.11441 -7.636274e+03 17 851 -6273.25823 -7.713711e+03 17 852 -6123.80738 -7.772883e+03 17 853 -5968.11882 -7.812857e+03 17 854 -5808.64783 -7.833002e+03 17 855 -5647.90936 -7.833002e+03 17 856 -5488.43837 -7.812857e+03 17 857 -5332.74981 -7.772883e+03 17 858 -5183.29896 -7.713711e+03 17 859 -5042.44278 -7.636274e+03 17 860 -4912.40263 -7.541795e+03 17 861 -4795.22933 -7.431762e+03 17 862 -4692.77078 -7.307911e+03 17 863 -4606.64281 -7.172195e+03 17 864 -4538.20370 -7.026754e+03 17 865 -4488.53278 -6.873883e+03 17 866 -4458.41340 -6.715991e+03 17 867 -4448.32055 -6.555570e+03 17 868 -7006.35981 -6.463573e+03 18 869 -7014.05363 -6.341283e+03 18 870 -7037.01377 -6.220922e+03 18 871 -7074.87814 -6.104387e+03 18 872 -7127.04957 -5.993517e+03 18 873 -7192.70531 -5.890060e+03 18 874 -7270.80992 -5.795648e+03 18 875 -7360.13165 -5.711769e+03 18 876 -7459.26183 -5.639747e+03 18 877 -7566.63713 -5.580717e+03 18 878 -7680.56417 -5.535610e+03 18 879 -7799.24626 -5.505138e+03 18 880 -7920.81171 -5.489780e+03 18 881 -8043.34336 -5.489780e+03 18 882 -8164.90880 -5.505138e+03 18 883 -8283.59089 -5.535610e+03 18 884 -8397.51794 -5.580717e+03 18 885 -8504.89324 -5.639747e+03 18 886 -8604.02342 -5.711769e+03 18 887 -8693.34515 -5.795648e+03 18 888 -8771.44976 -5.890060e+03 18 889 -8837.10549 -5.993517e+03 18 890 -8889.27693 -6.104387e+03 18 891 -8927.14129 -6.220922e+03 18 892 -8950.10143 -6.341283e+03 18 893 -8957.79526 -6.463573e+03 18 894 -8950.10143 -6.585862e+03 18 895 -8927.14129 -6.706224e+03 18 896 -8889.27693 -6.822758e+03 18 897 -8837.10549 -6.933628e+03 18 898 -8771.44976 -7.037085e+03 18 899 -8693.34515 -7.131497e+03 18 900 -8604.02342 -7.215376e+03 18 901 -8504.89324 -7.287398e+03 18 902 -8397.51794 -7.346428e+03 18 903 -8283.59089 -7.391535e+03 18 904 -8164.90880 -7.422008e+03 18 905 -8043.34336 -7.437365e+03 18 906 -7920.81171 -7.437365e+03 18 907 -7799.24626 -7.422008e+03 18 908 -7680.56417 -7.391535e+03 18 909 -7566.63713 -7.346428e+03 18 910 -7459.26183 -7.287398e+03 18 911 -7360.13165 -7.215376e+03 18 912 -7270.80992 -7.131497e+03 18 913 -7192.70531 -7.037085e+03 18 914 -7127.04957 -6.933628e+03 18 915 -7074.87814 -6.822758e+03 18 916 -7037.01377 -6.706224e+03 18 917 -7014.05363 -6.585862e+03 18 918 -7006.35981 -6.463573e+03 18 919 -5524.96104 6.556342e+03 19 920 -5535.75293 6.727874e+03 19 921 -5567.95842 6.896701e+03 19 922 -5621.06960 7.060161e+03 19 923 -5694.24888 7.215675e+03 19 924 -5786.34218 7.360790e+03 19 925 -5895.89712 7.493220e+03 19 926 -6021.18597 7.610874e+03 19 927 -6160.23285 7.711897e+03 19 928 -6310.84489 7.794697e+03 19 929 -6470.64687 7.857967e+03 19 930 -6637.11860 7.900709e+03 19 931 -6807.63474 7.922251e+03 19 932 -6979.50612 7.922251e+03 19 933 -7150.02226 7.900709e+03 19 934 -7316.49399 7.857967e+03 19 935 -7476.29597 7.794697e+03 19 936 -7626.90801 7.711897e+03 19 937 -7765.95489 7.610874e+03 19 938 -7891.24374 7.493220e+03 19 939 -8000.79868 7.360790e+03 19 940 -8092.89198 7.215675e+03 19 941 -8166.07126 7.060161e+03 19 942 -8219.18244 6.896701e+03 19 943 -8251.38793 6.727874e+03 19 944 -8262.17982 6.556342e+03 19 945 -8251.38793 6.384810e+03 19 946 -8219.18244 6.215983e+03 19 947 -8166.07126 6.052523e+03 19 948 -8092.89198 5.897009e+03 19 949 -8000.79868 5.751894e+03 19 950 -7891.24374 5.619464e+03 19 951 -7765.95489 5.501810e+03 19 952 -7626.90801 5.400787e+03 19 953 -7476.29597 5.317987e+03 19 954 -7316.49399 5.254717e+03 19 955 -7150.02226 5.211974e+03 19 956 -6979.50612 5.190433e+03 19 957 -6807.63474 5.190433e+03 19 958 -6637.11860 5.211974e+03 19 959 -6470.64687 5.254717e+03 19 960 -6310.84489 5.317987e+03 19 961 -6160.23285 5.400787e+03 19 962 -6021.18597 5.501810e+03 19 963 -5895.89712 5.619464e+03 19 964 -5786.34218 5.751894e+03 19 965 -5694.24888 5.897009e+03 19 966 -5621.06960 6.052523e+03 19 967 -5567.95842 6.215983e+03 19 968 -5535.75293 6.384810e+03 19 969 -5524.96104 6.556342e+03 19 970 -3712.37092 1.083600e+04 20 971 -3735.38867 1.120186e+04 20 972 -3804.07891 1.156195e+04 20 973 -3917.35835 1.191058e+04 20 974 -4073.44051 1.224228e+04 20 975 -4269.86389 1.255179e+04 20 976 -4503.53077 1.283424e+04 20 977 -4770.75607 1.308519e+04 20 978 -5067.32551 1.330066e+04 20 979 -5388.56200 1.347726e+04 20 980 -5729.39945 1.361220e+04 20 981 -6084.46264 1.370337e+04 20 982 -6448.15203 1.374931e+04 20 983 -6814.73202 1.374931e+04 20 984 -7178.42141 1.370337e+04 20 985 -7533.48460 1.361220e+04 20 986 -7874.32205 1.347726e+04 20 987 -8195.55854 1.330066e+04 20 988 -8492.12798 1.308519e+04 20 989 -8759.35328 1.283424e+04 20 990 -8993.02016 1.255179e+04 20 991 -9189.44354 1.224228e+04 20 992 -9345.52570 1.191058e+04 20 993 -9458.80515 1.156195e+04 20 994 -9527.49538 1.120186e+04 20 995 -9550.51313 1.083600e+04 20 996 -9527.49538 1.047015e+04 20 997 -9458.80515 1.011006e+04 20 998 -9345.52570 9.761421e+03 20 999 -9189.44354 9.429729e+03 20 1000 -8993.02016 9.120215e+03 20 1001 -8759.35328 8.837761e+03 20 1002 -8492.12798 8.586819e+03 20 1003 -8195.55854 8.371349e+03 20 1004 -7874.32205 8.194748e+03 20 1005 -7533.48460 8.059801e+03 20 1006 -7178.42141 7.968636e+03 20 1007 -6814.73202 7.922691e+03 20 1008 -6448.15203 7.922691e+03 20 1009 -6084.46264 7.968636e+03 20 1010 -5729.39945 8.059801e+03 20 1011 -5388.56200 8.194748e+03 20 1012 -5067.32551 8.371349e+03 20 1013 -4770.75607 8.586819e+03 20 1014 -4503.53077 8.837761e+03 20 1015 -4269.86389 9.120215e+03 20 1016 -4073.44051 9.429729e+03 20 1017 -3917.35835 9.761421e+03 20 1018 -3804.07891 1.011006e+04 20 1019 -3735.38867 1.047015e+04 20 1020 -3712.37092 1.083600e+04 20 1021 -1505.63083 1.055152e+04 21 1022 -1514.37090 1.069044e+04 21 1023 -1540.45326 1.082716e+04 21 1024 -1583.46658 1.095955e+04 21 1025 -1642.73252 1.108549e+04 21 1026 -1717.31641 1.120302e+04 21 1027 -1806.04203 1.131027e+04 21 1028 -1907.51011 1.140555e+04 21 1029 -2020.12045 1.148737e+04 21 1030 -2142.09711 1.155443e+04 21 1031 -2271.51645 1.160567e+04 21 1032 -2406.33745 1.164028e+04 21 1033 -2544.43390 1.165773e+04 21 1034 -2683.62793 1.165773e+04 21 1035 -2821.72438 1.164028e+04 21 1036 -2956.54538 1.160567e+04 21 1037 -3085.96472 1.155443e+04 21 1038 -3207.94138 1.148737e+04 21 1039 -3320.55172 1.140555e+04 21 1040 -3422.01980 1.131027e+04 21 1041 -3510.74542 1.120302e+04 21 1042 -3585.32931 1.108549e+04 21 1043 -3644.59525 1.095955e+04 21 1044 -3687.60857 1.082716e+04 21 1045 -3713.69093 1.069044e+04 21 1046 -3722.43100 1.055152e+04 21 1047 -3713.69093 1.041260e+04 21 1048 -3687.60857 1.027587e+04 21 1049 -3644.59525 1.014349e+04 21 1050 -3585.32931 1.001754e+04 21 1051 -3510.74542 9.900015e+03 21 1052 -3422.01980 9.792764e+03 21 1053 -3320.55172 9.697480e+03 21 1054 -3207.94138 9.615663e+03 21 1055 -3085.96472 9.548606e+03 21 1056 -2956.54538 9.497365e+03 21 1057 -2821.72438 9.462749e+03 21 1058 -2683.62793 9.445304e+03 21 1059 -2544.43390 9.445304e+03 21 1060 -2406.33745 9.462749e+03 21 1061 -2271.51645 9.497365e+03 21 1062 -2142.09711 9.548606e+03 21 1063 -2020.12045 9.615663e+03 21 1064 -1907.51011 9.697480e+03 21 1065 -1806.04203 9.792764e+03 21 1066 -1717.31641 9.900015e+03 21 1067 -1642.73252 1.001754e+04 21 1068 -1583.46658 1.014349e+04 21 1069 -1540.45326 1.027587e+04 21 1070 -1514.37090 1.041260e+04 21 1071 -1505.63083 1.055152e+04 21 1072 -491.71902 1.129376e+04 22 1073 -496.38885 1.136798e+04 22 1074 -510.32469 1.144104e+04 22 1075 -533.30676 1.151177e+04 22 1076 -564.97263 1.157906e+04 22 1077 -604.82290 1.164186e+04 22 1078 -652.22910 1.169916e+04 22 1079 -706.44363 1.175007e+04 22 1080 -766.61148 1.179379e+04 22 1081 -831.78376 1.182962e+04 22 1082 -900.93268 1.185699e+04 22 1083 -972.96771 1.187549e+04 22 1084 -1046.75282 1.188481e+04 22 1085 -1121.12437 1.188481e+04 22 1086 -1194.90947 1.187549e+04 22 1087 -1266.94450 1.185699e+04 22 1088 -1336.09342 1.182962e+04 22 1089 -1401.26571 1.179379e+04 22 1090 -1461.43355 1.175007e+04 22 1091 -1515.64808 1.169916e+04 22 1092 -1563.05429 1.164186e+04 22 1093 -1602.90456 1.157906e+04 22 1094 -1634.57042 1.151177e+04 22 1095 -1657.55249 1.144104e+04 22 1096 -1671.48833 1.136798e+04 22 1097 -1676.15816 1.129376e+04 22 1098 -1671.48833 1.121953e+04 22 1099 -1657.55249 1.114648e+04 22 1100 -1634.57042 1.107575e+04 22 1101 -1602.90456 1.100846e+04 22 1102 -1563.05429 1.094566e+04 22 1103 -1515.64808 1.088836e+04 22 1104 -1461.43355 1.083745e+04 22 1105 -1401.26571 1.079373e+04 22 1106 -1336.09342 1.075790e+04 22 1107 -1266.94450 1.073053e+04 22 1108 -1194.90947 1.071203e+04 22 1109 -1121.12437 1.070271e+04 22 1110 -1046.75282 1.070271e+04 22 1111 -972.96771 1.071203e+04 22 1112 -900.93268 1.073053e+04 22 1113 -831.78376 1.075790e+04 22 1114 -766.61148 1.079373e+04 22 1115 -706.44363 1.083745e+04 22 1116 -652.22910 1.088836e+04 22 1117 -604.82290 1.094566e+04 22 1118 -564.97263 1.100846e+04 22 1119 -533.30676 1.107575e+04 22 1120 -510.32469 1.114648e+04 22 1121 -496.38885 1.121953e+04 22 1122 -491.71902 1.129376e+04 22 1123 -8956.93169 -6.598524e+03 23 1124 -9032.38785 -5.399182e+03 23 1125 -9257.56632 -4.218755e+03 23 1126 -9628.91592 -3.075859e+03 23 1127 -10140.58024 -1.988517e+03 23 1128 -10784.49002 -9.738774e+02 23 1129 -11550.49042 -4.794200e+01 23 1130 -12426.50116 7.746868e+02 23 1131 -13398.70703 1.481036e+03 23 1132 -14451.77576 2.059965e+03 23 1133 -15569.09982 2.502345e+03 23 1134 -16733.05835 2.801199e+03 23 1135 -17925.29503 2.951813e+03 23 1136 -19127.00757 2.951813e+03 23 1137 -20319.24425 2.801199e+03 23 1138 -21483.20279 2.502345e+03 23 1139 -22600.52685 2.059965e+03 23 1140 -23653.59558 1.481036e+03 23 1141 -24625.80145 7.746868e+02 23 1142 -25501.81219 -4.794200e+01 23 1143 -26267.81259 -9.738774e+02 23 1144 -26911.72237 -1.988517e+03 23 1145 -27423.38668 -3.075859e+03 23 1146 -27794.73628 -4.218755e+03 23 1147 -28019.91476 -5.399182e+03 23 1148 -28095.37091 -6.598524e+03 23 1149 -28019.91476 -7.797865e+03 23 1150 -27794.73628 -8.978292e+03 23 1151 -27423.38668 -1.012119e+04 23 1152 -26911.72237 -1.120853e+04 23 1153 -26267.81259 -1.222317e+04 23 1154 -25501.81219 -1.314911e+04 23 1155 -24625.80145 -1.397173e+04 23 1156 -23653.59558 -1.467808e+04 23 1157 -22600.52685 -1.525701e+04 23 1158 -21483.20279 -1.569939e+04 23 1159 -20319.24425 -1.599825e+04 23 1160 -19127.00757 -1.614886e+04 23 1161 -17925.29503 -1.614886e+04 23 1162 -16733.05835 -1.599825e+04 23 1163 -15569.09982 -1.569939e+04 23 1164 -14451.77576 -1.525701e+04 23 1165 -13398.70703 -1.467808e+04 23 1166 -12426.50116 -1.397173e+04 23 1167 -11550.49042 -1.314911e+04 23 1168 -10784.49002 -1.222317e+04 23 1169 -10140.58024 -1.120853e+04 23 1170 -9628.91592 -1.012119e+04 23 1171 -9257.56632 -8.978292e+03 23 1172 -9032.38785 -7.797865e+03 23 1173 -8956.93169 -6.598524e+03 23 1174 -10007.31062 9.133993e+02 24 1175 -10015.46915 1.043075e+03 24 1176 -10039.81609 1.170707e+03 24 1177 -10079.96746 1.294280e+03 24 1178 -10135.29006 1.411846e+03 24 1179 -10204.91142 1.521552e+03 24 1180 -10287.73356 1.621667e+03 24 1181 -10382.45034 1.710612e+03 24 1182 -10487.56800 1.786984e+03 24 1183 -10601.42879 1.849580e+03 24 1184 -10722.23704 1.897411e+03 24 1185 -10848.08755 1.929724e+03 24 1186 -10976.99557 1.946009e+03 24 1187 -11106.92815 1.946009e+03 24 1188 -11235.83617 1.929724e+03 24 1189 -11361.68668 1.897411e+03 24 1190 -11482.49494 1.849580e+03 24 1191 -11596.35572 1.786984e+03 24 1192 -11701.47339 1.710612e+03 24 1193 -11796.19016 1.621667e+03 24 1194 -11879.01231 1.521552e+03 24 1195 -11948.63366 1.411846e+03 24 1196 -12003.95626 1.294280e+03 24 1197 -12044.10764 1.170707e+03 24 1198 -12068.45458 1.043075e+03 24 1199 -12076.61311 9.133993e+02 24 1200 -12068.45458 7.837231e+02 24 1201 -12044.10764 6.560920e+02 24 1202 -12003.95626 5.325188e+02 24 1203 -11948.63366 4.149523e+02 24 1204 -11879.01231 3.052466e+02 24 1205 -11796.19016 2.051318e+02 24 1206 -11701.47339 1.161868e+02 24 1207 -11596.35572 3.981436e+01 24 1208 -11482.49494 -2.278113e+01 24 1209 -11361.68668 -7.061250e+01 24 1210 -11235.83617 -1.029254e+02 24 1211 -11106.92815 -1.192103e+02 24 1212 -10976.99557 -1.192103e+02 24 1213 -10848.08755 -1.029254e+02 24 1214 -10722.23704 -7.061250e+01 24 1215 -10601.42879 -2.278113e+01 24 1216 -10487.56800 3.981436e+01 24 1217 -10382.45034 1.161868e+02 24 1218 -10287.73356 2.051318e+02 24 1219 -10204.91142 3.052466e+02 24 1220 -10135.29006 4.149523e+02 24 1221 -10079.96746 5.325188e+02 24 1222 -10039.81609 6.560920e+02 24 1223 -10015.46915 7.837231e+02 24 1224 -10007.31062 9.133993e+02 24 1225 6909.86962 1.316298e+04 25 1226 6887.94479 1.351147e+04 25 1227 6822.51609 1.385446e+04 25 1228 6714.61534 1.418654e+04 25 1229 6565.94423 1.450248e+04 25 1230 6378.84737 1.479730e+04 25 1231 6156.27541 1.506634e+04 25 1232 5901.73842 1.530537e+04 25 1233 5619.25061 1.551061e+04 25 1234 5313.26699 1.567883e+04 25 1235 4988.61309 1.580736e+04 25 1236 4650.40890 1.589420e+04 25 1237 4303.98811 1.593796e+04 25 1238 3954.81398 1.593796e+04 25 1239 3608.39319 1.589420e+04 25 1240 3270.18901 1.580736e+04 25 1241 2945.53511 1.567883e+04 25 1242 2639.55148 1.551061e+04 25 1243 2357.06368 1.530537e+04 25 1244 2102.52669 1.506634e+04 25 1245 1879.95472 1.479730e+04 25 1246 1692.85787 1.450248e+04 25 1247 1544.18675 1.418654e+04 25 1248 1436.28601 1.385446e+04 25 1249 1370.85730 1.351147e+04 25 1250 1348.93248 1.316298e+04 25 1251 1370.85730 1.281450e+04 25 1252 1436.28601 1.247151e+04 25 1253 1544.18675 1.213942e+04 25 1254 1692.85787 1.182348e+04 25 1255 1879.95472 1.152866e+04 25 1256 2102.52669 1.125962e+04 25 1257 2357.06368 1.102059e+04 25 1258 2639.55148 1.081535e+04 25 1259 2945.53511 1.064714e+04 25 1260 3270.18901 1.051860e+04 25 1261 3608.39319 1.043176e+04 25 1262 3954.81398 1.038800e+04 25 1263 4303.98811 1.038800e+04 25 1264 4650.40890 1.043176e+04 25 1265 4988.61309 1.051860e+04 25 1266 5313.26699 1.064714e+04 25 1267 5619.25061 1.081535e+04 25 1268 5901.73842 1.102059e+04 25 1269 6156.27541 1.125962e+04 25 1270 6378.84737 1.152866e+04 25 1271 6565.94423 1.182348e+04 25 1272 6714.61534 1.213942e+04 25 1273 6822.51609 1.247151e+04 25 1274 6887.94479 1.281450e+04 25 1275 6909.86962 1.316298e+04 25 ``` ] --- class: split-40 count: false .left-code-circle_pack-auto[ ```r gapminder %>% filter(continent == "Americas") %>% filter(year == 2002) %>% select(country, pop) -> prep packcircles::circleProgressiveLayout(prep$pop, sizetype = 'area') -> pack pack %>% packcircles::circleLayoutVertices(npoints = 50) -> circle_outlines circle_outlines %>% * ggplot() ``` ] .right-output-circle_pack-auto[ <img src="geoms_files/figure-html/circle_pack_auto_12_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-circle_pack-auto[ ```r gapminder %>% filter(continent == "Americas") %>% filter(year == 2002) %>% select(country, pop) -> prep packcircles::circleProgressiveLayout(prep$pop, sizetype = 'area') -> pack pack %>% packcircles::circleLayoutVertices(npoints = 50) -> circle_outlines circle_outlines %>% ggplot() + * aes(x = x, y = y) ``` ] .right-output-circle_pack-auto[ <img src="geoms_files/figure-html/circle_pack_auto_13_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-circle_pack-auto[ ```r gapminder %>% filter(continent == "Americas") %>% filter(year == 2002) %>% select(country, pop) -> prep packcircles::circleProgressiveLayout(prep$pop, sizetype = 'area') -> pack pack %>% packcircles::circleLayoutVertices(npoints = 50) -> circle_outlines circle_outlines %>% ggplot() + aes(x = x, y = y) + * geom_polygon(colour = "black", alpha = 0.6) ``` ] .right-output-circle_pack-auto[ <img src="geoms_files/figure-html/circle_pack_auto_14_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-circle_pack-auto[ ```r gapminder %>% filter(continent == "Americas") %>% filter(year == 2002) %>% select(country, pop) -> prep packcircles::circleProgressiveLayout(prep$pop, sizetype = 'area') -> pack pack %>% packcircles::circleLayoutVertices(npoints = 50) -> circle_outlines circle_outlines %>% ggplot() + aes(x = x, y = y) + geom_polygon(colour = "black", alpha = 0.6) + * aes(group = id) ``` ] .right-output-circle_pack-auto[ <img src="geoms_files/figure-html/circle_pack_auto_15_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-circle_pack-auto[ ```r gapminder %>% filter(continent == "Americas") %>% filter(year == 2002) %>% select(country, pop) -> prep packcircles::circleProgressiveLayout(prep$pop, sizetype = 'area') -> pack pack %>% packcircles::circleLayoutVertices(npoints = 50) -> circle_outlines circle_outlines %>% ggplot() + aes(x = x, y = y) + geom_polygon(colour = "black", alpha = 0.6) + aes(group = id) + * aes(fill = factor(id)) ``` ] .right-output-circle_pack-auto[ <img src="geoms_files/figure-html/circle_pack_auto_16_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-circle_pack-auto[ ```r gapminder %>% filter(continent == "Americas") %>% filter(year == 2002) %>% select(country, pop) -> prep packcircles::circleProgressiveLayout(prep$pop, sizetype = 'area') -> pack pack %>% packcircles::circleLayoutVertices(npoints = 50) -> circle_outlines circle_outlines %>% ggplot() + aes(x = x, y = y) + geom_polygon(colour = "black", alpha = 0.6) + aes(group = id) + aes(fill = factor(id)) + * geom_text(data = cbind(prep, pack), * aes(x, y, size = pop, label = country, * group = NULL, fill = NULL)) ``` ] .right-output-circle_pack-auto[ <img src="geoms_files/figure-html/circle_pack_auto_17_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-circle_pack-auto[ ```r gapminder %>% filter(continent == "Americas") %>% filter(year == 2002) %>% select(country, pop) -> prep packcircles::circleProgressiveLayout(prep$pop, sizetype = 'area') -> pack pack %>% packcircles::circleLayoutVertices(npoints = 50) -> circle_outlines circle_outlines %>% ggplot() + aes(x = x, y = y) + geom_polygon(colour = "black", alpha = 0.6) + aes(group = id) + aes(fill = factor(id)) + geom_text(data = cbind(prep, pack), aes(x, y, size = pop, label = country, group = NULL, fill = NULL)) + * theme(legend.position = "none") ``` ] .right-output-circle_pack-auto[ <img src="geoms_files/figure-html/circle_pack_auto_18_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-circle_pack-auto[ ```r gapminder %>% filter(continent == "Americas") %>% filter(year == 2002) %>% select(country, pop) -> prep packcircles::circleProgressiveLayout(prep$pop, sizetype = 'area') -> pack pack %>% packcircles::circleLayoutVertices(npoints = 50) -> circle_outlines circle_outlines %>% ggplot() + aes(x = x, y = y) + geom_polygon(colour = "black", alpha = 0.6) + aes(group = id) + aes(fill = factor(id)) + geom_text(data = cbind(prep, pack), aes(x, y, size = pop, label = country, group = NULL, fill = NULL)) + theme(legend.position = "none") + * coord_equal() ``` ] .right-output-circle_pack-auto[ <img src="geoms_files/figure-html/circle_pack_auto_19_output-1.png" width="100%" /> ] <style> .left-code-circle_pack-auto { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-circle_pack-auto { width: 60%; float: right; padding-left: 1%; } </style> --- class: split-40 count: false .left-code-treemapify-auto[ ```r *gapminder ``` ] .right-output-treemapify-auto[ ``` # A tibble: 1,704 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Afghanistan Asia 1952 28.8 8425333 779. 2 Afghanistan Asia 1957 30.3 9240934 821. 3 Afghanistan Asia 1962 32.0 10267083 853. 4 Afghanistan Asia 1967 34.0 11537966 836. 5 Afghanistan Asia 1972 36.1 13079460 740. 6 Afghanistan Asia 1977 38.4 14880372 786. 7 Afghanistan Asia 1982 39.9 12881816 978. 8 Afghanistan Asia 1987 40.8 13867957 852. 9 Afghanistan Asia 1992 41.7 16317921 649. 10 Afghanistan Asia 1997 41.8 22227415 635. # … with 1,694 more rows ``` ] --- class: split-40 count: false .left-code-treemapify-auto[ ```r gapminder %>% * filter(continent == "Americas") ``` ] .right-output-treemapify-auto[ ``` # A tibble: 300 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Argentina Americas 1952 62.5 17876956 5911. 2 Argentina Americas 1957 64.4 19610538 6857. 3 Argentina Americas 1962 65.1 21283783 7133. 4 Argentina Americas 1967 65.6 22934225 8053. 5 Argentina Americas 1972 67.1 24779799 9443. 6 Argentina Americas 1977 68.5 26983828 10079. 7 Argentina Americas 1982 69.9 29341374 8998. 8 Argentina Americas 1987 70.8 31620918 9140. 9 Argentina Americas 1992 71.9 33958947 9308. 10 Argentina Americas 1997 73.3 36203463 10967. # … with 290 more rows ``` ] --- class: split-40 count: false .left-code-treemapify-auto[ ```r gapminder %>% filter(continent == "Americas") %>% * filter(year == 2002) ``` ] .right-output-treemapify-auto[ ``` # A tibble: 25 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Argentina Americas 2002 74.3 38331121 8798. 2 Bolivia Americas 2002 63.9 8445134 3413. 3 Brazil Americas 2002 71.0 179914212 8131. 4 Canada Americas 2002 79.8 31902268 33329. 5 Chile Americas 2002 77.9 15497046 10779. 6 Colombia Americas 2002 71.7 41008227 5755. 7 Costa Rica Americas 2002 78.1 3834934 7723. 8 Cuba Americas 2002 77.2 11226999 6341. 9 Dominican Republic Americas 2002 70.8 8650322 4564. 10 Ecuador Americas 2002 74.2 12921234 5773. # … with 15 more rows ``` ] --- class: split-40 count: false .left-code-treemapify-auto[ ```r gapminder %>% filter(continent == "Americas") %>% filter(year == 2002) %>% * mutate(pop_millions = pop/1000000) ``` ] .right-output-treemapify-auto[ ``` # A tibble: 25 x 7 country continent year lifeExp pop gdpPercap pop_millions <fct> <fct> <int> <dbl> <int> <dbl> <dbl> 1 Argentina Americas 2002 74.3 38331121 8798. 38.3 2 Bolivia Americas 2002 63.9 8445134 3413. 8.45 3 Brazil Americas 2002 71.0 179914212 8131. 180. 4 Canada Americas 2002 79.8 31902268 33329. 31.9 5 Chile Americas 2002 77.9 15497046 10779. 15.5 6 Colombia Americas 2002 71.7 41008227 5755. 41.0 7 Costa Rica Americas 2002 78.1 3834934 7723. 3.83 8 Cuba Americas 2002 77.2 11226999 6341. 11.2 9 Dominican Republic Americas 2002 70.8 8650322 4564. 8.65 10 Ecuador Americas 2002 74.2 12921234 5773. 12.9 # … with 15 more rows ``` ] --- class: split-40 count: false .left-code-treemapify-auto[ ```r gapminder %>% filter(continent == "Americas") %>% filter(year == 2002) %>% mutate(pop_millions = pop/1000000) %>% * ggplot() ``` ] .right-output-treemapify-auto[ <img src="geoms_files/figure-html/treemapify_auto_5_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-treemapify-auto[ ```r gapminder %>% filter(continent == "Americas") %>% filter(year == 2002) %>% mutate(pop_millions = pop/1000000) %>% ggplot() + * aes(fill = pop_millions, area = pop_millions) ``` ] .right-output-treemapify-auto[ <img src="geoms_files/figure-html/treemapify_auto_6_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-treemapify-auto[ ```r gapminder %>% filter(continent == "Americas") %>% filter(year == 2002) %>% mutate(pop_millions = pop/1000000) %>% ggplot() + aes(fill = pop_millions, area = pop_millions) + * treemapify::geom_treemap() ``` ] .right-output-treemapify-auto[ <img src="geoms_files/figure-html/treemapify_auto_7_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-treemapify-auto[ ```r gapminder %>% filter(continent == "Americas") %>% filter(year == 2002) %>% mutate(pop_millions = pop/1000000) %>% ggplot() + aes(fill = pop_millions, area = pop_millions) + treemapify::geom_treemap() + * treemapify::geom_treemap_text(aes(label = country), * fontface = "italic", * colour = "white", * place = "topleft", * grow = F) ``` ] .right-output-treemapify-auto[ <img src="geoms_files/figure-html/treemapify_auto_8_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-treemapify-auto[ ```r gapminder %>% filter(continent == "Americas") %>% filter(year == 2002) %>% mutate(pop_millions = pop/1000000) %>% ggplot() + aes(fill = pop_millions, area = pop_millions) + treemapify::geom_treemap() + treemapify::geom_treemap_text(aes(label = country), fontface = "italic", colour = "white", place = "topleft", grow = F) + * scale_fill_viridis_c(trans = "log10", begin = .2, option = "inferno", * end = .7, breaks = c(1, 3, 10, 30, 100)) ``` ] .right-output-treemapify-auto[ <img src="geoms_files/figure-html/treemapify_auto_9_output-1.png" width="100%" /> ] <style> .left-code-treemapify-auto { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-treemapify-auto { width: 60%; float: right; padding-left: 1%; } </style> --- class: middle, center, inverse # Singe value per category --- class: split-40 count: false .left-code-single_value-rotate[ ```r gapminder %>% filter(year == 2002) %>% filter(continent == "Europe") %>% ggplot() + aes(x = lifeExp) + aes(y = reorder(country, lifeExp)) + geom_point() + geom_col() + theme_minimal() ``` ] .right-output-single_value-rotate[ <img src="geoms_files/figure-html/single_value_rotate_1_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-single_value-rotate[ ```r gapminder %>% filter(year == 2002) %>% filter(continent == "Europe") %>% ggplot() + aes(x = lifeExp) + aes(y = reorder(country, lifeExp)) + geom_point() + * geom_segment(aes(xend = 0, yend = country)) + theme_minimal() ``` ] .right-output-single_value-rotate[ <img src="geoms_files/figure-html/single_value_rotate_2_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-single_value-rotate[ ```r gapminder %>% filter(year == 2002) %>% filter(continent == "Europe") %>% ggplot() + aes(x = lifeExp) + aes(y = reorder(country, lifeExp)) + geom_point() + * geom_hline(aes(yintercept = country), linetype = "dotted") + theme_minimal() ``` ] .right-output-single_value-rotate[ <img src="geoms_files/figure-html/single_value_rotate_3_output-1.png" width="100%" /> ] <style> .left-code-single_value-rotate { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-single_value-rotate { width: 60%; float: right; padding-left: 1%; } </style> --- ```r # install.packages("waffle", repos = "https://cinc.rud.is") ``` --- class: split-40 count: false .left-code-waffle-auto[ ```r # special install *gapminder ``` ] .right-output-waffle-auto[ ``` # A tibble: 1,704 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Afghanistan Asia 1952 28.8 8425333 779. 2 Afghanistan Asia 1957 30.3 9240934 821. 3 Afghanistan Asia 1962 32.0 10267083 853. 4 Afghanistan Asia 1967 34.0 11537966 836. 5 Afghanistan Asia 1972 36.1 13079460 740. 6 Afghanistan Asia 1977 38.4 14880372 786. 7 Afghanistan Asia 1982 39.9 12881816 978. 8 Afghanistan Asia 1987 40.8 13867957 852. 9 Afghanistan Asia 1992 41.7 16317921 649. 10 Afghanistan Asia 1997 41.8 22227415 635. # … with 1,694 more rows ``` ] --- class: split-40 count: false .left-code-waffle-auto[ ```r # special install gapminder %>% * filter(year == 2002) ``` ] .right-output-waffle-auto[ ``` # A tibble: 142 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Afghanistan Asia 2002 42.1 25268405 727. 2 Albania Europe 2002 75.7 3508512 4604. 3 Algeria Africa 2002 71.0 31287142 5288. 4 Angola Africa 2002 41.0 10866106 2773. 5 Argentina Americas 2002 74.3 38331121 8798. 6 Australia Oceania 2002 80.4 19546792 30688. 7 Austria Europe 2002 79.0 8148312 32418. 8 Bahrain Asia 2002 74.8 656397 23404. 9 Bangladesh Asia 2002 62.0 135656790 1136. 10 Belgium Europe 2002 78.3 10311970 30486. # … with 132 more rows ``` ] --- class: split-40 count: false .left-code-waffle-auto[ ```r # special install gapminder %>% filter(year == 2002) %>% * count(continent) ``` ] .right-output-waffle-auto[ ``` # A tibble: 5 x 2 continent n <fct> <int> 1 Africa 52 2 Americas 25 3 Asia 33 4 Europe 30 5 Oceania 2 ``` ] --- class: split-40 count: false .left-code-waffle-auto[ ```r # special install gapminder %>% filter(year == 2002) %>% count(continent) %>% * ggplot() ``` ] .right-output-waffle-auto[ <img src="geoms_files/figure-html/waffle_auto_4_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-waffle-auto[ ```r # special install gapminder %>% filter(year == 2002) %>% count(continent) %>% ggplot() + * waffle::geom_waffle(aes(fill = continent, values = n), * n_rows = 20, size = 0.33, colour = "white", flip = T) ``` ] .right-output-waffle-auto[ <img src="geoms_files/figure-html/waffle_auto_5_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-waffle-auto[ ```r # special install gapminder %>% filter(year == 2002) %>% count(continent) %>% ggplot() + waffle::geom_waffle(aes(fill = continent, values = n), n_rows = 20, size = 0.33, colour = "white", flip = T) + * coord_equal() ``` ] .right-output-waffle-auto[ <img src="geoms_files/figure-html/waffle_auto_6_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-waffle-auto[ ```r # special install gapminder %>% filter(year == 2002) %>% count(continent) %>% ggplot() + waffle::geom_waffle(aes(fill = continent, values = n), n_rows = 20, size = 0.33, colour = "white", flip = T) + coord_equal() + * facet_wrap(~continent, strip.position = "bottom") ``` ] .right-output-waffle-auto[ <img src="geoms_files/figure-html/waffle_auto_7_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-waffle-auto[ ```r # special install gapminder %>% filter(year == 2002) %>% count(continent) %>% ggplot() + waffle::geom_waffle(aes(fill = continent, values = n), n_rows = 20, size = 0.33, colour = "white", flip = T) + coord_equal() + facet_wrap(~continent, strip.position = "bottom") + * theme_void() ``` ] .right-output-waffle-auto[ <img src="geoms_files/figure-html/waffle_auto_8_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-waffle-auto[ ```r # special install gapminder %>% filter(year == 2002) %>% count(continent) %>% ggplot() + waffle::geom_waffle(aes(fill = continent, values = n), n_rows = 20, size = 0.33, colour = "white", flip = T) + coord_equal() + facet_wrap(~continent, strip.position = "bottom") + theme_void() + * theme(legend.position = "none") ``` ] .right-output-waffle-auto[ <img src="geoms_files/figure-html/waffle_auto_9_output-1.png" width="100%" /> ] <style> .left-code-waffle-auto { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-waffle-auto { width: 60%; float: right; padding-left: 1%; } </style> --- class: inverse, center, middle name: mult_series ## a few series --- class: split-40 count: false .left-code-time_series_multi-rotate[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(gdp = pop * gdpPercap) %>% ggplot() + aes(x = year) + aes(y = gdp) + geom_point() + geom_line(aes(linetype = country, color = country)) + theme_minimal() ``` ] .right-output-time_series_multi-rotate[ <img src="geoms_files/figure-html/time_series_multi_rotate_1_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series_multi-rotate[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(gdp = pop * gdpPercap) %>% ggplot() + aes(x = year) + aes(y = gdp) + geom_point() + * ggforce::geom_bspline(aes(linetype = country)) + theme_minimal() ``` ] .right-output-time_series_multi-rotate[ <img src="geoms_files/figure-html/time_series_multi_rotate_2_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series_multi-rotate[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(gdp = pop * gdpPercap) %>% ggplot() + aes(x = year) + aes(y = gdp) + geom_point() + * geom_col(aes(fill = country), position = "dodge", alpha = .4) + theme_minimal() ``` ] .right-output-time_series_multi-rotate[ <img src="geoms_files/figure-html/time_series_multi_rotate_3_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series_multi-rotate[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(gdp = pop * gdpPercap) %>% ggplot() + aes(x = year) + aes(y = gdp) + geom_point() + * geom_col(aes(fill = country), alpha = .4) + theme_minimal() ``` ] .right-output-time_series_multi-rotate[ <img src="geoms_files/figure-html/time_series_multi_rotate_4_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series_multi-rotate[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(gdp = pop * gdpPercap) %>% ggplot() + aes(x = year) + aes(y = gdp) + geom_point() + * geom_area(aes(fill = country), alpha = .4) + theme_minimal() ``` ] .right-output-time_series_multi-rotate[ <img src="geoms_files/figure-html/time_series_multi_rotate_5_output-1.png" width="100%" /> ] <style> .left-code-time_series_multi-rotate { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-time_series_multi-rotate { width: 60%; float: right; padding-left: 1%; } </style> --- --- class: inverse, center, middle # Many series --- class: split-40 count: false .left-code-aes_group-auto[ ```r *gapminder ``` ] .right-output-aes_group-auto[ ``` # A tibble: 1,704 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Afghanistan Asia 1952 28.8 8425333 779. 2 Afghanistan Asia 1957 30.3 9240934 821. 3 Afghanistan Asia 1962 32.0 10267083 853. 4 Afghanistan Asia 1967 34.0 11537966 836. 5 Afghanistan Asia 1972 36.1 13079460 740. 6 Afghanistan Asia 1977 38.4 14880372 786. 7 Afghanistan Asia 1982 39.9 12881816 978. 8 Afghanistan Asia 1987 40.8 13867957 852. 9 Afghanistan Asia 1992 41.7 16317921 649. 10 Afghanistan Asia 1997 41.8 22227415 635. # … with 1,694 more rows ``` ] --- class: split-40 count: false .left-code-aes_group-auto[ ```r gapminder %>% * filter(continent %in% c("Americas", "Oceania")) ``` ] .right-output-aes_group-auto[ ``` # A tibble: 324 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Argentina Americas 1952 62.5 17876956 5911. 2 Argentina Americas 1957 64.4 19610538 6857. 3 Argentina Americas 1962 65.1 21283783 7133. 4 Argentina Americas 1967 65.6 22934225 8053. 5 Argentina Americas 1972 67.1 24779799 9443. 6 Argentina Americas 1977 68.5 26983828 10079. 7 Argentina Americas 1982 69.9 29341374 8998. 8 Argentina Americas 1987 70.8 31620918 9140. 9 Argentina Americas 1992 71.9 33958947 9308. 10 Argentina Americas 1997 73.3 36203463 10967. # … with 314 more rows ``` ] --- class: split-40 count: false .left-code-aes_group-auto[ ```r gapminder %>% filter(continent %in% c("Americas", "Oceania")) %>% * ggplot() ``` ] .right-output-aes_group-auto[ <img src="geoms_files/figure-html/aes_group_auto_3_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-aes_group-auto[ ```r gapminder %>% filter(continent %in% c("Americas", "Oceania")) %>% ggplot() + * aes(x = year) ``` ] .right-output-aes_group-auto[ <img src="geoms_files/figure-html/aes_group_auto_4_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-aes_group-auto[ ```r gapminder %>% filter(continent %in% c("Americas", "Oceania")) %>% ggplot() + aes(x = year) + * aes(y = lifeExp) ``` ] .right-output-aes_group-auto[ <img src="geoms_files/figure-html/aes_group_auto_5_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-aes_group-auto[ ```r gapminder %>% filter(continent %in% c("Americas", "Oceania")) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + * geom_point(color = "grey60") ``` ] .right-output-aes_group-auto[ <img src="geoms_files/figure-html/aes_group_auto_6_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-aes_group-auto[ ```r gapminder %>% filter(continent %in% c("Americas", "Oceania")) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + geom_point(color = "grey60") + * geom_line(color = "grey60") ``` ] .right-output-aes_group-auto[ <img src="geoms_files/figure-html/aes_group_auto_7_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-aes_group-auto[ ```r gapminder %>% filter(continent %in% c("Americas", "Oceania")) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + geom_point(color = "grey60") + geom_line(color = "grey60") + * aes(color = country) ``` ] .right-output-aes_group-auto[ <img src="geoms_files/figure-html/aes_group_auto_8_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-aes_group-auto[ ```r gapminder %>% filter(continent %in% c("Americas", "Oceania")) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + geom_point(color = "grey60") + geom_line(color = "grey60") + aes(color = country) + * scale_color_discrete(guide = F) ``` ] .right-output-aes_group-auto[ <img src="geoms_files/figure-html/aes_group_auto_9_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-aes_group-auto[ ```r gapminder %>% filter(continent %in% c("Americas", "Oceania")) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + geom_point(color = "grey60") + geom_line(color = "grey60") + aes(color = country) + scale_color_discrete(guide = F) + * aes(color = NULL) ``` ] .right-output-aes_group-auto[ <img src="geoms_files/figure-html/aes_group_auto_10_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-aes_group-auto[ ```r gapminder %>% filter(continent %in% c("Americas", "Oceania")) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + geom_point(color = "grey60") + geom_line(color = "grey60") + aes(color = country) + scale_color_discrete(guide = F) + aes(color = NULL) + * aes(group = country) ``` ] .right-output-aes_group-auto[ <img src="geoms_files/figure-html/aes_group_auto_11_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-aes_group-auto[ ```r gapminder %>% filter(continent %in% c("Americas", "Oceania")) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + geom_point(color = "grey60") + geom_line(color = "grey60") + aes(color = country) + scale_color_discrete(guide = F) + aes(color = NULL) + aes(group = country) + * geom_point(data = . %>% # using global data * filter(country %in% # filtering to * c("New Zealand","Chile")), # NZ and Chile * color = "plum4", * size = 4) ``` ] .right-output-aes_group-auto[ <img src="geoms_files/figure-html/aes_group_auto_12_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-aes_group-auto[ ```r gapminder %>% filter(continent %in% c("Americas", "Oceania")) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + geom_point(color = "grey60") + geom_line(color = "grey60") + aes(color = country) + scale_color_discrete(guide = F) + aes(color = NULL) + aes(group = country) + geom_point(data = . %>% # using global data filter(country %in% # filtering to c("New Zealand","Chile")), # NZ and Chile color = "plum4", size = 4) + * geom_line(data = . %>% * filter(country %in% * c("New Zealand","Chile")), * color = "plum4", * size = 2) ``` ] .right-output-aes_group-auto[ <img src="geoms_files/figure-html/aes_group_auto_13_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-aes_group-auto[ ```r gapminder %>% filter(continent %in% c("Americas", "Oceania")) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + geom_point(color = "grey60") + geom_line(color = "grey60") + aes(color = country) + scale_color_discrete(guide = F) + aes(color = NULL) + aes(group = country) + geom_point(data = . %>% # using global data filter(country %in% # filtering to c("New Zealand","Chile")), # NZ and Chile color = "plum4", size = 4) + geom_line(data = . %>% filter(country %in% c("New Zealand","Chile")), color = "plum4", size = 2) + * geom_text(data = . %>% * filter(country %in% * c("New Zealand","Chile")) %>% * group_by(country) %>% * slice(3), * aes(label = country), * nudge_y = 2, hjust = .7, * color = "plum4", size = 5, * fontface = "bold") ``` ] .right-output-aes_group-auto[ <img src="geoms_files/figure-html/aes_group_auto_14_output-1.png" width="100%" /> ] <style> .left-code-aes_group-auto { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-aes_group-auto { width: 60%; float: right; padding-left: 1%; } </style> --- class: split-40 count: false .left-code-difference_ribbon-auto[ ```r *gapminder ``` ] .right-output-difference_ribbon-auto[ ``` # A tibble: 1,704 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Afghanistan Asia 1952 28.8 8425333 779. 2 Afghanistan Asia 1957 30.3 9240934 821. 3 Afghanistan Asia 1962 32.0 10267083 853. 4 Afghanistan Asia 1967 34.0 11537966 836. 5 Afghanistan Asia 1972 36.1 13079460 740. 6 Afghanistan Asia 1977 38.4 14880372 786. 7 Afghanistan Asia 1982 39.9 12881816 978. 8 Afghanistan Asia 1987 40.8 13867957 852. 9 Afghanistan Asia 1992 41.7 16317921 649. 10 Afghanistan Asia 1997 41.8 22227415 635. # … with 1,694 more rows ``` ] --- class: split-40 count: false .left-code-difference_ribbon-auto[ ```r gapminder %>% * filter(continent == "Oceania") ``` ] .right-output-difference_ribbon-auto[ ``` # A tibble: 24 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Australia Oceania 1952 69.1 8691212 10040. 2 Australia Oceania 1957 70.3 9712569 10950. 3 Australia Oceania 1962 70.9 10794968 12217. 4 Australia Oceania 1967 71.1 11872264 14526. 5 Australia Oceania 1972 71.9 13177000 16789. 6 Australia Oceania 1977 73.5 14074100 18334. 7 Australia Oceania 1982 74.7 15184200 19477. 8 Australia Oceania 1987 76.3 16257249 21889. 9 Australia Oceania 1992 77.6 17481977 23425. 10 Australia Oceania 1997 78.8 18565243 26998. # … with 14 more rows ``` ] --- class: split-40 count: false .left-code-difference_ribbon-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% * mutate(pop_millions = pop/1000000) ``` ] .right-output-difference_ribbon-auto[ ``` # A tibble: 24 x 7 country continent year lifeExp pop gdpPercap pop_millions <fct> <fct> <int> <dbl> <int> <dbl> <dbl> 1 Australia Oceania 1952 69.1 8691212 10040. 8.69 2 Australia Oceania 1957 70.3 9712569 10950. 9.71 3 Australia Oceania 1962 70.9 10794968 12217. 10.8 4 Australia Oceania 1967 71.1 11872264 14526. 11.9 5 Australia Oceania 1972 71.9 13177000 16789. 13.2 6 Australia Oceania 1977 73.5 14074100 18334. 14.1 7 Australia Oceania 1982 74.7 15184200 19477. 15.2 8 Australia Oceania 1987 76.3 16257249 21889. 16.3 9 Australia Oceania 1992 77.6 17481977 23425. 17.5 10 Australia Oceania 1997 78.8 18565243 26998. 18.6 # … with 14 more rows ``` ] --- class: split-40 count: false .left-code-difference_ribbon-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) -> *gm_oceania ``` ] .right-output-difference_ribbon-auto[ ] --- class: split-40 count: false .left-code-difference_ribbon-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) -> gm_oceania *gm_oceania ``` ] .right-output-difference_ribbon-auto[ ``` # A tibble: 24 x 7 country continent year lifeExp pop gdpPercap pop_millions <fct> <fct> <int> <dbl> <int> <dbl> <dbl> 1 Australia Oceania 1952 69.1 8691212 10040. 8.69 2 Australia Oceania 1957 70.3 9712569 10950. 9.71 3 Australia Oceania 1962 70.9 10794968 12217. 10.8 4 Australia Oceania 1967 71.1 11872264 14526. 11.9 5 Australia Oceania 1972 71.9 13177000 16789. 13.2 6 Australia Oceania 1977 73.5 14074100 18334. 14.1 7 Australia Oceania 1982 74.7 15184200 19477. 15.2 8 Australia Oceania 1987 76.3 16257249 21889. 16.3 9 Australia Oceania 1992 77.6 17481977 23425. 17.5 10 Australia Oceania 1997 78.8 18565243 26998. 18.6 # … with 14 more rows ``` ] --- class: split-40 count: false .left-code-difference_ribbon-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) -> gm_oceania gm_oceania %>% * select(-gdpPercap, -lifeExp, - pop) ``` ] .right-output-difference_ribbon-auto[ ``` # A tibble: 24 x 4 country continent year pop_millions <fct> <fct> <int> <dbl> 1 Australia Oceania 1952 8.69 2 Australia Oceania 1957 9.71 3 Australia Oceania 1962 10.8 4 Australia Oceania 1967 11.9 5 Australia Oceania 1972 13.2 6 Australia Oceania 1977 14.1 7 Australia Oceania 1982 15.2 8 Australia Oceania 1987 16.3 9 Australia Oceania 1992 17.5 10 Australia Oceania 1997 18.6 # … with 14 more rows ``` ] --- class: split-40 count: false .left-code-difference_ribbon-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) -> gm_oceania gm_oceania %>% select(-gdpPercap, -lifeExp, - pop) %>% * pivot_wider(names_from = country, * values_from = pop_millions) ``` ] .right-output-difference_ribbon-auto[ ``` # A tibble: 12 x 4 continent year Australia `New Zealand` <fct> <int> <dbl> <dbl> 1 Oceania 1952 8.69 1.99 2 Oceania 1957 9.71 2.23 3 Oceania 1962 10.8 2.49 4 Oceania 1967 11.9 2.73 5 Oceania 1972 13.2 2.93 6 Oceania 1977 14.1 3.16 7 Oceania 1982 15.2 3.21 8 Oceania 1987 16.3 3.32 9 Oceania 1992 17.5 3.44 10 Oceania 1997 18.6 3.68 11 Oceania 2002 19.5 3.91 12 Oceania 2007 20.4 4.12 ``` ] --- class: split-40 count: false .left-code-difference_ribbon-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) -> gm_oceania gm_oceania %>% select(-gdpPercap, -lifeExp, - pop) %>% pivot_wider(names_from = country, values_from = pop_millions) -> *gm_oceania_pop_millions_wide ``` ] .right-output-difference_ribbon-auto[ ] --- class: split-40 count: false .left-code-difference_ribbon-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) -> gm_oceania gm_oceania %>% select(-gdpPercap, -lifeExp, - pop) %>% pivot_wider(names_from = country, values_from = pop_millions) -> gm_oceania_pop_millions_wide *gm_oceania # global data ``` ] .right-output-difference_ribbon-auto[ ``` # A tibble: 24 x 7 country continent year lifeExp pop gdpPercap pop_millions <fct> <fct> <int> <dbl> <int> <dbl> <dbl> 1 Australia Oceania 1952 69.1 8691212 10040. 8.69 2 Australia Oceania 1957 70.3 9712569 10950. 9.71 3 Australia Oceania 1962 70.9 10794968 12217. 10.8 4 Australia Oceania 1967 71.1 11872264 14526. 11.9 5 Australia Oceania 1972 71.9 13177000 16789. 13.2 6 Australia Oceania 1977 73.5 14074100 18334. 14.1 7 Australia Oceania 1982 74.7 15184200 19477. 15.2 8 Australia Oceania 1987 76.3 16257249 21889. 16.3 9 Australia Oceania 1992 77.6 17481977 23425. 17.5 10 Australia Oceania 1997 78.8 18565243 26998. 18.6 # … with 14 more rows ``` ] --- class: split-40 count: false .left-code-difference_ribbon-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) -> gm_oceania gm_oceania %>% select(-gdpPercap, -lifeExp, - pop) %>% pivot_wider(names_from = country, values_from = pop_millions) -> gm_oceania_pop_millions_wide gm_oceania %>% # global data * ggplot() ``` ] .right-output-difference_ribbon-auto[ <img src="geoms_files/figure-html/difference_ribbon_auto_10_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-difference_ribbon-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) -> gm_oceania gm_oceania %>% select(-gdpPercap, -lifeExp, - pop) %>% pivot_wider(names_from = country, values_from = pop_millions) -> gm_oceania_pop_millions_wide gm_oceania %>% # global data ggplot() + * aes(x = year) ``` ] .right-output-difference_ribbon-auto[ <img src="geoms_files/figure-html/difference_ribbon_auto_11_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-difference_ribbon-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) -> gm_oceania gm_oceania %>% select(-gdpPercap, -lifeExp, - pop) %>% pivot_wider(names_from = country, values_from = pop_millions) -> gm_oceania_pop_millions_wide gm_oceania %>% # global data ggplot() + aes(x = year) + * aes(y = pop_millions) ``` ] .right-output-difference_ribbon-auto[ <img src="geoms_files/figure-html/difference_ribbon_auto_12_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-difference_ribbon-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) -> gm_oceania gm_oceania %>% select(-gdpPercap, -lifeExp, - pop) %>% pivot_wider(names_from = country, values_from = pop_millions) -> gm_oceania_pop_millions_wide gm_oceania %>% # global data ggplot() + aes(x = year) + aes(y = pop_millions) + * geom_line(aes(linetype = country), * color = "plum4") ``` ] .right-output-difference_ribbon-auto[ <img src="geoms_files/figure-html/difference_ribbon_auto_13_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-difference_ribbon-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) -> gm_oceania gm_oceania %>% select(-gdpPercap, -lifeExp, - pop) %>% pivot_wider(names_from = country, values_from = pop_millions) -> gm_oceania_pop_millions_wide gm_oceania %>% # global data ggplot() + aes(x = year) + aes(y = pop_millions) + geom_line(aes(linetype = country), color = "plum4") + * geom_ribbon(data = gm_oceania_pop_millions_wide, # local data * aes(ymin = `New Zealand`, # poorly named var like this one has space * ymax = Australia, # must be surrounded by back ticks * y = NULL), # without this geom ribbon is wondering about y equals year * fill = "plum4", * alpha = .1) ``` ] .right-output-difference_ribbon-auto[ <img src="geoms_files/figure-html/difference_ribbon_auto_14_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-difference_ribbon-auto[ ```r gapminder %>% filter(continent == "Oceania") %>% mutate(pop_millions = pop/1000000) -> gm_oceania gm_oceania %>% select(-gdpPercap, -lifeExp, - pop) %>% pivot_wider(names_from = country, values_from = pop_millions) -> gm_oceania_pop_millions_wide gm_oceania %>% # global data ggplot() + aes(x = year) + aes(y = pop_millions) + geom_line(aes(linetype = country), color = "plum4") + geom_ribbon(data = gm_oceania_pop_millions_wide, # local data aes(ymin = `New Zealand`, # poorly named var like this one has space ymax = Australia, # must be surrounded by back ticks y = NULL), # without this geom ribbon is wondering about y equals year fill = "plum4", alpha = .1) + * scale_y_continuous(limits = c(0, 22)) ``` ] .right-output-difference_ribbon-auto[ <img src="geoms_files/figure-html/difference_ribbon_auto_15_output-1.png" width="100%" /> ] <style> .left-code-difference_ribbon-auto { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-difference_ribbon-auto { width: 60%; float: right; padding-left: 1%; } </style> --- class: split-40 count: false .left-code-growth-auto[ ```r *gapminder ``` ] .right-output-growth-auto[ ``` # A tibble: 1,704 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Afghanistan Asia 1952 28.8 8425333 779. 2 Afghanistan Asia 1957 30.3 9240934 821. 3 Afghanistan Asia 1962 32.0 10267083 853. 4 Afghanistan Asia 1967 34.0 11537966 836. 5 Afghanistan Asia 1972 36.1 13079460 740. 6 Afghanistan Asia 1977 38.4 14880372 786. 7 Afghanistan Asia 1982 39.9 12881816 978. 8 Afghanistan Asia 1987 40.8 13867957 852. 9 Afghanistan Asia 1992 41.7 16317921 649. 10 Afghanistan Asia 1997 41.8 22227415 635. # … with 1,694 more rows ``` ] --- class: split-40 count: false .left-code-growth-auto[ ```r gapminder %>% * filter(continent == "Europe") ``` ] .right-output-growth-auto[ ``` # A tibble: 360 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Albania Europe 1952 55.2 1282697 1601. 2 Albania Europe 1957 59.3 1476505 1942. 3 Albania Europe 1962 64.8 1728137 2313. 4 Albania Europe 1967 66.2 1984060 2760. 5 Albania Europe 1972 67.7 2263554 3313. 6 Albania Europe 1977 68.9 2509048 3533. 7 Albania Europe 1982 70.4 2780097 3631. 8 Albania Europe 1987 72 3075321 3739. 9 Albania Europe 1992 71.6 3326498 2497. 10 Albania Europe 1997 73.0 3428038 3193. # … with 350 more rows ``` ] --- class: split-40 count: false .left-code-growth-auto[ ```r gapminder %>% filter(continent == "Europe") %>% * filter(year %in% c(1972, 2002)) ``` ] .right-output-growth-auto[ ``` # A tibble: 60 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Albania Europe 1972 67.7 2263554 3313. 2 Albania Europe 2002 75.7 3508512 4604. 3 Austria Europe 1972 70.6 7544201 16662. 4 Austria Europe 2002 79.0 8148312 32418. 5 Belgium Europe 1972 71.4 9709100 16672. 6 Belgium Europe 2002 78.3 10311970 30486. 7 Bosnia and Herzegovina Europe 1972 67.4 3819000 2860. 8 Bosnia and Herzegovina Europe 2002 74.1 4165416 6019. 9 Bulgaria Europe 1972 70.9 8576200 6597. 10 Bulgaria Europe 2002 72.1 7661799 7697. # … with 50 more rows ``` ] --- class: split-40 count: false .left-code-growth-auto[ ```r gapminder %>% filter(continent == "Europe") %>% filter(year %in% c(1972, 2002)) %>% * mutate(country = reorder(country, lifeExp, mean)) ``` ] .right-output-growth-auto[ ``` # A tibble: 60 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Albania Europe 1972 67.7 2263554 3313. 2 Albania Europe 2002 75.7 3508512 4604. 3 Austria Europe 1972 70.6 7544201 16662. 4 Austria Europe 2002 79.0 8148312 32418. 5 Belgium Europe 1972 71.4 9709100 16672. 6 Belgium Europe 2002 78.3 10311970 30486. 7 Bosnia and Herzegovina Europe 1972 67.4 3819000 2860. 8 Bosnia and Herzegovina Europe 2002 74.1 4165416 6019. 9 Bulgaria Europe 1972 70.9 8576200 6597. 10 Bulgaria Europe 2002 72.1 7661799 7697. # … with 50 more rows ``` ] --- class: split-40 count: false .left-code-growth-auto[ ```r gapminder %>% filter(continent == "Europe") %>% filter(year %in% c(1972, 2002)) %>% mutate(country = reorder(country, lifeExp, mean)) -> *gap_72_02_europe ``` ] .right-output-growth-auto[ ] --- class: split-40 count: false .left-code-growth-auto[ ```r gapminder %>% filter(continent == "Europe") %>% filter(year %in% c(1972, 2002)) %>% mutate(country = reorder(country, lifeExp, mean)) -> gap_72_02_europe *gap_72_02_europe ``` ] .right-output-growth-auto[ ``` # A tibble: 60 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Albania Europe 1972 67.7 2263554 3313. 2 Albania Europe 2002 75.7 3508512 4604. 3 Austria Europe 1972 70.6 7544201 16662. 4 Austria Europe 2002 79.0 8148312 32418. 5 Belgium Europe 1972 71.4 9709100 16672. 6 Belgium Europe 2002 78.3 10311970 30486. 7 Bosnia and Herzegovina Europe 1972 67.4 3819000 2860. 8 Bosnia and Herzegovina Europe 2002 74.1 4165416 6019. 9 Bulgaria Europe 1972 70.9 8576200 6597. 10 Bulgaria Europe 2002 72.1 7661799 7697. # … with 50 more rows ``` ] --- class: split-40 count: false .left-code-growth-auto[ ```r gapminder %>% filter(continent == "Europe") %>% filter(year %in% c(1972, 2002)) %>% mutate(country = reorder(country, lifeExp, mean)) -> gap_72_02_europe gap_72_02_europe %>% * select(-gdpPercap, -pop) ``` ] .right-output-growth-auto[ ``` # A tibble: 60 x 4 country continent year lifeExp <fct> <fct> <int> <dbl> 1 Albania Europe 1972 67.7 2 Albania Europe 2002 75.7 3 Austria Europe 1972 70.6 4 Austria Europe 2002 79.0 5 Belgium Europe 1972 71.4 6 Belgium Europe 2002 78.3 7 Bosnia and Herzegovina Europe 1972 67.4 8 Bosnia and Herzegovina Europe 2002 74.1 9 Bulgaria Europe 1972 70.9 10 Bulgaria Europe 2002 72.1 # … with 50 more rows ``` ] --- class: split-40 count: false .left-code-growth-auto[ ```r gapminder %>% filter(continent == "Europe") %>% filter(year %in% c(1972, 2002)) %>% mutate(country = reorder(country, lifeExp, mean)) -> gap_72_02_europe gap_72_02_europe %>% select(-gdpPercap, -pop) %>% * pivot_wider(names_from = year, * values_from = lifeExp) ``` ] .right-output-growth-auto[ ``` # A tibble: 30 x 4 country continent `1972` `2002` <fct> <fct> <dbl> <dbl> 1 Albania Europe 67.7 75.7 2 Austria Europe 70.6 79.0 3 Belgium Europe 71.4 78.3 4 Bosnia and Herzegovina Europe 67.4 74.1 5 Bulgaria Europe 70.9 72.1 6 Croatia Europe 69.6 74.9 7 Czech Republic Europe 70.3 75.5 8 Denmark Europe 73.5 77.2 9 Finland Europe 70.9 78.4 10 France Europe 72.4 79.6 # … with 20 more rows ``` ] --- class: split-40 count: false .left-code-growth-auto[ ```r gapminder %>% filter(continent == "Europe") %>% filter(year %in% c(1972, 2002)) %>% mutate(country = reorder(country, lifeExp, mean)) -> gap_72_02_europe gap_72_02_europe %>% select(-gdpPercap, -pop) %>% pivot_wider(names_from = year, values_from = lifeExp) -> *gap_72_02_europe_wide ``` ] .right-output-growth-auto[ ] --- class: split-40 count: false .left-code-growth-auto[ ```r gapminder %>% filter(continent == "Europe") %>% filter(year %in% c(1972, 2002)) %>% mutate(country = reorder(country, lifeExp, mean)) -> gap_72_02_europe gap_72_02_europe %>% select(-gdpPercap, -pop) %>% pivot_wider(names_from = year, values_from = lifeExp) -> gap_72_02_europe_wide *ggplot(data = gap_72_02_europe) ``` ] .right-output-growth-auto[ <img src="geoms_files/figure-html/growth_auto_10_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-growth-auto[ ```r gapminder %>% filter(continent == "Europe") %>% filter(year %in% c(1972, 2002)) %>% mutate(country = reorder(country, lifeExp, mean)) -> gap_72_02_europe gap_72_02_europe %>% select(-gdpPercap, -pop) %>% pivot_wider(names_from = year, values_from = lifeExp) -> gap_72_02_europe_wide ggplot(data = gap_72_02_europe) + * aes(x = lifeExp) ``` ] .right-output-growth-auto[ <img src="geoms_files/figure-html/growth_auto_11_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-growth-auto[ ```r gapminder %>% filter(continent == "Europe") %>% filter(year %in% c(1972, 2002)) %>% mutate(country = reorder(country, lifeExp, mean)) -> gap_72_02_europe gap_72_02_europe %>% select(-gdpPercap, -pop) %>% pivot_wider(names_from = year, values_from = lifeExp) -> gap_72_02_europe_wide ggplot(data = gap_72_02_europe) + aes(x = lifeExp) + * aes(y = country) ``` ] .right-output-growth-auto[ <img src="geoms_files/figure-html/growth_auto_12_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-growth-auto[ ```r gapminder %>% filter(continent == "Europe") %>% filter(year %in% c(1972, 2002)) %>% mutate(country = reorder(country, lifeExp, mean)) -> gap_72_02_europe gap_72_02_europe %>% select(-gdpPercap, -pop) %>% pivot_wider(names_from = year, values_from = lifeExp) -> gap_72_02_europe_wide ggplot(data = gap_72_02_europe) + aes(x = lifeExp) + aes(y = country) + * geom_point() ``` ] .right-output-growth-auto[ <img src="geoms_files/figure-html/growth_auto_13_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-growth-auto[ ```r gapminder %>% filter(continent == "Europe") %>% filter(year %in% c(1972, 2002)) %>% mutate(country = reorder(country, lifeExp, mean)) -> gap_72_02_europe gap_72_02_europe %>% select(-gdpPercap, -pop) %>% pivot_wider(names_from = year, values_from = lifeExp) -> gap_72_02_europe_wide ggplot(data = gap_72_02_europe) + aes(x = lifeExp) + aes(y = country) + geom_point() + * aes(color = factor(year)) ``` ] .right-output-growth-auto[ <img src="geoms_files/figure-html/growth_auto_14_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-growth-auto[ ```r gapminder %>% filter(continent == "Europe") %>% filter(year %in% c(1972, 2002)) %>% mutate(country = reorder(country, lifeExp, mean)) -> gap_72_02_europe gap_72_02_europe %>% select(-gdpPercap, -pop) %>% pivot_wider(names_from = year, values_from = lifeExp) -> gap_72_02_europe_wide ggplot(data = gap_72_02_europe) + aes(x = lifeExp) + aes(y = country) + geom_point() + aes(color = factor(year)) + * geom_segment(data = gap_72_02_europe_wide, * aes(x = `1972`, # poorly named columns ie starting w number * xend = `2002`, # need to be surouned by backtick * yend = country), * color = "plum3", * size = 1.5) ``` ] .right-output-growth-auto[ <img src="geoms_files/figure-html/growth_auto_15_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-growth-auto[ ```r gapminder %>% filter(continent == "Europe") %>% filter(year %in% c(1972, 2002)) %>% mutate(country = reorder(country, lifeExp, mean)) -> gap_72_02_europe gap_72_02_europe %>% select(-gdpPercap, -pop) %>% pivot_wider(names_from = year, values_from = lifeExp) -> gap_72_02_europe_wide ggplot(data = gap_72_02_europe) + aes(x = lifeExp) + aes(y = country) + geom_point() + aes(color = factor(year)) + geom_segment(data = gap_72_02_europe_wide, aes(x = `1972`, # poorly named columns ie starting w number xend = `2002`, # need to be surouned by backtick yend = country), color = "plum3", size = 1.5) + * geom_point(size = 4) # point layer above not really needed - just for showing logic ``` ] .right-output-growth-auto[ <img src="geoms_files/figure-html/growth_auto_16_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-growth-auto[ ```r gapminder %>% filter(continent == "Europe") %>% filter(year %in% c(1972, 2002)) %>% mutate(country = reorder(country, lifeExp, mean)) -> gap_72_02_europe gap_72_02_europe %>% select(-gdpPercap, -pop) %>% pivot_wider(names_from = year, values_from = lifeExp) -> gap_72_02_europe_wide ggplot(data = gap_72_02_europe) + aes(x = lifeExp) + aes(y = country) + geom_point() + aes(color = factor(year)) + geom_segment(data = gap_72_02_europe_wide, aes(x = `1972`, # poorly named columns ie starting w number xend = `2002`, # need to be surouned by backtick yend = country), color = "plum3", size = 1.5) + geom_point(size = 4) + # point layer above not really needed - just for showing logic * scale_color_manual(values = c("plum3", "plum4")) ``` ] .right-output-growth-auto[ <img src="geoms_files/figure-html/growth_auto_17_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-growth-auto[ ```r gapminder %>% filter(continent == "Europe") %>% filter(year %in% c(1972, 2002)) %>% mutate(country = reorder(country, lifeExp, mean)) -> gap_72_02_europe gap_72_02_europe %>% select(-gdpPercap, -pop) %>% pivot_wider(names_from = year, values_from = lifeExp) -> gap_72_02_europe_wide ggplot(data = gap_72_02_europe) + aes(x = lifeExp) + aes(y = country) + geom_point() + aes(color = factor(year)) + geom_segment(data = gap_72_02_europe_wide, aes(x = `1972`, # poorly named columns ie starting w number xend = `2002`, # need to be surouned by backtick yend = country), color = "plum3", size = 1.5) + geom_point(size = 4) + # point layer above not really needed - just for showing logic scale_color_manual(values = c("plum3", "plum4")) + * theme(legend.position = c(.15,.85)) ``` ] .right-output-growth-auto[ <img src="geoms_files/figure-html/growth_auto_18_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-growth-auto[ ```r gapminder %>% filter(continent == "Europe") %>% filter(year %in% c(1972, 2002)) %>% mutate(country = reorder(country, lifeExp, mean)) -> gap_72_02_europe gap_72_02_europe %>% select(-gdpPercap, -pop) %>% pivot_wider(names_from = year, values_from = lifeExp) -> gap_72_02_europe_wide ggplot(data = gap_72_02_europe) + aes(x = lifeExp) + aes(y = country) + geom_point() + aes(color = factor(year)) + geom_segment(data = gap_72_02_europe_wide, aes(x = `1972`, # poorly named columns ie starting w number xend = `2002`, # need to be surouned by backtick yend = country), color = "plum3", size = 1.5) + geom_point(size = 4) + # point layer above not really needed - just for showing logic scale_color_manual(values = c("plum3", "plum4")) + theme(legend.position = c(.15,.85)) + * labs(color = NULL, y = NULL) ``` ] .right-output-growth-auto[ <img src="geoms_files/figure-html/growth_auto_19_output-1.png" width="100%" /> ] <style> .left-code-growth-auto { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-growth-auto { width: 60%; float: right; padding-left: 1%; } </style> --- name: group ## The group aesthetic and geometric objects --- Using geom_line(), you can use many of the same aesthetics as before as well as one special aesthetic: `group`. > Lines and paths fall somewhere in between: each overall line is composed of a set of straight segments, but each segment represents two points. --- Hadley Wickham Group is like a declaration that instead of plotting the entire data set all together, instead you will plot many small data sets, each defined by the categorical variable "mapped" to `group`. Let's see how this works with the following example. --- name: many_series class: inverse, middle, center # Many series --- The geometric object `line` connects all points as it moves along the x axis. If a group is not defined, the geom_line is hard to interpret, as seen before group is added. We also see that mapping discrete data to the color or linetype aesthetics has a similar effect to declaring that there are groups in the data. Another thing we observe in the last addition to the last plot is adding an additional geometric layer. The point layer, because it follows the line layer, appears on top of the line layer. --- class: split-40 count: false .left-code-time_series_heat-auto[ ```r *gapminder ``` ] .right-output-time_series_heat-auto[ ``` # A tibble: 1,704 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Afghanistan Asia 1952 28.8 8425333 779. 2 Afghanistan Asia 1957 30.3 9240934 821. 3 Afghanistan Asia 1962 32.0 10267083 853. 4 Afghanistan Asia 1967 34.0 11537966 836. 5 Afghanistan Asia 1972 36.1 13079460 740. 6 Afghanistan Asia 1977 38.4 14880372 786. 7 Afghanistan Asia 1982 39.9 12881816 978. 8 Afghanistan Asia 1987 40.8 13867957 852. 9 Afghanistan Asia 1992 41.7 16317921 649. 10 Afghanistan Asia 1997 41.8 22227415 635. # … with 1,694 more rows ``` ] --- class: split-40 count: false .left-code-time_series_heat-auto[ ```r gapminder %>% * filter(continent == "Europe") ``` ] .right-output-time_series_heat-auto[ ``` # A tibble: 360 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Albania Europe 1952 55.2 1282697 1601. 2 Albania Europe 1957 59.3 1476505 1942. 3 Albania Europe 1962 64.8 1728137 2313. 4 Albania Europe 1967 66.2 1984060 2760. 5 Albania Europe 1972 67.7 2263554 3313. 6 Albania Europe 1977 68.9 2509048 3533. 7 Albania Europe 1982 70.4 2780097 3631. 8 Albania Europe 1987 72 3075321 3739. 9 Albania Europe 1992 71.6 3326498 2497. 10 Albania Europe 1997 73.0 3428038 3193. # … with 350 more rows ``` ] --- class: split-40 count: false .left-code-time_series_heat-auto[ ```r gapminder %>% filter(continent == "Europe") %>% * ggplot() ``` ] .right-output-time_series_heat-auto[ <img src="geoms_files/figure-html/time_series_heat_auto_3_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series_heat-auto[ ```r gapminder %>% filter(continent == "Europe") %>% ggplot() + * aes(x = factor(year)) ``` ] .right-output-time_series_heat-auto[ <img src="geoms_files/figure-html/time_series_heat_auto_4_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series_heat-auto[ ```r gapminder %>% filter(continent == "Europe") %>% ggplot() + aes(x = factor(year)) + * aes(y = country) ``` ] .right-output-time_series_heat-auto[ <img src="geoms_files/figure-html/time_series_heat_auto_5_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series_heat-auto[ ```r gapminder %>% filter(continent == "Europe") %>% ggplot() + aes(x = factor(year)) + aes(y = country) + * geom_tile(color = "grey80") ``` ] .right-output-time_series_heat-auto[ <img src="geoms_files/figure-html/time_series_heat_auto_6_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series_heat-auto[ ```r gapminder %>% filter(continent == "Europe") %>% ggplot() + aes(x = factor(year)) + aes(y = country) + geom_tile(color = "grey80") + * aes(fill = lifeExp) ``` ] .right-output-time_series_heat-auto[ <img src="geoms_files/figure-html/time_series_heat_auto_7_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series_heat-auto[ ```r gapminder %>% filter(continent == "Europe") %>% ggplot() + aes(x = factor(year)) + aes(y = country) + geom_tile(color = "grey80") + aes(fill = lifeExp) + * scale_fill_viridis_c(option = "magma") ``` ] .right-output-time_series_heat-auto[ <img src="geoms_files/figure-html/time_series_heat_auto_8_output-1.png" width="100%" /> ] <style> .left-code-time_series_heat-auto { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-time_series_heat-auto { width: 60%; float: right; padding-left: 1%; } </style> --- # ranks of a series --- class: split-40 count: false .left-code-time_series_bump-auto[ ```r *gapminder ``` ] .right-output-time_series_bump-auto[ ``` # A tibble: 1,704 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Afghanistan Asia 1952 28.8 8425333 779. 2 Afghanistan Asia 1957 30.3 9240934 821. 3 Afghanistan Asia 1962 32.0 10267083 853. 4 Afghanistan Asia 1967 34.0 11537966 836. 5 Afghanistan Asia 1972 36.1 13079460 740. 6 Afghanistan Asia 1977 38.4 14880372 786. 7 Afghanistan Asia 1982 39.9 12881816 978. 8 Afghanistan Asia 1987 40.8 13867957 852. 9 Afghanistan Asia 1992 41.7 16317921 649. 10 Afghanistan Asia 1997 41.8 22227415 635. # … with 1,694 more rows ``` ] --- class: split-40 count: false .left-code-time_series_bump-auto[ ```r gapminder %>% * filter(country %in% c("Austria", "Belgium", * "Norway", "Netherlands", * "Spain", "Italy","France")) ``` ] .right-output-time_series_bump-auto[ ``` # A tibble: 84 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Austria Europe 1952 66.8 6927772 6137. 2 Austria Europe 1957 67.5 6965860 8843. 3 Austria Europe 1962 69.5 7129864 10751. 4 Austria Europe 1967 70.1 7376998 12835. 5 Austria Europe 1972 70.6 7544201 16662. 6 Austria Europe 1977 72.2 7568430 19749. 7 Austria Europe 1982 73.2 7574613 21597. 8 Austria Europe 1987 74.9 7578903 23688. 9 Austria Europe 1992 76.0 7914969 27042. 10 Austria Europe 1997 77.5 8069876 29096. # … with 74 more rows ``` ] --- class: split-40 count: false .left-code-time_series_bump-auto[ ```r gapminder %>% filter(country %in% c("Austria", "Belgium", "Norway", "Netherlands", "Spain", "Italy","France")) %>% * filter(year > 1980) ``` ] .right-output-time_series_bump-auto[ ``` # A tibble: 42 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Austria Europe 1982 73.2 7574613 21597. 2 Austria Europe 1987 74.9 7578903 23688. 3 Austria Europe 1992 76.0 7914969 27042. 4 Austria Europe 1997 77.5 8069876 29096. 5 Austria Europe 2002 79.0 8148312 32418. 6 Austria Europe 2007 79.8 8199783 36126. 7 Belgium Europe 1982 73.9 9856303 20980. 8 Belgium Europe 1987 75.4 9870200 22526. 9 Belgium Europe 1992 76.5 10045622 25576. 10 Belgium Europe 1997 77.5 10199787 27561. # … with 32 more rows ``` ] --- class: split-40 count: false .left-code-time_series_bump-auto[ ```r gapminder %>% filter(country %in% c("Austria", "Belgium", "Norway", "Netherlands", "Spain", "Italy","France")) %>% filter(year > 1980) %>% * group_by(year) ``` ] .right-output-time_series_bump-auto[ ``` # A tibble: 42 x 6 # Groups: year [6] country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Austria Europe 1982 73.2 7574613 21597. 2 Austria Europe 1987 74.9 7578903 23688. 3 Austria Europe 1992 76.0 7914969 27042. 4 Austria Europe 1997 77.5 8069876 29096. 5 Austria Europe 2002 79.0 8148312 32418. 6 Austria Europe 2007 79.8 8199783 36126. 7 Belgium Europe 1982 73.9 9856303 20980. 8 Belgium Europe 1987 75.4 9870200 22526. 9 Belgium Europe 1992 76.5 10045622 25576. 10 Belgium Europe 1997 77.5 10199787 27561. # … with 32 more rows ``` ] --- class: split-40 count: false .left-code-time_series_bump-auto[ ```r gapminder %>% filter(country %in% c("Austria", "Belgium", "Norway", "Netherlands", "Spain", "Italy","France")) %>% filter(year > 1980) %>% group_by(year) %>% * arrange(lifeExp) ``` ] .right-output-time_series_bump-auto[ ``` # A tibble: 42 x 6 # Groups: year [6] country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Austria Europe 1982 73.2 7574613 21597. 2 Belgium Europe 1982 73.9 9856303 20980. 3 France Europe 1982 74.9 54433565 20294. 4 Austria Europe 1987 74.9 7578903 23688. 5 Italy Europe 1982 75.0 56535636 16537. 6 Belgium Europe 1987 75.4 9870200 22526. 7 Norway Europe 1987 75.9 4186147 31541. 8 Norway Europe 1982 76.0 4114787 26299. 9 Austria Europe 1992 76.0 7914969 27042. 10 Netherlands Europe 1982 76.0 14310401 21399. # … with 32 more rows ``` ] --- class: split-40 count: false .left-code-time_series_bump-auto[ ```r gapminder %>% filter(country %in% c("Austria", "Belgium", "Norway", "Netherlands", "Spain", "Italy","France")) %>% filter(year > 1980) %>% group_by(year) %>% arrange(lifeExp) %>% * mutate(rank_life_exp = 1:n()) ``` ] .right-output-time_series_bump-auto[ ``` # A tibble: 42 x 7 # Groups: year [6] country continent year lifeExp pop gdpPercap rank_life_exp <fct> <fct> <int> <dbl> <int> <dbl> <int> 1 Austria Europe 1982 73.2 7574613 21597. 1 2 Belgium Europe 1982 73.9 9856303 20980. 2 3 France Europe 1982 74.9 54433565 20294. 3 4 Austria Europe 1987 74.9 7578903 23688. 1 5 Italy Europe 1982 75.0 56535636 16537. 4 6 Belgium Europe 1987 75.4 9870200 22526. 2 7 Norway Europe 1987 75.9 4186147 31541. 3 8 Norway Europe 1982 76.0 4114787 26299. 5 9 Austria Europe 1992 76.0 7914969 27042. 1 10 Netherlands Europe 1982 76.0 14310401 21399. 6 # … with 32 more rows ``` ] --- class: split-40 count: false .left-code-time_series_bump-auto[ ```r gapminder %>% filter(country %in% c("Austria", "Belgium", "Norway", "Netherlands", "Spain", "Italy","France")) %>% filter(year > 1980) %>% group_by(year) %>% arrange(lifeExp) %>% mutate(rank_life_exp = 1:n()) %>% * ungroup() ``` ] .right-output-time_series_bump-auto[ ``` # A tibble: 42 x 7 country continent year lifeExp pop gdpPercap rank_life_exp <fct> <fct> <int> <dbl> <int> <dbl> <int> 1 Austria Europe 1982 73.2 7574613 21597. 1 2 Belgium Europe 1982 73.9 9856303 20980. 2 3 France Europe 1982 74.9 54433565 20294. 3 4 Austria Europe 1987 74.9 7578903 23688. 1 5 Italy Europe 1982 75.0 56535636 16537. 4 6 Belgium Europe 1987 75.4 9870200 22526. 2 7 Norway Europe 1987 75.9 4186147 31541. 3 8 Norway Europe 1982 76.0 4114787 26299. 5 9 Austria Europe 1992 76.0 7914969 27042. 1 10 Netherlands Europe 1982 76.0 14310401 21399. 6 # … with 32 more rows ``` ] --- class: split-40 count: false .left-code-time_series_bump-auto[ ```r gapminder %>% filter(country %in% c("Austria", "Belgium", "Norway", "Netherlands", "Spain", "Italy","France")) %>% filter(year > 1980) %>% group_by(year) %>% arrange(lifeExp) %>% mutate(rank_life_exp = 1:n()) %>% ungroup() %>% * ggplot() ``` ] .right-output-time_series_bump-auto[ <img src="geoms_files/figure-html/time_series_bump_auto_8_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series_bump-auto[ ```r gapminder %>% filter(country %in% c("Austria", "Belgium", "Norway", "Netherlands", "Spain", "Italy","France")) %>% filter(year > 1980) %>% group_by(year) %>% arrange(lifeExp) %>% mutate(rank_life_exp = 1:n()) %>% ungroup() %>% ggplot() + * aes(x = year) ``` ] .right-output-time_series_bump-auto[ <img src="geoms_files/figure-html/time_series_bump_auto_9_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series_bump-auto[ ```r gapminder %>% filter(country %in% c("Austria", "Belgium", "Norway", "Netherlands", "Spain", "Italy","France")) %>% filter(year > 1980) %>% group_by(year) %>% arrange(lifeExp) %>% mutate(rank_life_exp = 1:n()) %>% ungroup() %>% ggplot() + aes(x = year) + * aes(y = rank_life_exp) ``` ] .right-output-time_series_bump-auto[ <img src="geoms_files/figure-html/time_series_bump_auto_10_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series_bump-auto[ ```r gapminder %>% filter(country %in% c("Austria", "Belgium", "Norway", "Netherlands", "Spain", "Italy","France")) %>% filter(year > 1980) %>% group_by(year) %>% arrange(lifeExp) %>% mutate(rank_life_exp = 1:n()) %>% ungroup() %>% ggplot() + aes(x = year) + aes(y = rank_life_exp) + * geom_point(size = 6) ``` ] .right-output-time_series_bump-auto[ <img src="geoms_files/figure-html/time_series_bump_auto_11_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series_bump-auto[ ```r gapminder %>% filter(country %in% c("Austria", "Belgium", "Norway", "Netherlands", "Spain", "Italy","France")) %>% filter(year > 1980) %>% group_by(year) %>% arrange(lifeExp) %>% mutate(rank_life_exp = 1:n()) %>% ungroup() %>% ggplot() + aes(x = year) + aes(y = rank_life_exp) + geom_point(size = 6) + * aes(color = country) ``` ] .right-output-time_series_bump-auto[ <img src="geoms_files/figure-html/time_series_bump_auto_12_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series_bump-auto[ ```r gapminder %>% filter(country %in% c("Austria", "Belgium", "Norway", "Netherlands", "Spain", "Italy","France")) %>% filter(year > 1980) %>% group_by(year) %>% arrange(lifeExp) %>% mutate(rank_life_exp = 1:n()) %>% ungroup() %>% ggplot() + aes(x = year) + aes(y = rank_life_exp) + geom_point(size = 6) + aes(color = country) + * ggbump::geom_bump(size = 2, smooth = 8) ``` ] .right-output-time_series_bump-auto[ <img src="geoms_files/figure-html/time_series_bump_auto_13_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series_bump-auto[ ```r gapminder %>% filter(country %in% c("Austria", "Belgium", "Norway", "Netherlands", "Spain", "Italy","France")) %>% filter(year > 1980) %>% group_by(year) %>% arrange(lifeExp) %>% mutate(rank_life_exp = 1:n()) %>% ungroup() %>% ggplot() + aes(x = year) + aes(y = rank_life_exp) + geom_point(size = 6) + aes(color = country) + ggbump::geom_bump(size = 2, smooth = 8) + * scale_x_continuous(limits = c(1970, 2020), * breaks = seq(1982, 2007, * by = 5)) ``` ] .right-output-time_series_bump-auto[ <img src="geoms_files/figure-html/time_series_bump_auto_14_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series_bump-auto[ ```r gapminder %>% filter(country %in% c("Austria", "Belgium", "Norway", "Netherlands", "Spain", "Italy","France")) %>% filter(year > 1980) %>% group_by(year) %>% arrange(lifeExp) %>% mutate(rank_life_exp = 1:n()) %>% ungroup() %>% ggplot() + aes(x = year) + aes(y = rank_life_exp) + geom_point(size = 6) + aes(color = country) + ggbump::geom_bump(size = 2, smooth = 8) + scale_x_continuous(limits = c(1970, 2020), breaks = seq(1982, 2007, by = 5)) + * geom_text(data = . %>% * filter(year == min(year)), * aes(x = year - 2.5, label = country), * size = 5, hjust = 1) ``` ] .right-output-time_series_bump-auto[ <img src="geoms_files/figure-html/time_series_bump_auto_15_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series_bump-auto[ ```r gapminder %>% filter(country %in% c("Austria", "Belgium", "Norway", "Netherlands", "Spain", "Italy","France")) %>% filter(year > 1980) %>% group_by(year) %>% arrange(lifeExp) %>% mutate(rank_life_exp = 1:n()) %>% ungroup() %>% ggplot() + aes(x = year) + aes(y = rank_life_exp) + geom_point(size = 6) + aes(color = country) + ggbump::geom_bump(size = 2, smooth = 8) + scale_x_continuous(limits = c(1970, 2020), breaks = seq(1982, 2007, by = 5)) + geom_text(data = . %>% filter(year == min(year)), aes(x = year - 2.5, label = country), size = 5, hjust = 1) + * geom_text(data = . %>% * filter(year == max(year)), * aes(x = year + 2.5, label = country), * size = 5, hjust = 0) ``` ] .right-output-time_series_bump-auto[ <img src="geoms_files/figure-html/time_series_bump_auto_16_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series_bump-auto[ ```r gapminder %>% filter(country %in% c("Austria", "Belgium", "Norway", "Netherlands", "Spain", "Italy","France")) %>% filter(year > 1980) %>% group_by(year) %>% arrange(lifeExp) %>% mutate(rank_life_exp = 1:n()) %>% ungroup() %>% ggplot() + aes(x = year) + aes(y = rank_life_exp) + geom_point(size = 6) + aes(color = country) + ggbump::geom_bump(size = 2, smooth = 8) + scale_x_continuous(limits = c(1970, 2020), breaks = seq(1982, 2007, by = 5)) + geom_text(data = . %>% filter(year == min(year)), aes(x = year - 2.5, label = country), size = 5, hjust = 1) + geom_text(data = . %>% filter(year == max(year)), aes(x = year + 2.5, label = country), size = 5, hjust = 0) + * scale_color_manual(values = paletteer::paletteer_d("basetheme::brutal", 7)) ``` ] .right-output-time_series_bump-auto[ <img src="geoms_files/figure-html/time_series_bump_auto_17_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series_bump-auto[ ```r gapminder %>% filter(country %in% c("Austria", "Belgium", "Norway", "Netherlands", "Spain", "Italy","France")) %>% filter(year > 1980) %>% group_by(year) %>% arrange(lifeExp) %>% mutate(rank_life_exp = 1:n()) %>% ungroup() %>% ggplot() + aes(x = year) + aes(y = rank_life_exp) + geom_point(size = 6) + aes(color = country) + ggbump::geom_bump(size = 2, smooth = 8) + scale_x_continuous(limits = c(1970, 2020), breaks = seq(1982, 2007, by = 5)) + geom_text(data = . %>% filter(year == min(year)), aes(x = year - 2.5, label = country), size = 5, hjust = 1) + geom_text(data = . %>% filter(year == max(year)), aes(x = year + 2.5, label = country), size = 5, hjust = 0) + scale_color_manual(values = paletteer::paletteer_d("basetheme::brutal", 7)) + * theme_minimal() ``` ] .right-output-time_series_bump-auto[ <img src="geoms_files/figure-html/time_series_bump_auto_18_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-time_series_bump-auto[ ```r gapminder %>% filter(country %in% c("Austria", "Belgium", "Norway", "Netherlands", "Spain", "Italy","France")) %>% filter(year > 1980) %>% group_by(year) %>% arrange(lifeExp) %>% mutate(rank_life_exp = 1:n()) %>% ungroup() %>% ggplot() + aes(x = year) + aes(y = rank_life_exp) + geom_point(size = 6) + aes(color = country) + ggbump::geom_bump(size = 2, smooth = 8) + scale_x_continuous(limits = c(1970, 2020), breaks = seq(1982, 2007, by = 5)) + geom_text(data = . %>% filter(year == min(year)), aes(x = year - 2.5, label = country), size = 5, hjust = 1) + geom_text(data = . %>% filter(year == max(year)), aes(x = year + 2.5, label = country), size = 5, hjust = 0) + scale_color_manual(values = paletteer::paletteer_d("basetheme::brutal", 7)) + theme_minimal() + * theme(legend.position = "none") ``` ] .right-output-time_series_bump-auto[ <img src="geoms_files/figure-html/time_series_bump_auto_19_output-1.png" width="100%" /> ] <style> .left-code-time_series_bump-auto { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-time_series_bump-auto { width: 60%; float: right; padding-left: 1%; } </style> --- class: split-40 count: false .left-code-time_series_bump_line-1[ ```r gapminder %>% filter(country %in% c("Austria", "Belgium", "Norway", "Netherlands", "Spain", "Italy","France")) %>% filter(year > 1980) %>% group_by(year) %>% arrange(lifeExp) %>% mutate(rank_life_exp = 1:n()) %>% ungroup() %>% ggplot() + aes(x = year) + aes(y = rank_life_exp) + aes(color = country) + * geom_line(size = 2, smooth = 8) + * geom_point(size = 6, shape = 21, fill = "white", stroke = 2) + scale_x_continuous(limits = c(1970, 2020), breaks = seq(1982, 2007, by = 5)) + geom_text(data = . %>% filter(year == min(year)), aes(x = year - 2.5, label = country), size = 5, hjust = 1) + geom_text(data = . %>% filter(year == max(year)), aes(x = year + 2.5, label = country), size = 5, hjust = 0) + scale_color_manual(values = paletteer::paletteer_d("basetheme::brutal", 7)) + theme_minimal() + theme(legend.position = "none") ``` ] .right-output-time_series_bump_line-1[ <img src="geoms_files/figure-html/time_series_bump_line_1_1_output-1.png" width="100%" /> ] <style> .left-code-time_series_bump_line-1 { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-time_series_bump_line-1 { width: 60%; float: right; padding-left: 1%; } </style> --- class: split-40 count: false .left-code-slope_plot-auto[ ```r *gapminder ``` ] .right-output-slope_plot-auto[ ``` # A tibble: 1,704 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Afghanistan Asia 1952 28.8 8425333 779. 2 Afghanistan Asia 1957 30.3 9240934 821. 3 Afghanistan Asia 1962 32.0 10267083 853. 4 Afghanistan Asia 1967 34.0 11537966 836. 5 Afghanistan Asia 1972 36.1 13079460 740. 6 Afghanistan Asia 1977 38.4 14880372 786. 7 Afghanistan Asia 1982 39.9 12881816 978. 8 Afghanistan Asia 1987 40.8 13867957 852. 9 Afghanistan Asia 1992 41.7 16317921 649. 10 Afghanistan Asia 1997 41.8 22227415 635. # … with 1,694 more rows ``` ] --- class: split-40 count: false .left-code-slope_plot-auto[ ```r gapminder %>% * filter(country %in% c("Belgium", * "Norway", * "Spain")) ``` ] .right-output-slope_plot-auto[ ``` # A tibble: 36 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Belgium Europe 1952 68 8730405 8343. 2 Belgium Europe 1957 69.2 8989111 9715. 3 Belgium Europe 1962 70.2 9218400 10991. 4 Belgium Europe 1967 70.9 9556500 13149. 5 Belgium Europe 1972 71.4 9709100 16672. 6 Belgium Europe 1977 72.8 9821800 19118. 7 Belgium Europe 1982 73.9 9856303 20980. 8 Belgium Europe 1987 75.4 9870200 22526. 9 Belgium Europe 1992 76.5 10045622 25576. 10 Belgium Europe 1997 77.5 10199787 27561. # … with 26 more rows ``` ] --- class: split-40 count: false .left-code-slope_plot-auto[ ```r gapminder %>% filter(country %in% c("Belgium", "Norway", "Spain")) %>% * filter(year > 1990) ``` ] .right-output-slope_plot-auto[ ``` # A tibble: 12 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Belgium Europe 1992 76.5 10045622 25576. 2 Belgium Europe 1997 77.5 10199787 27561. 3 Belgium Europe 2002 78.3 10311970 30486. 4 Belgium Europe 2007 79.4 10392226 33693. 5 Norway Europe 1992 77.3 4286357 33966. 6 Norway Europe 1997 78.3 4405672 41283. 7 Norway Europe 2002 79.0 4535591 44684. 8 Norway Europe 2007 80.2 4627926 49357. 9 Spain Europe 1992 77.6 39549438 18603. 10 Spain Europe 1997 78.8 39855442 20445. 11 Spain Europe 2002 79.8 40152517 24835. 12 Spain Europe 2007 80.9 40448191 28821. ``` ] --- class: split-40 count: false .left-code-slope_plot-auto[ ```r gapminder %>% filter(country %in% c("Belgium", "Norway", "Spain")) %>% filter(year > 1990) %>% * ggplot() ``` ] .right-output-slope_plot-auto[ <img src="geoms_files/figure-html/slope_plot_auto_4_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-slope_plot-auto[ ```r gapminder %>% filter(country %in% c("Belgium", "Norway", "Spain")) %>% filter(year > 1990) %>% ggplot() + * aes(x = year) ``` ] .right-output-slope_plot-auto[ <img src="geoms_files/figure-html/slope_plot_auto_5_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-slope_plot-auto[ ```r gapminder %>% filter(country %in% c("Belgium", "Norway", "Spain")) %>% filter(year > 1990) %>% ggplot() + aes(x = year) + * aes(y = lifeExp) ``` ] .right-output-slope_plot-auto[ <img src="geoms_files/figure-html/slope_plot_auto_6_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-slope_plot-auto[ ```r gapminder %>% filter(country %in% c("Belgium", "Norway", "Spain")) %>% filter(year > 1990) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + * aes(color = country) ``` ] .right-output-slope_plot-auto[ <img src="geoms_files/figure-html/slope_plot_auto_7_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-slope_plot-auto[ ```r gapminder %>% filter(country %in% c("Belgium", "Norway", "Spain")) %>% filter(year > 1990) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + aes(color = country) + * geom_line(size = 2, smooth = 8) ``` ] .right-output-slope_plot-auto[ <img src="geoms_files/figure-html/slope_plot_auto_8_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-slope_plot-auto[ ```r gapminder %>% filter(country %in% c("Belgium", "Norway", "Spain")) %>% filter(year > 1990) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + aes(color = country) + geom_line(size = 2, smooth = 8) + * geom_label(aes(label = round(lifeExp, 1)), * color = "darkgrey", * stroke = "red", * check_overlap = T) ``` ] .right-output-slope_plot-auto[ <img src="geoms_files/figure-html/slope_plot_auto_9_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-slope_plot-auto[ ```r gapminder %>% filter(country %in% c("Belgium", "Norway", "Spain")) %>% filter(year > 1990) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + aes(color = country) + geom_line(size = 2, smooth = 8) + geom_label(aes(label = round(lifeExp, 1)), color = "darkgrey", stroke = "red", check_overlap = T) + * scale_x_continuous(limits = c(1985, 2012), * breaks = seq(1992, 2007, * by = 5)) ``` ] .right-output-slope_plot-auto[ <img src="geoms_files/figure-html/slope_plot_auto_10_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-slope_plot-auto[ ```r gapminder %>% filter(country %in% c("Belgium", "Norway", "Spain")) %>% filter(year > 1990) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + aes(color = country) + geom_line(size = 2, smooth = 8) + geom_label(aes(label = round(lifeExp, 1)), color = "darkgrey", stroke = "red", check_overlap = T) + scale_x_continuous(limits = c(1985, 2012), breaks = seq(1992, 2007, by = 5)) + * geom_text(data = . %>% * filter(year == min(year)), * aes(x = year - 1.5, label = country), * size = 5, hjust = 1) ``` ] .right-output-slope_plot-auto[ <img src="geoms_files/figure-html/slope_plot_auto_11_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-slope_plot-auto[ ```r gapminder %>% filter(country %in% c("Belgium", "Norway", "Spain")) %>% filter(year > 1990) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + aes(color = country) + geom_line(size = 2, smooth = 8) + geom_label(aes(label = round(lifeExp, 1)), color = "darkgrey", stroke = "red", check_overlap = T) + scale_x_continuous(limits = c(1985, 2012), breaks = seq(1992, 2007, by = 5)) + geom_text(data = . %>% filter(year == min(year)), aes(x = year - 1.5, label = country), size = 5, hjust = 1) + * geom_text(data = . %>% * filter(year == max(year)), * aes(x = year + 1.5, label = country), * size = 5, hjust = 0) ``` ] .right-output-slope_plot-auto[ <img src="geoms_files/figure-html/slope_plot_auto_12_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-slope_plot-auto[ ```r gapminder %>% filter(country %in% c("Belgium", "Norway", "Spain")) %>% filter(year > 1990) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + aes(color = country) + geom_line(size = 2, smooth = 8) + geom_label(aes(label = round(lifeExp, 1)), color = "darkgrey", stroke = "red", check_overlap = T) + scale_x_continuous(limits = c(1985, 2012), breaks = seq(1992, 2007, by = 5)) + geom_text(data = . %>% filter(year == min(year)), aes(x = year - 1.5, label = country), size = 5, hjust = 1) + geom_text(data = . %>% filter(year == max(year)), aes(x = year + 1.5, label = country), size = 5, hjust = 0) + * scale_color_manual(values = * paletteer::paletteer_d("basetheme::brutal", 7)) ``` ] .right-output-slope_plot-auto[ <img src="geoms_files/figure-html/slope_plot_auto_13_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-slope_plot-auto[ ```r gapminder %>% filter(country %in% c("Belgium", "Norway", "Spain")) %>% filter(year > 1990) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + aes(color = country) + geom_line(size = 2, smooth = 8) + geom_label(aes(label = round(lifeExp, 1)), color = "darkgrey", stroke = "red", check_overlap = T) + scale_x_continuous(limits = c(1985, 2012), breaks = seq(1992, 2007, by = 5)) + geom_text(data = . %>% filter(year == min(year)), aes(x = year - 1.5, label = country), size = 5, hjust = 1) + geom_text(data = . %>% filter(year == max(year)), aes(x = year + 1.5, label = country), size = 5, hjust = 0) + scale_color_manual(values = paletteer::paletteer_d("basetheme::brutal", 7)) + * theme_minimal() ``` ] .right-output-slope_plot-auto[ <img src="geoms_files/figure-html/slope_plot_auto_14_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-slope_plot-auto[ ```r gapminder %>% filter(country %in% c("Belgium", "Norway", "Spain")) %>% filter(year > 1990) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + aes(color = country) + geom_line(size = 2, smooth = 8) + geom_label(aes(label = round(lifeExp, 1)), color = "darkgrey", stroke = "red", check_overlap = T) + scale_x_continuous(limits = c(1985, 2012), breaks = seq(1992, 2007, by = 5)) + geom_text(data = . %>% filter(year == min(year)), aes(x = year - 1.5, label = country), size = 5, hjust = 1) + geom_text(data = . %>% filter(year == max(year)), aes(x = year + 1.5, label = country), size = 5, hjust = 0) + scale_color_manual(values = paletteer::paletteer_d("basetheme::brutal", 7)) + theme_minimal() + * theme(panel.grid.major.y = element_blank()) ``` ] .right-output-slope_plot-auto[ <img src="geoms_files/figure-html/slope_plot_auto_15_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-slope_plot-auto[ ```r gapminder %>% filter(country %in% c("Belgium", "Norway", "Spain")) %>% filter(year > 1990) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + aes(color = country) + geom_line(size = 2, smooth = 8) + geom_label(aes(label = round(lifeExp, 1)), color = "darkgrey", stroke = "red", check_overlap = T) + scale_x_continuous(limits = c(1985, 2012), breaks = seq(1992, 2007, by = 5)) + geom_text(data = . %>% filter(year == min(year)), aes(x = year - 1.5, label = country), size = 5, hjust = 1) + geom_text(data = . %>% filter(year == max(year)), aes(x = year + 1.5, label = country), size = 5, hjust = 0) + scale_color_manual(values = paletteer::paletteer_d("basetheme::brutal", 7)) + theme_minimal() + theme(panel.grid.major.y = element_blank()) + * theme(panel.grid.minor.y = element_blank()) ``` ] .right-output-slope_plot-auto[ <img src="geoms_files/figure-html/slope_plot_auto_16_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-slope_plot-auto[ ```r gapminder %>% filter(country %in% c("Belgium", "Norway", "Spain")) %>% filter(year > 1990) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + aes(color = country) + geom_line(size = 2, smooth = 8) + geom_label(aes(label = round(lifeExp, 1)), color = "darkgrey", stroke = "red", check_overlap = T) + scale_x_continuous(limits = c(1985, 2012), breaks = seq(1992, 2007, by = 5)) + geom_text(data = . %>% filter(year == min(year)), aes(x = year - 1.5, label = country), size = 5, hjust = 1) + geom_text(data = . %>% filter(year == max(year)), aes(x = year + 1.5, label = country), size = 5, hjust = 0) + scale_color_manual(values = paletteer::paletteer_d("basetheme::brutal", 7)) + theme_minimal() + theme(panel.grid.major.y = element_blank()) + theme(panel.grid.minor.y = element_blank()) + * theme(panel.grid.minor.x = element_blank()) ``` ] .right-output-slope_plot-auto[ <img src="geoms_files/figure-html/slope_plot_auto_17_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-slope_plot-auto[ ```r gapminder %>% filter(country %in% c("Belgium", "Norway", "Spain")) %>% filter(year > 1990) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + aes(color = country) + geom_line(size = 2, smooth = 8) + geom_label(aes(label = round(lifeExp, 1)), color = "darkgrey", stroke = "red", check_overlap = T) + scale_x_continuous(limits = c(1985, 2012), breaks = seq(1992, 2007, by = 5)) + geom_text(data = . %>% filter(year == min(year)), aes(x = year - 1.5, label = country), size = 5, hjust = 1) + geom_text(data = . %>% filter(year == max(year)), aes(x = year + 1.5, label = country), size = 5, hjust = 0) + scale_color_manual(values = paletteer::paletteer_d("basetheme::brutal", 7)) + theme_minimal() + theme(panel.grid.major.y = element_blank()) + theme(panel.grid.minor.y = element_blank()) + theme(panel.grid.minor.x = element_blank()) + * theme(panel.grid.major.x = element_blank()) ``` ] .right-output-slope_plot-auto[ <img src="geoms_files/figure-html/slope_plot_auto_18_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-slope_plot-auto[ ```r gapminder %>% filter(country %in% c("Belgium", "Norway", "Spain")) %>% filter(year > 1990) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + aes(color = country) + geom_line(size = 2, smooth = 8) + geom_label(aes(label = round(lifeExp, 1)), color = "darkgrey", stroke = "red", check_overlap = T) + scale_x_continuous(limits = c(1985, 2012), breaks = seq(1992, 2007, by = 5)) + geom_text(data = . %>% filter(year == min(year)), aes(x = year - 1.5, label = country), size = 5, hjust = 1) + geom_text(data = . %>% filter(year == max(year)), aes(x = year + 1.5, label = country), size = 5, hjust = 0) + scale_color_manual(values = paletteer::paletteer_d("basetheme::brutal", 7)) + theme_minimal() + theme(panel.grid.major.y = element_blank()) + theme(panel.grid.minor.y = element_blank()) + theme(panel.grid.minor.x = element_blank()) + theme(panel.grid.major.x = element_blank()) + * theme(axis.text.y = element_blank()) ``` ] .right-output-slope_plot-auto[ <img src="geoms_files/figure-html/slope_plot_auto_19_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-slope_plot-auto[ ```r gapminder %>% filter(country %in% c("Belgium", "Norway", "Spain")) %>% filter(year > 1990) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + aes(color = country) + geom_line(size = 2, smooth = 8) + geom_label(aes(label = round(lifeExp, 1)), color = "darkgrey", stroke = "red", check_overlap = T) + scale_x_continuous(limits = c(1985, 2012), breaks = seq(1992, 2007, by = 5)) + geom_text(data = . %>% filter(year == min(year)), aes(x = year - 1.5, label = country), size = 5, hjust = 1) + geom_text(data = . %>% filter(year == max(year)), aes(x = year + 1.5, label = country), size = 5, hjust = 0) + scale_color_manual(values = paletteer::paletteer_d("basetheme::brutal", 7)) + theme_minimal() + theme(panel.grid.major.y = element_blank()) + theme(panel.grid.minor.y = element_blank()) + theme(panel.grid.minor.x = element_blank()) + theme(panel.grid.major.x = element_blank()) + theme(axis.text.y = element_blank()) + * theme(axis.ticks.y = element_blank()) ``` ] .right-output-slope_plot-auto[ <img src="geoms_files/figure-html/slope_plot_auto_20_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-slope_plot-auto[ ```r gapminder %>% filter(country %in% c("Belgium", "Norway", "Spain")) %>% filter(year > 1990) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + aes(color = country) + geom_line(size = 2, smooth = 8) + geom_label(aes(label = round(lifeExp, 1)), color = "darkgrey", stroke = "red", check_overlap = T) + scale_x_continuous(limits = c(1985, 2012), breaks = seq(1992, 2007, by = 5)) + geom_text(data = . %>% filter(year == min(year)), aes(x = year - 1.5, label = country), size = 5, hjust = 1) + geom_text(data = . %>% filter(year == max(year)), aes(x = year + 1.5, label = country), size = 5, hjust = 0) + scale_color_manual(values = paletteer::paletteer_d("basetheme::brutal", 7)) + theme_minimal() + theme(panel.grid.major.y = element_blank()) + theme(panel.grid.minor.y = element_blank()) + theme(panel.grid.minor.x = element_blank()) + theme(panel.grid.major.x = element_blank()) + theme(axis.text.y = element_blank()) + theme(axis.ticks.y = element_blank()) + * theme(legend.position = "none") ``` ] .right-output-slope_plot-auto[ <img src="geoms_files/figure-html/slope_plot_auto_21_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-slope_plot-auto[ ```r gapminder %>% filter(country %in% c("Belgium", "Norway", "Spain")) %>% filter(year > 1990) %>% ggplot() + aes(x = year) + aes(y = lifeExp) + aes(color = country) + geom_line(size = 2, smooth = 8) + geom_label(aes(label = round(lifeExp, 1)), color = "darkgrey", stroke = "red", check_overlap = T) + scale_x_continuous(limits = c(1985, 2012), breaks = seq(1992, 2007, by = 5)) + geom_text(data = . %>% filter(year == min(year)), aes(x = year - 1.5, label = country), size = 5, hjust = 1) + geom_text(data = . %>% filter(year == max(year)), aes(x = year + 1.5, label = country), size = 5, hjust = 0) + scale_color_manual(values = paletteer::paletteer_d("basetheme::brutal", 7)) + theme_minimal() + theme(panel.grid.major.y = element_blank()) + theme(panel.grid.minor.y = element_blank()) + theme(panel.grid.minor.x = element_blank()) + theme(panel.grid.major.x = element_blank()) + theme(axis.text.y = element_blank()) + theme(axis.ticks.y = element_blank()) + theme(legend.position = "none") + * labs(x = NULL, y = NULL) ``` ] .right-output-slope_plot-auto[ <img src="geoms_files/figure-html/slope_plot_auto_22_output-1.png" width="100%" /> ] <style> .left-code-slope_plot-auto { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-slope_plot-auto { width: 60%; float: right; padding-left: 1%; } </style> --- [Racing bar chart](https://evamaerey.github.io/flipbooks/racing_bars/racing_barcharts.html#34) is concerned with ranks and values. --- ## Questions geom_area() is a special case of what other geom_*()? Use the help to answer this question. --- Geoms is a long section consider because there are many geoms. Consider taking the [overview track](#local). --- name: c # Continuous Univariate --- class: split-40 count: false .left-code-univariate_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% ggplot() + aes(x = lifeExp) + theme_minimal() + geom_rug(col = "darkgrey") + geom_histogram(alpha = .5, fill = "cadetblue") ``` ] .right-output-univariate_continuous-rotate[ <img src="geoms_files/figure-html/univariate_continuous_rotate_1_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-univariate_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% ggplot() + aes(x = lifeExp) + theme_minimal() + geom_rug(col = "darkgrey") + * geom_freqpoly(linetype = "dashed") ``` ] .right-output-univariate_continuous-rotate[ <img src="geoms_files/figure-html/univariate_continuous_rotate_2_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-univariate_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% ggplot() + aes(x = lifeExp) + theme_minimal() + geom_rug(col = "darkgrey") + * geom_dotplot(fill = "blue", alpha = .5) ``` ] .right-output-univariate_continuous-rotate[ <img src="geoms_files/figure-html/univariate_continuous_rotate_3_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-univariate_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% ggplot() + aes(x = lifeExp) + theme_minimal() + geom_rug(col = "darkgrey") + * geom_dotplot(binwidth = "dotdensity", alpha = .5) ``` ] .right-output-univariate_continuous-rotate[ <img src="geoms_files/figure-html/univariate_continuous_rotate_4_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-univariate_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% ggplot() + aes(x = lifeExp) + theme_minimal() + geom_rug(col = "darkgrey") + * geom_histogram(col = "black", fill = "maroon4", alpha = .4, aes(y = ..density..)) ``` ] .right-output-univariate_continuous-rotate[ <img src="geoms_files/figure-html/univariate_continuous_rotate_5_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-univariate_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% ggplot() + aes(x = lifeExp) + theme_minimal() + geom_rug(col = "darkgrey") + * geom_density(linetype = "dotted", adjust = 1/4, size = 1.25) ``` ] .right-output-univariate_continuous-rotate[ <img src="geoms_files/figure-html/univariate_continuous_rotate_6_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-univariate_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% ggplot() + aes(x = lifeExp) + theme_minimal() + geom_rug(col = "darkgrey") + * geom_density(linetype = "dashed", adjust = 1/2, size = 1.25) ``` ] .right-output-univariate_continuous-rotate[ <img src="geoms_files/figure-html/univariate_continuous_rotate_7_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-univariate_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% ggplot() + aes(x = lifeExp) + theme_minimal() + geom_rug(col = "darkgrey") + * ggalt::geom_bkde(alpha = 0.3 ) ``` ] .right-output-univariate_continuous-rotate[ <img src="geoms_files/figure-html/univariate_continuous_rotate_8_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-univariate_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% ggplot() + aes(x = lifeExp) + theme_minimal() + geom_rug(col = "darkgrey") + * ggalt::geom_bkde(alpha = 0.3, bandwidth = .25, aes(fill = continent)) ``` ] .right-output-univariate_continuous-rotate[ <img src="geoms_files/figure-html/univariate_continuous_rotate_9_output-1.png" width="100%" /> ] <style> .left-code-univariate_continuous-rotate { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-univariate_continuous-rotate { width: 60%; float: right; padding-left: 1%; } </style> --- --- name: c # Continuous - Discrete via facetting --- class: split-40 count: false .left-code-geom_discrete_continuous_facet-rotate[ ```r gapminder %>% filter(year == 2002) %>% ggplot() + aes(x = lifeExp) + theme_minimal() + geom_rug(col = "darkgrey") + geom_histogram(alpha = .5, fill = "cadetblue") + facet_grid(continent ~ .) ``` ] .right-output-geom_discrete_continuous_facet-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_facet_rotate_1_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-geom_discrete_continuous_facet-rotate[ ```r gapminder %>% filter(year == 2002) %>% ggplot() + aes(x = lifeExp) + theme_minimal() + geom_rug(col = "darkgrey") + * geom_freqpoly(linetype = "dashed") + facet_grid(continent ~ .) ``` ] .right-output-geom_discrete_continuous_facet-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_facet_rotate_2_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-geom_discrete_continuous_facet-rotate[ ```r gapminder %>% filter(year == 2002) %>% ggplot() + aes(x = lifeExp) + theme_minimal() + geom_rug(col = "darkgrey") + * geom_dotplot(fill = "blue", alpha = .5) + facet_grid(continent ~ .) ``` ] .right-output-geom_discrete_continuous_facet-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_facet_rotate_3_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-geom_discrete_continuous_facet-rotate[ ```r gapminder %>% filter(year == 2002) %>% ggplot() + aes(x = lifeExp) + theme_minimal() + geom_rug(col = "darkgrey") + * geom_dotplot(binwidth = "dotdensity", alpha = .5) + facet_grid(continent ~ .) ``` ] .right-output-geom_discrete_continuous_facet-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_facet_rotate_4_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-geom_discrete_continuous_facet-rotate[ ```r gapminder %>% filter(year == 2002) %>% ggplot() + aes(x = lifeExp) + theme_minimal() + geom_rug(col = "darkgrey") + * geom_histogram(col = "black", fill = "maroon4", alpha = .4, aes(y = ..density..)) + facet_grid(continent ~ .) ``` ] .right-output-geom_discrete_continuous_facet-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_facet_rotate_5_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-geom_discrete_continuous_facet-rotate[ ```r gapminder %>% filter(year == 2002) %>% ggplot() + aes(x = lifeExp) + theme_minimal() + geom_rug(col = "darkgrey") + * geom_density(linetype = "dotted", adjust = 1/4, size = 1.25) + facet_grid(continent ~ .) ``` ] .right-output-geom_discrete_continuous_facet-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_facet_rotate_6_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-geom_discrete_continuous_facet-rotate[ ```r gapminder %>% filter(year == 2002) %>% ggplot() + aes(x = lifeExp) + theme_minimal() + geom_rug(col = "darkgrey") + * geom_density(linetype = "dashed", adjust = 1/2, size = 1.25) + facet_grid(continent ~ .) ``` ] .right-output-geom_discrete_continuous_facet-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_facet_rotate_7_output-1.png" width="100%" /> ] <style> .left-code-geom_discrete_continuous_facet-rotate { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-geom_discrete_continuous_facet-rotate { width: 60%; float: right; padding-left: 1%; } </style> --- --- class: inverse, center, middle name: dc ## Discrete v. Continuous --- class: split-40 count: false .left-code-geom_discrete_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% ggplot() + aes(y = fct_rev(continent)) + aes(x = lifeExp) + geom_point(size = .2) + geom_boxplot(alpha = .1) + theme_minimal() + labs(y = NULL) ``` ] .right-output-geom_discrete_continuous-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_rotate_1_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-geom_discrete_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% ggplot() + aes(y = fct_rev(continent)) + aes(x = lifeExp) + geom_point(size = .2) + * geom_boxplot(width = .1, outlier.shape = NA, alpha = 0.5) + theme_minimal() + labs(y = NULL) ``` ] .right-output-geom_discrete_continuous-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_rotate_2_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-geom_discrete_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% ggplot() + aes(y = fct_rev(continent)) + aes(x = lifeExp) + geom_point(size = .2) + * geom_jitter(width = .2, alpha = .5, color = "green") + theme_minimal() + labs(y = NULL) ``` ] .right-output-geom_discrete_continuous-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_rotate_3_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-geom_discrete_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% ggplot() + aes(y = fct_rev(continent)) + aes(x = lifeExp) + geom_point(size = .2) + * geom_violin(alpha = .1) + theme_minimal() + labs(y = NULL) ``` ] .right-output-geom_discrete_continuous-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_rotate_4_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-geom_discrete_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% ggplot() + aes(y = fct_rev(continent)) + aes(x = lifeExp) + geom_point(size = .2) + * ggforce::geom_sina(col = "magenta", alpha = .5) + theme_minimal() + labs(y = NULL) ``` ] .right-output-geom_discrete_continuous-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_rotate_5_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-geom_discrete_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% ggplot() + aes(y = fct_rev(continent)) + aes(x = lifeExp) + geom_point(size = .2) + * stat_summary(fun.y = mean, geom = "point", col = "goldenrod2", size = 8) + theme_minimal() + labs(y = NULL) ``` ] .right-output-geom_discrete_continuous-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_rotate_6_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-geom_discrete_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% ggplot() + aes(y = fct_rev(continent)) + aes(x = lifeExp) + geom_point(size = .2) + * ggridges::geom_density_ridges(alpha = .2, fill = "blue") + theme_minimal() + labs(y = NULL) ``` ] .right-output-geom_discrete_continuous-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_rotate_7_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-geom_discrete_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% ggplot() + aes(y = fct_rev(continent)) + aes(x = lifeExp) + geom_point(size = .2) + * ggridges::geom_density_ridges(scale = .7, alpha = .2, fill = "blue") + theme_minimal() + labs(y = NULL) ``` ] .right-output-geom_discrete_continuous-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_rotate_8_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-geom_discrete_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% ggplot() + aes(y = fct_rev(continent)) + aes(x = lifeExp) + geom_point(size = .2) + * ggridges::geom_density_ridges(scale = 1.5, alpha = .2, fill = "blue") + theme_minimal() + labs(y = NULL) ``` ] .right-output-geom_discrete_continuous-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_rotate_9_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-geom_discrete_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% ggplot() + aes(y = fct_rev(continent)) + aes(x = lifeExp) + geom_point(size = .2) + * ggridges::geom_density_ridges_gradient(aes(fill = stat(x))) + theme_minimal() + labs(y = NULL) ``` ] .right-output-geom_discrete_continuous-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_rotate_10_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-geom_discrete_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% ggplot() + aes(y = fct_rev(continent)) + aes(x = lifeExp) + geom_point(size = .2) + * ggridges::stat_density_ridges(quantile_lines = TRUE, quantiles = c(0.025, 0.975), alpha = 0.5, fill = "plum4") + theme_minimal() + labs(y = NULL) ``` ] .right-output-geom_discrete_continuous-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_rotate_11_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-geom_discrete_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% ggplot() + aes(y = fct_rev(continent)) + aes(x = lifeExp) + geom_point(size = .2) + * ggridges::geom_density_ridges(jittered_points = TRUE, position = "raincloud", alpha = .5, scale = 0.9) + theme_minimal() + labs(y = NULL) ``` ] .right-output-geom_discrete_continuous-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_rotate_12_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-geom_discrete_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% ggplot() + aes(y = fct_rev(continent)) + aes(x = lifeExp) + geom_point(size = .2) + * ggridges::geom_density_ridges(stat = "binline", bins = 20, scale = 0.95, draw_baseline = FALSE) + theme_minimal() + labs(y = NULL) ``` ] .right-output-geom_discrete_continuous-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_rotate_13_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-geom_discrete_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% ggplot() + aes(y = fct_rev(continent)) + aes(x = lifeExp) + geom_point(size = .2) + * ggridges::geom_density_ridges(scale = 2, alpha = .5) + ggridges::scale_fill_cyclical(values = c("blue", "green")) + theme_minimal() + labs(y = NULL) ``` ] .right-output-geom_discrete_continuous-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_rotate_14_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-geom_discrete_continuous-rotate[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% ggplot() + aes(y = fct_rev(continent)) + aes(x = lifeExp) + geom_point(size = .2) + * geom_point(aes(color = continent), position = position_nudge(x = 0, y = .2), size = .5, alpha = 0.8) + geom_boxplot(width = .1, outlier.shape = NA, alpha = 0.5) + theme_minimal() + labs(y = NULL) ``` ] .right-output-geom_discrete_continuous-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_rotate_15_output-1.png" width="100%" /> ] <style> .left-code-geom_discrete_continuous-rotate { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-geom_discrete_continuous-rotate { width: 60%; float: right; padding-left: 1%; } </style> --- class: split-40 count: false .left-code-geom_discrete_continuous_bee-rotate[ ```r gapminder %>% mutate(higher_income = gdpPercap > 20000) %>% ggplot() + aes(x = continent) + aes(y = lifeExp) + aes(alpha = year) + ggbeeswarm::geom_quasirandom(aes(x = continent, y = lifeExp)) ``` ] .right-output-geom_discrete_continuous_bee-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_bee_rotate_1_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-geom_discrete_continuous_bee-rotate[ ```r gapminder %>% mutate(higher_income = gdpPercap > 20000) %>% ggplot() + aes(x = continent) + aes(y = lifeExp) + aes(alpha = year) + * ggbeeswarm::geom_quasirandom(aes(color = continent)) ``` ] .right-output-geom_discrete_continuous_bee-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_bee_rotate_2_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-geom_discrete_continuous_bee-rotate[ ```r gapminder %>% mutate(higher_income = gdpPercap > 20000) %>% ggplot() + aes(x = continent) + aes(y = lifeExp) + aes(alpha = year) + * ggbeeswarm::geom_quasirandom(aes(color = higher_income), dodge.width = .8) ``` ] .right-output-geom_discrete_continuous_bee-rotate[ <img src="geoms_files/figure-html/geom_discrete_continuous_bee_rotate_3_output-1.png" width="100%" /> ] <style> .left-code-geom_discrete_continuous_bee-rotate { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-geom_discrete_continuous_bee-rotate { width: 60%; float: right; padding-left: 1%; } </style> --- class: inverse, center, middle name: dd ## Discrete v. Discrete --- class: split-40 count: false .left-code-discrete2x-rotate[ ```r gapminder_2002 %>% mutate(seventy_plus = lifeExp >= 75) %>% mutate(age_category = case_when(seventy_plus == T ~ "Seventy +", seventy_plus == F ~ "< Seventy")) %>% ggplot() + aes(x = continent) + aes(y = age_category) + geom_jitter(col = "blue", alpha = .3, width = .35, height = .35) + geom_count(col = "magenta", alpha = .6) + theme_minimal() ``` ] .right-output-discrete2x-rotate[ <img src="geoms_files/figure-html/discrete2x_rotate_1_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-discrete2x-rotate[ ```r gapminder_2002 %>% mutate(seventy_plus = lifeExp >= 75) %>% mutate(age_category = case_when(seventy_plus == T ~ "Seventy +", seventy_plus == F ~ "< Seventy")) %>% ggplot() + aes(x = continent) + aes(y = age_category) + geom_jitter(col = "blue", alpha = .3, width = .35, height = .35) + * geom_text(data = . %>% group_by(age_category, continent) %>% count, aes(label = n)) + theme_minimal() ``` ] .right-output-discrete2x-rotate[ <img src="geoms_files/figure-html/discrete2x_rotate_2_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-discrete2x-rotate[ ```r gapminder_2002 %>% mutate(seventy_plus = lifeExp >= 75) %>% mutate(age_category = case_when(seventy_plus == T ~ "Seventy +", seventy_plus == F ~ "< Seventy")) %>% ggplot() + aes(x = continent) + aes(y = age_category) + geom_jitter(col = "blue", alpha = .3, width = .35, height = .35) + * geom_label(data = . %>% group_by(age_category, continent) %>% count, aes(label = n)) + theme_minimal() ``` ] .right-output-discrete2x-rotate[ <img src="geoms_files/figure-html/discrete2x_rotate_3_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-discrete2x-rotate[ ```r gapminder_2002 %>% mutate(seventy_plus = lifeExp >= 75) %>% mutate(age_category = case_when(seventy_plus == T ~ "Seventy +", seventy_plus == F ~ "< Seventy")) %>% ggplot() + aes(x = continent) + aes(y = age_category) + geom_jitter(col = "blue", alpha = .3, width = .35, height = .35) + * geom_point(position = ggforce::position_jitternormal()) + theme_minimal() ``` ] .right-output-discrete2x-rotate[ <img src="geoms_files/figure-html/discrete2x_rotate_4_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-discrete2x-rotate[ ```r gapminder_2002 %>% mutate(seventy_plus = lifeExp >= 75) %>% mutate(age_category = case_when(seventy_plus == T ~ "Seventy +", seventy_plus == F ~ "< Seventy")) %>% ggplot() + aes(x = continent) + aes(y = age_category) + geom_jitter(col = "blue", alpha = .3, width = .35, height = .35) + * geom_point(position = ggforce::position_jitternormal(sd_x = 0.15, sd_y = 0.01)) + theme_minimal() ``` ] .right-output-discrete2x-rotate[ <img src="geoms_files/figure-html/discrete2x_rotate_5_output-1.png" width="100%" /> ] <style> .left-code-discrete2x-rotate { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-discrete2x-rotate { width: 60%; float: right; padding-left: 1%; } </style> --- class: split-40 count: false .left-code-discrete2x2-rotate[ ```r gapminder_2002 %>% mutate(seventyfive_plus = lifeExp >= 75) %>% mutate(age_category = case_when(seventyfive_plus == T ~ "75+", seventyfive_plus == F ~ "<75")) %>% ggplot() + aes(x = age_category) + aes(fill = continent) + geom_point(stat = "count") + geom_bar(position = "dodge", alpha = .6) + theme_minimal() ``` ] .right-output-discrete2x2-rotate[ <img src="geoms_files/figure-html/discrete2x2_rotate_1_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-discrete2x2-rotate[ ```r gapminder_2002 %>% mutate(seventyfive_plus = lifeExp >= 75) %>% mutate(age_category = case_when(seventyfive_plus == T ~ "75+", seventyfive_plus == F ~ "<75")) %>% ggplot() + aes(x = age_category) + aes(fill = continent) + geom_point(stat = "count") + * geom_bar(alpha = .6) + theme_minimal() ``` ] .right-output-discrete2x2-rotate[ <img src="geoms_files/figure-html/discrete2x2_rotate_2_output-1.png" width="100%" /> ] <style> .left-code-discrete2x2-rotate { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-discrete2x2-rotate { width: 60%; float: right; padding-left: 1%; } </style> --- # Mosaic --- class: split-40 count: false .left-code-mosaic-auto[ ```r *gapminder ``` ] .right-output-mosaic-auto[ ``` # A tibble: 1,704 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Afghanistan Asia 1952 28.8 8425333 779. 2 Afghanistan Asia 1957 30.3 9240934 821. 3 Afghanistan Asia 1962 32.0 10267083 853. 4 Afghanistan Asia 1967 34.0 11537966 836. 5 Afghanistan Asia 1972 36.1 13079460 740. 6 Afghanistan Asia 1977 38.4 14880372 786. 7 Afghanistan Asia 1982 39.9 12881816 978. 8 Afghanistan Asia 1987 40.8 13867957 852. 9 Afghanistan Asia 1992 41.7 16317921 649. 10 Afghanistan Asia 1997 41.8 22227415 635. # … with 1,694 more rows ``` ] --- class: split-40 count: false .left-code-mosaic-auto[ ```r gapminder %>% * filter(year == 2002) ``` ] .right-output-mosaic-auto[ ``` # A tibble: 142 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Afghanistan Asia 2002 42.1 25268405 727. 2 Albania Europe 2002 75.7 3508512 4604. 3 Algeria Africa 2002 71.0 31287142 5288. 4 Angola Africa 2002 41.0 10866106 2773. 5 Argentina Americas 2002 74.3 38331121 8798. 6 Australia Oceania 2002 80.4 19546792 30688. 7 Austria Europe 2002 79.0 8148312 32418. 8 Bahrain Asia 2002 74.8 656397 23404. 9 Bangladesh Asia 2002 62.0 135656790 1136. 10 Belgium Europe 2002 78.3 10311970 30486. # … with 132 more rows ``` ] --- class: split-40 count: false .left-code-mosaic-auto[ ```r gapminder %>% filter(year == 2002) %>% * mutate(higher_income = gdpPercap > 20000) ``` ] .right-output-mosaic-auto[ ``` # A tibble: 142 x 7 country continent year lifeExp pop gdpPercap higher_income <fct> <fct> <int> <dbl> <int> <dbl> <lgl> 1 Afghanistan Asia 2002 42.1 25268405 727. FALSE 2 Albania Europe 2002 75.7 3508512 4604. FALSE 3 Algeria Africa 2002 71.0 31287142 5288. FALSE 4 Angola Africa 2002 41.0 10866106 2773. FALSE 5 Argentina Americas 2002 74.3 38331121 8798. FALSE 6 Australia Oceania 2002 80.4 19546792 30688. TRUE 7 Austria Europe 2002 79.0 8148312 32418. TRUE 8 Bahrain Asia 2002 74.8 656397 23404. TRUE 9 Bangladesh Asia 2002 62.0 135656790 1136. FALSE 10 Belgium Europe 2002 78.3 10311970 30486. TRUE # … with 132 more rows ``` ] --- class: split-40 count: false .left-code-mosaic-auto[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% * group_by(continent, higher_income) ``` ] .right-output-mosaic-auto[ ``` # A tibble: 142 x 7 # Groups: continent, higher_income [8] country continent year lifeExp pop gdpPercap higher_income <fct> <fct> <int> <dbl> <int> <dbl> <lgl> 1 Afghanistan Asia 2002 42.1 25268405 727. FALSE 2 Albania Europe 2002 75.7 3508512 4604. FALSE 3 Algeria Africa 2002 71.0 31287142 5288. FALSE 4 Angola Africa 2002 41.0 10866106 2773. FALSE 5 Argentina Americas 2002 74.3 38331121 8798. FALSE 6 Australia Oceania 2002 80.4 19546792 30688. TRUE 7 Austria Europe 2002 79.0 8148312 32418. TRUE 8 Bahrain Asia 2002 74.8 656397 23404. TRUE 9 Bangladesh Asia 2002 62.0 135656790 1136. FALSE 10 Belgium Europe 2002 78.3 10311970 30486. TRUE # … with 132 more rows ``` ] --- class: split-40 count: false .left-code-mosaic-auto[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% group_by(continent, higher_income) %>% * summarise(count = n()) ``` ] .right-output-mosaic-auto[ ``` # A tibble: 8 x 3 # Groups: continent [5] continent higher_income count <fct> <lgl> <int> 1 Africa FALSE 52 2 Americas FALSE 23 3 Americas TRUE 2 4 Asia FALSE 26 5 Asia TRUE 7 6 Europe FALSE 13 7 Europe TRUE 17 8 Oceania TRUE 2 ``` ] --- class: split-40 count: false .left-code-mosaic-auto[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% group_by(continent, higher_income) %>% summarise(count = n()) %>% * mutate(num_in_continents = sum(count), * prop = count/sum(count)) ``` ] .right-output-mosaic-auto[ ``` # A tibble: 8 x 5 # Groups: continent [5] continent higher_income count num_in_continents prop <fct> <lgl> <int> <int> <dbl> 1 Africa FALSE 52 52 1 2 Americas FALSE 23 25 0.92 3 Americas TRUE 2 25 0.08 4 Asia FALSE 26 33 0.788 5 Asia TRUE 7 33 0.212 6 Europe FALSE 13 30 0.433 7 Europe TRUE 17 30 0.567 8 Oceania TRUE 2 2 1 ``` ] --- class: split-40 count: false .left-code-mosaic-auto[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% group_by(continent, higher_income) %>% summarise(count = n()) %>% mutate(num_in_continents = sum(count), prop = count/sum(count)) %>% * ungroup() ``` ] .right-output-mosaic-auto[ ``` # A tibble: 8 x 5 continent higher_income count num_in_continents prop <fct> <lgl> <int> <int> <dbl> 1 Africa FALSE 52 52 1 2 Americas FALSE 23 25 0.92 3 Americas TRUE 2 25 0.08 4 Asia FALSE 26 33 0.788 5 Asia TRUE 7 33 0.212 6 Europe FALSE 13 30 0.433 7 Europe TRUE 17 30 0.567 8 Oceania TRUE 2 2 1 ``` ] --- class: split-40 count: false .left-code-mosaic-auto[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% group_by(continent, higher_income) %>% summarise(count = n()) %>% mutate(num_in_continents = sum(count), prop = count/sum(count)) %>% ungroup() %>% * ggplot() ``` ] .right-output-mosaic-auto[ <img src="geoms_files/figure-html/mosaic_auto_8_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-mosaic-auto[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% group_by(continent, higher_income) %>% summarise(count = n()) %>% mutate(num_in_continents = sum(count), prop = count/sum(count)) %>% ungroup() %>% ggplot() + * aes(x = continent, y = prop) ``` ] .right-output-mosaic-auto[ <img src="geoms_files/figure-html/mosaic_auto_9_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-mosaic-auto[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% group_by(continent, higher_income) %>% summarise(count = n()) %>% mutate(num_in_continents = sum(count), prop = count/sum(count)) %>% ungroup() %>% ggplot() + aes(x = continent, y = prop) + * geom_bar(stat = "identity", * position = "fill", * color = "lightgrey") ``` ] .right-output-mosaic-auto[ <img src="geoms_files/figure-html/mosaic_auto_10_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-mosaic-auto[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% group_by(continent, higher_income) %>% summarise(count = n()) %>% mutate(num_in_continents = sum(count), prop = count/sum(count)) %>% ungroup() %>% ggplot() + aes(x = continent, y = prop) + geom_bar(stat = "identity", position = "fill", color = "lightgrey") + * facet_grid(~continent, scales = "free_x", space = "free_x") ``` ] .right-output-mosaic-auto[ <img src="geoms_files/figure-html/mosaic_auto_11_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-mosaic-auto[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% group_by(continent, higher_income) %>% summarise(count = n()) %>% mutate(num_in_continents = sum(count), prop = count/sum(count)) %>% ungroup() %>% ggplot() + aes(x = continent, y = prop) + geom_bar(stat = "identity", position = "fill", color = "lightgrey") + facet_grid(~continent, scales = "free_x", space = "free_x") + * aes(width = num_in_continents) ``` ] .right-output-mosaic-auto[ <img src="geoms_files/figure-html/mosaic_auto_12_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-mosaic-auto[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% group_by(continent, higher_income) %>% summarise(count = n()) %>% mutate(num_in_continents = sum(count), prop = count/sum(count)) %>% ungroup() %>% ggplot() + aes(x = continent, y = prop) + geom_bar(stat = "identity", position = "fill", color = "lightgrey") + facet_grid(~continent, scales = "free_x", space = "free_x") + aes(width = num_in_continents) + * aes(fill = higher_income) ``` ] .right-output-mosaic-auto[ <img src="geoms_files/figure-html/mosaic_auto_13_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-mosaic-auto[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% group_by(continent, higher_income) %>% summarise(count = n()) %>% mutate(num_in_continents = sum(count), prop = count/sum(count)) %>% ungroup() %>% ggplot() + aes(x = continent, y = prop) + geom_bar(stat = "identity", position = "fill", color = "lightgrey") + facet_grid(~continent, scales = "free_x", space = "free_x") + aes(width = num_in_continents) + aes(fill = higher_income) + * theme(panel.spacing.x = unit(0, "npc")) ``` ] .right-output-mosaic-auto[ <img src="geoms_files/figure-html/mosaic_auto_14_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-code-mosaic-auto[ ```r gapminder %>% filter(year == 2002) %>% mutate(higher_income = gdpPercap > 20000) %>% group_by(continent, higher_income) %>% summarise(count = n()) %>% mutate(num_in_continents = sum(count), prop = count/sum(count)) %>% ungroup() %>% ggplot() + aes(x = continent, y = prop) + geom_bar(stat = "identity", position = "fill", color = "lightgrey") + facet_grid(~continent, scales = "free_x", space = "free_x") + aes(width = num_in_continents) + aes(fill = higher_income) + theme(panel.spacing.x = unit(0, "npc")) + * theme(strip.text = element_blank()) ``` ] .right-output-mosaic-auto[ <img src="geoms_files/figure-html/mosaic_auto_15_output-1.png" width="100%" /> ] <style> .left-code-mosaic-auto { color: #777; width: 38%; height: 92%; float: left; font-size: 80% } .right-output-mosaic-auto { width: 60%; float: right; padding-left: 1%; } </style> --- # Cartography, Networks, Animation... Are in other code-movies in the [ggplot2 grammar guide](https://evamaerey.github.io/ggplot2_grammar_guide/about). --- <!-- --- --> <!-- class: middle, center, inverse --> <!-- # geom stats --> <!-- -- --> <!-- ### identity --> <!-- -- --> <!-- ### count --> <!-- --- --> <!-- ```{r stat, include=F} --> <!-- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-03-03/game_goals.csv') -> --> <!-- game_goals --> <!-- game_goals %>% --> <!-- count(season) %>% --> <!-- full_join(tibble(season = 1980:2020)) %>% --> <!-- ggplot() + --> <!-- aes(x = season) + --> <!-- aes(y = n) + --> <!-- geom_col() + # stat is identity --> <!-- geom_point() + # stat is identity --> <!-- geom_line() + # stat is identity --> <!-- geom_area(alpha = .2, # stat is identity --> <!-- fill = "magenta") + --> <!-- aes(fill = season) + --> <!-- aes(xend = season) + --> <!-- aes(yend = 0) + --> <!-- geom_segment(linetype = "dotted") -> --> <!-- you_aggregate_then_plot --> <!-- game_goals %>% --> <!-- ggplot() + --> <!-- aes(x = season) + --> <!-- geom_bar() + # a version of geom column --> <!-- geom_point(stat = "count") + --> <!-- geom_line(stat = "count") + --> <!-- geom_area(stat = "count", --> <!-- alpha = .2, --> <!-- fill = "magenta") + --> <!-- aes(fill = season) -> # not completely grasping why fill cant work here --> <!-- ggplot_aggregates_for_you --> <!-- ``` --> <!-- --- --> <!-- ```{r bar_discrete_continuous, include = F} --> <!-- tibble(my_var = c(1, 2.5, 2.5, 2.5, --> <!-- 7, 7.25, 7.25)) %>% --> <!-- ggplot() + --> <!-- aes(x = my_var) + --> <!-- geom_bar(fill = "blue", # default is --> <!-- alpha = .5, # widths adjusted so --> <!-- linetype = "dotted") + # no overlap --> <!-- geom_bar(alpha = .5, --> <!-- width = .6, #setting width --> <!-- fill = "orange") + --> <!-- # replacing previous aes x statement --> <!-- # each category take up horizontal space of 1 --> <!-- aes(x = as_factor(my_var)) --> <!-- ``` --> <!-- ## radar chart --> <!-- ```{r} --> <!-- gapminder %>% --> <!-- filter(continent == "Oceania") %>% --> <!-- select(year, country, gdpPercap) %>% --> <!-- group_by(country) %>% --> <!-- mutate(row = row_number()) %>% --> <!-- mutate(dist = row/n()) %>% --> <!-- mutate(y_pos = gdpPercap*sin(2*pi*dist)) %>% --> <!-- mutate(x_pos = gdpPercap*cos(2*pi*dist)) -> --> <!-- prep --> <!-- tibble(y = (1:8 * 4000)) %>% --> <!-- crossing(x = 1:12) %>% --> <!-- group_by(y) %>% --> <!-- mutate(row = row_number()) %>% --> <!-- mutate(dist = row/n()) %>% --> <!-- mutate(y_pos = y*sin(2*pi*dist)) %>% --> <!-- mutate(x_pos = y*cos(2*pi*dist)) %>% --> <!-- ggplot() + --> <!-- aes(group = y) + --> <!-- aes(x = x_pos) + --> <!-- aes(y = y_pos) + --> <!-- geom_path() + --> <!-- geom_path(data = prep, aes(group = country), --> <!-- color = "purple", --> <!-- size = 4) --> <!-- options(scipen = 30) --> <!-- sin(pi*2*(1:6)/6) --> <!-- ``` --> <style type="text/css"> .remark-code{line-height: 1.5; font-size: 55%} </style>