diff --git a/_freeze/materials/00-welcome/execute-results/html.json b/_freeze/materials/00-welcome/execute-results/html.json index 64eaf0d..4997f52 100644 --- a/_freeze/materials/00-welcome/execute-results/html.json +++ b/_freeze/materials/00-welcome/execute-results/html.json @@ -1,7 +1,7 @@ { - "hash": "4c2a284f2b9347b0491952f959acb465", + "hash": "30e2dc92d571d0b4a5cf7552814831d3", "result": { - "markdown": "---\ntitle: \"Engaging and Beautiful Data Visualizations with ggplot2\"\nsubtitle: \"Welcome!\"\nauthor: \"Cédric Scherer // posit::conf // September 2023\"\nformat:\n revealjs:\n theme: slides.scss\n logo: img/logo.png\n footer: '**[Cédric Scherer](https://cedricscherer.com)** // posit::conf(2023)'\n transition: fade\n progress: true\n multiplex: false\n preview-links: true\n scrollable: false\n hide-inactive-cursor: true\n highlight-style: printing\n chalkboard:\n theme: whiteboard\n boardmarker-width: 4\n buttons: true\n pause: true\neditor: source\nknitr:\n opts_chunk:\n dev: \"ragg_png\"\n retina: 3\n dpi: 200\nexecute:\n freeze: auto\n cache: true\n echo: true\n fig-width: 5\n fig-height: 6\n---\n\n\n\n# Welcome





{background-image=\"img/logo-welcome.png\" background-position=\"center\" background-size=\"40%\"}\n\n\n\n## {#hello-blank data-menu-title=\"Hello\" background-image=\"img/intro/hello-blank.png\" background-position=\"center\" background-size=\"62%\"}\n\n\n\n## {#hello-team data-menu-title=\"Hello Team\" background-image=\"img/intro/hello-team.png\" background-position=\"center\" background-size=\"62%\"}\n\n\n\n## {#teaching-team data-menu-title=\"Teaching Team\" background-image=\"img/intro/team-hex-grid.png\" background-position=\"center\" background-size=\"105%\"}\n\n\n\n## {#hello-cedric data-menu-title=\"Hello Cédric\" background-image=\"img/intro/hello-cedric.png\" background-position=\"center\" background-size=\"62%\"}\n\n\n\n## {#cedric-avatars data-menu-title=\"Cédric Avatars\" background-image=\"img/intro/avatars-logo.png\" background-position=\"center\" background-size=\"80%\"}\n\n\n\n## {#cedric-dataviz-science data-menu-title=\"Cédric Projects Science\" background-image=\"img/intro/projects-science.png\" background-position=\"center\" background-size=\"82%\" background-color=\"#ABABAB\"}\n\n::: footer\n:::\n\n\n\n## {#cedric-dataviz-clients data-menu-title=\"Cédric Projects Clients\" background-image=\"img/intro/projects-clients.png\" background-position=\"center\" background-size=\"77%\" background-color=\"#ABABAB\"}\n\n::: footer\n:::\n\n\n\n## {#cedric-dataviz-personal data-menu-title=\"Cédric Projects Personal\"background-image=\"img/intro/projects-personal.png\" background-position=\"center\" background-size=\"85%\" background-color=\"#ABABAB\"}\n\n::: footer\n:::\n\n\n\n## {#cedric-blog data-menu-title=\"Cédric Blog\"background-image=\"img/intro/blog.png\" background-position=\"center\" background-size=\"56%\"}\n\n::: footer\n:::\n\n\n\n## {#cedric-ggplot-tutorial data-menu-title=\"Cédric Blog Tutorial\" background-image=\"img/intro/blog-tutorial.png\" background-position=\"center\" background-size=\"56%\"}\n\n::: footer\n:::\n\n\n\n## {#cedric-ggplot-tutorial-overview data-menu-title=\"Cédric Blog Tutorial Overview\"}\n\n![[cedricscherer.com/2019/08/05/a-ggplot2-tutorial-for-beautiful-plotting-in-r](https://www.cedricscherer.com/2019/08/05/a-ggplot2-tutorial-for-beautiful-plotting-in-r/)](img/intro/ggplot-tutorial-overview.png){fig-align=\"center\" fig-alt=\"Overview of some exemplary plots included in my ggplot2 tutorial.\"}\n\n\n\n## {#cedric-ggplot-evol data-menu-title=\"Cédric Blog ggplot Evolution\" background-image=\"img/intro/blog-evol.png\" background-position=\"center\" background-size=\"56%\"}\n\n::: footer\n:::\n\n\n\n## {#cedric-ggplot-evol-gif data-menu-title=\"Cédric Blog ggplot Evolution GIF\"}\n\n![[cedricscherer.com/2019/05/17/the-evolution-of-a-ggplot](https://www.cedricscherer.com/2019/05/17/the-evolution-of-a-ggplot)](img/intro/evol-ggplot-1.gif){fig-align=\"center\" fig-alt=\"Animated evolution of a jitter-pop plot showing student-teacher ratios per continent. The animation shows iteration through different geometries, theme adjustments, combinations of layers, and additional annotations such as text labels with arrows and an inset tile grid map with colors by region mathing those of the main graphic.\"}\n\n\n\n## {#cedric-rstudio-conf data-menu-title=\"Cédric Blog rstudio::conf\" background-image=\"img/intro/blog-rstudioconf.png\" background-position=\"center\" background-size=\"56%\"}\n\n::: footer\n:::\n\n\n\n## {#hello-thomas data-menu-title=\"Hello Thomas\" background-image=\"img/intro/hello-thomas.png\" background-position=\"center\" background-size=\"62%\"}\n\n\n\n## {#thomas-artwork data-menu-title=\"Thomas Artwork\"}\n\n![Artwork by Thomas Linn Pedersen](img/intro/thomas_artwork.png)\n\n\n\n## {#hello-jasmin data-menu-title=\"Hello Jasmin\" background-image=\"img/intro/hello-jasmin.png\" background-position=\"center\" background-size=\"62%\"}\n\n\n\n## {#jasmin-dataviz data-menu-title=\"Jasmin Data Visualization\"}\n\n![Graphic by Jasmin Sarah König](img/intro/jasmin-overview.png)\n\n\n\n## {#jasmin-dataviz-observable data-menu-title=\"Jasmin Data Visualization\"}\n\n\n\n\n\n## {#hello-jonathan data-menu-title=\"Hello Jonathan\" background-image=\"img/intro/hello-jonathan.png\" background-position=\"center\" background-size=\"62%\"}\n\n\n\n## {#jonathan-photography-japan data-menu-title=\"Jonathan Photography\"}\n\n![Photo by Jonathan Keane](img/intro/jonathan-japan.jpg)\n\n\n\n## {#hello-course data-menu-title=\"Hello Course\" background-image=\"img/intro/hello-course.png\" background-position=\"center\" background-size=\"62%\"}\n\n\n\n## Conversation Starters\n\n- What's your name?\n- Where do you feel home?\n- When did you use R for the first time?\n- What's your favorite animal / plant / color / typeface?\n- Where did you spend your summer?\n- Whom would you like to meet during the posit::conf?\n- Which R package are you looking forward to try?\n- What are things you want to learn about ggplot2?\n\n\n\n## Announcements\n\n
\n\n#### WiFi\n- Username: Posit Conf 2023\n- Password: conf2023

\n\n#### Course Materials\n- Webpage: [posit-conf-2023.github.io/dataviz-ggplot2](https://posit-conf-2023.github.io/dataviz-ggplot2/)\n- Posit Cloud: [posit.cloud/spaces/397253](https://posit.cloud/spaces/397253/content/all?sort=name_asc)\n\n\n\n## {#course-webpage data-menu-title=\"Course Webpage\" .center}\n\n
\nposit-conf-2023.github.io/
dataviz-ggplot2
\n
\n\n\n\n## {#posit-cloud data-menu-title=\"Posit Cloud\" .center}\n\n
\nposit.cloud/spaces/397253\n
\n\n\n\n## Announcements\n\n::: incremental\n- **Gender-neutral bathrooms** are located among the Grand Suite Bathrooms.\n- The two **meditation/prayer rooms** (Grand Suite 2A and Grand Suite 2B) are open Sunday-Tuesday 7:30 am-7:00 pm and Wednesday 8:00 am-6:00 pm\n- The **lactation room** is located in Grand Suite 1 and open Sunday-Tuesday 7:30 am-7:00 pm and Wednesday 8:00 am-6:00 pm.\n- Participants who do not wish to be photographed have **red lanyards**; please note everyone's lanyard colors before taking a photo and respect their choices.\n- The **Code of Conduct** and **COVID** policies can be found at [posit.co/code-of-conduct](https://posit.co/code-of-conduct). Please review them carefully. You can report Code of Conduct violations in person, by email, or by phone. Please see the policy linked above for contact information.\n:::\n\n\n\n## Communication Strategy\n\n
\n\n::: incremental\n- Green sticky note --- I am done with the exercise

\n- Pink sticky note --- I need help or support

\n- You can ask questions / comment at any time during the course.\n- Please avoid questions during the breaks to give us a chance to recover.\n- We will be using Discord as our main digital communication method.\n- Team up with your neighbors for exercises --- and lunch!\n- We will collect feedback twice during the day (more later).\n:::\n\n\n\n# Preparation\n\n\n\n## Required Packages\n\n\n::: {.cell hash='00-welcome_cache/revealjs/packages-install-tidyverse_88585319b84dbef92a58fccba66b637e'}\n\n```{.r .cell-code}\ninstall.packages(\"ggplot2\")\ninstall.packages(\"dplyr\")\ninstall.packages(\"readr\")\ninstall.packages(\"forcats\")\ninstall.packages(\"stringr\")\ninstall.packages(\"lubridate\")\ninstall.packages(\"purrr\")\n```\n:::\n\n\n::: fragment\n\n::: {.cell hash='00-welcome_cache/revealjs/packages-install-other_057c75c7a29cffb13735c8f36543a25c'}\n\n```{.r .cell-code}\ninstall.packages(\"here\")\ninstall.packages(\"scales\")\ninstall.packages(\"ragg\")\ninstall.packages(\"systemfonts\")\ninstall.packages(\"rcartocolor\")\ninstall.packages(\"scico\")\ninstall.packages(\"prismatic\")\ninstall.packages(\"patchwork\")\ninstall.packages(\"ggtext\")\ninstall.packages(\"ggforce\")\ninstall.packages(\"ggrepel\")\ninstall.packages(\"colorspace\")\ninstall.packages(\"gapminder\")\nremotes::install_github(\"clauswilke/colorblindr\")\n```\n:::\n\n:::\n\n\n\n## Optional Packages\n\n\n::: {.cell hash='00-welcome_cache/revealjs/packages-install-optional_6f3a9d7feebf705a88edbc23d7bb3537'}\n\n```{.r .cell-code}\ninstall.packages(\"camcorder\")\ninstall.packages(\"viridis\")\ninstall.packages(\"RColorBrewer\")\ninstall.packages(\"MetBrewer\")\ninstall.packages(\"ggthemes\")\ninstall.packages(\"ggsci\")\ninstall.packages(\"hrbrthemes\")\ninstall.packages(\"tvthemes\")\ninstall.packages(\"ggannotate\")\nremotes::install_github(\"AllanCameron/geomtextpath\")\n```\n:::\n\n\n\n\n## Required Typefaces\n\nDownload and install the following typefaces:\n\n* Asap: [fonts.google.com/specimen/Asap](https://fonts.google.com/specimen/Asap)\n* Spline Sans: [fonts.google.com/specimen/Spline+Sans](https://fonts.google.com/specimen/Spline+Sans)\n* Spline Sans Mono: [fonts.google.com/specimen/Spline+Sans+Mono](https://fonts.google.com/specimen/Spline+Sans+Mono)\n* Hepta Slab: [fonts.google.com/specimen/Hepta+Slab](https://fonts.google.com/specimen/Hepta+Slab)\n\n. . . \n\nAll files are also available via
[cedricscherer.com/files/positconf-dataviz-ggplot2-fonts.zip](https://cedricscherer.com/files/positconf-dataviz-ggplot2-fonts.zip)\n\n. . . \n\n→ Install the font files. \n\n. . . \n \n→ Restart Rstudio.\n\n\n\n# Let's get started!\n", + "markdown": "---\ntitle: \"Engaging and Beautiful Data Visualizations with ggplot2\"\nsubtitle: \"Welcome!\"\nauthor: \"Cédric Scherer // posit::conf // September 2023\"\nformat:\n revealjs:\n theme: slides.scss\n logo: img/logo.png\n footer: '**[Cédric Scherer](https://cedricscherer.com)** // posit::conf(2023)'\n transition: fade\n progress: true\n multiplex: false\n preview-links: true\n scrollable: false\n hide-inactive-cursor: true\n highlight-style: printing\n chalkboard:\n theme: whiteboard\n boardmarker-width: 4\n buttons: true\n pause: true\neditor: source\nknitr:\n opts_chunk:\n dev: \"ragg_png\"\n retina: 3\n dpi: 200\nexecute:\n freeze: auto\n cache: true\n echo: true\n fig-width: 5\n fig-height: 6\n---\n\n\n\n# Welcome





{background-image=\"img/logo-welcome.png\" background-position=\"center\" background-size=\"40%\"}\n\n\n\n## {#hello-blank data-menu-title=\"Hello\" background-image=\"img/intro/hello-blank.png\" background-position=\"center\" background-size=\"62%\"}\n\n\n\n## {#hello-team data-menu-title=\"Hello Team\" background-image=\"img/intro/hello-team.png\" background-position=\"center\" background-size=\"62%\"}\n\n\n\n## {#teaching-team data-menu-title=\"Teaching Team\" background-image=\"img/intro/team-hex-grid.png\" background-position=\"center\" background-size=\"105%\"}\n\n\n\n## {#hello-cedric data-menu-title=\"Hello Cédric\" background-image=\"img/intro/hello-cedric.png\" background-position=\"center\" background-size=\"62%\"}\n\n\n\n## {#cedric-avatars data-menu-title=\"Cédric Avatars\" background-image=\"img/intro/avatars-logo.png\" background-position=\"center\" background-size=\"80%\"}\n\n\n\n## {#cedric-dataviz-science data-menu-title=\"Cédric Projects Science\" background-image=\"img/intro/projects-science.png\" background-position=\"center\" background-size=\"82%\" background-color=\"#ABABAB\"}\n\n::: footer\n:::\n\n\n\n## {#cedric-dataviz-clients data-menu-title=\"Cédric Projects Clients\" background-image=\"img/intro/projects-clients.png\" background-position=\"center\" background-size=\"77%\" background-color=\"#ABABAB\"}\n\n::: footer\n:::\n\n\n\n## {#cedric-dataviz-personal data-menu-title=\"Cédric Projects Personal\"background-image=\"img/intro/projects-personal.png\" background-position=\"center\" background-size=\"85%\" background-color=\"#ABABAB\"}\n\n::: footer\n:::\n\n\n\n## {#cedric-blog data-menu-title=\"Cédric Blog \"background-image=\"img/intro/blog.png\" background-position=\"center\" background-size=\"56%\"}\n\n::: footer\n:::\n\n\n\n## {#cedric-ggplot-tutorial data-menu-title=\"Cédric Blog Tutorial\" background-image=\"img/intro/blog-tutorial.png\" background-position=\"center\" background-size=\"56%\"}\n\n::: footer\n:::\n\n\n\n## {#cedric-ggplot-tutorial-overview data-menu-title=\"Cédric Blog Tutorial Overview\"}\n\n![[cedricscherer.com/2019/08/05/a-ggplot2-tutorial-for-beautiful-plotting-in-r](https://www.cedricscherer.com/2019/08/05/a-ggplot2-tutorial-for-beautiful-plotting-in-r/)](img/intro/ggplot-tutorial-overview.png){fig-align=\"center\" fig-alt=\"Overview of some exemplary plots included in my ggplot2 tutorial.\"}\n\n\n\n## {#cedric-ggplot-evol data-menu-title=\"Cédric Blog ggplot Evolution\" background-image=\"img/intro/blog-evol.png\" background-position=\"center\" background-size=\"56%\"}\n\n::: footer\n:::\n\n\n\n## {#cedric-ggplot-evol-gif data-menu-title=\"Cédric Blog ggplot Evolution GIF\"}\n\n![[cedricscherer.com/2019/05/17/the-evolution-of-a-ggplot](https://www.cedricscherer.com/2019/05/17/the-evolution-of-a-ggplot)](img/intro/evol-ggplot-1.gif){fig-align=\"center\" fig-alt=\"Animated evolution of a jitter-pop plot showing student-teacher ratios per continent. The animation shows iteration through different geometries, theme adjustments, combinations of layers, and additional annotations such as text labels with arrows and an inset tile grid map with colors by region mathing those of the main graphic.\"}\n\n\n\n## {#cedric-rstudio-conf data-menu-title=\"Cédric Blog rstudio::conf\" background-image=\"img/intro/blog-rstudioconf.png\" background-position=\"center\" background-size=\"56%\"}\n\n::: footer\n:::\n\n\n\n## {#hello-thomas data-menu-title=\"Hello Thomas\" background-image=\"img/intro/hello-thomas.png\" background-position=\"center\" background-size=\"62%\"}\n\n\n\n## {#thomas-artwork data-menu-title=\"Thomas Artwork\"}\n\n![Artwork by Thomas Linn Pedersen](img/intro/thomas_artwork.png)\n\n\n\n## {#hello-jasmin data-menu-title=\"Hello Jasmin\" background-image=\"img/intro/hello-jasmin.png\" background-position=\"center\" background-size=\"62%\"}\n\n\n\n## {#jasmin-dataviz data-menu-title=\"Jasmin Data Visualization\"}\n\n![Graphic by Jasmin Sarah König](img/intro/jasmin-overview.png)\n\n\n\n## {#jasmin-dataviz-observable data-menu-title=\"Jasmin Data Visualization\"}\n\n\n\n\n\n## {#hello-jonathan data-menu-title=\"Hello Jonathan\" background-image=\"img/intro/hello-jonathan.png\" background-position=\"center\" background-size=\"62%\"}\n\n\n\n## {#jonathan-photography-japan data-menu-title=\"Jonathan Photography\"}\n\n![Photo by Jonathan Keane](img/intro/jonathan-japan.jpg)\n\n\n\n## {#hello-course data-menu-title=\"Hello Course\" background-image=\"img/intro/hello-course.png\" background-position=\"center\" background-size=\"62%\"}\n\n\n\n## Conversation Starters\n\n- What's your name?\n- Where do you feel home?\n- When did you use R for the first time?\n- What's your favorite animal / plant / color / typeface?\n- Where did you spend your summer?\n- Whom would you like to meet during the posit::conf?\n- Which R package are you looking forward to try?\n- What are things you want to learn about ggplot2?\n\n\n\n## Announcements\n\n
\n\n#### WiFi\n- Username: Posit Conf 2023\n- Password: conf2023

\n\n#### Course Materials\n- Webpage: [posit-conf-2023.github.io/dataviz-ggplot2](https://posit-conf-2023.github.io/dataviz-ggplot2/)\n- Posit Cloud: [posit.cloud/spaces/397253](https://posit.cloud/spaces/397253/content/all?sort=name_asc)\n\n\n\n## {#course-webpage data-menu-title=\"Course Webpage\" .center}\n\n
\nposit-conf-2023.github.io/
dataviz-ggplot2
\n
\n\n\n\n## {#posit-cloud data-menu-title=\"Posit Cloud\" .center}\n\n
\nposit.cloud/spaces/397253\n
\n\n\n\n## Announcements\n\n::: incremental\n- **Gender-neutral bathrooms** are located among the Grand Suite Bathrooms.\n- The two **meditation/prayer rooms** (Grand Suite 2A and Grand Suite 2B) are open Sunday-Tuesday 7:30 am-7:00 pm and Wednesday 8:00 am-6:00 pm\n- The **lactation room** is located in Grand Suite 1 and open Sunday-Tuesday 7:30 am-7:00 pm and Wednesday 8:00 am-6:00 pm.\n- Participants who do not wish to be photographed have **red lanyards**; please note everyone's lanyard colors before taking a photo and respect their choices.\n- The **Code of Conduct** and **COVID** policies can be found at [posit.co/code-of-conduct](https://posit.co/code-of-conduct). Please review them carefully. You can report Code of Conduct violations in person, by email, or by phone. Please see the policy linked above for contact information.\n:::\n\n\n\n## Communication Strategy\n\n
\n\n::: incremental\n- Green sticky note --- I am done with the exercise

\n- Pink sticky note --- I need help or support

\n- You can ask questions / comment at any time during the course.\n- Please avoid questions during the breaks to give us a chance to recover.\n- We will be using Discord as our main digital communication method.\n- Team up with your neighbors for exercises --- and lunch!\n- We will collect feedback twice during the day (more later).\n:::\n\n\n\n# Preparation\n\n\n\n## Required Packages\n\n\n::: {.cell hash='00-welcome_cache/revealjs/packages-install-tidyverse_88585319b84dbef92a58fccba66b637e'}\n\n```{.r .cell-code}\ninstall.packages(\"ggplot2\")\ninstall.packages(\"dplyr\")\ninstall.packages(\"readr\")\ninstall.packages(\"forcats\")\ninstall.packages(\"stringr\")\ninstall.packages(\"lubridate\")\ninstall.packages(\"purrr\")\n```\n:::\n\n\n::: fragment\n\n::: {.cell hash='00-welcome_cache/revealjs/packages-install-other_057c75c7a29cffb13735c8f36543a25c'}\n\n```{.r .cell-code}\ninstall.packages(\"here\")\ninstall.packages(\"scales\")\ninstall.packages(\"ragg\")\ninstall.packages(\"systemfonts\")\ninstall.packages(\"rcartocolor\")\ninstall.packages(\"scico\")\ninstall.packages(\"prismatic\")\ninstall.packages(\"patchwork\")\ninstall.packages(\"ggtext\")\ninstall.packages(\"ggforce\")\ninstall.packages(\"ggrepel\")\ninstall.packages(\"colorspace\")\ninstall.packages(\"gapminder\")\nremotes::install_github(\"clauswilke/colorblindr\")\n```\n:::\n\n:::\n\n\n\n## Optional Packages\n\n\n::: {.cell hash='00-welcome_cache/revealjs/packages-install-optional_6f3a9d7feebf705a88edbc23d7bb3537'}\n\n```{.r .cell-code}\ninstall.packages(\"camcorder\")\ninstall.packages(\"viridis\")\ninstall.packages(\"RColorBrewer\")\ninstall.packages(\"MetBrewer\")\ninstall.packages(\"ggthemes\")\ninstall.packages(\"ggsci\")\ninstall.packages(\"hrbrthemes\")\ninstall.packages(\"tvthemes\")\ninstall.packages(\"ggannotate\")\nremotes::install_github(\"AllanCameron/geomtextpath\")\n```\n:::\n\n\n\n\n## Required Typefaces\n\nDownload and install the following typefaces:\n\n* Asap: [fonts.google.com/specimen/Asap](https://fonts.google.com/specimen/Asap)\n* Spline Sans: [fonts.google.com/specimen/Spline+Sans](https://fonts.google.com/specimen/Spline+Sans)\n* Spline Sans Mono: [fonts.google.com/specimen/Spline+Sans+Mono](https://fonts.google.com/specimen/Spline+Sans+Mono)\n* Hepta Slab: [fonts.google.com/specimen/Hepta+Slab](https://fonts.google.com/specimen/Hepta+Slab)\n\n. . . \n\nAll files are also available via
[cedricscherer.com/files/positconf-dataviz-ggplot2-fonts.zip](https://cedricscherer.com/files/positconf-dataviz-ggplot2-fonts.zip)\n\n. . . \n\n→ Install the font files. \n\n. . . \n \n→ Restart Rstudio.\n\n\n\n# Let's get started!\n", "supporting": [], "filters": [ "rmarkdown/pagebreak.lua" diff --git a/_freeze/materials/01-fundamentals/execute-results/html.json b/_freeze/materials/01-fundamentals/execute-results/html.json index af02a85..d1300f8 100644 --- a/_freeze/materials/01-fundamentals/execute-results/html.json +++ b/_freeze/materials/01-fundamentals/execute-results/html.json @@ -1,7 +1,7 @@ { - "hash": "a7040cf60680b842b8f94cd9aa262af8", + "hash": "e6e1ffe660743a0103dd963a55d94927", "result": { - "markdown": "---\ntitle: \"Engaging and Beautiful Data Visualizations with ggplot2\"\nsubtitle: \"Fundamentals & Workflows\"\nauthor: \"Cédric Scherer // posit::conf // September 2023\"\nformat:\n revealjs:\n theme: slides.scss\n logo: img/logo.png\n footer: '[Cédric Scherer](https://cedricscherer.com) // posit::conf(2023)'\n transition: fade\n progress: true\n multiplex: false\n preview-links: true\n scrollable: false\n hide-inactive-cursor: true\n highlight-style: printing\n chalkboard:\n theme: whiteboard\n boardmarker-width: 4\n buttons: true\n pause: true\neditor: source\nknitr:\n opts_chunk:\n dev: \"ragg_png\"\n retina: 3\n dpi: 200\nexecute:\n freeze: auto\n cache: true\n echo: true\n fig-width: 10.1\n fig-height: 6.3\n fig-align: center\n---\n\n\n\n\n\n# {ggplot2}\n\n\n##\n\n::: footer\n[{ggplot2} package description](https://ggplot2.tidyverse.org/)\n:::\n\n![](img/intro/ggplot2.png){fig-align=\"center\" fig-alt=\"The ggplot2 hex logo.\"}\n\n
\n\n{ggplot2} is a system for declaratively creating graphics,
based on \"The Grammar of Graphics\" (Wilkinson 2005).
\n\n::: fragment\n[You provide the data, tell {ggplot2} how to]{style=\"font-size:24pt;\"} [map variables to aesthetics,]{.circle-highlight}
what graphical primitives to use, and it takes care of the details.\n:::\n\n## Advantages of {ggplot2}\n\n::: incremental\n- consistent underlying \"grammar of graphics\" (Wilkinson 2005)\\\n- very flexible, layered plot specification\\\n- theme system for polishing plot appearance\\\n- lots of additional functionality thanks to extensions\\\n- active and helpful community\n:::\n\n\n## The Components of a ggplot\n\n
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ComponentFunctionExplanation
Dataggplot(data)         *The raw data that you want to visualize.*
Aesthetics          aes()*The mapping between variables and visual properties*
Geometriesgeom_*()*The geometric shapes representing the data.*
\n\n--------------------------------------------------------------------------------\n\n![ggplot2 examples featured on [ggplot2.tidyverse.org](https://ggplot2.tidyverse.org/)](img/basic-ggplots.png){fig-align=\"center\" fig-alt=\"A collection of the versatility of ggplot2 to create basic graphs. All of them use only data, aesthetics, and layers with the defaults of ggplot2.\"}\n\n\n## The Components of a ggplot\n\n\n
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ComponentFunctionExplanation
Dataggplot(data)         *The raw data that you want to visualize.*
Aesthetics          aes()*The mapping between variables and visual properties.*
Geometriesgeom_*()*The geometric shapes representing the data.*
Statisticsstat_*()*The statistical transformations applied to the data.*
Scalesscale_*()*The representation of mapped aesthetic attributes.*
Coordinate Systemcoord_*()*The transformation to map data coordinates into the plot plane.*
Facetsfacet_*()*The arrangement of the data into a grid of small multiples.*
Visual Themestheme() | theme_*()*The overall visual defaults of non-data elements of the graphic.*
\n\n--------------------------------------------------------------------------------\n\n![Illustration by [Allison Horst](https://github.com/allisonhorst/stats-illustrations)](img/ah-ggplot2-exploratory.png){fig-align=\"center\" fig-alt=\"Allison Horsts monster illustration of explorative plotting with ggplot2.\"}\n\n--------------------------------------------------------------------------------\n\n![Illustration by [Allison Horst](https://github.com/allisonhorst/stats-illustrations)](img/ah-ggplot2-masterpiece.png){fig-align=\"center\" fig-alt=\"Allison Horsts monster illustration of building data masterpiece ith ggplot2 featuring a little Picasso monster :)\"}\n\n\n# The {ggplot2} Showcase\n\n--------------------------------------------------------------------------------\n\n
\n\n![Collection of Graphics from the [BBC R Cookbook](https://bbc.github.io/rcookbook/)](img/showcase/bbc-gallery.png){fig-align=\"center\" fig-alt=\"A multi-plot panel of various data visualizations created by the BBC teams.\"}\n\n--------------------------------------------------------------------------------\n\n
\n\n![Collection of Graphics from the [BBC R Cookbook](https://bbc.github.io/rcookbook/)](img/showcase/bbc-gallery-quote.png){fig-align=\"center\" fig-alt=\"A multi-plot panel of various data visualizations created by the BBC teams.\"}\n\n--------------------------------------------------------------------------------\n\n![[\"Bill Dimensions of Brush-Tailed Penguins\"](https://github.com/Z3tt/TidyTuesday/tree/main/plots/2020_31)](img/showcase/palmer-penguins.png){fig-align=\"center\" fig-size=\"80%\" fig-alt=\"Distribution of coffee bean ratings by the Coffee Quality Institute for countries with 25 or more reviews (up to 2018). Distributions are shown as dot plots and multiple interval stripes.\"}\n\n--------------------------------------------------------------------------------\n\n![[\"Netflix Content Explosion\"](https://twitter.com/tanya_shapiro/status/1610419176333627393) by Tanya Shapiro](img/showcase/netflix-originals-tanya-shapiro.jpeg){fig-align=\"center\" fig-size=\"50%\" fig-alt=\"rea graph of number of Netflix original series over time, annotated with images and labels.\"}\n\n--------------------------------------------------------------------------------\n\n![My reinterpreted [The Economist graphic](https://www.economist.com/graphic-detail/2019/09/28/why-are-some-languages-spoken-faster-than-others)](img/showcase/speech-speed.png){fig-align=\"center\" fig-alt=\"The raincloud chart showing the distributions of normalized speech rates (dark pink) and information rates (dark lime green) across language families.\"}\n\n--------------------------------------------------------------------------------\n\n![[\"Not My Cup of Coffee\"](https://www.behance.net/gallery/100638417/Not-My-Cup-of-Coffee)](img/showcase/coffee-ratings.png){fig-align=\"center\" fig-alt=\"The raincloud chart showing the distributions of normalized speech rates (dark pink) and information rates (dark lime green) across language families.\"}\n\n--------------------------------------------------------------------------------\n\n![[\"Food Carbon Footprint Index 2018\"](https://github.com/Z3tt/TidyTuesday/tree/main/plots/2020_08)](img/showcase/20200307_TT_2020_08_CarbonFoodprint_alt.png){fig-align=\"center\" fig-alt=\"Two circular hierarchical bar plots showing the carbon footprint 2018 for food consumption and CO2 per continent and country.\"}\n\n--------------------------------------------------------------------------------\n\n![[\"Popular Programming Languages in CRAN Packages\"](https://twitter.com/spren9er/status/1195826547724374018) by Torsten Sprenger](img/showcase/cran-packages-torsten-sprenger.png){fig-align=\"center\" fig-alt=\"A circular tree showing the programing languages used in CRAN packages, with nodes being grouped by languages and package names, sized by number of lines.\"}\n\n--------------------------------------------------------------------------------\n\n![[\"Appearance of X-Men Characters\"](https://www.behance.net/gallery/100640345/Appearance-of-Popular-X-Men-Characters)](img/showcase/xmen-comics.png){fig-align=\"center\" fig-size=\"45%\" fig-alt=\"Streamgraphs showing the appearance of the most common X-Men characters (Wovlerine, Magneto, Nightcrawler, Storm & Gambit) during the so-called Claremont Run. Chris Claremont is a famous American comic book writer who was in charge of the Uncanny X-Men comic book series from 1975–1991. During that time he developed complex literary themes and strong female characters into superhero comics, and turning the X-Men into one of Marvel's most popular series.\"}\n\n--------------------------------------------------------------------------------\n\n![[\"Artists in the US\"](https://twitter.com/leeolney3/status/1574656040599265280) by Lee Olney](img/showcase/artists-usa-lee-olney.png){fig-align=\"center\" fig-alt=\"A facet of barcodes showing location quotients from artists in the US by type and race.\"}\n\n--------------------------------------------------------------------------------\n\n
\n\n![My Contribution to the [SWDchallenge \"Small Multiples\"](https://www.storytellingwithdata.com/blog/2020/1/6/swdchallenge-small-multiples)](img/showcase/SWD_2020_01_SmallMultiples_grey.png){fig-align=\"center\" fig-alt=\"A facet of shots and goals of the Bundesliga football clubs in the season 2019/20.\"}\n\n--------------------------------------------------------------------------------\n\n![[\"European Energy Generation\"](github.com/jack-davison/tidytuesday) by Jack Davison](img/showcase/jack_davison.png){fig-align=\"center\" fig-alt=\"A gridded map of Europe showing horizontal stacked bars of energy production per country over time (each bar represents share among one year from 2016 to 2018).\"}\n\n--------------------------------------------------------------------------------\n\n![[Moon Charts as a Tile Grid Map](https://github.com/z3tt/grid-btw-wahlkreise-constituencies) showing the 2nd Vote Results from the German Election 2021](img/showcase/btw21_tile_grid_moon_second_de.png){fig-align=\"center\" fig-alt=\"A grid map using moon charts for all 297 electoral districts which show the share of the wnning party in second votesc during the German election in 2021.\"}\n\n--------------------------------------------------------------------------------\n\n![Our Winning Contribution to the [BES MoveMap Contest](https://besmovesig.wordpress.com/2021/02/25/mapping-movements-the-art-and-the-science-we-have-the-winners/)](img/showcase/20210131_BES_CheetahMap_rcarto.png){fig-align=\"center\" fig-alt=\"A spatial map of cheetah movement and their hotspot behaviour in Namibia.\"}\n\n--------------------------------------------------------------------------------\n\n![[Bivariate Choropleth x Hillshade Map](timogrossenbacher.ch/2019/04/bivariate-maps-with-ggplot2-and-sf) by Timo Gossenbacher](img/showcase/swiss_map.png){fig-align=\"center\" fig-alt=\"A spatial map of income and inequality shown with a bivariate color palette; alpine regions have a hillshading effect.\"}\n\n--------------------------------------------------------------------------------\n\n![Pixel Art by [Georgios Karamanis](https://karaman.is/)](img/showcase/bob-ross-pixel-art-georgios.png){fig-align=\"center\" fig-alt=\"A set of small multiples using pixelated encodings of certain elements in Bob Ross' paintings.\"}\n\n--------------------------------------------------------------------------------\n\n![Generative Art by [Thomas Lin Pedersen](https://www.data-imaginist.com/art)](img/showcase/genart.png){fig-align=\"center\" fig-alt=\"Two artworks by Thomas Pedersen, completely generated in R with ggplot2 (and pure magic).\"}\n\n\n# A Walk-Through Example\n\n\n## The Data Set\n\nBike sharing counts in London, UK, powered by [TfL Open Data](https://tfl.gov.uk/modes/cycling/santander-cycles)\n\n::: incremental\n- covers the years 2015 and 2016\n- incl. weather data acquired from [freemeteo.com](https://freemeteo.com)\n- prepared by Hristo Mavrodiev for [Kaggle](https://www.kaggle.com/hmavrodiev/london-bike-sharing-dataset)\n- further modification by myself\n:::\n\n\n## The Data Set\n\n\n::: {.cell}\n\n```{.r .cell-code}\nlibrary(readr)\nlibrary(ggplot2)\n\nbikes <-\n read_csv(\n here::here(\"data\", \"london-bikes.csv\"),\n col_types = \"Dcfffilllddddc\"\n )\n```\n:::\n\n\n\n## The Data Set\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/view-data_08b7b3be3eee0339e21d78d3715ee833'}\n\n```{.r .cell-code}\nbikes\n```\n\n::: {.cell-output .cell-output-stdout}\n```{.hscroll}\n# A tibble: 1,454 × 14\n date day_night year month season count is_workday is_weekend is_holiday temp temp_feel humidity wind_speed weather_type \n \n 1 2015-01-04 day 2015 1 3 6830 FALSE TRUE FALSE 2.17 -0.75 95.2 10.4 broken clouds \n 2 2015-01-04 night 2015 1 3 2404 FALSE TRUE FALSE 2.79 2.04 93.4 4.58 clear \n 3 2015-01-05 day 2015 1 3 14763 TRUE FALSE FALSE 8.96 7.71 81.1 8.67 broken clouds \n 4 2015-01-05 night 2015 1 3 5609 TRUE FALSE FALSE 7.12 5.71 79.5 9.04 cloudy \n 5 2015-01-06 day 2015 1 3 14501 TRUE FALSE FALSE 9 6.46 80.2 19.2 broken clouds \n 6 2015-01-06 night 2015 1 3 6112 TRUE FALSE FALSE 6.71 4.21 77.6 12.8 clear \n 7 2015-01-07 day 2015 1 3 16358 TRUE FALSE FALSE 8.17 5.08 75.2 21.2 scattered clouds\n 8 2015-01-07 night 2015 1 3 4706 TRUE FALSE FALSE 6.68 3.86 81.3 18.1 clear \n 9 2015-01-08 day 2015 1 3 9971 TRUE FALSE FALSE 9.46 7.12 79.4 18.8 scattered clouds\n10 2015-01-08 night 2015 1 3 5630 TRUE FALSE FALSE 10.0 8.46 79.2 22.2 clear \n# ℹ 1,444 more rows\n```\n:::\n:::\n\n\n\n\n## The Data Set\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/data-table_78b1267b2d8c1d92c639963f8ed64a4f'}\n::: {.cell-output-display}\n`````{=html}\n\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n
Variable Description Class
date Date encoded as `YYYY-MM-DD` date
day_night `day` (6:00am–5:59pm) or `night` (6:00pm–5:59am) character
year `2015` or `2016` factor
month `1` (January) to `12` (December) factor
season `0` (spring), `1` (summer), `2` (autumn), or `3` (winter) factor
count Sum of reported bikes rented integer
is_workday `TRUE` being Monday to Friday and no bank holiday logical
is_weekend `TRUE` being Saturday or Sunday logical
is_holiday `TRUE` being a bank holiday in the UK logical
temp Average air temperature (°C) double
temp_feel Average feels like temperature (°C) double
humidity Average air humidity (%) double
wind_speed Average wind speed (km/h) double
weather_type Most common weather type character
\n\n`````\n:::\n:::\n\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-full-1.png){width=2020}\n:::\n:::\n\n\n\n## A Default ggplot\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-0_54e69338bfad3e48c3cfc463ef22e77b'}\n\n```{.r .cell-code}\n# scatter plot of plot bikes$count versus bikes$temp_feel\nggplot(data = bikes) + # initial call + data\n aes(x = temp_feel, y = count) + # aesthetics\n geom_point() # geometric layer\n```\n:::\n\n\n\n## A Default ggplot\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-1_0e54cdfa411c3d3b234fefff974ba242'}\n\n```{.r .cell-code}\n# scatter plot of plot bikes$count versus bikes$temp_feel\nggplot(bikes, aes(x = temp_feel, y = count)) +\n geom_point()\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-1_ef3f65b32793ec6d371133f6f7038b29'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-1-1.png){width=2020}\n:::\n:::\n\n\n\n## Combine Layers\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-2_f184aaeaa11b8515b6b82b001609e579'}\n\n```{.r .cell-code code-line-numbers=\"3,4\"}\nggplot(bikes, aes(x = temp_feel, y = count)) +\n geom_point() + \n # add a GAM smoothing\n stat_smooth() # also: geom_smooth()\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-2_91b3b1905cf1268438b7f56b0d731a6f'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-2-1.png){width=2020}\n:::\n:::\n\n\n\n## Mapping Aesthetics\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-3_293593d0c1a51009ba5eb8a59f7728ea'}\n\n```{.r .cell-code code-line-numbers=\"1\"}\nggplot(bikes, aes(x = temp_feel, y = count, color = day_night)) + \n geom_point() + \n stat_smooth()\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-3_88f47cdcb755f82a106c3104e6f61c8a'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-3-1.png){width=2020}\n:::\n:::\n\n\n\n## Mapping Aesthetics\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-4_bc36b6670c28f6d74336be8eea1dc2f0'}\n\n```{.r .cell-code code-line-numbers=\"2,3|4,5\"}\nggplot(bikes, aes(x = temp_feel, y = count)) + \n # color mapping only applied to points\n geom_point(aes(color = day_night)) + \n # invisible grouping to create two trend lines\n stat_smooth(aes(group = day_night))\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-4_78c4aadf451b272dde9b6f8b9f90d1dd'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-4-1.png){width=2020}\n:::\n:::\n\n\n\n## Setting Properties\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-5_34ed96698fc797de07f96bd938e6c867'}\n\n```{.r .cell-code code-line-numbers=\"2,4,5|7,9,10\"}\nggplot(bikes, aes(x = temp_feel, y = count)) + \n geom_point(\n aes(color = day_night), \n # setting larger points with 50% opacity\n alpha = .5, size = 1.5\n ) + \n stat_smooth(\n aes(group = day_night), \n # use linear fitting + draw black smoothing lines\n method = \"lm\", color = \"black\"\n )\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-5_8fb70a2442398fd47b6e93b823111860'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-5-1.png){width=2020}\n:::\n:::\n\n\n\n## Split into Facets\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-6_e529afc4ea35d449fb64c893507c694f'}\n\n```{.r .cell-code code-line-numbers=\"9,10|10|6,7,8\"}\nggplot(bikes, aes(x = temp_feel, y = count)) + \n geom_point(\n aes(color = day_night), \n alpha = .5, size = 1.5\n ) + \n stat_smooth(\n method = \"lm\", color = \"black\"\n ) +\n # small multiples\n facet_wrap(facets = vars(day_night)) # also: ~ day_night\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-6_27afd61089e430c690a7804868b50766'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-6-1.png){width=2020}\n:::\n:::\n\n\n\n## Split into Facets\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-7_95545d6c6b8eb53f8fb668d6bf3087d3'}\n\n```{.r .cell-code code-line-numbers=\"9,10,11,12|3\"}\nggplot(bikes, aes(x = temp_feel, y = count)) + \n geom_point(\n aes(color = season), \n alpha = .5, size = 1.5\n ) + \n stat_smooth(\n method = \"lm\", color = \"black\"\n ) +\n # small multiples\n facet_grid(\n rows = vars(day_night), cols = vars(year) # also: day_night ~ year\n )\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-7_69b48889365752e9cd23674008e0f2a6'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-7-1.png){width=2020}\n:::\n:::\n\n\n\n## Free Facets Axes\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-8_fd9eff017a9fba3dbc48953c23b59afb'}\n\n```{.r .cell-code code-line-numbers=\"11,12|13,14\"}\nggplot(bikes, aes(x = temp_feel, y = count)) + \n geom_point(\n aes(color = season), \n alpha = .5, size = 1.5\n ) + \n stat_smooth(\n method = \"lm\", color = \"black\"\n ) +\n facet_grid(\n day_night ~ year, \n # free y axis range\n scales = \"free_y\", \n # scale heights proportionally\n space = \"free_y\"\n )\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-8_4245878b8777d05fe555922e5a7de0f1'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-8-1.png){width=2020}\n:::\n:::\n\n\n\n## Store ggplot\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"1\"}\ng1 <- \n ggplot(bikes, aes(x = temp_feel, y = count)) + \n geom_point(\n aes(color = season), \n alpha = .5, size = 1.5\n ) + \n stat_smooth(\n method = \"lm\", color = \"black\"\n ) +\n facet_grid(\n day_night ~ year, \n scales = \"free_y\", \n space = \"free_y\"\n )\n```\n:::\n\n\n\n## Change the Axis Scaling\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-9a_71ca58800723ac3067ba987f2a91ea75'}\n\n```{.r .cell-code code-line-numbers=\"1|2,3,8|4,5|6,7\"}\ng1 +\n # x axis\n scale_x_continuous(\n # add °C symbol\n labels = function(x) paste0(x, \"°C\"), \n # use 5°C spacing\n breaks = -1:6*5 # also: seq(-5, 30, by = 5)\n )\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-9a_94c213b3e3298aee7aa24c2a76b7b869'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-9a-1.png){width=2020}\n:::\n:::\n\n\n\n## Change the Axis Scaling\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"9,10,15|11,12|13,14|1\"}\ng2 <- g1 +\n # x axis\n scale_x_continuous(\n # add °C symbol\n labels = function(x) paste0(x, \"°C\"), \n # use 5°C spacing\n breaks = -1:6*5 # also: seq(-5, 30, by = 5)\n ) +\n # y axis\n scale_y_continuous(\n # add a thousand separator\n labels = scales::label_comma(), \n # use consistent spacing across rows\n breaks = 0:5*10000\n )\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-9b_a1f16b4bb9b70474a341331ddfd6cf88'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-9b-1.png){width=2020}\n:::\n:::\n\n\n\n## Use a Custom Color Palette\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-10a_a2b62e2d5909c2c1666aa1d893b05151'}\n\n```{.r .cell-code code-line-numbers=\"2,3,4,5\"}\ng2 +\n # use a custom color palette for season colors\n scale_color_manual(\n values = c(\"#6681FE\", \"#1EC98D\", \"#F7B01B\", \"#A26E7C\")\n )\n```\n:::\n\n\n\n## Use a Custom Color Palette\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"1,2,3,4,5,6,7|10,11,12\"}\n# use a named vector for explicit matching\ncolors <- c(\n `0` = \"#1EC98D\",\n `1` = \"#F7B01B\",\n `2` = \"#A26E7C\",\n `3` = \"#6681FE\"\n)\n\ng2 +\n scale_color_manual(\n values = colors\n )\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-10_ce693f946c70482edbf1e765ddb060e1'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-10-1.png){width=2020}\n:::\n:::\n\n\n\n## Adjust Labels and Titles\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-11_2d7e0b13bceb12c6758e86b13d745705'}\n\n```{.r .cell-code code-line-numbers=\"11,12\"}\n# use a named vector for explicit matching\ncolors <- c(\n `0` = \"#1EC98D\",\n `1` = \"#F7B01B\",\n `2` = \"#A26E7C\",\n `3` = \"#6681FE\"\n)\n\ng2 +\n scale_color_manual(\n values = colors,\n # overwrite legend keys\n labels = c(\"Winter\", \"Spring\", \"Summer\", \"Autumn\")\n )\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-11_9545eeba757f1a80bcb64ae741df7cec'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-11-1.png){width=2020}\n:::\n:::\n\n\n\n## Adjust Labels and Titles\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"6,12|7,8|9,10,11\"}\ng3 <- g2 +\n scale_color_manual(\n values = colors,\n labels = c(\"Winter\", \"Spring\", \"Summer\", \"Autumn\")\n ) +\n labs(\n # overwrite axis and legend titles\n x = \"Average feels-like temperature\", y = NULL, color = NULL,\n # add plot title and caption\n title = \"Trends of Reported Bike Rents versus Feels-Like Temperature in London\",\n caption = \"Data: TfL (Transport for London), Jan 2015–Dec 2016\"\n )\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-12_fa8618f2346558525d91984fc7c63410'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-12-1.png){width=2020}\n:::\n:::\n\n\n\n## Apply a Complete Theme\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-13_8ce6babacc4b7bf8b34abbd3a8f15fc1'}\n\n```{.r .cell-code code-line-numbers=\"2,3,4,5\"}\ng3 +\n # add theme with a custom font + larger element sizes\n theme_light(\n base_size = 15, base_family = \"Spline Sans\"\n )\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-13_7b4505b1ca4b548fdd479f0a368e2306'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-13-1.png){width=2020}\n:::\n:::\n\n\n\n## Apply a Complete Theme\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"3,4,20|5,6,7|8,9,10,11,12,13,14|15,16|17,18|19\"}\ng4 <- g3 +\n theme_light(base_size = 15, base_family = \"Spline Sans\") +\n # theme adjustments\n theme(\n plot.title.position = \"plot\", # left-align title \n plot.caption.position = \"plot\", # right-align caption\n legend.position = \"top\", # place legend above plot\n plot.title = element_text(face = \"bold\", size = rel(1.4)), # larger, bold title\n axis.text = element_text(family = \"Spline Sans Mono\"), # monospaced font for axes\n axis.title.x = element_text( # left-aligned, grey x axis label\n hjust = 0, color = \"grey20\", margin = margin(t = 12)\n ),\n legend.text = element_text(size = rel(1)), # larger legend labels\n strip.text = element_text(face = \"bold\", size = rel(1.15)), # larger, bold facet labels\n panel.grid.major.x = element_blank(), # no vertical major lines\n panel.grid.minor = element_blank(), # no minor grid lines\n panel.spacing.x = unit(20, \"pt\"), # increase white space between panels\n panel.spacing.y = unit(10, \"pt\"), # increase white space between panels\n plot.margin = margin(rep(15, 4)) # adjust white space around plot\n )\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-14_579d1a1dfaf0480650568783386a63ce'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-14-1.png){width=2020}\n:::\n:::\n\n\n\n## Adjust Legend\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-15_d3d277f36ff972c767f850750799d004'}\n\n```{.r .cell-code code-line-numbers=\"2,3,4,5|4\"}\ng4 +\n # adjust symbol size in legend\n guides(\n color = guide_legend(override.aes = list(size = 4))\n )\n```\n:::\n\n\n\n## Adjust Legend\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-15b_6458e18188c6b9f6ebd8138a1213bb5f'}\n\n```{.r .cell-code code-line-numbers=\"2,5,6,7|5,6\"}\ng4 +\n scale_color_manual(\n values = colors,\n labels = c(\"Winter\", \"Spring\", \"Summer\", \"Autumn\"),\n # adjust symbol size in legend size\n guide = guide_legend(override.aes = list(size = 4))\n )\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-15_c1f1277ad82b6cd039e09702caad009f'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-15-1.png){width=2020}\n:::\n:::\n\n\n\n--------------------------------------------------------------------------------\n\n## Full Code\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-full_8c95ed35a394e76e96f956adb5272781'}\n\n```{.r .cell-code}\n# create named color vector\ncolors <- c(\n `0` = \"#1EC98D\",\n `1` = \"#F7B01B\",\n `2` = \"#A26E7C\",\n `3` = \"#6681FE\"\n)\n\n# scatter plot of plot bikes$count versus bikes$temp_feel\nggplot(bikes, aes(x = temp_feel, y = count)) + \n # add points\n geom_point(\n # color mapping only applied to points\n aes(color = season), \n # setting larger points with 50% opacity\n alpha = .5, size = 1.5\n ) + \n # add a smoothing\n stat_smooth( # also: geom_smooth()\n # use linear fitting + draw black smoothing lines\n method = \"lm\", color = \"black\"\n ) +\n # small multiples\n facet_grid(\n day_night ~ year, # also: vars(day_night), vars(year)\n # free y axis range\n scales = \"free_y\", \n # scale heights proportionally \n space = \"free_y\"\n ) +\n # x axis\n scale_x_continuous(\n # add °C symbol\n labels = function(x) paste0(x, \"°C\"), \n # use 5°C spacing\n breaks = -1:6*5 # also: seq(-5, 30, by = 5)\n ) +\n # y axis\n scale_y_continuous(\n # add a thousand separator\n labels = scales::label_comma(), \n # use consistent spacing across rows\n breaks = 0:5*10000\n ) +\n # colors\n scale_color_manual(\n # use a custom color palette\n values = colors,\n # overwrite legend keys\n labels = c(\"Winter\", \"Spring\", \"Summer\", \"Autumn\"),\n # adjust symbol size in legend size\n guide = guide_legend(override.aes = list(size = 4))\n ) +\n labs(\n # overwrite axis and legend titles\n x = \"Average feels-like temperature\", y = NULL, color = NULL,\n # add plot title and caption\n title = \"Trends of Reported Bike Rents versus Feels-Like Temperature in London\",\n caption = \"Data: TfL (Transport for London), Jan 2015–Dec 2016\"\n ) +\n # add theme with a custom font + larger element sizes\n theme_light(\n base_size = 15, base_family = \"Spline Sans\"\n ) +\n # theme adjustments\n theme(\n plot.title.position = \"plot\", # left-align title \n plot.caption.position = \"plot\", # right-align caption\n legend.position = \"top\", # place legend above plot\n plot.title = element_text(face = \"bold\", size = rel(1.4)), # larger, bold title\n axis.text = element_text(family = \"Spline Sans Mono\"), # monospaced font for axes\n axis.title.x = element_text( # left-aligned, grey x axis label\n hjust = 0, color = \"grey20\", margin = margin(t = 12)\n ),\n legend.text = element_text(size = rel(1)), # larger legend labels\n strip.text = element_text(face = \"bold\", size = rel(1.15)), # larger, bold facet labels\n panel.grid.major.x = element_blank(), # no vertical major lines\n panel.grid.minor = element_blank(), # no minor grid lines\n panel.spacing.x = unit(20, \"pt\"), # increase white space between panels\n panel.spacing.y = unit(10, \"pt\"), # increase white space between panels\n plot.margin = margin(rep(15, 4)) # adjust white space around plot\n )\n```\n:::\n\n\n\n# Saving Plots\n\n\n## Save the Graphic\n\n
\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save_e5f05ce158402d7e685982556d179209'}\n\n```{.r .cell-code}\nggsave(filename = \"my_plot.png\", plot = g)\n```\n:::\n\n\n::: fragment\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-implicit_9766c1583f2fbb00908b516d985f6453'}\n\n```{.r .cell-code}\nggsave(\"my_plot.png\")\n```\n:::\n\n:::\n\n
\n\n::: fragment\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-aspect_c4c7d92b369109a8c63e4d3acb8b3a4a'}\n\n```{.r .cell-code}\nggsave(\"my_plot.png\", width = 6, height = 5, dpi = 600)\n```\n:::\n\n:::\n\n\n## Plot Resolution\n\n\n\n\n\n::: {layout-ncol=\"2\"}\n![](plots/resolution-dpi-100.png)\n\n![](plots/resolution-dpi-600.png)\n:::\n\n\n## Plot Resolution\n\n::: {layout-ncol=\"2\"}\n![](img/resolution-dpi-100-zoom.png)\n\n![](img/resolution-dpi-600-zoom.png)\n:::\n\n\n## Save the Graphic\n\n
\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save_439dcf333a92406ebd8f3987d6bf9287'}\n\n```{.r .cell-code}\nggsave(filename = \"my_plot.png\", plot = g)\n```\n:::\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-implicit_c5fdbcc9003675c2f0008fca98c36874'}\n\n```{.r .cell-code}\nggsave(\"my_plot.png\")\n```\n:::\n\n\n
\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-aspect_c7758af26f1a01644a26e5432e2f2d0c'}\n\n```{.r .cell-code}\nggsave(\"my_plot.png\", width = 6, height = 5, dpi = 600)\n```\n:::\n\n\n::: fragment\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-unit_1cb025e0ae788e688d21927fee627091'}\n\n```{.r .cell-code}\nggsave(\"my_plot.png\", width = 6*2.54, height = 5*2.54, unit = \"cm\", dpi = 600)\n```\n:::\n\n:::\n\n
\n\n::: fragment\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-raster-agg_7717fd36fbcc79947a3b710ba2e06004'}\n\n```{.r .cell-code}\nggsave(\"my_plot.png\", device = agg_png)\n```\n:::\n\n:::\n\n::: fragment\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-cairo_b9eb653fefdb960c5af7f9f35c0916ab'}\n\n```{.r .cell-code}\nggsave(\"my_plot.pdf\", device = cairo_pdf)\n```\n:::\n\n:::\n\n\n--------------------------------------------------------------------------------\n\n
\n\n![Modified from canva.com](img/vector-raster-canva.png){fig-alt=\"A comparison of vector and raster graphics.\" fig-width=\"150%\"}\n\n\n\n## The {ragg} Package\n\nprovides drop-in replacements for the default raster graphic devices\n\n::: incremental\n\n* faster\n* direct access to all system fonts\n* advanced text rendering\n * including support for right-to-left text, emojis, and font fallback\n* high quality anti-aliasing\n* high quality rotated text\n* supports 16-bit output\n* system independent rendering\n\n:::\n\n\n## The {ragg} Package\n\n
\n\n![Source: [tidyverse.org/blog/2021/02/modern-text-features](https://www.tidyverse.org/blog/2021/02/modern-text-features/)](img/ragg-left-and-right.png){fig-align=\"center\" fig-alt=\"A comparison of different graphic devices in R comparing the rendering of right-to-left text (and mixing left-to-right and right-to-left text).\"}\n\n\n## The {ragg} Package\n\n
\n\n![Source: [tidyverse.org/blog/2021/02/modern-text-features](https://www.tidyverse.org/blog/2021/02/modern-text-features/)](img/ragg-ligatures.png){fig-align=\"center\" fig-alt=\"A comparison of different graphic devices in R comparing the rendering of font ligatures.\"}\n\n\n## The {ragg} Package\n\n
\n\n![Source: [tidyverse.org/blog/2021/02/modern-text-features](https://www.tidyverse.org/blog/2021/02/modern-text-features/)](img/ragg-emojis.png){fig-align=\"center\" fig-alt=\"A comparison of different graphic devices in R comparing the rendering of emojis.\"}\n\n\n## The {ragg} Package\n\n
\n\n![Source: [tidyverse.org/blog/2021/02/modern-text-features](https://www.tidyverse.org/blog/2021/02/modern-text-features/)](img/ragg-fallback.png){fig-align=\"center\" fig-alt=\"A comparison of different graphic devices in R comparing the rendering missing glyphs, partly making use of fallback fonts.\"}\n\n\n## The {ragg} Package\n\n::: incremental\n* use {ragg} when saving ggplots by passing agg device function: `ggsave(device = agg_png))` ([used by default if installed](https://github.com/tidyverse/ggplot2/pull/4388))\n* use {ragg} in the *Rstudio Plots* pane be setting the backend to AGG: ![](img/ragg-rstudio.png){fig-alt=\"How to set the AGG device as the default in RStudio via Global Options > > General > Graphics > Backend.\"}\n* use {ragg} when knitting Rmarkdown files by setting `dev=\"ragg_png\"` in the code chunk options.\n\n:::\n\n\n## Save the Graphic\n\n
\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save_439dcf333a92406ebd8f3987d6bf9287'}\n\n```{.r .cell-code}\nggsave(filename = \"my_plot.png\", plot = g)\n```\n:::\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-implicit_c5fdbcc9003675c2f0008fca98c36874'}\n\n```{.r .cell-code}\nggsave(\"my_plot.png\")\n```\n:::\n\n\n
\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-aspect_c7758af26f1a01644a26e5432e2f2d0c'}\n\n```{.r .cell-code}\nggsave(\"my_plot.png\", width = 6, height = 5, dpi = 600)\n```\n:::\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-unit_7b4c6b278330b6c7959419e4fe66e57e'}\n\n```{.r .cell-code}\nggsave(\"my_plot.png\", width = 6*2.54, height = 5*2.54, unit = \"cm\", dpi = 600)\n```\n:::\n\n
\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-raster-agg_ee35fa72950cb04d7a1ba33120bd2923'}\n\n```{.r .cell-code}\nggsave(\"my_plot.png\", device = agg_png)\n```\n:::\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-cairo_a437ddfca531433a3be58b3e32c0b6cf'}\n\n```{.r .cell-code}\nggsave(\"my_plot.pdf\", device = cairo_pdf)\n```\n:::\n\n\n::: fragment\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-svg_04c01878d73ecdfe86e9bb01ec2cecfb'}\n\n```{.r .cell-code}\nggsave(\"my_plot.svg\")\n```\n:::\n\n:::\n\n\n--------------------------------------------------------------------------------\n\n![](img/figma-svg.png){fig-align=\"center\"}\n\n\n## How to Work with Aspect Ratios\n\n::: incremental\n- don't rely on the Rstudio viewer pane!\n- once you have a *\"it's getting close\"* prototype, settle on a plot size

\n- **Approach 1:** save the file and inspect it—go back to your IDE—repeat\n - tedious and time-consuming...

\n- **Approach 2:** use a qmd or rmd with inline output and chunk settings\n - set `fig-width` / `fig.width` and `fig-height` / `fig.height`
per chunk or globally

\n:::\n\n\n## Setting Plot Sizes in Quarto and Rmarkdown\n\n![](img/plot-size-chunk-yaml.png){fig-alt=\"A screenshot of an exemplary Qmd file with two chunks with different settings of fig-width and fig-height as YAML-styled options using the hashpipe. Unfortunately, these are not respected when the chunk output is printed inline.\" fig-width=\"60%\"}\n\n\n## Setting Plot Sizes in Quarto and Rmarkdown\n\n![](img/plot-size-chunk-inline.png){fig-alt=\"A screenshot of an exemplary Qmd file with two chunks with different settings of fig.width and fig.height set as inline chunk options.\" fig-width=\"60%\"}\n\n\n## How to Work with Aspect Ratios\n\n- don't rely on the Rstudio viewer pane!\n- once you have a *\"it's getting close\"* prototype, settle on a plot size

\n- **Approach 1:** save the file and inspect it—go back to your IDE—repeat\n - tedious and time-consuming...

\n- **Approach 2:** use a qmd or rmd with inline output and chunk settings\n - set `fig-width` / `fig.width` and `fig-height` / `fig.height`
per chunk or globally

\n- **Approach 3:** use our [{camcorder} package](https://github.com/thebioengineer/camcorder)\n - saves output from all `ggplot()` calls and displays it in the viewer pane\n\n\n## Setting Plot Sizes via {camcorder}\n\n
\n\n![](img/plot-size-camcorder-a.png){fig-alt=\"A screenshot of an exemplary R script with a plot automatically saved and isplayed in correct aspect ratio thanks to the camcorder package.\" fig-width=\"120%\"}\n\n\n## Setting Plot Sizes via {camcorder}\n\n
\n\n![](img/plot-size-camcorder-b.png){fig-alt=\"A screenshot of an exemplary R script with a plot automatically saved and isplayed in correct aspect ratio thanks to the camcorder package.\" fig-width=\"120%\"}\n\n\n## Setting Plot Sizes via {camcorder}\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/camcorder-record_00dad4ac42afbc08553cc5c510c3d7ea'}\n\n```{.r .cell-code code-line-numbers=\"1,2,3,4,5,6,7|9,10,11,12,13,15\"}\ncamcorder::gg_record(\n dir = here::here(\"temp\"), # path for plot files\n device = \"png\", # device to use\n width = 10, # figure width\n height = 5, # figure height\n dpi = 600 # plot resolution\n)\n\ng <- ggplot(bikes, aes(x = temp, y = count, color = day_night)) +\n geom_point(alpha = .3, size = 2) +\n scale_color_manual(values = c(day = \"#FFA200\", night = \"#757BC7\")) +\n theme_minimal(base_size = 14, base_family = \"Asap SemiCondensed\") +\n theme(panel.grid.minor = element_blank())\n\ng\n```\n:::\n\n\n\n## Setting Plot Sizes via {camcorder}\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/camcorder-resize_8c9dabd1c4d2661597733e6d716f0424'}\n\n```{.r .cell-code code-line-numbers=\"17,19\"}\ncamcorder::gg_record(\n dir = here::here(\"temp\"), # path for plot files\n device = \"png\", # device to use\n width = 10, # figure width\n height = 5, # figure height\n dpi = 600 # plot resolution\n)\n\ng <- ggplot(bikes, aes(x = temp, y = count, color = day_night)) +\n geom_point(alpha = .3, size = 2) +\n scale_color_manual(values = c(day = \"#FFA200\", night = \"#757BC7\")) +\n theme_minimal(base_size = 14, base_family = \"Asap SemiCondensed\") +\n theme(panel.grid.minor = element_blank())\n\ng\n\ncamcorder::gg_resize_film(width = 20) # update figure width\n\ng\n```\n:::\n\n\n\n## Like a Pro: Set Theme Globally\n\n\n::: {.cell}\n\n```{.r .cell-code}\ntheme_set(theme_minimal(base_size = 14, base_family = \"Asap SemiCondensed\"))\ntheme_update(panel.grid.minor = element_blank())\n```\n:::\n\n\n\n# Programming
with ggplot2\n\n\n## Conditional Components\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/conditional-components_caef70472f777a01248d33a3f284f406'}\n\n```{.r .cell-code code-line-numbers=\"1|3,4,5|4\"}\nsmooth <- TRUE\n\nggplot(bikes, aes(x = temp, y = humidity)) +\n { if(smooth) geom_smooth(color = \"red\") } +\n geom_point(alpha = .5)\n```\n:::\n\n\n\n## Conditional Components\n\n\n::: {.cell layout-align=\"center\" hash='01-fundamentals_cache/revealjs/conditional-components-1_af3590b704ded767678e130b9bed0532'}\n\n```{.r .cell-code}\nsmooth <- TRUE\n\nggplot(bikes, aes(x = temp, y = humidity)) +\n { if(smooth) geom_smooth(color = \"red\") } +\n geom_point(alpha = .5)\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/conditional-components-1-1.png){fig-align='center' width=1600}\n:::\n:::\n\n\n\n## Conditional Components\n\n\n::: {.cell layout-align=\"center\" hash='01-fundamentals_cache/revealjs/conditional-components-2_f29ca7457d58aeba72af8364052998e2'}\n\n```{.r .cell-code code-line-numbers=\"1\"}\nsmooth <- FALSE\n\nggplot(bikes, aes(x = temp, y = humidity)) +\n { if(smooth) geom_smooth(color = \"red\") } +\n geom_point(alpha = .5)\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/conditional-components-2-1.png){fig-align='center' width=1600}\n:::\n:::\n\n\n\n## Wrapper Functions for Plots\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/conditional-components-function_bbcbb08aec8f13e9bfdf6dcd42f130a4'}\n\n```{.r .cell-code code-line-numbers=\"1,5|2,3,4\"}\ndraw_scatter <- function(smooth = TRUE) {\n ggplot(bikes, aes(x = temp, y = humidity)) +\n { if(smooth) geom_smooth(color = \"red\") } +\n geom_point(alpha = .5)\n}\n```\n:::\n\n\n\n## Wrapper Functions for Plots\n\n\n::: {.cell output-location='column' hash='01-fundamentals_cache/revealjs/conditional-components-function-plot-default_b88942c23d103843491ed566b4ee8391'}\n\n```{.r .cell-code}\ndraw_scatter()\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/conditional-components-function-plot-default-1.png){width=1000}\n:::\n:::\n\n\n\n## Wrapper Functions for Plots\n\n\n::: {.cell output-location='column' hash='01-fundamentals_cache/revealjs/conditional-components-function-plot-false_9e465abdd77a1628e20f9b9194f5c781'}\n\n```{.r .cell-code}\ndraw_scatter(smooth = FALSE)\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/conditional-components-function-plot-false-1.png){width=1000}\n:::\n:::\n\n\n\n## Components as Functions\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"1,2,7|3,6|4,5\"}\ngeom_scatterfit <- function(pointsize = 1, pointalpha = 1, \n method = \"lm\", linecolor = \"red\", ...) {\n list(\n geom_point(size = pointsize, alpha = pointalpha, ...),\n geom_smooth(method = method, color = linecolor, ...)\n )\n}\n```\n:::\n\n\n\n## Components as Functions\n\n\n::: {.cell output-location='column' hash='01-fundamentals_cache/revealjs/function-components-defaults_b82bb4e1013de3757c454e7f445193ef'}\n\n```{.r .cell-code code-line-numbers=\"3\"}\nggplot(bikes,\n aes(x = humidity, y = count)) +\n geom_scatterfit()\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/function-components-defaults-1.png){width=1000}\n:::\n:::\n\n\n\n## Components as Functions\n\n\n::: {.cell output-location='column' hash='01-fundamentals_cache/revealjs/function-components-args_166742f1bde5f609121fd38acd7a44d2'}\n\n```{.r .cell-code code-line-numbers=\"4,5\"}\nggplot(bikes,\n aes(x = humidity, y = count)) +\n geom_scatterfit(\n color = \"#28A87D\", \n linewidth = 3\n )\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/function-components-args-1.png){width=1000}\n:::\n:::\n\n\n\n## Components as Functions\n\n\n::: {.cell output-location='column' hash='01-fundamentals_cache/revealjs/function-components-custom_0855f87dcad4c1979956d8c4ba0fb5cc'}\n\n```{.r .cell-code code-line-numbers=\"1,2|4,5,6,7\"}\nggplot(diamonds, \n aes(x = carat, y = price)) +\n geom_scatterfit(\n pointsize = .5, \n pointalpha = .1,\n method = \"gam\",\n linecolor = \"#EFAC00\"\n )\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/function-components-custom-1.png){width=1000}\n:::\n:::\n\n\n\n## Components as Functions\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"1,14|2,13|3,4,5,6,7|8,9,10,11,12\"}\nscales_log <- function(sides = \"xy\") {\n list(\n if(stringr::str_detect(sides, \"x\")) {\n scale_x_log10(\n breaks = c(10^(1:100)), labels = scales::label_log()\n )\n },\n if(stringr::str_detect(sides, \"y\")) {\n scale_y_log10(\n breaks = c(10^(1:100)), labels = scales::label_log()\n )\n }\n )\n}\n```\n:::\n\n\n\n## Components as Functions\n\n\n::: {.cell output-location='column' hash='01-fundamentals_cache/revealjs/function-components-scales-custom_5b6321eab679a1975d13c047c2a99c10'}\n\n```{.r .cell-code code-line-numbers=\"9\"}\nggplot(diamonds, \n aes(x = carat, y = price)) +\n geom_scatterfit(\n pointsize = .5, \n pointalpha = .1,\n method = \"gam\",\n linecolor = \"#EFAC00\"\n ) +\n scales_log(sides = \"y\")\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/function-components-scales-custom-1.png){width=1000}\n:::\n:::\n\n\n\n## Iterative Graphics\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"1,11|2,3,4|5,6,7,8,9|1,4,9\"}\ntrends_monthly <- function(grp = \"January\") {\n bikes |> \n dplyr::mutate(month = lubridate::month(date, label = TRUE, abbr = FALSE)) |> \n dplyr::filter(month %in% grp) |> \n ggplot(aes(x = temp, y = count, color = day_night)) +\n geom_point(alpha = .2, show.legend = FALSE) +\n geom_smooth(se = FALSE) +\n scale_color_manual(values = c(\"#FFA200\", \"#757bc7\")) +\n labs(title = grp, x = \"Temperature\", y = \"Bike shares\", color = NULL)\n}\n```\n:::\n\n\n\n## Iterative Graphics\n\n\n::: {.cell output-location='column'}\n\n```{.r .cell-code}\ntrends_monthly(\"July\")\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/function-iterate-monthly-july-1.png){width=1000}\n:::\n:::\n\n\n\n## Iterative Graphics\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"8,9,10\"}\ntrends_monthly <- function(grp = \"January\") {\n bikes |> \n dplyr::mutate(month = lubridate::month(date, label = TRUE, abbr = FALSE)) |> \n dplyr::filter(month %in% grp) |> \n ggplot(aes(x = temp, y = count, color = day_night)) +\n geom_point(alpha = .2, show.legend = FALSE) +\n geom_smooth(se = FALSE) +\n # keep axis ranges consistent\n scale_x_continuous(limits = range(bikes$temp)) +\n scale_y_continuous(limits = range(bikes$count)) +\n scale_color_manual(values = c(\"#FFA200\", \"#757bc7\")) +\n labs(title = grp, x = \"Temperature\", y = \"Bike shares\", color = NULL)\n}\n```\n:::\n\n\n\n## Iterative Graphics\n\n\n::: {.cell output-location='column'}\n\n```{.r .cell-code}\ntrends_monthly(\"July\")\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/function-iterate-monthly-ranges-july-1.png){width=1000}\n:::\n:::\n\n\n\n## Iterative Graphics\n\n\n::: {.cell}\n\n```{.r .cell-code}\nplots <- purrr::map(month.name[1:12], trends_monthly) ## also: ~ trends_monthly(.x)\n```\n:::\n\n\n\n## Iterative Graphics\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code code-line-numbers=\"2\"}\nplots <- purrr::map(month.name[1:12], trends_monthly) ## also: ~ trends_monthly(.x)\nplots[[9]]\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/function-iterate-monthly-ranges-purrr-single-1.png){fig-align='center' width=1600}\n:::\n:::\n\n\n\n## Iterative Graphics\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code code-line-numbers=\"2\"}\nplots <- purrr::map(month.name[1:12], trends_monthly) ## also: ~ trends_monthly(.x)\npatchwork::wrap_plots(plots)\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/function-iterate-monthly-ranges-wrap-1.png){fig-align='center' width=3600}\n:::\n:::\n\n\n\n## Iterative Graphics\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"1,11|2|3,4|5,6,7|8,9,10\"}\nplot_density <- function(data, var, grp = \"\") {\n ggplot(data, aes(x = !!sym(var))) +\n geom_density(aes(fill = !!sym(grp)), position = \"identity\",\n color = \"grey30\", alpha = .3) +\n coord_cartesian(expand = FALSE, clip = \"off\") +\n scale_y_continuous(labels = scales::label_number()) +\n scale_fill_brewer(palette = \"Dark2\", name = NULL) +\n theme(legend.position = \"top\")\n}\n```\n:::\n\n\n\n## Iterative Graphics\n\n\n::: {.cell output-location='column'}\n\n```{.r .cell-code}\nplot_density(\n bikes, \"count\"\n)\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/function-density-plot-1.png){width=1000}\n:::\n:::\n\n\n\n## Iterative Graphics\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code code-line-numbers=\"1,2,3,4|2|3|5\"}\nplots <- purrr::map(\n c(\"count\", \"temp\", \"humidity\", \"wind_speed\"), \n ~ plot_density(data = bikes, var = .x, grp = \"day_night\")\n)\npatchwork::wrap_plots(plots, nrow = 1)\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/function-density-plot-grp-1.png){fig-align='center' width=2800}\n:::\n:::\n\n\n\n## Iterative Graphics\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code code-line-numbers=\"2|3|5\"}\nplots <- purrr::map(\n names(dplyr::select(midwest, where(is.numeric))),\n ~plot_density(data = midwest, var = .x)\n)\npatchwork::wrap_plots(plots)\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/function-density-plot-midwest-1.png){fig-align='center' width=4000}\n:::\n:::\n\n\n\n# Combine Plots\n\n\n## Combine Plots with {patchwork}\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"1|3|5|7∂\"}\nlibrary(patchwork)\n\np1 <- plot_density(data = bikes, var = \"count\", grp = \"day_night\")\n\np2 <- plot_density(data = bikes, var = \"humidity\", grp = \"day_night\")\n\np3 <- ggplot(bikes, aes(x = humidity, y = count)) + geom_scatterfit(pointalpha = .3)\n```\n:::\n\n\n\n## Combine Plots with {patchwork}\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code}\n(p1 + p2) / p3\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/patchwork-example-1-1.png){fig-align='center' width=2400}\n:::\n:::\n\n\n\n## Combine Plots with {patchwork}\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code}\n(p1 + p2) / p3 + plot_layout(heights = c(1, 2))\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/patchwork-example-2-1.png){fig-align='center' width=2400}\n:::\n:::\n\n\n\n## Combine Plots with {patchwork}\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code}\n(p1 + p2) / p3 + plot_layout(heights = c(1, 2), guides = \"collect\")\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/patchwork-example-3-1.png){fig-align='center' width=2400}\n:::\n:::\n\n\n\n## Combine Plots with {patchwork}\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code}\n(p1 + p2) / p3 + plot_layout(heights = c(1, 2), guides = \"collect\") +\n plot_annotation(theme = theme(legend.justification = \"top\"))\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/patchwork-example-4-1.png){fig-align='center' width=2400}\n:::\n:::\n\n\n\n## Combine Plots with {patchwork}\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code}\n(p1 + p2) / p3 + plot_layout(heights = c(1, 2), guides = \"collect\") +\n plot_annotation(tag_levels = \"A\", tag_suffix = \".\", theme = theme(legend.justification = \"top\"))\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/patchwork-example-5-1.png){fig-align='center' width=2400}\n:::\n:::\n\n\n\n# Exciting Extension Packages\n\n\n## Layers\n\n+ [**`{geofacet}`**](https://hafen.github.io/geofacet/) — tile grid maps\n+ [**`{ggalluvial}`**](https://github.com/hrbrmstr/ggalt) — alluvial plots\n+ [**`{ggalt}`**](https://github.com/hrbrmstr/ggalt) — dumbbell, horizon, and lollipop charts, splines, ...\n+ [**`{ggbeeswarm}`**](https://github.com/hrbrmstr/ggalt) — beeswarm plots and variants\n+ [**`{ggbraid}`**](https://nsgrantham.github.io/ggbraid/) — ribbons for alternating groups\n+ [**`{ggbump}`**](https://github.com/davidsjoberg/ggbump) — parallel sets, pie charts, geometries, splines, voronoi, ...\n+ [**`{ggdensity}`**](https://jamesotto852.github.io/ggdensity/) — improved density plots\n+ [**`{ggdist}`**](https://github.com/davidsjoberg/ggbump) — uncertainty visualizations\n+ [**`{ggforce}`**](https://ggforce.data-imaginist.com/) — several interesting layers (and more)\n+ [**`{ggpattern}`**](https://github.com/coolbutuseless/ggpattern) — pattern fills for layers\n\n\n## Layers (continued)\n\n+ [**`{ggpointdensity}`**](https://github.com/LKremer/ggpointdensity) — density gradients for scatter plots\n+ [**`{ggraph}`**](https://github.com/thomasp85/ggraph) — networks, graphs & trees\n+ [**`{ggridges}`**](https://github.com/clauswilke/ggridges) — ridgeline plots\n+ [**`{ggsankey}`**](https://github.com/davidsjoberg/ggsankey) — sankey diagrams\n+ [**`{ggsignif}`**](https://const-ae.github.io/ggsignif/) — significance levels\n+ [**`{ggstar}`**](https://github.com/xiangpin/ggstar) — more point shapes\n+ [**`{ggstream}`**](https://github.com/davidsjoberg/ggstream) — stream graphs\n+ [**`{ggupset}`**](https://github.com/const-ae/ggupset) — upset graphs\n+ [**`{treemapify}`**](https://wilkox.org/treemapify/) — treemaps\n\n\n## Utilities\n\n+ [**`{cowplot}`**](https://cran.r-project.org/web/packages/cowplot/vignettes/introduction.html) — combine ggplots\n+ [**`{ggannotate}`**](https://github.com/MattCowgill/ggannotate) — point-n-click annotations\n+ [**`{ggblend}`**](https://mjskay.github.io/ggblend/) — blend, compose, adjust layers\n+ [**`{ggfittext}`**](https://wilkox.org/ggfittext/) — scale text according to space\n+ [**`{ggfx}`**](https://ggfx.data-imaginist.com/) — shaders and filters for layers\n+ [**`{ggh4x}`**](https://teunbrand.github.io/ggh4x/) — facets, positions, and more\n+ [**`{ggtext}`**](https://github.com/thomasp85/patchwork#patchwork) — text rendering for theme elements + text layers\n+ [**`{lemon}`**](https://github.com/stefanedwards/lemon) — axis lines (and a few layers)\n+ [**`{patchwork}`**](https://github.com/thomasp85/patchwork#patchwork) — combine ggplots\n+ [**`{scales}`**](https://scales.r-lib.org/) — control scales \n\n\n## Themes\n\n+ [**`{ggdark}`**](https://github.com/nsgrantham/ggdark)\n+ [**`{ggsci}`**](https://github.com/jrnold/ggthemes) (also color scales)\n+ [**`{ggtech}`**](https://github.com/ricardo-bion/ggtech) (also color scales)\n+ [**`{ggthemes}`**](https://github.com/jrnold/ggthemes) (also color scales)\n+ [**`{ggthemr}`**](https://github.com/Mikata-Project/ggthemr)\n+ [**`{hrbrthemes}`**](https://github.com/hrbrmstr/hrbrthemes) (also color scales)\n+ [**`{tvthemes}`**](https://ryo-n7.github.io/tvthemes/) (also color scales)\n\n\n## Color Palettes\n\n+ [**`{colorspace}`**](https://cran.r-project.org/web/packages/colorspace/vignettes/colorspace.html)\n+ [**`{jcolors}`**](https://jaredhuling.org/jcolors/)\n+ [**`{MetBrewer}`**](https://github.com/BlakeRMills/MetBrewer)\n+ [**`{nord}`**](https://cran.r-project.org/web/packages/nord/readme/README.html)\n+ [**`{rcartocolor}`**](https://jakubnowosad.com/rcartocolor/)\n+ [**`{RColorBrewer}`**](https://cran.r-project.org/web/packages/RColorBrewer/index.html)\n+ [**`{scico}`**](https://github.com/thomasp85/scico)\n+ [**`{unikn}`**](https://github.com/hneth/unikn)\n+ [**`{viridis}`**](https://cran.r-project.org/web/packages/viridis/vignettes/intro-to-viridis.html)\n+ [**`{wesanderson}`**](https://github.com/karthik/wesanderson)\n\n\n## Interactive Charts\n\n+ [**`{ggiraph}`**](https://davidgohel.github.io/ggiraph/)\n+ [**`{plotly}`**](https://plotly.com/r/)\n+ [**`{echarts4r}`**](https://echarts4r.john-coene.com/)*\n+ [**`{highcharter}`**](https://jkunst.com/highcharter/)*\n+ [**`{charter}`**](https://github.com/JohnCoene/charter)*\n+ [**`{streamgraph}`**](https://hrbrmstr.github.io/streamgraph/)*\n+ [**`{tmap}`**](https://cran.r-project.org/web/packages/tmap/vignettes/tmap-getstarted.html)*\n+ [**`{leaflet}`**](https://rstudio.github.io/leaflet/)*\n+ [**`{globe4r}`**](https://globe4r.john-coene.com/)*\n+ [**`{grapher}`**](https://grapher.network/)*\n\n* not using ggplot2\n\n\n## Recap\n\n::: recap\n- a basic ggplot is build by specifying three components:
`data`, `aes`thetics and a `layer` (usually a `geom_*` or `stat_*`)\n- *aesthetic mappings* define how variables map to visual properties\n- the default appearance of all other components can be modified via `scale_*`, `coord_*`, `facet_*` and `theme_*` / `theme` \n- use the devices cairo (pdf) and agg (png, jpg, tiff) when saving plots\n- find a suitable plot size by setting figure chunk options in qmd/rmd files or with the help of the `{camcorder}` package\n- define conditional components, custom layers and functions to generate plots more efficiently and to iterate over multiple inputs\n- combine multiple plot outputs with `{patchwork}`\n:::\n\n\n# Exercises\n\n\n## Exercise 1\n\n::: question\n- **Discuss / investigate with your neighbor:**\n - What are the differences between `geom_line()` and `geom_path()`?\n - Why can you use `geom_smooth()` and `stat_smooth()` interchangeably?\n - What are the three ways to *remove a legend* from a ggplot?\n:::\n\n\n## Exercise 2\n\n::: question\n- **Explore the TfL bike share data visually:**\n - Create a *time series* of counts per day and night.\n - Draw *box and whisker plots* of average temperatures per month.\n - Visualize bike counts per weather type and period as *bar chart*. \n- **Combine the three plots with {patchwork}.**\n- **Export the final graphic in a format of your choice.**\n:::\n\n## {background-image=\"img/exercise-what-now.png\" background-position=\"center\" background-size=\"75%\"}\n", + "markdown": "---\ntitle: \"Engaging and Beautiful Data Visualizations with ggplot2\"\nsubtitle: \"Fundamentals & Workflows\"\nauthor: \"Cédric Scherer // posit::conf // September 2023\"\nformat:\n revealjs:\n theme: slides.scss\n logo: img/logo.png\n footer: '[Cédric Scherer](https://cedricscherer.com) // posit::conf(2023)'\n transition: fade\n progress: true\n multiplex: false\n preview-links: true\n scrollable: false\n hide-inactive-cursor: true\n highlight-style: printing\n chalkboard:\n theme: whiteboard\n boardmarker-width: 4\n buttons: true\n pause: true\neditor: source\nknitr:\n opts_chunk:\n dev: \"ragg_png\"\n retina: 3\n dpi: 200\nexecute:\n freeze: auto\n cache: true\n echo: true\n fig-width: 10.1\n fig-height: 6.3\n fig-align: center\n---\n\n\n\n\n\n# {ggplot2}\n\n\n##\n\n::: footer\n[{ggplot2} package description](https://ggplot2.tidyverse.org/)\n:::\n\n![](img/intro/ggplot2.png){fig-align=\"center\" fig-alt=\"The ggplot2 hex logo.\"}\n\n
\n\n{ggplot2} is a system for declaratively creating graphics,
based on \"The Grammar of Graphics\" (Wilkinson 2005).
\n\n::: fragment\n[You provide the data, tell {ggplot2} how to]{style=\"font-size:24pt;\"} [map variables to aesthetics,]{.circle-highlight}
what graphical primitives to use, and it takes care of the details.\n:::\n\n## Advantages of {ggplot2}\n\n::: incremental\n- consistent underlying \"grammar of graphics\" (Wilkinson 2005)\\\n- very flexible, layered plot specification\\\n- theme system for polishing plot appearance\\\n- lots of additional functionality thanks to extensions\\\n- active and helpful community\n:::\n\n\n## The Components of a ggplot\n\n
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ComponentFunctionExplanation
Dataggplot(data)         *The raw data that you want to visualize (initialising a plot).*
Aesthetics          aes()*The mapping between variables and visual properties.*
Geometriesgeom_*()*The geometric shape of a layer representing the data.*
\n\n--------------------------------------------------------------------------------\n\n![ggplot2 examples featured on [ggplot2.tidyverse.org](https://ggplot2.tidyverse.org/)](img/basic-ggplots.png){fig-align=\"center\" fig-alt=\"A collection of the versatility of ggplot2 to create basic graphs. All of them use only data, aesthetics, and layers with the defaults of ggplot2.\"}\n\n\n## The Components of a ggplot\n\n\n
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ComponentFunctionExplanation
Dataggplot(data)         *The raw data that you want to visualize (initializing a plot).*
Aesthetics          aes()*The mapping between variables and visual properties.*
Geometriesgeom_*()*The geometric shape of a layer representing the data.*
Statisticsstat_*()*The statistical transformation of a layer applied to the data.*
Scalesscale_*()*The representation of mapped aesthetic attributes.*
Coordinate Systemcoord_*()*The transformation to map data coordinates into the plot plane.*
Facetsfacet_*()*The arrangement of the data into a set of small multiples.*
Visual Themestheme() | theme_*()*The overall visual defaults of non-data elements of the graphic.*
\n\n--------------------------------------------------------------------------------\n\n![Illustration by [Allison Horst](https://github.com/allisonhorst/stats-illustrations)](img/ah-ggplot2-exploratory.png){fig-align=\"center\" fig-alt=\"Allison Horsts monster illustration of explorative plotting with ggplot2.\"}\n\n--------------------------------------------------------------------------------\n\n![Illustration by [Allison Horst](https://github.com/allisonhorst/stats-illustrations)](img/ah-ggplot2-masterpiece.png){fig-align=\"center\" fig-alt=\"Allison Horsts monster illustration of building data masterpiece ith ggplot2 featuring a little Picasso monster :)\"}\n\n\n# The {ggplot2} Showcase\n\n--------------------------------------------------------------------------------\n\n
\n\n![Collection of Graphics from the [BBC R Cookbook](https://bbc.github.io/rcookbook/)](img/showcase/bbc-gallery.png){fig-align=\"center\" fig-alt=\"A multi-plot panel of various data visualizations created by the BBC teams.\"}\n\n--------------------------------------------------------------------------------\n\n
\n\n![Collection of Graphics from the [BBC R Cookbook](https://bbc.github.io/rcookbook/)](img/showcase/bbc-gallery-quote.png){fig-align=\"center\" fig-alt=\"A multi-plot panel of various data visualizations created by the BBC teams.\"}\n\n--------------------------------------------------------------------------------\n\n![[\"Bill Dimensions of Brush-Tailed Penguins\"](https://github.com/Z3tt/TidyTuesday/tree/main/plots/2020_31)](img/showcase/palmer-penguins.png){fig-align=\"center\" fig-size=\"80%\" fig-alt=\"Distribution of coffee bean ratings by the Coffee Quality Institute for countries with 25 or more reviews (up to 2018). Distributions are shown as dot plots and multiple interval stripes.\"}\n\n--------------------------------------------------------------------------------\n\n![[\"Netflix Content Explosion\"](https://twitter.com/tanya_shapiro/status/1610419176333627393) by Tanya Shapiro](img/showcase/netflix-originals-tanya-shapiro.jpeg){fig-align=\"center\" fig-size=\"50%\" fig-alt=\"rea graph of number of Netflix original series over time, annotated with images and labels.\"}\n\n--------------------------------------------------------------------------------\n\n![My reinterpreted [The Economist graphic](https://www.economist.com/graphic-detail/2019/09/28/why-are-some-languages-spoken-faster-than-others)](img/showcase/speech-speed.png){fig-align=\"center\" fig-alt=\"The raincloud chart showing the distributions of normalized speech rates (dark pink) and information rates (dark lime green) across language families.\"}\n\n--------------------------------------------------------------------------------\n\n![[\"Not My Cup of Coffee\"](https://www.behance.net/gallery/100638417/Not-My-Cup-of-Coffee)](img/showcase/coffee-ratings.png){fig-align=\"center\" fig-alt=\"The raincloud chart showing the distributions of normalized speech rates (dark pink) and information rates (dark lime green) across language families.\"}\n\n--------------------------------------------------------------------------------\n\n![[\"Food Carbon Footprint Index 2018\"](https://github.com/Z3tt/TidyTuesday/tree/main/plots/2020_08)](img/showcase/20200307_TT_2020_08_CarbonFoodprint_alt.png){fig-align=\"center\" fig-alt=\"Two circular hierarchical bar plots showing the carbon footprint 2018 for food consumption and CO2 per continent and country.\"}\n\n--------------------------------------------------------------------------------\n\n![[\"Popular Programming Languages in CRAN Packages\"](https://twitter.com/spren9er/status/1195826547724374018) by Torsten Sprenger](img/showcase/cran-packages-torsten-sprenger.png){fig-align=\"center\" fig-alt=\"A circular tree showing the programing languages used in CRAN packages, with nodes being grouped by languages and package names, sized by number of lines.\"}\n\n--------------------------------------------------------------------------------\n\n![[\"Appearance of X-Men Characters\"](https://www.behance.net/gallery/100640345/Appearance-of-Popular-X-Men-Characters)](img/showcase/xmen-comics.png){fig-align=\"center\" fig-size=\"45%\" fig-alt=\"Streamgraphs showing the appearance of the most common X-Men characters (Wovlerine, Magneto, Nightcrawler, Storm & Gambit) during the so-called Claremont Run. Chris Claremont is a famous American comic book writer who was in charge of the Uncanny X-Men comic book series from 1975–1991. During that time he developed complex literary themes and strong female characters into superhero comics, and turning the X-Men into one of Marvel's most popular series.\"}\n\n--------------------------------------------------------------------------------\n\n![[\"Artists in the US\"](https://twitter.com/leeolney3/status/1574656040599265280) by Lee Olney](img/showcase/artists-usa-lee-olney.png){fig-align=\"center\" fig-alt=\"A facet of barcodes showing location quotients from artists in the US by type and race.\"}\n\n--------------------------------------------------------------------------------\n\n
\n\n![My Contribution to the [SWDchallenge \"Small Multiples\"](https://www.storytellingwithdata.com/blog/2020/1/6/swdchallenge-small-multiples)](img/showcase/SWD_2020_01_SmallMultiples_grey.png){fig-align=\"center\" fig-alt=\"A facet of shots and goals of the Bundesliga football clubs in the season 2019/20.\"}\n\n--------------------------------------------------------------------------------\n\n![[\"European Energy Generation\"](github.com/jack-davison/tidytuesday) by Jack Davison](img/showcase/jack_davison.png){fig-align=\"center\" fig-alt=\"A gridded map of Europe showing horizontal stacked bars of energy production per country over time (each bar represents share among one year from 2016 to 2018).\"}\n\n--------------------------------------------------------------------------------\n\n![[Moon Charts as a Tile Grid Map](https://github.com/z3tt/grid-btw-wahlkreise-constituencies) showing the 2nd Vote Results from the German Election 2021](img/showcase/btw21_tile_grid_moon_second_de.png){fig-align=\"center\" fig-alt=\"A grid map using moon charts for all 297 electoral districts which show the share of the wnning party in second votesc during the German election in 2021.\"}\n\n--------------------------------------------------------------------------------\n\n![Our Winning Contribution to the [BES MoveMap Contest](https://besmovesig.wordpress.com/2021/02/25/mapping-movements-the-art-and-the-science-we-have-the-winners/)](img/showcase/20210131_BES_CheetahMap_rcarto.png){fig-align=\"center\" fig-alt=\"A spatial map of cheetah movement and their hotspot behaviour in Namibia.\"}\n\n--------------------------------------------------------------------------------\n\n![[Bivariate Choropleth x Hillshade Map](timogrossenbacher.ch/2019/04/bivariate-maps-with-ggplot2-and-sf) by Timo Gossenbacher](img/showcase/swiss_map.png){fig-align=\"center\" fig-alt=\"A spatial map of income and inequality shown with a bivariate color palette; alpine regions have a hillshading effect.\"}\n\n--------------------------------------------------------------------------------\n\n![Pixel Art by [Georgios Karamanis](https://karaman.is/)](img/showcase/bob-ross-pixel-art-georgios.png){fig-align=\"center\" fig-alt=\"A set of small multiples using pixelated encodings of certain elements in Bob Ross' paintings.\"}\n\n--------------------------------------------------------------------------------\n\n![Generative Art by [Thomas Lin Pedersen](https://www.data-imaginist.com/art)](img/showcase/genart.png){fig-align=\"center\" fig-alt=\"Two artworks by Thomas Pedersen, completely generated in R with ggplot2 (and pure magic).\"}\n\n\n# A Walk-Through Example\n\n\n## The Data Set\n\nBike sharing counts in London, UK, powered by [TfL Open Data](https://tfl.gov.uk/modes/cycling/santander-cycles)\n\n::: incremental\n- covers the years 2015 and 2016\n- incl. weather data acquired from [freemeteo.com](https://freemeteo.com)\n- prepared by Hristo Mavrodiev for [Kaggle](https://www.kaggle.com/hmavrodiev/london-bike-sharing-dataset)\n- further modification by myself\n:::\n\n\n## The Data Set\n\n\n::: {.cell}\n\n```{.r .cell-code}\nlibrary(readr)\nlibrary(ggplot2)\n\nbikes <-\n read_csv(\n here::here(\"data\", \"london-bikes.csv\"),\n col_types = \"Dcfffilllddddc\"\n )\n```\n:::\n\n\n\n## The Data Set\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/view-data_08b7b3be3eee0339e21d78d3715ee833'}\n\n```{.r .cell-code}\nbikes\n```\n\n::: {.cell-output .cell-output-stdout}\n```{.hscroll}\n# A tibble: 1,454 × 14\n date day_night year month season count is_workday is_weekend is_holiday temp temp_feel humidity wind_speed weather_type \n \n 1 2015-01-04 day 2015 1 3 6830 FALSE TRUE FALSE 2.17 -0.75 95.2 10.4 broken clouds \n 2 2015-01-04 night 2015 1 3 2404 FALSE TRUE FALSE 2.79 2.04 93.4 4.58 clear \n 3 2015-01-05 day 2015 1 3 14763 TRUE FALSE FALSE 8.96 7.71 81.1 8.67 broken clouds \n 4 2015-01-05 night 2015 1 3 5609 TRUE FALSE FALSE 7.12 5.71 79.5 9.04 cloudy \n 5 2015-01-06 day 2015 1 3 14501 TRUE FALSE FALSE 9 6.46 80.2 19.2 broken clouds \n 6 2015-01-06 night 2015 1 3 6112 TRUE FALSE FALSE 6.71 4.21 77.6 12.8 clear \n 7 2015-01-07 day 2015 1 3 16358 TRUE FALSE FALSE 8.17 5.08 75.2 21.2 scattered clouds\n 8 2015-01-07 night 2015 1 3 4706 TRUE FALSE FALSE 6.68 3.86 81.3 18.1 clear \n 9 2015-01-08 day 2015 1 3 9971 TRUE FALSE FALSE 9.46 7.12 79.4 18.8 scattered clouds\n10 2015-01-08 night 2015 1 3 5630 TRUE FALSE FALSE 10.0 8.46 79.2 22.2 clear \n# ℹ 1,444 more rows\n```\n:::\n:::\n\n\n\n\n## The Data Set\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/data-table_78b1267b2d8c1d92c639963f8ed64a4f'}\n::: {.cell-output-display}\n`````{=html}\n\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n
Variable Description Class
date Date encoded as `YYYY-MM-DD` date
day_night `day` (6:00am–5:59pm) or `night` (6:00pm–5:59am) character
year `2015` or `2016` factor
month `1` (January) to `12` (December) factor
season `0` (spring), `1` (summer), `2` (autumn), or `3` (winter) factor
count Sum of reported bikes rented integer
is_workday `TRUE` being Monday to Friday and no bank holiday logical
is_weekend `TRUE` being Saturday or Sunday logical
is_holiday `TRUE` being a bank holiday in the UK logical
temp Average air temperature (°C) double
temp_feel Average feels like temperature (°C) double
humidity Average air humidity (%) double
wind_speed Average wind speed (km/h) double
weather_type Most common weather type character
\n\n`````\n:::\n:::\n\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-full-1.png){width=2020}\n:::\n:::\n\n\n\n## A Default ggplot\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-0_54e69338bfad3e48c3cfc463ef22e77b'}\n\n```{.r .cell-code}\n# scatter plot of plot bikes$count versus bikes$temp_feel\nggplot(data = bikes) + # initial call + data\n aes(x = temp_feel, y = count) + # aesthetics\n geom_point() # geometric layer\n```\n:::\n\n\n\n## A Default ggplot\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-1_0e54cdfa411c3d3b234fefff974ba242'}\n\n```{.r .cell-code}\n# scatter plot of plot bikes$count versus bikes$temp_feel\nggplot(bikes, aes(x = temp_feel, y = count)) +\n geom_point()\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-1_ef3f65b32793ec6d371133f6f7038b29'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-1-1.png){width=2020}\n:::\n:::\n\n\n\n## Combine Layers\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-2_f184aaeaa11b8515b6b82b001609e579'}\n\n```{.r .cell-code code-line-numbers=\"3,4\"}\nggplot(bikes, aes(x = temp_feel, y = count)) +\n geom_point() + \n # add a GAM smoothing\n stat_smooth() # also: geom_smooth()\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-2_91b3b1905cf1268438b7f56b0d731a6f'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-2-1.png){width=2020}\n:::\n:::\n\n\n\n## Mapping Aesthetics\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-3_293593d0c1a51009ba5eb8a59f7728ea'}\n\n```{.r .cell-code code-line-numbers=\"1\"}\nggplot(bikes, aes(x = temp_feel, y = count, color = day_night)) + \n geom_point() + \n stat_smooth()\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-3_88f47cdcb755f82a106c3104e6f61c8a'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-3-1.png){width=2020}\n:::\n:::\n\n\n\n## Mapping Aesthetics\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-4_bc36b6670c28f6d74336be8eea1dc2f0'}\n\n```{.r .cell-code code-line-numbers=\"2,3|4,5\"}\nggplot(bikes, aes(x = temp_feel, y = count)) + \n # color mapping only applied to points\n geom_point(aes(color = day_night)) + \n # invisible grouping to create two trend lines\n stat_smooth(aes(group = day_night))\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-4_78c4aadf451b272dde9b6f8b9f90d1dd'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-4-1.png){width=2020}\n:::\n:::\n\n\n\n## Setting Properties\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-5_34ed96698fc797de07f96bd938e6c867'}\n\n```{.r .cell-code code-line-numbers=\"2,4,5|7,9,10\"}\nggplot(bikes, aes(x = temp_feel, y = count)) + \n geom_point(\n aes(color = day_night), \n # setting larger points with 50% opacity\n alpha = .5, size = 1.5\n ) + \n stat_smooth(\n aes(group = day_night), \n # use linear fitting + draw black smoothing lines\n method = \"lm\", color = \"black\"\n )\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-5_8fb70a2442398fd47b6e93b823111860'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-5-1.png){width=2020}\n:::\n:::\n\n\n\n## Split into Facets\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-6_e529afc4ea35d449fb64c893507c694f'}\n\n```{.r .cell-code code-line-numbers=\"9,10|10|6,7,8\"}\nggplot(bikes, aes(x = temp_feel, y = count)) + \n geom_point(\n aes(color = day_night), \n alpha = .5, size = 1.5\n ) + \n stat_smooth(\n method = \"lm\", color = \"black\"\n ) +\n # small multiples\n facet_wrap(facets = vars(day_night)) # also: ~ day_night\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-6_27afd61089e430c690a7804868b50766'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-6-1.png){width=2020}\n:::\n:::\n\n\n\n## Split into Facets\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-7_95545d6c6b8eb53f8fb668d6bf3087d3'}\n\n```{.r .cell-code code-line-numbers=\"9,10,11,12|3\"}\nggplot(bikes, aes(x = temp_feel, y = count)) + \n geom_point(\n aes(color = season), \n alpha = .5, size = 1.5\n ) + \n stat_smooth(\n method = \"lm\", color = \"black\"\n ) +\n # small multiples\n facet_grid(\n rows = vars(day_night), cols = vars(year) # also: day_night ~ year\n )\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-7_69b48889365752e9cd23674008e0f2a6'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-7-1.png){width=2020}\n:::\n:::\n\n\n\n## Free Facets Axes\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-8_fd9eff017a9fba3dbc48953c23b59afb'}\n\n```{.r .cell-code code-line-numbers=\"11,12|13,14\"}\nggplot(bikes, aes(x = temp_feel, y = count)) + \n geom_point(\n aes(color = season), \n alpha = .5, size = 1.5\n ) + \n stat_smooth(\n method = \"lm\", color = \"black\"\n ) +\n facet_grid(\n day_night ~ year, \n # free y axis range\n scales = \"free_y\", \n # scale heights proportionally\n space = \"free_y\"\n )\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-8_4245878b8777d05fe555922e5a7de0f1'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-8-1.png){width=2020}\n:::\n:::\n\n\n\n## Store ggplot\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"1\"}\ng1 <- \n ggplot(bikes, aes(x = temp_feel, y = count)) + \n geom_point(\n aes(color = season), \n alpha = .5, size = 1.5\n ) + \n stat_smooth(\n method = \"lm\", color = \"black\"\n ) +\n facet_grid(\n day_night ~ year, \n scales = \"free_y\", \n space = \"free_y\"\n )\n```\n:::\n\n\n\n## Change the Axis Scaling\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-9a_71ca58800723ac3067ba987f2a91ea75'}\n\n```{.r .cell-code code-line-numbers=\"1|2,3,8|4,5|6,7\"}\ng1 +\n # x axis\n scale_x_continuous(\n # add °C symbol\n labels = function(x) paste0(x, \"°C\"), \n # use 5°C spacing\n breaks = -1:6*5 # also: seq(-5, 30, by = 5)\n )\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-9a_94c213b3e3298aee7aa24c2a76b7b869'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-9a-1.png){width=2020}\n:::\n:::\n\n\n\n## Change the Axis Scaling\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"9,10,15|11,12|13,14|1\"}\ng2 <- g1 +\n # x axis\n scale_x_continuous(\n # add °C symbol\n labels = function(x) paste0(x, \"°C\"), \n # use 5°C spacing\n breaks = -1:6*5 # also: seq(-5, 30, by = 5)\n ) +\n # y axis\n scale_y_continuous(\n # add a thousand separator\n labels = scales::label_comma(), \n # use consistent spacing across rows\n breaks = 0:5*10000\n )\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-9b_a1f16b4bb9b70474a341331ddfd6cf88'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-9b-1.png){width=2020}\n:::\n:::\n\n\n\n## Use a Custom Color Palette\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-10a_a2b62e2d5909c2c1666aa1d893b05151'}\n\n```{.r .cell-code code-line-numbers=\"2,3,4,5\"}\ng2 +\n # use a custom color palette for season colors\n scale_color_manual(\n values = c(\"#6681FE\", \"#1EC98D\", \"#F7B01B\", \"#A26E7C\")\n )\n```\n:::\n\n\n\n## Use a Custom Color Palette\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"1,2,3,4,5,6,7|10,11,12\"}\n# use a named vector for explicit matching\ncolors <- c(\n `0` = \"#1EC98D\",\n `1` = \"#F7B01B\",\n `2` = \"#A26E7C\",\n `3` = \"#6681FE\"\n)\n\ng2 +\n scale_color_manual(\n values = colors\n )\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-10_ce693f946c70482edbf1e765ddb060e1'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-10-1.png){width=2020}\n:::\n:::\n\n\n\n## Adjust Labels and Titles\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-11_2d7e0b13bceb12c6758e86b13d745705'}\n\n```{.r .cell-code code-line-numbers=\"11,12\"}\n# use a named vector for explicit matching\ncolors <- c(\n `0` = \"#1EC98D\",\n `1` = \"#F7B01B\",\n `2` = \"#A26E7C\",\n `3` = \"#6681FE\"\n)\n\ng2 +\n scale_color_manual(\n values = colors,\n # overwrite legend keys\n labels = c(\"Winter\", \"Spring\", \"Summer\", \"Autumn\")\n )\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-11_9545eeba757f1a80bcb64ae741df7cec'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-11-1.png){width=2020}\n:::\n:::\n\n\n\n## Adjust Labels and Titles\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"6,12|7,8|9,10,11\"}\ng3 <- g2 +\n scale_color_manual(\n values = colors,\n labels = c(\"Winter\", \"Spring\", \"Summer\", \"Autumn\")\n ) +\n labs(\n # overwrite axis and legend titles\n x = \"Average feels-like temperature\", y = NULL, color = NULL,\n # add plot title and caption\n title = \"Trends of Reported Bike Rents versus Feels-Like Temperature in London\",\n caption = \"Data: TfL (Transport for London), Jan 2015–Dec 2016\"\n )\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-12_fa8618f2346558525d91984fc7c63410'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-12-1.png){width=2020}\n:::\n:::\n\n\n\n## Apply a Complete Theme\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-13_8ce6babacc4b7bf8b34abbd3a8f15fc1'}\n\n```{.r .cell-code code-line-numbers=\"2,3,4,5\"}\ng3 +\n # add theme with a custom font + larger element sizes\n theme_light(\n base_size = 15, base_family = \"Spline Sans\"\n )\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-13_7b4505b1ca4b548fdd479f0a368e2306'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-13-1.png){width=2020}\n:::\n:::\n\n\n\n## Apply a Complete Theme\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"3,4,20|5,6,7|8,9,10,11,12,13,14|15,16|17,18|19\"}\ng4 <- g3 +\n theme_light(base_size = 15, base_family = \"Spline Sans\") +\n # theme adjustments\n theme(\n plot.title.position = \"plot\", # left-align title \n plot.caption.position = \"plot\", # right-align caption\n legend.position = \"top\", # place legend above plot\n plot.title = element_text(face = \"bold\", size = rel(1.4)), # larger, bold title\n axis.text = element_text(family = \"Spline Sans Mono\"), # monospaced font for axes\n axis.title.x = element_text( # left-aligned, grey x axis label\n hjust = 0, color = \"grey20\", margin = margin(t = 12)\n ),\n legend.text = element_text(size = rel(1)), # larger legend labels\n strip.text = element_text(face = \"bold\", size = rel(1.15)), # larger, bold facet labels\n panel.grid.major.x = element_blank(), # no vertical major lines\n panel.grid.minor = element_blank(), # no minor grid lines\n panel.spacing.x = unit(20, \"pt\"), # increase white space between panels\n panel.spacing.y = unit(10, \"pt\"), # increase white space between panels\n plot.margin = margin(rep(15, 4)) # adjust white space around plot\n )\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-14_579d1a1dfaf0480650568783386a63ce'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-14-1.png){width=2020}\n:::\n:::\n\n\n\n## Adjust Legend\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-15_d3d277f36ff972c767f850750799d004'}\n\n```{.r .cell-code code-line-numbers=\"2,3,4,5|4\"}\ng4 +\n # adjust symbol size in legend\n guides(\n color = guide_legend(override.aes = list(size = 4))\n )\n```\n:::\n\n\n\n## Adjust Legend\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-15b_6458e18188c6b9f6ebd8138a1213bb5f'}\n\n```{.r .cell-code code-line-numbers=\"2,5,6,7|5,6\"}\ng4 +\n scale_color_manual(\n values = colors,\n labels = c(\"Winter\", \"Spring\", \"Summer\", \"Autumn\"),\n # adjust symbol size in legend size\n guide = guide_legend(override.aes = list(size = 4))\n )\n```\n:::\n\n\n--------------------------------------------------------------------------------\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-15_c1f1277ad82b6cd039e09702caad009f'}\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/walkthrough-15-1.png){width=2020}\n:::\n:::\n\n\n\n--------------------------------------------------------------------------------\n\n## Full Code\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/walkthrough-full_8c95ed35a394e76e96f956adb5272781'}\n\n```{.r .cell-code}\n# create named color vector\ncolors <- c(\n `0` = \"#1EC98D\",\n `1` = \"#F7B01B\",\n `2` = \"#A26E7C\",\n `3` = \"#6681FE\"\n)\n\n# scatter plot of plot bikes$count versus bikes$temp_feel\nggplot(bikes, aes(x = temp_feel, y = count)) + \n # add points\n geom_point(\n # color mapping only applied to points\n aes(color = season), \n # setting larger points with 50% opacity\n alpha = .5, size = 1.5\n ) + \n # add a smoothing\n stat_smooth( # also: geom_smooth()\n # use linear fitting + draw black smoothing lines\n method = \"lm\", color = \"black\"\n ) +\n # small multiples\n facet_grid(\n day_night ~ year, # also: vars(day_night), vars(year)\n # free y axis range\n scales = \"free_y\", \n # scale heights proportionally \n space = \"free_y\"\n ) +\n # x axis\n scale_x_continuous(\n # add °C symbol\n labels = function(x) paste0(x, \"°C\"), \n # use 5°C spacing\n breaks = -1:6*5 # also: seq(-5, 30, by = 5)\n ) +\n # y axis\n scale_y_continuous(\n # add a thousand separator\n labels = scales::label_comma(), \n # use consistent spacing across rows\n breaks = 0:5*10000\n ) +\n # colors\n scale_color_manual(\n # use a custom color palette\n values = colors,\n # overwrite legend keys\n labels = c(\"Winter\", \"Spring\", \"Summer\", \"Autumn\"),\n # adjust symbol size in legend size\n guide = guide_legend(override.aes = list(size = 4))\n ) +\n labs(\n # overwrite axis and legend titles\n x = \"Average feels-like temperature\", y = NULL, color = NULL,\n # add plot title and caption\n title = \"Trends of Reported Bike Rents versus Feels-Like Temperature in London\",\n caption = \"Data: TfL (Transport for London), Jan 2015–Dec 2016\"\n ) +\n # add theme with a custom font + larger element sizes\n theme_light(\n base_size = 15, base_family = \"Spline Sans\"\n ) +\n # theme adjustments\n theme(\n plot.title.position = \"plot\", # left-align title \n plot.caption.position = \"plot\", # right-align caption\n legend.position = \"top\", # place legend above plot\n plot.title = element_text(face = \"bold\", size = rel(1.4)), # larger, bold title\n axis.text = element_text(family = \"Spline Sans Mono\"), # monospaced font for axes\n axis.title.x = element_text( # left-aligned, grey x axis label\n hjust = 0, color = \"grey20\", margin = margin(t = 12)\n ),\n legend.text = element_text(size = rel(1)), # larger legend labels\n strip.text = element_text(face = \"bold\", size = rel(1.15)), # larger, bold facet labels\n panel.grid.major.x = element_blank(), # no vertical major lines\n panel.grid.minor = element_blank(), # no minor grid lines\n panel.spacing.x = unit(20, \"pt\"), # increase white space between panels\n panel.spacing.y = unit(10, \"pt\"), # increase white space between panels\n plot.margin = margin(rep(15, 4)) # adjust white space around plot\n )\n```\n:::\n\n\n\n# Saving Plots\n\n\n## Save the Graphic\n\n
\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save_e5f05ce158402d7e685982556d179209'}\n\n```{.r .cell-code}\nggsave(filename = \"my_plot.png\", plot = g)\n```\n:::\n\n\n::: fragment\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-implicit_9766c1583f2fbb00908b516d985f6453'}\n\n```{.r .cell-code}\nggsave(\"my_plot.png\")\n```\n:::\n\n:::\n\n
\n\n::: fragment\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-aspect_c4c7d92b369109a8c63e4d3acb8b3a4a'}\n\n```{.r .cell-code}\nggsave(\"my_plot.png\", width = 6, height = 5, dpi = 600)\n```\n:::\n\n:::\n\n\n## Plot Resolution\n\n\n\n\n\n::: {layout-ncol=\"2\"}\n![](plots/resolution-dpi-100.png)\n\n![](plots/resolution-dpi-600.png)\n:::\n\n\n## Plot Resolution\n\n::: {layout-ncol=\"2\"}\n![](img/resolution-dpi-100-zoom.png)\n\n![](img/resolution-dpi-600-zoom.png)\n:::\n\n\n## Save the Graphic\n\n
\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save_439dcf333a92406ebd8f3987d6bf9287'}\n\n```{.r .cell-code}\nggsave(filename = \"my_plot.png\", plot = g)\n```\n:::\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-implicit_c5fdbcc9003675c2f0008fca98c36874'}\n\n```{.r .cell-code}\nggsave(\"my_plot.png\")\n```\n:::\n\n\n
\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-aspect_c7758af26f1a01644a26e5432e2f2d0c'}\n\n```{.r .cell-code}\nggsave(\"my_plot.png\", width = 6, height = 5, dpi = 600)\n```\n:::\n\n\n::: fragment\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-unit_1cb025e0ae788e688d21927fee627091'}\n\n```{.r .cell-code}\nggsave(\"my_plot.png\", width = 6*2.54, height = 5*2.54, unit = \"cm\", dpi = 600)\n```\n:::\n\n:::\n\n
\n\n::: fragment\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-raster-agg_7717fd36fbcc79947a3b710ba2e06004'}\n\n```{.r .cell-code}\nggsave(\"my_plot.png\", device = agg_png)\n```\n:::\n\n:::\n\n::: fragment\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-cairo_b9eb653fefdb960c5af7f9f35c0916ab'}\n\n```{.r .cell-code}\nggsave(\"my_plot.pdf\", device = cairo_pdf)\n```\n:::\n\n:::\n\n\n--------------------------------------------------------------------------------\n\n
\n\n![Modified from canva.com](img/vector-raster-canva.png){fig-alt=\"A comparison of vector and raster graphics.\" fig-width=\"150%\"}\n\n\n\n## The {ragg} Package\n\nprovides drop-in replacements for the default raster graphic devices\n\n::: incremental\n\n* faster\n* direct access to all system fonts\n* advanced text rendering\n * including support for right-to-left text, emojis, and font fallback\n* high quality anti-aliasing\n* high quality rotated text\n* supports 16-bit output\n* system independent rendering\n\n:::\n\n\n## The {ragg} Package\n\n
\n\n![Source: [tidyverse.org/blog/2021/02/modern-text-features](https://www.tidyverse.org/blog/2021/02/modern-text-features/)](img/ragg-left-and-right.png){fig-align=\"center\" fig-alt=\"A comparison of different graphic devices in R comparing the rendering of right-to-left text (and mixing left-to-right and right-to-left text).\"}\n\n\n## The {ragg} Package\n\n
\n\n![Source: [tidyverse.org/blog/2021/02/modern-text-features](https://www.tidyverse.org/blog/2021/02/modern-text-features/)](img/ragg-ligatures.png){fig-align=\"center\" fig-alt=\"A comparison of different graphic devices in R comparing the rendering of font ligatures.\"}\n\n\n## The {ragg} Package\n\n
\n\n![Source: [tidyverse.org/blog/2021/02/modern-text-features](https://www.tidyverse.org/blog/2021/02/modern-text-features/)](img/ragg-emojis.png){fig-align=\"center\" fig-alt=\"A comparison of different graphic devices in R comparing the rendering of emojis.\"}\n\n\n## The {ragg} Package\n\n
\n\n![Source: [tidyverse.org/blog/2021/02/modern-text-features](https://www.tidyverse.org/blog/2021/02/modern-text-features/)](img/ragg-fallback.png){fig-align=\"center\" fig-alt=\"A comparison of different graphic devices in R comparing the rendering missing glyphs, partly making use of fallback fonts.\"}\n\n\n## The {ragg} Package\n\n::: incremental\n* use {ragg} when saving ggplots by passing agg device function: `ggsave(device = agg_png))` ([used by default if installed](https://github.com/tidyverse/ggplot2/pull/4388))\n* use {ragg} in the *Rstudio Plots* pane be setting the backend to AGG: ![](img/ragg-rstudio.png){fig-alt=\"How to set the AGG device as the default in RStudio via Global Options > > General > Graphics > Backend.\"}\n* use {ragg} when knitting Rmarkdown files by setting `dev=\"ragg_png\"` in the code chunk options.\n\n:::\n\n\n## Save the Graphic\n\n
\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save_439dcf333a92406ebd8f3987d6bf9287'}\n\n```{.r .cell-code}\nggsave(filename = \"my_plot.png\", plot = g)\n```\n:::\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-implicit_c5fdbcc9003675c2f0008fca98c36874'}\n\n```{.r .cell-code}\nggsave(\"my_plot.png\")\n```\n:::\n\n\n
\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-aspect_c7758af26f1a01644a26e5432e2f2d0c'}\n\n```{.r .cell-code}\nggsave(\"my_plot.png\", width = 6, height = 5, dpi = 600)\n```\n:::\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-unit_7b4c6b278330b6c7959419e4fe66e57e'}\n\n```{.r .cell-code}\nggsave(\"my_plot.png\", width = 6*2.54, height = 5*2.54, unit = \"cm\", dpi = 600)\n```\n:::\n\n
\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-raster-agg_ee35fa72950cb04d7a1ba33120bd2923'}\n\n```{.r .cell-code}\nggsave(\"my_plot.png\", device = agg_png)\n```\n:::\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-cairo_a437ddfca531433a3be58b3e32c0b6cf'}\n\n```{.r .cell-code}\nggsave(\"my_plot.pdf\", device = cairo_pdf)\n```\n:::\n\n\n::: fragment\n\n::: {.cell hash='01-fundamentals_cache/revealjs/ggplot-save-svg_04c01878d73ecdfe86e9bb01ec2cecfb'}\n\n```{.r .cell-code}\nggsave(\"my_plot.svg\")\n```\n:::\n\n:::\n\n\n--------------------------------------------------------------------------------\n\n![](img/figma-svg.png){fig-align=\"center\"}\n\n\n## How to Work with Aspect Ratios\n\n::: incremental\n- don't rely on the Rstudio viewer pane!\n- once you have a *\"it's getting close\"* prototype, settle on a plot size

\n- **Approach 1:** save the file and inspect it—go back to your IDE—repeat\n - tedious and time-consuming...

\n- **Approach 2:** use a qmd or rmd with inline output and chunk settings\n - set `fig-width` / `fig.width` and `fig-height` / `fig.height`
per chunk or globally

\n:::\n\n\n## Setting Plot Sizes in Quarto and Rmarkdown\n\n![](img/plot-size-chunk-yaml.png){fig-alt=\"A screenshot of an exemplary Qmd file with two chunks with different settings of fig-width and fig-height as YAML-styled options using the hashpipe. Unfortunately, these are not respected when the chunk output is printed inline.\" fig-width=\"60%\"}\n\n\n## Setting Plot Sizes in Quarto and Rmarkdown\n\n![](img/plot-size-chunk-inline.png){fig-alt=\"A screenshot of an exemplary Qmd file with two chunks with different settings of fig.width and fig.height set as inline chunk options.\" fig-width=\"60%\"}\n\n\n## How to Work with Aspect Ratios\n\n- don't rely on the Rstudio viewer pane!\n- once you have a *\"it's getting close\"* prototype, settle on a plot size

\n- **Approach 1:** save the file and inspect it—go back to your IDE—repeat\n - tedious and time-consuming...

\n- **Approach 2:** use a qmd or rmd with inline output and chunk settings\n - set `fig-width` / `fig.width` and `fig-height` / `fig.height`
per chunk or globally

\n- **Approach 3:** use our [{camcorder} package](https://github.com/thebioengineer/camcorder)\n - saves output from all `ggplot()` calls and displays it in the viewer pane\n\n\n## Setting Plot Sizes via {camcorder}\n\n
\n\n![](img/plot-size-camcorder-a.png){fig-alt=\"A screenshot of an exemplary R script with a plot automatically saved and isplayed in correct aspect ratio thanks to the camcorder package.\" fig-width=\"120%\"}\n\n\n## Setting Plot Sizes via {camcorder}\n\n
\n\n![](img/plot-size-camcorder-b.png){fig-alt=\"A screenshot of an exemplary R script with a plot automatically saved and isplayed in correct aspect ratio thanks to the camcorder package.\" fig-width=\"120%\"}\n\n\n## Setting Plot Sizes via {camcorder}\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/camcorder-record_00dad4ac42afbc08553cc5c510c3d7ea'}\n\n```{.r .cell-code code-line-numbers=\"1,2,3,4,5,6,7|9,10,11,12,13,15\"}\ncamcorder::gg_record(\n dir = here::here(\"temp\"), # path for plot files\n device = \"png\", # device to use\n width = 10, # figure width\n height = 5, # figure height\n dpi = 600 # plot resolution\n)\n\ng <- ggplot(bikes, aes(x = temp, y = count, color = day_night)) +\n geom_point(alpha = .3, size = 2) +\n scale_color_manual(values = c(day = \"#FFA200\", night = \"#757BC7\")) +\n theme_minimal(base_size = 14, base_family = \"Asap SemiCondensed\") +\n theme(panel.grid.minor = element_blank())\n\ng\n```\n:::\n\n\n\n## Setting Plot Sizes via {camcorder}\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/camcorder-resize_8c9dabd1c4d2661597733e6d716f0424'}\n\n```{.r .cell-code code-line-numbers=\"17,19\"}\ncamcorder::gg_record(\n dir = here::here(\"temp\"), # path for plot files\n device = \"png\", # device to use\n width = 10, # figure width\n height = 5, # figure height\n dpi = 600 # plot resolution\n)\n\ng <- ggplot(bikes, aes(x = temp, y = count, color = day_night)) +\n geom_point(alpha = .3, size = 2) +\n scale_color_manual(values = c(day = \"#FFA200\", night = \"#757BC7\")) +\n theme_minimal(base_size = 14, base_family = \"Asap SemiCondensed\") +\n theme(panel.grid.minor = element_blank())\n\ng\n\ncamcorder::gg_resize_film(width = 20) # update figure width\n\ng\n```\n:::\n\n\n\n## Like a Pro: Set Theme Globally\n\n\n::: {.cell}\n\n```{.r .cell-code}\ntheme_set(theme_minimal(base_size = 14, base_family = \"Asap SemiCondensed\"))\ntheme_update(panel.grid.minor = element_blank())\n```\n:::\n\n\n\n# Programming
with ggplot2\n\n\n## Conditional Components\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/conditional-components_caef70472f777a01248d33a3f284f406'}\n\n```{.r .cell-code code-line-numbers=\"1|3,4,5|4\"}\nsmooth <- TRUE\n\nggplot(bikes, aes(x = temp, y = humidity)) +\n { if(smooth) geom_smooth(color = \"red\") } +\n geom_point(alpha = .5)\n```\n:::\n\n\n\n## Conditional Components\n\n\n::: {.cell layout-align=\"center\" hash='01-fundamentals_cache/revealjs/conditional-components-1_af3590b704ded767678e130b9bed0532'}\n\n```{.r .cell-code}\nsmooth <- TRUE\n\nggplot(bikes, aes(x = temp, y = humidity)) +\n { if(smooth) geom_smooth(color = \"red\") } +\n geom_point(alpha = .5)\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/conditional-components-1-1.png){fig-align='center' width=1600}\n:::\n:::\n\n\n\n## Conditional Components\n\n\n::: {.cell layout-align=\"center\" hash='01-fundamentals_cache/revealjs/conditional-components-2_f29ca7457d58aeba72af8364052998e2'}\n\n```{.r .cell-code code-line-numbers=\"1\"}\nsmooth <- FALSE\n\nggplot(bikes, aes(x = temp, y = humidity)) +\n { if(smooth) geom_smooth(color = \"red\") } +\n geom_point(alpha = .5)\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/conditional-components-2-1.png){fig-align='center' width=1600}\n:::\n:::\n\n\n\n## Wrapper Functions for Plots\n\n\n::: {.cell hash='01-fundamentals_cache/revealjs/conditional-components-function_bbcbb08aec8f13e9bfdf6dcd42f130a4'}\n\n```{.r .cell-code code-line-numbers=\"1,5|2,3,4\"}\ndraw_scatter <- function(smooth = TRUE) {\n ggplot(bikes, aes(x = temp, y = humidity)) +\n { if(smooth) geom_smooth(color = \"red\") } +\n geom_point(alpha = .5)\n}\n```\n:::\n\n\n\n## Wrapper Functions for Plots\n\n\n::: {.cell output-location='column' hash='01-fundamentals_cache/revealjs/conditional-components-function-plot-default_b88942c23d103843491ed566b4ee8391'}\n\n```{.r .cell-code}\ndraw_scatter()\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/conditional-components-function-plot-default-1.png){width=1000}\n:::\n:::\n\n\n\n## Wrapper Functions for Plots\n\n\n::: {.cell output-location='column' hash='01-fundamentals_cache/revealjs/conditional-components-function-plot-false_9e465abdd77a1628e20f9b9194f5c781'}\n\n```{.r .cell-code}\ndraw_scatter(smooth = FALSE)\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/conditional-components-function-plot-false-1.png){width=1000}\n:::\n:::\n\n\n\n## Components as Functions\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"1,2,7|3,6|4,5\"}\ngeom_scatterfit <- function(pointsize = 1, pointalpha = 1, \n method = \"lm\", linecolor = \"red\", ...) {\n list(\n geom_point(size = pointsize, alpha = pointalpha, ...),\n geom_smooth(method = method, color = linecolor, ...)\n )\n}\n```\n:::\n\n\n\n## Components as Functions\n\n\n::: {.cell output-location='column' hash='01-fundamentals_cache/revealjs/function-components-defaults_b82bb4e1013de3757c454e7f445193ef'}\n\n```{.r .cell-code code-line-numbers=\"3\"}\nggplot(bikes,\n aes(x = humidity, y = count)) +\n geom_scatterfit()\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/function-components-defaults-1.png){width=1000}\n:::\n:::\n\n\n\n## Components as Functions\n\n\n::: {.cell output-location='column' hash='01-fundamentals_cache/revealjs/function-components-args_166742f1bde5f609121fd38acd7a44d2'}\n\n```{.r .cell-code code-line-numbers=\"4,5\"}\nggplot(bikes,\n aes(x = humidity, y = count)) +\n geom_scatterfit(\n color = \"#28A87D\", \n linewidth = 3\n )\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/function-components-args-1.png){width=1000}\n:::\n:::\n\n\n\n## Components as Functions\n\n\n::: {.cell output-location='column' hash='01-fundamentals_cache/revealjs/function-components-custom_0855f87dcad4c1979956d8c4ba0fb5cc'}\n\n```{.r .cell-code code-line-numbers=\"1,2|4,5,6,7\"}\nggplot(diamonds, \n aes(x = carat, y = price)) +\n geom_scatterfit(\n pointsize = .5, \n pointalpha = .1,\n method = \"gam\",\n linecolor = \"#EFAC00\"\n )\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/function-components-custom-1.png){width=1000}\n:::\n:::\n\n\n\n## Components as Functions\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"1,14|2,13|3,4,5,6,7|8,9,10,11,12\"}\nscales_log <- function(sides = \"xy\") {\n list(\n if(stringr::str_detect(sides, \"x\")) {\n scale_x_log10(\n breaks = c(10^(1:100)), labels = scales::label_log()\n )\n },\n if(stringr::str_detect(sides, \"y\")) {\n scale_y_log10(\n breaks = c(10^(1:100)), labels = scales::label_log()\n )\n }\n )\n}\n```\n:::\n\n\n\n## Components as Functions\n\n\n::: {.cell output-location='column' hash='01-fundamentals_cache/revealjs/function-components-scales-custom_5b6321eab679a1975d13c047c2a99c10'}\n\n```{.r .cell-code code-line-numbers=\"9\"}\nggplot(diamonds, \n aes(x = carat, y = price)) +\n geom_scatterfit(\n pointsize = .5, \n pointalpha = .1,\n method = \"gam\",\n linecolor = \"#EFAC00\"\n ) +\n scales_log(sides = \"y\")\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/function-components-scales-custom-1.png){width=1000}\n:::\n:::\n\n\n\n## Iterative Graphics\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"1,11|2,3,4|5,6,7,8,9|1,4,9\"}\ntrends_monthly <- function(grp = \"January\") {\n bikes |> \n dplyr::mutate(month = lubridate::month(date, label = TRUE, abbr = FALSE)) |> \n dplyr::filter(month %in% grp) |> \n ggplot(aes(x = temp, y = count, color = day_night)) +\n geom_point(alpha = .2, show.legend = FALSE) +\n geom_smooth(se = FALSE) +\n scale_color_manual(values = c(\"#FFA200\", \"#757bc7\")) +\n labs(title = grp, x = \"Temperature\", y = \"Bike shares\", color = NULL)\n}\n```\n:::\n\n\n\n## Iterative Graphics\n\n\n::: {.cell output-location='column'}\n\n```{.r .cell-code}\ntrends_monthly(\"July\")\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/function-iterate-monthly-july-1.png){width=1000}\n:::\n:::\n\n\n\n## Iterative Graphics\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"8,9,10\"}\ntrends_monthly <- function(grp = \"January\") {\n bikes |> \n dplyr::mutate(month = lubridate::month(date, label = TRUE, abbr = FALSE)) |> \n dplyr::filter(month %in% grp) |> \n ggplot(aes(x = temp, y = count, color = day_night)) +\n geom_point(alpha = .2, show.legend = FALSE) +\n geom_smooth(se = FALSE) +\n # keep axis ranges consistent\n scale_x_continuous(limits = range(bikes$temp)) +\n scale_y_continuous(limits = range(bikes$count)) +\n scale_color_manual(values = c(\"#FFA200\", \"#757bc7\")) +\n labs(title = grp, x = \"Temperature\", y = \"Bike shares\", color = NULL)\n}\n```\n:::\n\n\n\n## Iterative Graphics\n\n\n::: {.cell output-location='column'}\n\n```{.r .cell-code}\ntrends_monthly(\"July\")\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/function-iterate-monthly-ranges-july-1.png){width=1000}\n:::\n:::\n\n\n\n## Iterative Graphics\n\n\n::: {.cell}\n\n```{.r .cell-code}\nplots <- purrr::map(month.name[1:12], trends_monthly) ## also: ~ trends_monthly(.x)\n```\n:::\n\n\n\n## Iterative Graphics\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code code-line-numbers=\"2\"}\nplots <- purrr::map(month.name[1:12], trends_monthly) ## also: ~ trends_monthly(.x)\nplots[[9]]\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/function-iterate-monthly-ranges-purrr-single-1.png){fig-align='center' width=1600}\n:::\n:::\n\n\n\n## Iterative Graphics\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code code-line-numbers=\"2\"}\nplots <- purrr::map(month.name[1:12], trends_monthly) ## also: ~ trends_monthly(.x)\npatchwork::wrap_plots(plots)\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/function-iterate-monthly-ranges-wrap-1.png){fig-align='center' width=3600}\n:::\n:::\n\n\n\n## Iterative Graphics\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"1,11|2|3,4|5,6,7|8,9,10\"}\nplot_density <- function(data, var, grp = \"\") {\n ggplot(data, aes(x = !!sym(var))) +\n geom_density(aes(fill = !!sym(grp)), position = \"identity\",\n color = \"grey30\", alpha = .3) +\n coord_cartesian(expand = FALSE, clip = \"off\") +\n scale_y_continuous(labels = scales::label_number()) +\n scale_fill_brewer(palette = \"Dark2\", name = NULL) +\n theme(legend.position = \"top\")\n}\n```\n:::\n\n\n\n## Iterative Graphics\n\n\n::: {.cell output-location='column'}\n\n```{.r .cell-code}\nplot_density(\n bikes, \"count\"\n)\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/function-density-plot-1.png){width=1000}\n:::\n:::\n\n\n\n## Iterative Graphics\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code code-line-numbers=\"1,2,3,4|2|3|5\"}\nplots <- purrr::map(\n c(\"count\", \"temp\", \"humidity\", \"wind_speed\"), \n ~ plot_density(data = bikes, var = .x, grp = \"day_night\")\n)\npatchwork::wrap_plots(plots, nrow = 1)\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/function-density-plot-grp-1.png){fig-align='center' width=2800}\n:::\n:::\n\n\n\n## Iterative Graphics\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code code-line-numbers=\"2|3|5\"}\nplots <- purrr::map(\n names(dplyr::select(midwest, where(is.numeric))),\n ~plot_density(data = midwest, var = .x)\n)\npatchwork::wrap_plots(plots)\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/function-density-plot-midwest-1.png){fig-align='center' width=4000}\n:::\n:::\n\n\n\n# Combine Plots\n\n\n## Combine Plots with {patchwork}\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"1|3|5|7∂\"}\nlibrary(patchwork)\n\np1 <- plot_density(data = bikes, var = \"count\", grp = \"day_night\")\n\np2 <- plot_density(data = bikes, var = \"humidity\", grp = \"day_night\")\n\np3 <- ggplot(bikes, aes(x = humidity, y = count)) + geom_scatterfit(pointalpha = .3)\n```\n:::\n\n\n\n## Combine Plots with {patchwork}\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code}\n(p1 + p2) / p3\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/patchwork-example-1-1.png){fig-align='center' width=2400}\n:::\n:::\n\n\n\n## Combine Plots with {patchwork}\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code}\n(p1 + p2) / p3 + plot_layout(heights = c(1, 2))\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/patchwork-example-2-1.png){fig-align='center' width=2400}\n:::\n:::\n\n\n\n## Combine Plots with {patchwork}\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code}\n(p1 + p2) / p3 + plot_layout(heights = c(1, 2), guides = \"collect\")\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/patchwork-example-3-1.png){fig-align='center' width=2400}\n:::\n:::\n\n\n\n## Combine Plots with {patchwork}\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code}\n(p1 + p2) / p3 + plot_layout(heights = c(1, 2), guides = \"collect\") +\n plot_annotation(theme = theme(legend.justification = \"top\"))\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/patchwork-example-4-1.png){fig-align='center' width=2400}\n:::\n:::\n\n\n\n## Combine Plots with {patchwork}\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code}\n(p1 + p2) / p3 + plot_layout(heights = c(1, 2), guides = \"collect\") +\n plot_annotation(tag_levels = \"A\", tag_suffix = \".\", theme = theme(legend.justification = \"top\"))\n```\n\n::: {.cell-output-display}\n![](01-fundamentals_files/figure-revealjs/patchwork-example-5-1.png){fig-align='center' width=2400}\n:::\n:::\n\n\n\n# Exciting Extension Packages\n\n\n## Layers\n\n+ [**`{geofacet}`**](https://hafen.github.io/geofacet/) — tile grid maps\n+ [**`{ggalluvial}`**](https://github.com/hrbrmstr/ggalt) — alluvial plots\n+ [**`{ggalt}`**](https://github.com/hrbrmstr/ggalt) — dumbbell, horizon, and lollipop charts, splines, ...\n+ [**`{ggbeeswarm}`**](https://github.com/hrbrmstr/ggalt) — beeswarm plots and variants\n+ [**`{ggbraid}`**](https://nsgrantham.github.io/ggbraid/) — ribbons for alternating groups\n+ [**`{ggbump}`**](https://github.com/davidsjoberg/ggbump) — parallel sets, pie charts, geometries, splines, voronoi, ...\n+ [**`{ggdensity}`**](https://jamesotto852.github.io/ggdensity/) — improved density plots\n+ [**`{ggdist}`**](https://github.com/davidsjoberg/ggbump) — uncertainty visualizations\n+ [**`{ggforce}`**](https://ggforce.data-imaginist.com/) — several interesting layers (and more)\n+ [**`{ggpattern}`**](https://github.com/coolbutuseless/ggpattern) — pattern fills for layers\n\n\n## Layers (continued)\n\n+ [**`{ggpointdensity}`**](https://github.com/LKremer/ggpointdensity) — density gradients for scatter plots\n+ [**`{ggraph}`**](https://github.com/thomasp85/ggraph) — networks, graphs & trees\n+ [**`{ggridges}`**](https://github.com/clauswilke/ggridges) — ridgeline plots\n+ [**`{ggsankey}`**](https://github.com/davidsjoberg/ggsankey) — sankey diagrams\n+ [**`{ggsignif}`**](https://const-ae.github.io/ggsignif/) — significance levels\n+ [**`{ggstar}`**](https://github.com/xiangpin/ggstar) — more point shapes\n+ [**`{ggstream}`**](https://github.com/davidsjoberg/ggstream) — stream graphs\n+ [**`{ggupset}`**](https://github.com/const-ae/ggupset) — upset graphs\n+ [**`{treemapify}`**](https://wilkox.org/treemapify/) — treemaps\n\n\n## Utilities\n\n+ [**`{cowplot}`**](https://cran.r-project.org/web/packages/cowplot/vignettes/introduction.html) — combine ggplots\n+ [**`{ggannotate}`**](https://github.com/MattCowgill/ggannotate) — point-n-click annotations\n+ [**`{ggblend}`**](https://mjskay.github.io/ggblend/) — blend, compose, adjust layers\n+ [**`{ggfittext}`**](https://wilkox.org/ggfittext/) — scale text according to space\n+ [**`{ggfx}`**](https://ggfx.data-imaginist.com/) — shaders and filters for layers\n+ [**`{ggh4x}`**](https://teunbrand.github.io/ggh4x/) — facets, positions, and more\n+ [**`{ggtext}`**](https://github.com/thomasp85/patchwork#patchwork) — text rendering for theme elements + text layers\n+ [**`{lemon}`**](https://github.com/stefanedwards/lemon) — axis lines (and a few layers)\n+ [**`{patchwork}`**](https://github.com/thomasp85/patchwork#patchwork) — combine ggplots\n+ [**`{scales}`**](https://scales.r-lib.org/) — control scales \n\n\n## Themes\n\n+ [**`{ggdark}`**](https://github.com/nsgrantham/ggdark)\n+ [**`{ggsci}`**](https://github.com/jrnold/ggthemes) (also color scales)\n+ [**`{ggtech}`**](https://github.com/ricardo-bion/ggtech) (also color scales)\n+ [**`{ggthemes}`**](https://github.com/jrnold/ggthemes) (also color scales)\n+ [**`{ggthemr}`**](https://github.com/Mikata-Project/ggthemr)\n+ [**`{hrbrthemes}`**](https://github.com/hrbrmstr/hrbrthemes) (also color scales)\n+ [**`{tvthemes}`**](https://ryo-n7.github.io/tvthemes/) (also color scales)\n\n\n## Color Palettes\n\n+ [**`{colorspace}`**](https://cran.r-project.org/web/packages/colorspace/vignettes/colorspace.html)\n+ [**`{jcolors}`**](https://jaredhuling.org/jcolors/)\n+ [**`{MetBrewer}`**](https://github.com/BlakeRMills/MetBrewer)\n+ [**`{nord}`**](https://cran.r-project.org/web/packages/nord/readme/README.html)\n+ [**`{rcartocolor}`**](https://jakubnowosad.com/rcartocolor/)\n+ [**`{RColorBrewer}`**](https://cran.r-project.org/web/packages/RColorBrewer/index.html)\n+ [**`{scico}`**](https://github.com/thomasp85/scico)\n+ [**`{unikn}`**](https://github.com/hneth/unikn)\n+ [**`{viridis}`**](https://cran.r-project.org/web/packages/viridis/vignettes/intro-to-viridis.html)\n+ [**`{wesanderson}`**](https://github.com/karthik/wesanderson)\n\n\n## Interactive Charts\n\n+ [**`{ggiraph}`**](https://davidgohel.github.io/ggiraph/)\n+ [**`{plotly}`**](https://plotly.com/r/)\n+ [**`{echarts4r}`**](https://echarts4r.john-coene.com/)*\n+ [**`{highcharter}`**](https://jkunst.com/highcharter/)*\n+ [**`{charter}`**](https://github.com/JohnCoene/charter)*\n+ [**`{streamgraph}`**](https://hrbrmstr.github.io/streamgraph/)*\n+ [**`{tmap}`**](https://cran.r-project.org/web/packages/tmap/vignettes/tmap-getstarted.html)*\n+ [**`{leaflet}`**](https://rstudio.github.io/leaflet/)*\n+ [**`{globe4r}`**](https://globe4r.john-coene.com/)*\n+ [**`{grapher}`**](https://grapher.network/)*\n\n* not using ggplot2\n\n\n## Recap\n\n::: recap\n- a basic ggplot is build by specifying three components:
`data`, `aes`thetics and a `layer` (usually a `geom_*` or `stat_*`)\n- *aesthetic mappings* define how variables map to visual properties\n- the default appearance of all other components can be modified via `scale_*`, `coord_*`, `facet_*` and `theme_*` / `theme` \n- use the devices cairo (pdf) and agg (png, jpg, tiff) when saving plots\n- find a suitable plot size by setting figure chunk options in qmd/rmd files or with the help of the `{camcorder}` package\n- define conditional components, custom layers and functions to generate plots more efficiently and to iterate over multiple inputs\n- combine multiple plot outputs with `{patchwork}`\n:::\n\n\n# Exercises\n\n\n## Exercise 1\n\n::: question\n- **Discuss / investigate with your neighbor:**\n - What are the differences between `geom_line()` and `geom_path()`?\n - Why can you use `geom_smooth()` and `stat_smooth()` interchangeably?\n - What are the three ways to *remove a legend* from a ggplot?\n:::\n\n\n## Exercise 2\n\n::: question\n- **Explore the TfL bike share data visually:**\n - Create a *time series* of counts per day and night.\n - Draw *box and whisker plots* of average temperatures per month.\n - Visualize bike counts per weather type and period as *bar chart*. \n- **Combine the three plots with {patchwork}.**\n- **Export the final graphic in a format of your choice.**\n:::\n\n## {background-image=\"img/exercise-what-now.png\" background-position=\"center\" background-size=\"75%\"}\n", "supporting": [], "filters": [ "rmarkdown/pagebreak.lua" diff --git a/_freeze/materials/01-fundamentals/figure-revealjs/walkthrough-15-1.png b/_freeze/materials/01-fundamentals/figure-revealjs/walkthrough-15-1.png index 13fc068..b6029c5 100644 Binary files a/_freeze/materials/01-fundamentals/figure-revealjs/walkthrough-15-1.png and b/_freeze/materials/01-fundamentals/figure-revealjs/walkthrough-15-1.png differ diff --git a/_freeze/materials/01-fundamentals/figure-revealjs/walkthrough-full-1.png b/_freeze/materials/01-fundamentals/figure-revealjs/walkthrough-full-1.png index 13fc068..b6029c5 100644 Binary files a/_freeze/materials/01-fundamentals/figure-revealjs/walkthrough-full-1.png and b/_freeze/materials/01-fundamentals/figure-revealjs/walkthrough-full-1.png differ diff --git a/_quarto.yml b/_quarto.yml index 3ad9b66..5b252ef 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -1,5 +1,6 @@ project: type: website + output-dir: docs resources: - "images/twitter-card.png" render: diff --git a/docs/docs/docs/docs/images/cedric.png b/docs/docs/docs/docs/images/cedric.png new file mode 100644 index 0000000..2db48b0 Binary files /dev/null and b/docs/docs/docs/docs/images/cedric.png differ diff --git a/docs/docs/docs/docs/images/logo.png b/docs/docs/docs/docs/images/logo.png new file mode 100644 index 0000000..d89034a Binary files /dev/null and b/docs/docs/docs/docs/images/logo.png differ diff --git a/docs/docs/docs/docs/images/team-page.png b/docs/docs/docs/docs/images/team-page.png new file mode 100644 index 0000000..5edef7c Binary files /dev/null and b/docs/docs/docs/docs/images/team-page.png differ diff --git a/docs/docs/docs/docs/images/twitter-card.png b/docs/docs/docs/docs/images/twitter-card.png new file mode 100644 index 0000000..df77ccc Binary files /dev/null and b/docs/docs/docs/docs/images/twitter-card.png differ diff --git a/docs/materials/00-welcome.html b/docs/materials/00-welcome.html index 607c134..b870637 100644 --- a/docs/materials/00-welcome.html +++ b/docs/materials/00-welcome.html @@ -451,7 +451,7 @@

-
+

@@ -1433,8 +1433,8 @@

Exercise

-
-

Exercise 1

+
+

Exercise

  • Create a corporate or funny custom theme. diff --git a/docs/materials/04-theming_files/figure-revealjs/systemfonts-font-variants-compare-proportional-1.png b/docs/materials/04-theming_files/figure-revealjs/systemfonts-font-variants-compare-proportional-1.png index 3562e4c..c8ad4ed 100644 Binary files a/docs/materials/04-theming_files/figure-revealjs/systemfonts-font-variants-compare-proportional-1.png and b/docs/materials/04-theming_files/figure-revealjs/systemfonts-font-variants-compare-proportional-1.png differ diff --git a/docs/materials/solutions/04-theming-solutions.html b/docs/materials/solutions/04-theming-solutions.html index 7690382..aa87c8e 100644 --- a/docs/materials/solutions/04-theming-solutions.html +++ b/docs/materials/solutions/04-theming-solutions.html @@ -434,17 +434,9 @@

    Exercise

Preparation

-
-
library(readr)
-library(dplyr)
-library(ggplot2)
-
-## data
-bikes <-
-  read_csv(
-    here::here("data", "london-bikes.csv"),
-    col_types = "Dcfffilllddddc"
-  )
+
+
library(ggplot2)
+library(readr)
diff --git a/docs/schedule.html b/docs/schedule.html index fad69c4..56c871b 100644 --- a/docs/schedule.html +++ b/docs/schedule.html @@ -257,7 +257,7 @@

Schedule

- @@ -269,7 +269,7 @@

Schedule

Fundamentals & Workflows - A coffee cup. @@ -281,7 +281,7 @@

Schedule

Coffee Break - @@ -293,7 +293,7 @@

Schedule

Working with Text - Plate and utensils. @@ -305,7 +305,7 @@

Schedule

Lunch Break - @@ -317,7 +317,7 @@

Schedule

Working with Colors - A coffee cup. @@ -329,7 +329,7 @@

Schedule

Coffee Break - diff --git a/docs/search.json b/docs/search.json index c6de014..7230a1e 100644 --- a/docs/search.json +++ b/docs/search.json @@ -137,14 +137,14 @@ "href": "materials/01-fundamentals.html#the-components-of-a-ggplot", "title": "Engaging and Beautiful Data Visualizations with ggplot2", "section": "The Components of a ggplot", - "text": "The Components of a ggplot\n\n\n\n\n\nComponent\n\n\nFunction\n\n\nExplanation\n\n\n\n\nData\n\n\nggplot(data)         \n\n\nThe raw data that you want to visualize.\n\n\n\n\nAesthetics          \n\n\naes()\n\n\nThe mapping between variables and visual properties\n\n\n\nGeometries\n\n\ngeom_*()\n\n\nThe geometric shapes representing the data." + "text": "The Components of a ggplot\n\n\n\n\n\nComponent\n\n\nFunction\n\n\nExplanation\n\n\n\n\nData\n\n\nggplot(data)         \n\n\nThe raw data that you want to visualize (initialising a plot).\n\n\n\n\nAesthetics          \n\n\naes()\n\n\nThe mapping between variables and visual properties.\n\n\n\nGeometries\n\n\ngeom_*()\n\n\nThe geometric shape of a layer representing the data." }, { "objectID": "materials/01-fundamentals.html#the-components-of-a-ggplot-1", "href": "materials/01-fundamentals.html#the-components-of-a-ggplot-1", "title": "Engaging and Beautiful Data Visualizations with ggplot2", "section": "The Components of a ggplot", - "text": "The Components of a ggplot\n\n\n\n\n\nComponent\n\n\nFunction\n\n\nExplanation\n\n\n\n\nData\n\n\nggplot(data)         \n\n\nThe raw data that you want to visualize.\n\n\n\n\nAesthetics          \n\n\naes()\n\n\nThe mapping between variables and visual properties.\n\n\n\nGeometries\n\n\ngeom_*()\n\n\nThe geometric shapes representing the data.\n\n\n\n\nStatistics\n\n\nstat_*()\n\n\nThe statistical transformations applied to the data.\n\n\n\n\nScales\n\n\nscale_*()\n\n\nThe representation of mapped aesthetic attributes.\n\n\n\n\nCoordinate System\n\n\ncoord_*()\n\n\nThe transformation to map data coordinates into the plot plane.\n\n\n\n\nFacets\n\n\nfacet_*()\n\n\nThe arrangement of the data into a grid of small multiples.\n\n\n\n\nVisual Themes\n\n\ntheme() | theme_*()\n\n\nThe overall visual defaults of non-data elements of the graphic." + "text": "The Components of a ggplot\n\n\n\n\n\nComponent\n\n\nFunction\n\n\nExplanation\n\n\n\n\nData\n\n\nggplot(data)         \n\n\nThe raw data that you want to visualize (initializing a plot).\n\n\n\n\nAesthetics          \n\n\naes()\n\n\nThe mapping between variables and visual properties.\n\n\n\nGeometries\n\n\ngeom_*()\n\n\nThe geometric shape of a layer representing the data.\n\n\n\n\nStatistics\n\n\nstat_*()\n\n\nThe statistical transformation of a layer applied to the data.\n\n\n\n\nScales\n\n\nscale_*()\n\n\nThe representation of mapped aesthetic attributes.\n\n\n\n\nCoordinate System\n\n\ncoord_*()\n\n\nThe transformation to map data coordinates into the plot plane.\n\n\n\n\nFacets\n\n\nfacet_*()\n\n\nThe arrangement of the data into a set of small multiples.\n\n\n\n\nVisual Themes\n\n\ntheme() | theme_*()\n\n\nThe overall visual defaults of non-data elements of the graphic." }, { "objectID": "materials/01-fundamentals.html#the-data-set", @@ -1964,7 +1964,7 @@ "href": "materials/04-theming.html#use-non-default-typefaces", "title": "Engaging and Beautiful Data Visualizations with ggplot2", "section": "Use Non-Default Typefaces", - "text": "Use Non-Default Typefaces\n\nsystem_fonts()\n\n# A tibble: 19,243 × 9\n path index name family style weight width italic monospace\n \n 1 /Users/cedric/Library/Fonts/FontBase/IntroHeadR-Base.otf 0 IntroHeadR-Base Intro… Base normal norm… FALSE FALSE \n 2 /Users/cedric/Library/Fonts/Moniqa-ThinItalicHeading.otf 0 Moniqa-ThinItalicHeading Moniqa Thin… ultra… norm… TRUE FALSE \n 3 /Users/cedric/Library/Fonts/FontBase/Bitter-200.ttf 0 Bitter-ExtraLight Bitter Extr… normal norm… FALSE FALSE \n 4 /Users/cedric/Library/Fonts/iosevka-ss02.ttc 72 Iosevka-SS02-Medium Iosev… Medi… medium norm… FALSE TRUE \n 5 /System/Library/Fonts/Supplemental/Bangla MN.ttc 0 BanglaMN Bangl… Regu… normal norm… FALSE FALSE \n 6 /Users/cedric/Library/Fonts/iosevka-ss01-extrabold.ttc 17 Iosevka-Fixed-SS01-Extrabold-Exten… Iosev… Extr… ultra… norm… TRUE TRUE \n 7 /Users/cedric/Library/Fonts/Anybody-ExtraExpandedExtraLight.otf 0 Anybody-ExtraExpandedExtraLight Anybo… Extr… light semi… FALSE FALSE \n 8 /Users/cedric/Library/Fonts/Neutraface Text Demi Alt.ttf 0 NeutrafaceText-DemiAlt Neutr… Regu… semib… norm… FALSE FALSE \n 9 /Users/cedric/Library/Fonts/PlusJakartaSans-Italic-VariableFont_wght.ttf 1 PlusJakartaSansItalic-Light Plus … Ligh… normal norm… TRUE FALSE \n10 /Users/cedric/Library/Fonts/aleo-italic-webfont.ttf 0 Aleo-Italic Aleo Ital… normal norm… TRUE FALSE \n# ℹ 19,233 more rows" + "text": "Use Non-Default Typefaces\n\nsystem_fonts()\n\n# A tibble: 16,691 × 9\n path index name family style weight width italic monospace\n \n 1 /Users/cedric/Library/Fonts/FontBase/IntroHeadR-Base.otf 0 IntroHeadR-Base Intro… Base normal norm… FALSE FALSE \n 2 /Users/cedric/Library/Fonts/Moniqa-ThinItalicHeading.otf 0 Moniqa-ThinItalicHeading Moniqa Thin… ultra… norm… TRUE FALSE \n 3 /Users/cedric/Library/Fonts/ArimoNerdFontPropo-Italic.ttf 0 ArimoNFP-Italic Arimo… Ital… normal norm… TRUE FALSE \n 4 /Users/cedric/Library/Fonts/iosevka-ss02.ttc 72 Iosevka-SS02-Medium Iosev… Medi… medium norm… FALSE TRUE \n 5 /System/Library/Fonts/Supplemental/Bangla MN.ttc 0 BanglaMN Bangl… Regu… normal norm… FALSE FALSE \n 6 /Users/cedric/Library/Fonts/iosevka-ss01-extrabold.ttc 17 Iosevka-Fixed-SS01-Extrabold-Exten… Iosev… Extr… ultra… norm… TRUE TRUE \n 7 /Users/cedric/Library/Fonts/Anybody-ExtraExpandedExtraLight.otf 0 Anybody-ExtraExpandedExtraLight Anybo… Extr… light semi… FALSE FALSE \n 8 /Users/cedric/Library/Fonts/Neutraface Text Demi Alt.ttf 0 NeutrafaceText-DemiAlt Neutr… Regu… semib… norm… FALSE FALSE \n 9 /Users/cedric/Library/Fonts/PlusJakartaSans-Italic-VariableFont_wght.ttf 1 PlusJakartaSansItalic-Light Plus … Ligh… normal norm… TRUE FALSE \n10 /Users/cedric/Library/Fonts/aleo-italic-webfont.ttf 0 Aleo-Italic Aleo Ital… normal norm… TRUE FALSE \n# ℹ 16,681 more rows" }, { "objectID": "materials/04-theming.html#use-non-default-typefaces-1", @@ -2226,11 +2226,11 @@ "text": "Exercise\n\n\nCreate a corporate or funny custom theme.\n\nMake use of an existing complete theme to get started.\nPick a non-default font (or multiple) for your theme.\nOptional: Try working with font variants.\nOptional: Add other helpful arguments to your theme_* function." }, { - "objectID": "materials/04-theming.html#exercise-1-1", - "href": "materials/04-theming.html#exercise-1-1", + "objectID": "materials/04-theming.html#exercise-2", + "href": "materials/04-theming.html#exercise-2", "title": "Engaging and Beautiful Data Visualizations with ggplot2", - "section": "Exercise 1", - "text": "Exercise 1\n\n\nCreate a corporate or funny custom theme.\n\nMake use of an existing complete theme to get started.\nPick a non-default font (or multiple).\nOptional: Try working with font variants.\nOptional: Add other helpful arguments to your theme_* function.\n\nShowcase your theme using some example graphics.\n\nSave the plots to disk and share them with the group.\nDid you add some additional arguments?Feel free to share your thoughts on “why” and “how”." + "section": "Exercise", + "text": "Exercise\n\n\nCreate a corporate or funny custom theme.\n\nMake use of an existing complete theme to get started.\nPick a non-default font (or multiple).\nOptional: Try working with font variants.\nOptional: Add other helpful arguments to your theme_* function.\n\nShowcase your theme using some example graphics.\n\nSave the plots to disk and share them with the group.\nDid you add some additional arguments?Feel free to share your thoughts on “why” and “how”." }, { "objectID": "materials/04-theming.html#section", @@ -2797,7 +2797,7 @@ "href": "materials/solutions/04-theming-solutions.html#preparation", "title": "Engaging and Beautiful Data Visualizations with ggplot2", "section": "Preparation", - "text": "Preparation\n\nlibrary(readr)\nlibrary(dplyr)\nlibrary(ggplot2)\n\n## data\nbikes <-\n read_csv(\n here::here(\"data\", \"london-bikes.csv\"),\n col_types = \"Dcfffilllddddc\"\n )" + "text": "Preparation\n\nlibrary(ggplot2)\nlibrary(readr)" }, { "objectID": "materials/solutions/04-theming-solutions.html#custom-theme", diff --git a/docs/site_libs/bootstrap/bootstrap.min.css b/docs/site_libs/bootstrap/bootstrap.min.css index 8669396..ae3cd9a 100644 --- a/docs/site_libs/bootstrap/bootstrap.min.css +++ b/docs/site_libs/bootstrap/bootstrap.min.css @@ -7,4 +7,4 @@ * * ansi colors from IPython notebook's * -*/.ansi-black-fg{color:#3e424d}.ansi-black-bg{background-color:#3e424d}.ansi-black-intense-fg{color:#282c36}.ansi-black-intense-bg{background-color:#282c36}.ansi-red-fg{color:#e75c58}.ansi-red-bg{background-color:#e75c58}.ansi-red-intense-fg{color:#b22b31}.ansi-red-intense-bg{background-color:#b22b31}.ansi-green-fg{color:#00a250}.ansi-green-bg{background-color:#00a250}.ansi-green-intense-fg{color:#007427}.ansi-green-intense-bg{background-color:#007427}.ansi-yellow-fg{color:#ddb62b}.ansi-yellow-bg{background-color:#ddb62b}.ansi-yellow-intense-fg{color:#b27d12}.ansi-yellow-intense-bg{background-color:#b27d12}.ansi-blue-fg{color:#208ffb}.ansi-blue-bg{background-color:#208ffb}.ansi-blue-intense-fg{color:#0065ca}.ansi-blue-intense-bg{background-color:#0065ca}.ansi-magenta-fg{color:#d160c4}.ansi-magenta-bg{background-color:#d160c4}.ansi-magenta-intense-fg{color:#a03196}.ansi-magenta-intense-bg{background-color:#a03196}.ansi-cyan-fg{color:#60c6c8}.ansi-cyan-bg{background-color:#60c6c8}.ansi-cyan-intense-fg{color:#258f8f}.ansi-cyan-intense-bg{background-color:#258f8f}.ansi-white-fg{color:#c5c1b4}.ansi-white-bg{background-color:#c5c1b4}.ansi-white-intense-fg{color:#a1a6b2}.ansi-white-intense-bg{background-color:#a1a6b2}.ansi-default-inverse-fg{color:#fff}.ansi-default-inverse-bg{background-color:#000}.ansi-bold{font-weight:bold}.ansi-underline{text-decoration:underline}:root{--quarto-body-bg: #fff;--quarto-body-color: #373a3c;--quarto-text-muted: #6c757d;--quarto-border-color: #dee2e6;--quarto-border-width: 1px;--quarto-border-radius: 0.25rem}table.gt_table{color:var(--quarto-body-color);font-size:1em;width:100%;background-color:rgba(0,0,0,0);border-top-width:inherit;border-bottom-width:inherit;border-color:var(--quarto-border-color)}table.gt_table th.gt_column_spanner_outer{color:var(--quarto-body-color);background-color:rgba(0,0,0,0);border-top-width:inherit;border-bottom-width:inherit;border-color:var(--quarto-border-color)}table.gt_table th.gt_col_heading{color:var(--quarto-body-color);font-weight:bold;background-color:rgba(0,0,0,0)}table.gt_table thead.gt_col_headings{border-bottom:1px solid currentColor;border-top-width:inherit;border-top-color:var(--quarto-border-color)}table.gt_table thead.gt_col_headings:not(:first-child){border-top-width:1px;border-top-color:var(--quarto-border-color)}table.gt_table td.gt_row{border-bottom-width:1px;border-bottom-color:var(--quarto-border-color);border-top-width:0px}table.gt_table tbody.gt_table_body{border-top-width:1px;border-bottom-width:1px;border-bottom-color:var(--quarto-border-color);border-top-color:currentColor}div.columns{display:initial;gap:initial}div.column{display:inline-block;overflow-x:initial;vertical-align:top;width:50%}.code-annotation-tip-content{word-wrap:break-word}.code-annotation-container-hidden{display:none !important}dl.code-annotation-container-grid{display:grid;grid-template-columns:min-content auto}dl.code-annotation-container-grid dt{grid-column:1}dl.code-annotation-container-grid dd{grid-column:2}pre.sourceCode.code-annotation-code{padding-right:0}code.sourceCode .code-annotation-anchor{z-index:100;position:absolute;right:.5em;left:inherit;background-color:rgba(0,0,0,0)}:root{--mermaid-bg-color: #fff;--mermaid-edge-color: #373a3c;--mermaid-node-fg-color: #373a3c;--mermaid-fg-color: #373a3c;--mermaid-fg-color--lighter: #4f5457;--mermaid-fg-color--lightest: #686d71;--mermaid-font-family: Asap, Asap Condensed, Spline Sans, Tahoma, Arial, sans-serif;--mermaid-label-bg-color: #fff;--mermaid-label-fg-color: #2780e3;--mermaid-node-bg-color: rgba(39, 128, 227, 0.1);--mermaid-node-fg-color: #373a3c}@media print{:root{font-size:11pt}#quarto-sidebar,#TOC,.nav-page{display:none}.page-columns .content{grid-column-start:page-start}.fixed-top{position:relative}.panel-caption,.figure-caption,figcaption{color:#666}}.code-copy-button{position:absolute;top:0;right:0;border:0;margin-top:5px;margin-right:5px;background-color:rgba(0,0,0,0);z-index:3}.code-copy-button:focus{outline:none}.code-copy-button-tooltip{font-size:.75em}.code-copy-button>.bi::before{display:inline-block;height:1rem;width:1rem;content:"";vertical-align:-0.125em;background-image:url('data:image/svg+xml,');background-repeat:no-repeat;background-size:1rem 1rem}.code-copy-button-checked>.bi::before{background-image:url('data:image/svg+xml,')}.code-copy-button:hover>.bi::before{background-image:url('data:image/svg+xml,')}.code-copy-button-checked:hover>.bi::before{background-image:url('data:image/svg+xml,')}main ol ol,main ul ul,main ol ul,main ul ol{margin-bottom:1em}body{margin:0}main.page-columns>header>h1.title,main.page-columns>header>.title.h1{margin-bottom:0}@media(min-width: 992px){body .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start page-start-inset] 35px [body-start-outset] 35px [body-start] 1.5em [body-content-start] minmax(500px, calc( 850px - 3em )) [body-content-end] 1.5em [body-end] 35px [body-end-outset] minmax(75px, 145px) [page-end-inset] 35px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.fullcontent:not(.floating):not(.docked) .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start page-start-inset] 35px [body-start-outset] 35px [body-start] 1.5em [body-content-start] minmax(500px, calc( 850px - 3em )) [body-content-end] 1.5em [body-end] 35px [body-end-outset] 35px [page-end-inset page-end] 5fr [screen-end-inset] 1.5em}body.slimcontent:not(.floating):not(.docked) .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start page-start-inset] 35px [body-start-outset] 35px [body-start] 1.5em [body-content-start] minmax(500px, calc( 850px - 3em )) [body-content-end] 1.5em [body-end] 50px [body-end-outset] minmax(0px, 200px) [page-end-inset] 35px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.listing:not(.floating):not(.docked) .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start] minmax(50px, 100px) [page-start-inset] 50px [body-start-outset] 50px [body-start] 1.5em [body-content-start] minmax(500px, calc( 850px - 3em )) [body-content-end] 3em [body-end] 50px [body-end-outset] minmax(0px, 250px) [page-end-inset] minmax(50px, 100px) [page-end] 1fr [screen-end-inset] 1.5em [screen-end]}body:not(.floating):not(.docked) .page-columns.toc-left{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start] 35px [page-start-inset] minmax(0px, 175px) [body-start-outset] 35px [body-start] 1.5em [body-content-start] minmax(450px, calc( 800px - 3em )) [body-content-end] 1.5em [body-end] 35px [body-end-outset] minmax(0px, 175px) [page-end-inset] 35px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body:not(.floating):not(.docked) .page-columns.toc-left .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start] 35px [page-start-inset] minmax(0px, 175px) [body-start-outset] 35px [body-start] 1.5em [body-content-start] minmax(450px, calc( 800px - 3em )) [body-content-end] 1.5em [body-end] 35px [body-end-outset] minmax(0px, 175px) [page-end-inset] 35px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.floating .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start] minmax(25px, 50px) [page-start-inset] minmax(50px, 150px) [body-start-outset] minmax(25px, 50px) [body-start] 1.5em [body-content-start] minmax(500px, calc( 800px - 3em )) [body-content-end] 1.5em [body-end] minmax(25px, 50px) [body-end-outset] minmax(50px, 150px) [page-end-inset] minmax(25px, 50px) [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.docked .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start] minmax(50px, 100px) [page-start-inset] 50px [body-start-outset] 50px [body-start] 1.5em [body-content-start] minmax(500px, calc( 1000px - 3em )) [body-content-end] 1.5em [body-end] 50px [body-end-outset] minmax(50px, 100px) [page-end-inset] 50px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.docked.fullcontent .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start] minmax(50px, 100px) [page-start-inset] 50px [body-start-outset] 50px [body-start] 1.5em [body-content-start] minmax(500px, calc( 1000px - 3em )) [body-content-end] 1.5em [body-end body-end-outset page-end-inset page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.floating.fullcontent .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start] 50px [page-start-inset] minmax(50px, 150px) [body-start-outset] 50px [body-start] 1.5em [body-content-start] minmax(500px, calc( 800px - 3em )) [body-content-end] 1.5em [body-end body-end-outset page-end-inset page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.docked.slimcontent .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start] minmax(50px, 100px) [page-start-inset] 50px [body-start-outset] 50px [body-start] 1.5em [body-content-start] minmax(450px, calc( 750px - 3em )) [body-content-end] 1.5em [body-end] 50px [body-end-outset] minmax(0px, 200px) [page-end-inset] 50px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.docked.listing .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start] minmax(50px, 100px) [page-start-inset] 50px [body-start-outset] 50px [body-start] 1.5em [body-content-start] minmax(500px, calc( 1000px - 3em )) [body-content-end] 1.5em [body-end] 50px [body-end-outset] minmax(0px, 200px) [page-end-inset] 50px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.floating.slimcontent .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start] 50px [page-start-inset] minmax(50px, 150px) [body-start-outset] 50px [body-start] 1.5em [body-content-start] minmax(450px, calc( 750px - 3em )) [body-content-end] 1.5em [body-end] 50px [body-end-outset] minmax(50px, 150px) [page-end-inset] 50px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.floating.listing .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start] minmax(25px, 50px) [page-start-inset] minmax(50px, 150px) [body-start-outset] minmax(25px, 50px) [body-start] 1.5em [body-content-start] minmax(500px, calc( 800px - 3em )) [body-content-end] 1.5em [body-end] minmax(25px, 50px) [body-end-outset] minmax(50px, 150px) [page-end-inset] minmax(25px, 50px) [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}}@media(max-width: 991.98px){body .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start page-start-inset body-start-outset] 5fr [body-start] 1.5em [body-content-start] minmax(500px, calc( 800px - 3em )) [body-content-end] 1.5em [body-end] 35px [body-end-outset] minmax(75px, 145px) [page-end-inset] 35px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.fullcontent:not(.floating):not(.docked) .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start page-start-inset body-start-outset] 5fr [body-start] 1.5em [body-content-start] minmax(500px, calc( 800px - 3em )) [body-content-end] 1.5em [body-end body-end-outset page-end-inset page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.slimcontent:not(.floating):not(.docked) .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start page-start-inset body-start-outset] 5fr [body-start] 1.5em [body-content-start] minmax(500px, calc( 800px - 3em )) [body-content-end] 1.5em [body-end] 35px [body-end-outset] minmax(75px, 145px) [page-end-inset] 35px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.listing:not(.floating):not(.docked) .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start page-start-inset body-start-outset] 5fr [body-start] 1.5em [body-content-start] minmax(500px, calc( 1250px - 3em )) [body-content-end body-end body-end-outset page-end-inset page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body:not(.floating):not(.docked) .page-columns.toc-left{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start] 35px [page-start-inset] minmax(0px, 145px) [body-start-outset] 35px [body-start] 1.5em [body-content-start] minmax(450px, calc( 800px - 3em )) [body-content-end] 1.5em [body-end body-end-outset page-end-inset page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body:not(.floating):not(.docked) .page-columns.toc-left .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start] 35px [page-start-inset] minmax(0px, 145px) [body-start-outset] 35px [body-start] 1.5em [body-content-start] minmax(450px, calc( 800px - 3em )) [body-content-end] 1.5em [body-end body-end-outset page-end-inset page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.floating .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start page-start-inset body-start-outset body-start] 1.5em [body-content-start] minmax(500px, calc( 750px - 3em )) [body-content-end] 1.5em [body-end] 50px [body-end-outset] minmax(75px, 150px) [page-end-inset] 25px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.docked .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start page-start-inset body-start-outset body-start body-content-start] minmax(500px, calc( 750px - 3em )) [body-content-end] 1.5em [body-end] 50px [body-end-outset] minmax(25px, 50px) [page-end-inset] 50px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.docked.fullcontent .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start page-start-inset body-start-outset body-start body-content-start] minmax(500px, calc( 1000px - 3em )) [body-content-end] 1.5em [body-end body-end-outset page-end-inset page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.floating.fullcontent .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start page-start-inset body-start-outset body-start] 1em [body-content-start] minmax(500px, calc( 800px - 3em )) [body-content-end] 1.5em [body-end body-end-outset page-end-inset page-end] 4fr [screen-end-inset] 1.5em [screen-end]}body.docked.slimcontent .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start page-start-inset body-start-outset body-start body-content-start] minmax(500px, calc( 750px - 3em )) [body-content-end] 1.5em [body-end] 50px [body-end-outset] minmax(25px, 50px) [page-end-inset] 50px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.docked.listing .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start page-start-inset body-start-outset body-start body-content-start] minmax(500px, calc( 750px - 3em )) [body-content-end] 1.5em [body-end] 50px [body-end-outset] minmax(25px, 50px) [page-end-inset] 50px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.floating.slimcontent .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start page-start-inset body-start-outset body-start] 1em [body-content-start] minmax(500px, calc( 750px - 3em )) [body-content-end] 1.5em [body-end] 35px [body-end-outset] minmax(75px, 145px) [page-end-inset] 35px [page-end] 4fr [screen-end-inset] 1.5em [screen-end]}body.floating.listing .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start page-start-inset body-start-outset body-start] 1em [body-content-start] minmax(500px, calc( 750px - 3em )) [body-content-end] 1.5em [body-end] 50px [body-end-outset] minmax(75px, 150px) [page-end-inset] 25px [page-end] 4fr [screen-end-inset] 1.5em [screen-end]}}@media(max-width: 767.98px){body .page-columns,body.fullcontent:not(.floating):not(.docked) .page-columns,body.slimcontent:not(.floating):not(.docked) .page-columns,body.docked .page-columns,body.docked.slimcontent .page-columns,body.docked.fullcontent .page-columns,body.floating .page-columns,body.floating.slimcontent .page-columns,body.floating.fullcontent .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start page-start-inset body-start-outset body-start body-content-start] minmax(0px, 1fr) [body-content-end body-end body-end-outset page-end-inset page-end screen-end-inset] 1.5em [screen-end]}body:not(.floating):not(.docked) .page-columns.toc-left{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start page-start-inset body-start-outset body-start body-content-start] minmax(0px, 1fr) [body-content-end body-end body-end-outset page-end-inset page-end screen-end-inset] 1.5em [screen-end]}body:not(.floating):not(.docked) .page-columns.toc-left .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start page-start-inset body-start-outset body-start body-content-start] minmax(0px, 1fr) [body-content-end body-end body-end-outset page-end-inset page-end screen-end-inset] 1.5em [screen-end]}nav[role=doc-toc]{display:none}}body,.page-row-navigation{grid-template-rows:[page-top] max-content [contents-top] max-content [contents-bottom] max-content [page-bottom]}.page-rows-contents{grid-template-rows:[content-top] minmax(max-content, 1fr) [content-bottom] minmax(60px, max-content) [page-bottom]}.page-full{grid-column:screen-start/screen-end !important}.page-columns>*{grid-column:body-content-start/body-content-end}.page-columns.column-page>*{grid-column:page-start/page-end}.page-columns.column-page-left>*{grid-column:page-start/body-content-end}.page-columns.column-page-right>*{grid-column:body-content-start/page-end}.page-rows{grid-auto-rows:auto}.header{grid-column:screen-start/screen-end;grid-row:page-top/contents-top}#quarto-content{padding:0;grid-column:screen-start/screen-end;grid-row:contents-top/contents-bottom}body.floating .sidebar.sidebar-navigation{grid-column:page-start/body-start;grid-row:content-top/page-bottom}body.docked .sidebar.sidebar-navigation{grid-column:screen-start/body-start;grid-row:content-top/page-bottom}.sidebar.toc-left{grid-column:page-start/body-start;grid-row:content-top/page-bottom}.sidebar.margin-sidebar{grid-column:body-end/page-end;grid-row:content-top/page-bottom}.page-columns .content{grid-column:body-content-start/body-content-end;grid-row:content-top/content-bottom;align-content:flex-start}.page-columns .page-navigation{grid-column:body-content-start/body-content-end;grid-row:content-bottom/page-bottom}.page-columns .footer{grid-column:screen-start/screen-end;grid-row:contents-bottom/page-bottom}.page-columns .column-body{grid-column:body-content-start/body-content-end}.page-columns .column-body-fullbleed{grid-column:body-start/body-end}.page-columns .column-body-outset{grid-column:body-start-outset/body-end-outset;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-body-outset table{background:#fff}.page-columns .column-body-outset-left{grid-column:body-start-outset/body-content-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-body-outset-left table{background:#fff}.page-columns .column-body-outset-right{grid-column:body-content-start/body-end-outset;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-body-outset-right table{background:#fff}.page-columns .column-page{grid-column:page-start/page-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-page table{background:#fff}.page-columns .column-page-inset{grid-column:page-start-inset/page-end-inset;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-page-inset table{background:#fff}.page-columns .column-page-inset-left{grid-column:page-start-inset/body-content-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-page-inset-left table{background:#fff}.page-columns .column-page-inset-right{grid-column:body-content-start/page-end-inset;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-page-inset-right figcaption table{background:#fff}.page-columns .column-page-left{grid-column:page-start/body-content-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-page-left table{background:#fff}.page-columns .column-page-right{grid-column:body-content-start/page-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-page-right figcaption table{background:#fff}#quarto-content.page-columns #quarto-margin-sidebar,#quarto-content.page-columns #quarto-sidebar{z-index:1}@media(max-width: 991.98px){#quarto-content.page-columns #quarto-margin-sidebar.collapse,#quarto-content.page-columns #quarto-sidebar.collapse{z-index:1055}}#quarto-content.page-columns main.column-page,#quarto-content.page-columns main.column-page-right,#quarto-content.page-columns main.column-page-left{z-index:0}.page-columns .column-screen-inset{grid-column:screen-start-inset/screen-end-inset;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen-inset table{background:#fff}.page-columns .column-screen-inset-left{grid-column:screen-start-inset/body-content-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen-inset-left table{background:#fff}.page-columns .column-screen-inset-right{grid-column:body-content-start/screen-end-inset;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen-inset-right table{background:#fff}.page-columns .column-screen{grid-column:screen-start/screen-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen table{background:#fff}.page-columns .column-screen-left{grid-column:screen-start/body-content-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen-left table{background:#fff}.page-columns .column-screen-right{grid-column:body-content-start/screen-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen-right table{background:#fff}.page-columns .column-screen-inset-shaded{grid-column:screen-start/screen-end;padding:1em;background:#f8f9fa;z-index:998;transform:translate3d(0, 0, 0);margin-bottom:1em}.zindex-content{z-index:998;transform:translate3d(0, 0, 0)}.zindex-modal{z-index:1055;transform:translate3d(0, 0, 0)}.zindex-over-content{z-index:999;transform:translate3d(0, 0, 0)}img.img-fluid.column-screen,img.img-fluid.column-screen-inset-shaded,img.img-fluid.column-screen-inset,img.img-fluid.column-screen-inset-left,img.img-fluid.column-screen-inset-right,img.img-fluid.column-screen-left,img.img-fluid.column-screen-right{width:100%}@media(min-width: 992px){.margin-caption,div.aside,aside,.column-margin{grid-column:body-end/page-end !important;z-index:998}.column-sidebar{grid-column:page-start/body-start !important;z-index:998}.column-leftmargin{grid-column:screen-start-inset/body-start !important;z-index:998}.no-row-height{height:1em;overflow:visible}}@media(max-width: 991.98px){.margin-caption,div.aside,aside,.column-margin{grid-column:body-end/page-end !important;z-index:998}.no-row-height{height:1em;overflow:visible}.page-columns.page-full{overflow:visible}.page-columns.toc-left .margin-caption,.page-columns.toc-left div.aside,.page-columns.toc-left aside,.page-columns.toc-left .column-margin{grid-column:body-content-start/body-content-end !important;z-index:998;transform:translate3d(0, 0, 0)}.page-columns.toc-left .no-row-height{height:initial;overflow:initial}}@media(max-width: 767.98px){.margin-caption,div.aside,aside,.column-margin{grid-column:body-content-start/body-content-end !important;z-index:998;transform:translate3d(0, 0, 0)}.no-row-height{height:initial;overflow:initial}#quarto-margin-sidebar{display:none}#quarto-sidebar-toc-left{display:none}.hidden-sm{display:none}}.panel-grid{display:grid;grid-template-rows:repeat(1, 1fr);grid-template-columns:repeat(24, 1fr);gap:1em}.panel-grid .g-col-1{grid-column:auto/span 1}.panel-grid .g-col-2{grid-column:auto/span 2}.panel-grid .g-col-3{grid-column:auto/span 3}.panel-grid .g-col-4{grid-column:auto/span 4}.panel-grid .g-col-5{grid-column:auto/span 5}.panel-grid .g-col-6{grid-column:auto/span 6}.panel-grid .g-col-7{grid-column:auto/span 7}.panel-grid .g-col-8{grid-column:auto/span 8}.panel-grid .g-col-9{grid-column:auto/span 9}.panel-grid .g-col-10{grid-column:auto/span 10}.panel-grid .g-col-11{grid-column:auto/span 11}.panel-grid .g-col-12{grid-column:auto/span 12}.panel-grid .g-col-13{grid-column:auto/span 13}.panel-grid .g-col-14{grid-column:auto/span 14}.panel-grid .g-col-15{grid-column:auto/span 15}.panel-grid .g-col-16{grid-column:auto/span 16}.panel-grid .g-col-17{grid-column:auto/span 17}.panel-grid .g-col-18{grid-column:auto/span 18}.panel-grid .g-col-19{grid-column:auto/span 19}.panel-grid .g-col-20{grid-column:auto/span 20}.panel-grid .g-col-21{grid-column:auto/span 21}.panel-grid .g-col-22{grid-column:auto/span 22}.panel-grid .g-col-23{grid-column:auto/span 23}.panel-grid .g-col-24{grid-column:auto/span 24}.panel-grid .g-start-1{grid-column-start:1}.panel-grid .g-start-2{grid-column-start:2}.panel-grid .g-start-3{grid-column-start:3}.panel-grid .g-start-4{grid-column-start:4}.panel-grid .g-start-5{grid-column-start:5}.panel-grid .g-start-6{grid-column-start:6}.panel-grid .g-start-7{grid-column-start:7}.panel-grid .g-start-8{grid-column-start:8}.panel-grid .g-start-9{grid-column-start:9}.panel-grid .g-start-10{grid-column-start:10}.panel-grid .g-start-11{grid-column-start:11}.panel-grid .g-start-12{grid-column-start:12}.panel-grid .g-start-13{grid-column-start:13}.panel-grid .g-start-14{grid-column-start:14}.panel-grid .g-start-15{grid-column-start:15}.panel-grid .g-start-16{grid-column-start:16}.panel-grid .g-start-17{grid-column-start:17}.panel-grid .g-start-18{grid-column-start:18}.panel-grid .g-start-19{grid-column-start:19}.panel-grid .g-start-20{grid-column-start:20}.panel-grid .g-start-21{grid-column-start:21}.panel-grid .g-start-22{grid-column-start:22}.panel-grid .g-start-23{grid-column-start:23}@media(min-width: 576px){.panel-grid .g-col-sm-1{grid-column:auto/span 1}.panel-grid .g-col-sm-2{grid-column:auto/span 2}.panel-grid .g-col-sm-3{grid-column:auto/span 3}.panel-grid .g-col-sm-4{grid-column:auto/span 4}.panel-grid .g-col-sm-5{grid-column:auto/span 5}.panel-grid .g-col-sm-6{grid-column:auto/span 6}.panel-grid .g-col-sm-7{grid-column:auto/span 7}.panel-grid .g-col-sm-8{grid-column:auto/span 8}.panel-grid .g-col-sm-9{grid-column:auto/span 9}.panel-grid .g-col-sm-10{grid-column:auto/span 10}.panel-grid .g-col-sm-11{grid-column:auto/span 11}.panel-grid .g-col-sm-12{grid-column:auto/span 12}.panel-grid .g-col-sm-13{grid-column:auto/span 13}.panel-grid .g-col-sm-14{grid-column:auto/span 14}.panel-grid .g-col-sm-15{grid-column:auto/span 15}.panel-grid .g-col-sm-16{grid-column:auto/span 16}.panel-grid .g-col-sm-17{grid-column:auto/span 17}.panel-grid .g-col-sm-18{grid-column:auto/span 18}.panel-grid .g-col-sm-19{grid-column:auto/span 19}.panel-grid .g-col-sm-20{grid-column:auto/span 20}.panel-grid .g-col-sm-21{grid-column:auto/span 21}.panel-grid .g-col-sm-22{grid-column:auto/span 22}.panel-grid .g-col-sm-23{grid-column:auto/span 23}.panel-grid .g-col-sm-24{grid-column:auto/span 24}.panel-grid .g-start-sm-1{grid-column-start:1}.panel-grid .g-start-sm-2{grid-column-start:2}.panel-grid .g-start-sm-3{grid-column-start:3}.panel-grid .g-start-sm-4{grid-column-start:4}.panel-grid .g-start-sm-5{grid-column-start:5}.panel-grid .g-start-sm-6{grid-column-start:6}.panel-grid .g-start-sm-7{grid-column-start:7}.panel-grid .g-start-sm-8{grid-column-start:8}.panel-grid .g-start-sm-9{grid-column-start:9}.panel-grid .g-start-sm-10{grid-column-start:10}.panel-grid .g-start-sm-11{grid-column-start:11}.panel-grid .g-start-sm-12{grid-column-start:12}.panel-grid .g-start-sm-13{grid-column-start:13}.panel-grid .g-start-sm-14{grid-column-start:14}.panel-grid .g-start-sm-15{grid-column-start:15}.panel-grid .g-start-sm-16{grid-column-start:16}.panel-grid .g-start-sm-17{grid-column-start:17}.panel-grid .g-start-sm-18{grid-column-start:18}.panel-grid .g-start-sm-19{grid-column-start:19}.panel-grid .g-start-sm-20{grid-column-start:20}.panel-grid .g-start-sm-21{grid-column-start:21}.panel-grid .g-start-sm-22{grid-column-start:22}.panel-grid .g-start-sm-23{grid-column-start:23}}@media(min-width: 768px){.panel-grid .g-col-md-1{grid-column:auto/span 1}.panel-grid .g-col-md-2{grid-column:auto/span 2}.panel-grid .g-col-md-3{grid-column:auto/span 3}.panel-grid .g-col-md-4{grid-column:auto/span 4}.panel-grid .g-col-md-5{grid-column:auto/span 5}.panel-grid .g-col-md-6{grid-column:auto/span 6}.panel-grid .g-col-md-7{grid-column:auto/span 7}.panel-grid .g-col-md-8{grid-column:auto/span 8}.panel-grid .g-col-md-9{grid-column:auto/span 9}.panel-grid .g-col-md-10{grid-column:auto/span 10}.panel-grid .g-col-md-11{grid-column:auto/span 11}.panel-grid .g-col-md-12{grid-column:auto/span 12}.panel-grid .g-col-md-13{grid-column:auto/span 13}.panel-grid .g-col-md-14{grid-column:auto/span 14}.panel-grid .g-col-md-15{grid-column:auto/span 15}.panel-grid .g-col-md-16{grid-column:auto/span 16}.panel-grid .g-col-md-17{grid-column:auto/span 17}.panel-grid .g-col-md-18{grid-column:auto/span 18}.panel-grid .g-col-md-19{grid-column:auto/span 19}.panel-grid .g-col-md-20{grid-column:auto/span 20}.panel-grid .g-col-md-21{grid-column:auto/span 21}.panel-grid .g-col-md-22{grid-column:auto/span 22}.panel-grid .g-col-md-23{grid-column:auto/span 23}.panel-grid .g-col-md-24{grid-column:auto/span 24}.panel-grid .g-start-md-1{grid-column-start:1}.panel-grid .g-start-md-2{grid-column-start:2}.panel-grid .g-start-md-3{grid-column-start:3}.panel-grid .g-start-md-4{grid-column-start:4}.panel-grid .g-start-md-5{grid-column-start:5}.panel-grid .g-start-md-6{grid-column-start:6}.panel-grid .g-start-md-7{grid-column-start:7}.panel-grid .g-start-md-8{grid-column-start:8}.panel-grid .g-start-md-9{grid-column-start:9}.panel-grid .g-start-md-10{grid-column-start:10}.panel-grid .g-start-md-11{grid-column-start:11}.panel-grid .g-start-md-12{grid-column-start:12}.panel-grid .g-start-md-13{grid-column-start:13}.panel-grid .g-start-md-14{grid-column-start:14}.panel-grid .g-start-md-15{grid-column-start:15}.panel-grid .g-start-md-16{grid-column-start:16}.panel-grid .g-start-md-17{grid-column-start:17}.panel-grid .g-start-md-18{grid-column-start:18}.panel-grid .g-start-md-19{grid-column-start:19}.panel-grid .g-start-md-20{grid-column-start:20}.panel-grid .g-start-md-21{grid-column-start:21}.panel-grid .g-start-md-22{grid-column-start:22}.panel-grid .g-start-md-23{grid-column-start:23}}@media(min-width: 992px){.panel-grid .g-col-lg-1{grid-column:auto/span 1}.panel-grid .g-col-lg-2{grid-column:auto/span 2}.panel-grid .g-col-lg-3{grid-column:auto/span 3}.panel-grid .g-col-lg-4{grid-column:auto/span 4}.panel-grid .g-col-lg-5{grid-column:auto/span 5}.panel-grid .g-col-lg-6{grid-column:auto/span 6}.panel-grid .g-col-lg-7{grid-column:auto/span 7}.panel-grid .g-col-lg-8{grid-column:auto/span 8}.panel-grid .g-col-lg-9{grid-column:auto/span 9}.panel-grid .g-col-lg-10{grid-column:auto/span 10}.panel-grid .g-col-lg-11{grid-column:auto/span 11}.panel-grid .g-col-lg-12{grid-column:auto/span 12}.panel-grid .g-col-lg-13{grid-column:auto/span 13}.panel-grid .g-col-lg-14{grid-column:auto/span 14}.panel-grid .g-col-lg-15{grid-column:auto/span 15}.panel-grid .g-col-lg-16{grid-column:auto/span 16}.panel-grid .g-col-lg-17{grid-column:auto/span 17}.panel-grid .g-col-lg-18{grid-column:auto/span 18}.panel-grid .g-col-lg-19{grid-column:auto/span 19}.panel-grid .g-col-lg-20{grid-column:auto/span 20}.panel-grid .g-col-lg-21{grid-column:auto/span 21}.panel-grid .g-col-lg-22{grid-column:auto/span 22}.panel-grid .g-col-lg-23{grid-column:auto/span 23}.panel-grid .g-col-lg-24{grid-column:auto/span 24}.panel-grid .g-start-lg-1{grid-column-start:1}.panel-grid .g-start-lg-2{grid-column-start:2}.panel-grid .g-start-lg-3{grid-column-start:3}.panel-grid .g-start-lg-4{grid-column-start:4}.panel-grid .g-start-lg-5{grid-column-start:5}.panel-grid .g-start-lg-6{grid-column-start:6}.panel-grid .g-start-lg-7{grid-column-start:7}.panel-grid .g-start-lg-8{grid-column-start:8}.panel-grid .g-start-lg-9{grid-column-start:9}.panel-grid .g-start-lg-10{grid-column-start:10}.panel-grid .g-start-lg-11{grid-column-start:11}.panel-grid .g-start-lg-12{grid-column-start:12}.panel-grid .g-start-lg-13{grid-column-start:13}.panel-grid .g-start-lg-14{grid-column-start:14}.panel-grid .g-start-lg-15{grid-column-start:15}.panel-grid .g-start-lg-16{grid-column-start:16}.panel-grid .g-start-lg-17{grid-column-start:17}.panel-grid .g-start-lg-18{grid-column-start:18}.panel-grid .g-start-lg-19{grid-column-start:19}.panel-grid .g-start-lg-20{grid-column-start:20}.panel-grid .g-start-lg-21{grid-column-start:21}.panel-grid .g-start-lg-22{grid-column-start:22}.panel-grid .g-start-lg-23{grid-column-start:23}}@media(min-width: 1200px){.panel-grid .g-col-xl-1{grid-column:auto/span 1}.panel-grid .g-col-xl-2{grid-column:auto/span 2}.panel-grid .g-col-xl-3{grid-column:auto/span 3}.panel-grid .g-col-xl-4{grid-column:auto/span 4}.panel-grid .g-col-xl-5{grid-column:auto/span 5}.panel-grid .g-col-xl-6{grid-column:auto/span 6}.panel-grid .g-col-xl-7{grid-column:auto/span 7}.panel-grid .g-col-xl-8{grid-column:auto/span 8}.panel-grid .g-col-xl-9{grid-column:auto/span 9}.panel-grid .g-col-xl-10{grid-column:auto/span 10}.panel-grid .g-col-xl-11{grid-column:auto/span 11}.panel-grid .g-col-xl-12{grid-column:auto/span 12}.panel-grid .g-col-xl-13{grid-column:auto/span 13}.panel-grid .g-col-xl-14{grid-column:auto/span 14}.panel-grid .g-col-xl-15{grid-column:auto/span 15}.panel-grid .g-col-xl-16{grid-column:auto/span 16}.panel-grid .g-col-xl-17{grid-column:auto/span 17}.panel-grid .g-col-xl-18{grid-column:auto/span 18}.panel-grid .g-col-xl-19{grid-column:auto/span 19}.panel-grid .g-col-xl-20{grid-column:auto/span 20}.panel-grid .g-col-xl-21{grid-column:auto/span 21}.panel-grid .g-col-xl-22{grid-column:auto/span 22}.panel-grid .g-col-xl-23{grid-column:auto/span 23}.panel-grid .g-col-xl-24{grid-column:auto/span 24}.panel-grid .g-start-xl-1{grid-column-start:1}.panel-grid .g-start-xl-2{grid-column-start:2}.panel-grid .g-start-xl-3{grid-column-start:3}.panel-grid .g-start-xl-4{grid-column-start:4}.panel-grid .g-start-xl-5{grid-column-start:5}.panel-grid .g-start-xl-6{grid-column-start:6}.panel-grid .g-start-xl-7{grid-column-start:7}.panel-grid .g-start-xl-8{grid-column-start:8}.panel-grid .g-start-xl-9{grid-column-start:9}.panel-grid .g-start-xl-10{grid-column-start:10}.panel-grid .g-start-xl-11{grid-column-start:11}.panel-grid .g-start-xl-12{grid-column-start:12}.panel-grid .g-start-xl-13{grid-column-start:13}.panel-grid .g-start-xl-14{grid-column-start:14}.panel-grid .g-start-xl-15{grid-column-start:15}.panel-grid .g-start-xl-16{grid-column-start:16}.panel-grid .g-start-xl-17{grid-column-start:17}.panel-grid .g-start-xl-18{grid-column-start:18}.panel-grid .g-start-xl-19{grid-column-start:19}.panel-grid .g-start-xl-20{grid-column-start:20}.panel-grid .g-start-xl-21{grid-column-start:21}.panel-grid .g-start-xl-22{grid-column-start:22}.panel-grid .g-start-xl-23{grid-column-start:23}}@media(min-width: 1400px){.panel-grid .g-col-xxl-1{grid-column:auto/span 1}.panel-grid .g-col-xxl-2{grid-column:auto/span 2}.panel-grid .g-col-xxl-3{grid-column:auto/span 3}.panel-grid .g-col-xxl-4{grid-column:auto/span 4}.panel-grid .g-col-xxl-5{grid-column:auto/span 5}.panel-grid .g-col-xxl-6{grid-column:auto/span 6}.panel-grid .g-col-xxl-7{grid-column:auto/span 7}.panel-grid .g-col-xxl-8{grid-column:auto/span 8}.panel-grid .g-col-xxl-9{grid-column:auto/span 9}.panel-grid .g-col-xxl-10{grid-column:auto/span 10}.panel-grid .g-col-xxl-11{grid-column:auto/span 11}.panel-grid .g-col-xxl-12{grid-column:auto/span 12}.panel-grid .g-col-xxl-13{grid-column:auto/span 13}.panel-grid .g-col-xxl-14{grid-column:auto/span 14}.panel-grid .g-col-xxl-15{grid-column:auto/span 15}.panel-grid .g-col-xxl-16{grid-column:auto/span 16}.panel-grid .g-col-xxl-17{grid-column:auto/span 17}.panel-grid .g-col-xxl-18{grid-column:auto/span 18}.panel-grid .g-col-xxl-19{grid-column:auto/span 19}.panel-grid .g-col-xxl-20{grid-column:auto/span 20}.panel-grid .g-col-xxl-21{grid-column:auto/span 21}.panel-grid .g-col-xxl-22{grid-column:auto/span 22}.panel-grid .g-col-xxl-23{grid-column:auto/span 23}.panel-grid .g-col-xxl-24{grid-column:auto/span 24}.panel-grid .g-start-xxl-1{grid-column-start:1}.panel-grid .g-start-xxl-2{grid-column-start:2}.panel-grid .g-start-xxl-3{grid-column-start:3}.panel-grid .g-start-xxl-4{grid-column-start:4}.panel-grid .g-start-xxl-5{grid-column-start:5}.panel-grid .g-start-xxl-6{grid-column-start:6}.panel-grid .g-start-xxl-7{grid-column-start:7}.panel-grid .g-start-xxl-8{grid-column-start:8}.panel-grid .g-start-xxl-9{grid-column-start:9}.panel-grid .g-start-xxl-10{grid-column-start:10}.panel-grid .g-start-xxl-11{grid-column-start:11}.panel-grid .g-start-xxl-12{grid-column-start:12}.panel-grid .g-start-xxl-13{grid-column-start:13}.panel-grid .g-start-xxl-14{grid-column-start:14}.panel-grid .g-start-xxl-15{grid-column-start:15}.panel-grid .g-start-xxl-16{grid-column-start:16}.panel-grid .g-start-xxl-17{grid-column-start:17}.panel-grid .g-start-xxl-18{grid-column-start:18}.panel-grid .g-start-xxl-19{grid-column-start:19}.panel-grid .g-start-xxl-20{grid-column-start:20}.panel-grid .g-start-xxl-21{grid-column-start:21}.panel-grid .g-start-xxl-22{grid-column-start:22}.panel-grid .g-start-xxl-23{grid-column-start:23}}main{margin-top:1em;margin-bottom:1em}h1,.h1,h2,.h2{margin-top:2rem;margin-bottom:1rem}h1.title,.title.h1{margin-top:0}h2,.h2{border-bottom:1px solid #dee2e6;padding-bottom:.5rem}h3,.h3,h4,.h4{margin-top:1.5rem}.header-section-number{color:#747a7f}.nav-link.active .header-section-number{color:inherit}mark,.mark{padding:0em}.panel-caption,caption,.figure-caption{font-size:1rem}.panel-caption,.figure-caption,figcaption{color:#747a7f}.table-caption,caption{color:#373a3c}.quarto-layout-cell[data-ref-parent] caption{color:#747a7f}.column-margin figcaption,.margin-caption,div.aside,aside,.column-margin{color:#747a7f;font-size:.825rem}.panel-caption.margin-caption{text-align:inherit}.column-margin.column-container p{margin-bottom:0}.column-margin.column-container>*:not(.collapse){padding-top:.5em;padding-bottom:.5em;display:block}.column-margin.column-container>*.collapse:not(.show){display:none}@media(min-width: 768px){.column-margin.column-container .callout-margin-content:first-child{margin-top:4.5em}.column-margin.column-container .callout-margin-content-simple:first-child{margin-top:3.5em}}.margin-caption>*{padding-top:.5em;padding-bottom:.5em}@media(max-width: 767.98px){.quarto-layout-row{flex-direction:column}}.tab-content{margin-top:0px;border-left:#dee2e6 1px solid;border-right:#dee2e6 1px solid;border-bottom:#dee2e6 1px solid;margin-left:0;padding:1em;margin-bottom:1em}@media(max-width: 767.98px){.layout-sidebar{margin-left:0;margin-right:0}}.panel-sidebar,.panel-sidebar .form-control,.panel-input,.panel-input .form-control,.selectize-dropdown{font-size:.9rem}.panel-sidebar .form-control,.panel-input .form-control{padding-top:.1rem}.tab-pane div.sourceCode{margin-top:0px}.tab-pane>p{padding-top:1em}.tab-content>.tab-pane:not(.active){display:none !important}div.sourceCode{background-color:rgba(233,236,239,.65);border:1px solid rgba(233,236,239,.65);border-radius:.25rem}pre.sourceCode{background-color:rgba(0,0,0,0)}pre.sourceCode{border:none;font-size:.875em;overflow:visible !important;padding:.4em}.callout pre.sourceCode{padding-left:0}div.sourceCode{overflow-y:hidden}.callout div.sourceCode{margin-left:initial}.blockquote{font-size:inherit;padding-left:1rem;padding-right:1.5rem;color:#747a7f}.blockquote h1:first-child,.blockquote .h1:first-child,.blockquote h2:first-child,.blockquote .h2:first-child,.blockquote h3:first-child,.blockquote .h3:first-child,.blockquote h4:first-child,.blockquote .h4:first-child,.blockquote h5:first-child,.blockquote .h5:first-child{margin-top:0}pre{background-color:initial;padding:initial;border:initial}p code:not(.sourceCode),li code:not(.sourceCode),td code:not(.sourceCode){background-color:#f7f7f7;padding:.2em}nav p code:not(.sourceCode),nav li code:not(.sourceCode),nav td code:not(.sourceCode){background-color:rgba(0,0,0,0);padding:0}td code:not(.sourceCode){white-space:pre-wrap}#quarto-embedded-source-code-modal>.modal-dialog{max-width:1000px;padding-left:1.75rem;padding-right:1.75rem}#quarto-embedded-source-code-modal>.modal-dialog>.modal-content>.modal-body{padding:0}#quarto-embedded-source-code-modal>.modal-dialog>.modal-content>.modal-body div.sourceCode{margin:0;padding:.2rem .2rem;border-radius:0px;border:none}#quarto-embedded-source-code-modal>.modal-dialog>.modal-content>.modal-header{padding:.7rem}.code-tools-button{font-size:1rem;padding:.15rem .15rem;margin-left:5px;color:#6c757d;background-color:rgba(0,0,0,0);transition:initial;cursor:pointer}.code-tools-button>.bi::before{display:inline-block;height:1rem;width:1rem;content:"";vertical-align:-0.125em;background-image:url('data:image/svg+xml,');background-repeat:no-repeat;background-size:1rem 1rem}.code-tools-button:hover>.bi::before{background-image:url('data:image/svg+xml,')}#quarto-embedded-source-code-modal .code-copy-button>.bi::before{background-image:url('data:image/svg+xml,')}#quarto-embedded-source-code-modal .code-copy-button-checked>.bi::before{background-image:url('data:image/svg+xml,')}.sidebar{will-change:top;transition:top 200ms linear;position:sticky;overflow-y:auto;padding-top:1.2em;max-height:100vh}.sidebar.toc-left,.sidebar.margin-sidebar{top:0px;padding-top:1em}.sidebar.toc-left>*,.sidebar.margin-sidebar>*{padding-top:.5em}.sidebar.quarto-banner-title-block-sidebar>*{padding-top:1.65em}figure .quarto-notebook-link{margin-top:.5em}.quarto-notebook-link{font-size:.75em;color:#6c757d;margin-bottom:1em;text-decoration:none;display:block}.quarto-notebook-link:hover{text-decoration:underline;color:#28a87d}.quarto-notebook-link::before{display:inline-block;height:.75rem;width:.75rem;margin-bottom:0em;margin-right:.25em;content:"";vertical-align:-0.125em;background-image:url('data:image/svg+xml,');background-repeat:no-repeat;background-size:.75rem .75rem}.quarto-alternate-notebooks i.bi,.quarto-alternate-formats i.bi{margin-right:.4em}.quarto-notebook .cell-container{display:flex}.quarto-notebook .cell-container .cell{flex-grow:4}.quarto-notebook .cell-container .cell-decorator{padding-top:1.5em;padding-right:1em;text-align:right}.quarto-notebook h2,.quarto-notebook .h2{border-bottom:none}.sidebar .quarto-alternate-formats a,.sidebar .quarto-alternate-notebooks a{text-decoration:none}.sidebar .quarto-alternate-formats a:hover,.sidebar .quarto-alternate-notebooks a:hover{color:#28a87d}.sidebar .quarto-alternate-notebooks h2,.sidebar .quarto-alternate-notebooks .h2,.sidebar .quarto-alternate-formats h2,.sidebar .quarto-alternate-formats .h2,.sidebar nav[role=doc-toc]>h2,.sidebar nav[role=doc-toc]>.h2{font-size:.875rem;font-weight:400;margin-bottom:.5rem;margin-top:.3rem;font-family:inherit;border-bottom:0;padding-bottom:0;padding-top:0px}.sidebar .quarto-alternate-notebooks h2,.sidebar .quarto-alternate-notebooks .h2,.sidebar .quarto-alternate-formats h2,.sidebar .quarto-alternate-formats .h2{margin-top:1rem}.sidebar nav[role=doc-toc]>ul a{border-left:1px solid #e9ecef;padding-left:.6rem}.sidebar .quarto-alternate-notebooks h2>ul a,.sidebar .quarto-alternate-notebooks .h2>ul a,.sidebar .quarto-alternate-formats h2>ul a,.sidebar .quarto-alternate-formats .h2>ul a{border-left:none;padding-left:.6rem}.sidebar .quarto-alternate-notebooks ul a:empty,.sidebar .quarto-alternate-formats ul a:empty,.sidebar nav[role=doc-toc]>ul a:empty{display:none}.sidebar .quarto-alternate-notebooks ul,.sidebar .quarto-alternate-formats ul,.sidebar nav[role=doc-toc] ul{padding-left:0;list-style:none;font-size:.875rem;font-weight:300}.sidebar .quarto-alternate-notebooks ul li a,.sidebar .quarto-alternate-formats ul li a,.sidebar nav[role=doc-toc]>ul li a{line-height:1.1rem;padding-bottom:.2rem;padding-top:.2rem;color:inherit}.sidebar nav[role=doc-toc] ul>li>ul>li>a{padding-left:1.2em}.sidebar nav[role=doc-toc] ul>li>ul>li>ul>li>a{padding-left:2.4em}.sidebar nav[role=doc-toc] ul>li>ul>li>ul>li>ul>li>a{padding-left:3.6em}.sidebar nav[role=doc-toc] ul>li>ul>li>ul>li>ul>li>ul>li>a{padding-left:4.8em}.sidebar nav[role=doc-toc] ul>li>ul>li>ul>li>ul>li>ul>li>ul>li>a{padding-left:6em}.sidebar nav[role=doc-toc] ul>li>a.active,.sidebar nav[role=doc-toc] ul>li>ul>li>a.active{border-left:1px solid #28a87d;color:#28a87d !important}.sidebar nav[role=doc-toc] ul>li>a:hover,.sidebar nav[role=doc-toc] ul>li>ul>li>a:hover{color:#28a87d !important}kbd,.kbd{color:#373a3c;background-color:#f8f9fa;border:1px solid;border-radius:5px;border-color:#dee2e6}div.hanging-indent{margin-left:1em;text-indent:-1em}.citation a,.footnote-ref{text-decoration:none}.footnotes ol{padding-left:1em}.tippy-content>*{margin-bottom:.7em}.tippy-content>*:last-child{margin-bottom:0}.table a{word-break:break-word}.table>:not(:first-child){border-top-width:1px;border-top-color:#dee2e6}.table>thead{border-bottom:1px solid currentColor}.table>tbody{border-top:1px solid #dee2e6}.callout{margin-top:1.25rem;margin-bottom:1.25rem;border-radius:.25rem;overflow-wrap:break-word}.callout .callout-caption-container{overflow-wrap:anywhere}.callout.callout-style-simple{padding:.4em .7em;border-left:5px solid;border-right:1px solid #dee2e6;border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6}.callout.callout-style-default{border-left:5px solid;border-right:1px solid #dee2e6;border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6}.callout .callout-body-container{flex-grow:1}.callout.callout-style-simple .callout-body{font-size:.9rem;font-weight:400}.callout.callout-style-default .callout-body{font-size:.9rem;font-weight:400}.callout.callout-captioned .callout-body{margin-top:.2em}.callout:not(.no-icon).callout-captioned.callout-style-simple .callout-body{padding-left:1.6em}.callout.callout-captioned>.callout-header{padding-top:.2em;margin-bottom:-0.2em}.callout.callout-style-simple>div.callout-header{border-bottom:none;font-size:.9rem;font-weight:600;opacity:75%}.callout.callout-style-default>div.callout-header{border-bottom:none;font-weight:600;opacity:85%;font-size:.9rem;padding-left:.5em;padding-right:.5em}.callout.callout-style-default div.callout-body{padding-left:.5em;padding-right:.5em}.callout.callout-style-default div.callout-body>:first-child{margin-top:.5em}.callout>div.callout-header[data-bs-toggle=collapse]{cursor:pointer}.callout.callout-style-default .callout-header[aria-expanded=false],.callout.callout-style-default .callout-header[aria-expanded=true]{padding-top:0px;margin-bottom:0px;align-items:center}.callout.callout-captioned .callout-body>:last-child:not(.sourceCode),.callout.callout-captioned .callout-body>div>:last-child:not(.sourceCode){margin-bottom:.5rem}.callout:not(.callout-captioned) .callout-body>:first-child,.callout:not(.callout-captioned) .callout-body>div>:first-child{margin-top:.25rem}.callout:not(.callout-captioned) .callout-body>:last-child,.callout:not(.callout-captioned) .callout-body>div>:last-child{margin-bottom:.2rem}.callout.callout-style-simple .callout-icon::before,.callout.callout-style-simple .callout-toggle::before{height:1rem;width:1rem;display:inline-block;content:"";background-repeat:no-repeat;background-size:1rem 1rem}.callout.callout-style-default .callout-icon::before,.callout.callout-style-default .callout-toggle::before{height:.9rem;width:.9rem;display:inline-block;content:"";background-repeat:no-repeat;background-size:.9rem .9rem}.callout.callout-style-default .callout-toggle::before{margin-top:5px}.callout .callout-btn-toggle .callout-toggle::before{transition:transform .2s linear}.callout .callout-header[aria-expanded=false] .callout-toggle::before{transform:rotate(-90deg)}.callout .callout-header[aria-expanded=true] .callout-toggle::before{transform:none}.callout.callout-style-simple:not(.no-icon) div.callout-icon-container{padding-top:.2em;padding-right:.55em}.callout.callout-style-default:not(.no-icon) div.callout-icon-container{padding-top:.1em;padding-right:.35em}.callout.callout-style-default:not(.no-icon) div.callout-caption-container{margin-top:-1px}.callout.callout-style-default.callout-caution:not(.no-icon) div.callout-icon-container{padding-top:.3em;padding-right:.35em}.callout>.callout-body>.callout-icon-container>.no-icon,.callout>.callout-header>.callout-icon-container>.no-icon{display:none}div.callout.callout{border-left-color:#6c757d}div.callout.callout-style-default>.callout-header{background-color:#6c757d}div.callout-note.callout{border-left-color:#2780e3}div.callout-note.callout-style-default>.callout-header{background-color:#e9f2fc}div.callout-note:not(.callout-captioned) .callout-icon::before{background-image:url('data:image/svg+xml,');}div.callout-note.callout-captioned .callout-icon::before{background-image:url('data:image/svg+xml,');}div.callout-note .callout-toggle::before{background-image:url('data:image/svg+xml,')}div.callout-tip.callout{border-left-color:#3fb618}div.callout-tip.callout-style-default>.callout-header{background-color:#ecf8e8}div.callout-tip:not(.callout-captioned) .callout-icon::before{background-image:url('data:image/svg+xml,');}div.callout-tip.callout-captioned .callout-icon::before{background-image:url('data:image/svg+xml,');}div.callout-tip .callout-toggle::before{background-image:url('data:image/svg+xml,')}div.callout-warning.callout{border-left-color:#ff7518}div.callout-warning.callout-style-default>.callout-header{background-color:#fff1e8}div.callout-warning:not(.callout-captioned) .callout-icon::before{background-image:url('data:image/svg+xml,');}div.callout-warning.callout-captioned .callout-icon::before{background-image:url('data:image/svg+xml,');}div.callout-warning .callout-toggle::before{background-image:url('data:image/svg+xml,')}div.callout-caution.callout{border-left-color:#f0ad4e}div.callout-caution.callout-style-default>.callout-header{background-color:#fef7ed}div.callout-caution:not(.callout-captioned) .callout-icon::before{background-image:url('data:image/svg+xml,');}div.callout-caution.callout-captioned .callout-icon::before{background-image:url('data:image/svg+xml,');}div.callout-caution .callout-toggle::before{background-image:url('data:image/svg+xml,')}div.callout-important.callout{border-left-color:#ff0039}div.callout-important.callout-style-default>.callout-header{background-color:#ffe6eb}div.callout-important:not(.callout-captioned) .callout-icon::before{background-image:url('data:image/svg+xml,');}div.callout-important.callout-captioned .callout-icon::before{background-image:url('data:image/svg+xml,');}div.callout-important .callout-toggle::before{background-image:url('data:image/svg+xml,')}.quarto-toggle-container{display:flex;align-items:center}@media(min-width: 992px){.navbar .quarto-color-scheme-toggle{padding-left:.5rem;padding-right:.5rem}}@media(max-width: 767.98px){.navbar .quarto-color-scheme-toggle{padding-left:0;padding-right:0;padding-bottom:.5em}}.quarto-reader-toggle .bi::before,.quarto-color-scheme-toggle .bi::before{display:inline-block;height:1rem;width:1rem;content:"";background-repeat:no-repeat;background-size:1rem 1rem}.navbar-collapse .quarto-color-scheme-toggle{padding-left:.6rem;padding-right:0;margin-top:-12px}.sidebar-navigation{padding-left:20px}.sidebar-navigation .quarto-color-scheme-toggle .bi::before{padding-top:.2rem;margin-bottom:-0.2rem}.sidebar-tools-main .quarto-color-scheme-toggle .bi::before{padding-top:.2rem;margin-bottom:-0.2rem}.navbar .quarto-color-scheme-toggle .bi::before{padding-top:7px;margin-bottom:-7px;padding-left:2px;margin-right:2px}.navbar .quarto-color-scheme-toggle:not(.alternate) .bi::before{background-image:url('data:image/svg+xml,')}.navbar .quarto-color-scheme-toggle.alternate .bi::before{background-image:url('data:image/svg+xml,')}.sidebar-navigation .quarto-color-scheme-toggle:not(.alternate) .bi::before{background-image:url('data:image/svg+xml,')}.sidebar-navigation .quarto-color-scheme-toggle.alternate .bi::before{background-image:url('data:image/svg+xml,')}.quarto-sidebar-toggle{border-color:#dee2e6;border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem;border-style:solid;border-width:1px;overflow:hidden;border-top-width:0px;padding-top:0px !important}.quarto-sidebar-toggle-title{cursor:pointer;padding-bottom:2px;margin-left:.25em;text-align:center;font-weight:400;font-size:.775em}#quarto-content .quarto-sidebar-toggle{background:#fafafa}#quarto-content .quarto-sidebar-toggle-title{color:#373a3c}.quarto-sidebar-toggle-icon{color:#dee2e6;margin-right:.5em;float:right;transition:transform .2s ease}.quarto-sidebar-toggle-icon::before{padding-top:5px}.quarto-sidebar-toggle.expanded .quarto-sidebar-toggle-icon{transform:rotate(-180deg)}.quarto-sidebar-toggle.expanded .quarto-sidebar-toggle-title{border-bottom:solid #dee2e6 1px}.quarto-sidebar-toggle-contents{background-color:#fff;padding-right:10px;padding-left:10px;margin-top:0px !important;transition:max-height .5s ease}.quarto-sidebar-toggle.expanded .quarto-sidebar-toggle-contents{padding-top:1em;padding-bottom:10px}.quarto-sidebar-toggle:not(.expanded) .quarto-sidebar-toggle-contents{padding-top:0px !important;padding-bottom:0px}nav[role=doc-toc]{z-index:1020}#quarto-sidebar>*,nav[role=doc-toc]>*{transition:opacity .1s ease,border .1s ease}#quarto-sidebar.slow>*,nav[role=doc-toc].slow>*{transition:opacity .4s ease,border .4s ease}.quarto-color-scheme-toggle:not(.alternate).top-right .bi::before{background-image:url('data:image/svg+xml,')}.quarto-color-scheme-toggle.alternate.top-right .bi::before{background-image:url('data:image/svg+xml,')}#quarto-appendix.default{border-top:1px solid #dee2e6}#quarto-appendix.default{background-color:#fff;padding-top:1.5em;margin-top:2em;z-index:998}#quarto-appendix.default .quarto-appendix-heading{margin-top:0;line-height:1.4em;font-weight:600;opacity:.9;border-bottom:none;margin-bottom:0}#quarto-appendix.default .footnotes ol,#quarto-appendix.default .footnotes ol li>p:last-of-type,#quarto-appendix.default .quarto-appendix-contents>p:last-of-type{margin-bottom:0}#quarto-appendix.default .quarto-appendix-secondary-label{margin-bottom:.4em}#quarto-appendix.default .quarto-appendix-bibtex{font-size:.7em;padding:1em;border:solid 1px #dee2e6;margin-bottom:1em}#quarto-appendix.default .quarto-appendix-bibtex code.sourceCode{white-space:pre-wrap}#quarto-appendix.default .quarto-appendix-citeas{font-size:.9em;padding:1em;border:solid 1px #dee2e6;margin-bottom:1em}#quarto-appendix.default .quarto-appendix-heading{font-size:1em !important}#quarto-appendix.default *[role=doc-endnotes]>ol,#quarto-appendix.default .quarto-appendix-contents>*:not(h2):not(.h2){font-size:.9em}#quarto-appendix.default section{padding-bottom:1.5em}#quarto-appendix.default section *[role=doc-endnotes],#quarto-appendix.default section>*:not(a){opacity:.9;word-wrap:break-word}.btn.btn-quarto,div.cell-output-display .btn-quarto{color:#cbcccc;background-color:#373a3c;border-color:#373a3c}.btn.btn-quarto:hover,div.cell-output-display .btn-quarto:hover{color:#cbcccc;background-color:#555859;border-color:#4b4e50}.btn-check:focus+.btn.btn-quarto,.btn.btn-quarto:focus,.btn-check:focus+div.cell-output-display .btn-quarto,div.cell-output-display .btn-quarto:focus{color:#cbcccc;background-color:#555859;border-color:#4b4e50;box-shadow:0 0 0 .25rem rgba(77,80,82,.5)}.btn-check:checked+.btn.btn-quarto,.btn-check:active+.btn.btn-quarto,.btn.btn-quarto:active,.btn.btn-quarto.active,.show>.btn.btn-quarto.dropdown-toggle,.btn-check:checked+div.cell-output-display .btn-quarto,.btn-check:active+div.cell-output-display .btn-quarto,div.cell-output-display .btn-quarto:active,div.cell-output-display .btn-quarto.active,.show>div.cell-output-display .btn-quarto.dropdown-toggle{color:#fff;background-color:#5f6163;border-color:#4b4e50}.btn-check:checked+.btn.btn-quarto:focus,.btn-check:active+.btn.btn-quarto:focus,.btn.btn-quarto:active:focus,.btn.btn-quarto.active:focus,.show>.btn.btn-quarto.dropdown-toggle:focus,.btn-check:checked+div.cell-output-display .btn-quarto:focus,.btn-check:active+div.cell-output-display .btn-quarto:focus,div.cell-output-display .btn-quarto:active:focus,div.cell-output-display .btn-quarto.active:focus,.show>div.cell-output-display .btn-quarto.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(77,80,82,.5)}.btn.btn-quarto:disabled,.btn.btn-quarto.disabled,div.cell-output-display .btn-quarto:disabled,div.cell-output-display .btn-quarto.disabled{color:#fff;background-color:#373a3c;border-color:#373a3c}nav.quarto-secondary-nav.color-navbar{background-color:#d4eee5;color:#444c49}nav.quarto-secondary-nav.color-navbar h1,nav.quarto-secondary-nav.color-navbar .h1,nav.quarto-secondary-nav.color-navbar .quarto-btn-toggle{color:#444c49}@media(max-width: 991.98px){body.nav-sidebar .quarto-title-banner,body.nav-sidebar .quarto-title-banner{display:none}}p.subtitle{margin-top:.25em;margin-bottom:.5em}code a:any-link{color:inherit;text-decoration-color:#6c757d}/*! light */div.observablehq table thead tr th{background-color:var(--bs-body-bg)}input,button,select,optgroup,textarea{background-color:var(--bs-body-bg)}.code-annotation-gutter-bg{background-color:#fff}.code-annotation-gutter{background-color:rgba(233,236,239,.65)}.code-annotation-gutter,.code-annotation-gutter-bg{height:100%;width:calc(20px + .5em);position:absolute;top:0;right:0}dl.code-annotation-container-grid dt{margin-right:1em;margin-top:.25rem}dl.code-annotation-container-grid dt{font-family:var(--bs-font-monospace);color:#4f5457;border:solid #4f5457 1px;border-radius:50%;height:22px;width:22px;line-height:22px;font-size:11px;text-align:center;vertical-align:middle;text-decoration:none}dl.code-annotation-container-grid dt[data-target-cell]{cursor:pointer}dl.code-annotation-container-grid dt[data-target-cell].code-annotation-active{color:#fff;border:solid #aaa 1px;background-color:#aaa}pre.code-annotation-code{padding-top:0;padding-bottom:0}pre.code-annotation-code code{z-index:3}#code-annotation-line-highlight-gutter{width:100%;border-top:solid rgba(170,170,170,.2666666667) 1px;border-bottom:solid rgba(170,170,170,.2666666667) 1px;z-index:2;background-color:rgba(170,170,170,.1333333333)}#code-annotation-line-highlight{margin-left:-4em;width:calc(100% + 4em);border-top:solid rgba(170,170,170,.2666666667) 1px;border-bottom:solid rgba(170,170,170,.2666666667) 1px;z-index:2;background-color:rgba(170,170,170,.1333333333)}code.sourceCode .code-annotation-anchor.code-annotation-active{background-color:var(--quarto-hl-normal-color, #aaaaaa);border:solid var(--quarto-hl-normal-color, #aaaaaa) 1px;color:#e9ecef;font-weight:bolder}code.sourceCode .code-annotation-anchor{font-family:var(--bs-font-monospace);color:var(--quarto-hl-co-color);border:solid var(--quarto-hl-co-color) 1px;border-radius:50%;height:18px;width:18px;font-size:9px;margin-top:2px}code.sourceCode button.code-annotation-anchor{padding:2px}code.sourceCode a.code-annotation-anchor{line-height:18px;text-align:center;vertical-align:middle;cursor:default;text-decoration:none}@media print{.page-columns .column-screen-inset{grid-column:page-start-inset/page-end-inset;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen-inset table{background:#fff}.page-columns .column-screen-inset-left{grid-column:page-start-inset/body-content-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen-inset-left table{background:#fff}.page-columns .column-screen-inset-right{grid-column:body-content-start/page-end-inset;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen-inset-right table{background:#fff}.page-columns .column-screen{grid-column:page-start/page-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen table{background:#fff}.page-columns .column-screen-left{grid-column:page-start/body-content-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen-left table{background:#fff}.page-columns .column-screen-right{grid-column:body-content-start/page-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen-right table{background:#fff}.page-columns .column-screen-inset-shaded{grid-column:page-start-inset/page-end-inset;padding:1em;background:#f8f9fa;z-index:998;transform:translate3d(0, 0, 0);margin-bottom:1em}}.quarto-video{margin-bottom:1em}a.external:after{display:inline-block;height:.75rem;width:.75rem;margin-bottom:.15em;margin-left:.25em;content:"";vertical-align:-0.125em;background-image:url('data:image/svg+xml,');background-repeat:no-repeat;background-size:.75rem .75rem}div.sourceCode code a.external:after{content:none}a.external:after:hover{cursor:pointer}.quarto-ext-icon{display:inline-block;font-size:.75em;padding-left:.3em}.code-with-filename .code-with-filename-file{margin-bottom:0;padding-bottom:2px;padding-top:2px;padding-left:.7em;border:var(--quarto-border-width) solid var(--quarto-border-color);border-radius:var(--quarto-border-radius);border-bottom:0;border-bottom-left-radius:0%;border-bottom-right-radius:0%}.code-with-filename div.sourceCode,.reveal .code-with-filename div.sourceCode{margin-top:0;border-top-left-radius:0%;border-top-right-radius:0%}.code-with-filename .code-with-filename-file pre{margin-bottom:0}.code-with-filename .code-with-filename-file,.code-with-filename .code-with-filename-file pre{background-color:rgba(219,219,219,.8)}.quarto-dark .code-with-filename .code-with-filename-file,.quarto-dark .code-with-filename .code-with-filename-file pre{background-color:#555}.code-with-filename .code-with-filename-file strong{font-weight:400}.quarto-title-banner{margin-bottom:1em;color:#444c49;background:#d4eee5}.quarto-title-banner .code-tools-button{color:#74827d}.quarto-title-banner .code-tools-button:hover{color:#444c49}.quarto-title-banner .code-tools-button>.bi::before{background-image:url('data:image/svg+xml,')}.quarto-title-banner .code-tools-button:hover>.bi::before{background-image:url('data:image/svg+xml,')}.quarto-title-banner .quarto-title .title{font-weight:600}.quarto-title-banner .quarto-categories{margin-top:.75em}@media(min-width: 992px){.quarto-title-banner{padding-top:2.5em;padding-bottom:2.5em}}@media(max-width: 991.98px){.quarto-title-banner{padding-top:1em;padding-bottom:1em}}main.quarto-banner-title-block>section:first-child>h2,main.quarto-banner-title-block>section:first-child>.h2,main.quarto-banner-title-block>section:first-child>h3,main.quarto-banner-title-block>section:first-child>.h3,main.quarto-banner-title-block>section:first-child>h4,main.quarto-banner-title-block>section:first-child>.h4{margin-top:0}.quarto-title .quarto-categories{display:flex;flex-wrap:wrap;row-gap:.5em;column-gap:.4em;padding-bottom:.5em;margin-top:.75em}.quarto-title .quarto-categories .quarto-category{padding:.25em .75em;font-size:.65em;text-transform:uppercase;border:solid 1px;border-radius:.25rem;opacity:.6}.quarto-title .quarto-categories .quarto-category a{color:inherit}#title-block-header.quarto-title-block.default .quarto-title-meta{display:grid;grid-template-columns:repeat(2, 1fr)}#title-block-header.quarto-title-block.default .quarto-title .title{margin-bottom:0}#title-block-header.quarto-title-block.default .quarto-title-author-orcid img{margin-top:-5px}#title-block-header.quarto-title-block.default .quarto-description p:last-of-type{margin-bottom:0}#title-block-header.quarto-title-block.default .quarto-title-meta-contents p,#title-block-header.quarto-title-block.default .quarto-title-authors p,#title-block-header.quarto-title-block.default .quarto-title-affiliations p{margin-bottom:.1em}#title-block-header.quarto-title-block.default .quarto-title-meta-heading{text-transform:uppercase;margin-top:1em;font-size:.8em;opacity:.8;font-weight:400}#title-block-header.quarto-title-block.default .quarto-title-meta-contents{font-size:.9em}#title-block-header.quarto-title-block.default .quarto-title-meta-contents a{color:#373a3c}#title-block-header.quarto-title-block.default .quarto-title-meta-contents p.affiliation:last-of-type{margin-bottom:.7em}#title-block-header.quarto-title-block.default p.affiliation{margin-bottom:.1em}#title-block-header.quarto-title-block.default .description,#title-block-header.quarto-title-block.default .abstract{margin-top:0}#title-block-header.quarto-title-block.default .description>p,#title-block-header.quarto-title-block.default .abstract>p{font-size:.9em}#title-block-header.quarto-title-block.default .description>p:last-of-type,#title-block-header.quarto-title-block.default .abstract>p:last-of-type{margin-bottom:0}#title-block-header.quarto-title-block.default .description .abstract-title,#title-block-header.quarto-title-block.default .abstract .abstract-title{margin-top:1em;text-transform:uppercase;font-size:.8em;opacity:.8;font-weight:400}#title-block-header.quarto-title-block.default .quarto-title-meta-author{display:grid;grid-template-columns:1fr 1fr}body{-webkit-font-smoothing:antialiased}.badge.bg-light{color:#373a3c}.progress .progress-bar{font-size:8px;line-height:8px}h1,.h1{font-family:"Literata","Bodoni MT","Georgia","Times New Roman",Times,serif;font-weight:800;font-style:italic}h2,.h2,h3,.h3,h4,.h4,span,body,.navbar-title{font-family:"Asap","Asap Condensed","Spline Sans","Tahoma","Arial",sans-serif;font-stretch:87.5%}h2,.h2{font-weight:600}.navbar-title{font-weight:800}code,.code{font-family:"Spline Sans Mono","Consolas",monospace}.question{border-left:3px solid #28a87d;padding:.5rem .5rem .2rem 1rem;margin-top:.5rem;margin-bottom:.3rem;background:#d9f6ec}.recap{border-left:3px solid #639;padding:.5rem .5rem .2rem 1rem;margin-top:.5rem;margin-bottom:.5rem;background:#e6d9f2}.navbar{padding-top:1px;padding-bottom:1px}.navbar-logo{max-height:60px}/*# sourceMappingURL=d6b77e37a12f878a50f9f8a85e535bdc.css.map */ +*/.ansi-black-fg{color:#3e424d}.ansi-black-bg{background-color:#3e424d}.ansi-black-intense-fg{color:#282c36}.ansi-black-intense-bg{background-color:#282c36}.ansi-red-fg{color:#e75c58}.ansi-red-bg{background-color:#e75c58}.ansi-red-intense-fg{color:#b22b31}.ansi-red-intense-bg{background-color:#b22b31}.ansi-green-fg{color:#00a250}.ansi-green-bg{background-color:#00a250}.ansi-green-intense-fg{color:#007427}.ansi-green-intense-bg{background-color:#007427}.ansi-yellow-fg{color:#ddb62b}.ansi-yellow-bg{background-color:#ddb62b}.ansi-yellow-intense-fg{color:#b27d12}.ansi-yellow-intense-bg{background-color:#b27d12}.ansi-blue-fg{color:#208ffb}.ansi-blue-bg{background-color:#208ffb}.ansi-blue-intense-fg{color:#0065ca}.ansi-blue-intense-bg{background-color:#0065ca}.ansi-magenta-fg{color:#d160c4}.ansi-magenta-bg{background-color:#d160c4}.ansi-magenta-intense-fg{color:#a03196}.ansi-magenta-intense-bg{background-color:#a03196}.ansi-cyan-fg{color:#60c6c8}.ansi-cyan-bg{background-color:#60c6c8}.ansi-cyan-intense-fg{color:#258f8f}.ansi-cyan-intense-bg{background-color:#258f8f}.ansi-white-fg{color:#c5c1b4}.ansi-white-bg{background-color:#c5c1b4}.ansi-white-intense-fg{color:#a1a6b2}.ansi-white-intense-bg{background-color:#a1a6b2}.ansi-default-inverse-fg{color:#fff}.ansi-default-inverse-bg{background-color:#000}.ansi-bold{font-weight:bold}.ansi-underline{text-decoration:underline}:root{--quarto-body-bg: #fff;--quarto-body-color: #373a3c;--quarto-text-muted: #6c757d;--quarto-border-color: #dee2e6;--quarto-border-width: 1px;--quarto-border-radius: 0.25rem}table.gt_table{color:var(--quarto-body-color);font-size:1em;width:100%;background-color:rgba(0,0,0,0);border-top-width:inherit;border-bottom-width:inherit;border-color:var(--quarto-border-color)}table.gt_table th.gt_column_spanner_outer{color:var(--quarto-body-color);background-color:rgba(0,0,0,0);border-top-width:inherit;border-bottom-width:inherit;border-color:var(--quarto-border-color)}table.gt_table th.gt_col_heading{color:var(--quarto-body-color);font-weight:bold;background-color:rgba(0,0,0,0)}table.gt_table thead.gt_col_headings{border-bottom:1px solid currentColor;border-top-width:inherit;border-top-color:var(--quarto-border-color)}table.gt_table thead.gt_col_headings:not(:first-child){border-top-width:1px;border-top-color:var(--quarto-border-color)}table.gt_table td.gt_row{border-bottom-width:1px;border-bottom-color:var(--quarto-border-color);border-top-width:0px}table.gt_table tbody.gt_table_body{border-top-width:1px;border-bottom-width:1px;border-bottom-color:var(--quarto-border-color);border-top-color:currentColor}div.columns{display:initial;gap:initial}div.column{display:inline-block;overflow-x:initial;vertical-align:top;width:50%}.code-annotation-tip-content{word-wrap:break-word}.code-annotation-container-hidden{display:none !important}dl.code-annotation-container-grid{display:grid;grid-template-columns:min-content auto}dl.code-annotation-container-grid dt{grid-column:1}dl.code-annotation-container-grid dd{grid-column:2}pre.sourceCode.code-annotation-code{padding-right:0}code.sourceCode .code-annotation-anchor{z-index:100;position:absolute;right:.5em;left:inherit;background-color:rgba(0,0,0,0)}:root{--mermaid-bg-color: #fff;--mermaid-edge-color: #373a3c;--mermaid-node-fg-color: #373a3c;--mermaid-fg-color: #373a3c;--mermaid-fg-color--lighter: #4f5457;--mermaid-fg-color--lightest: #686d71;--mermaid-font-family: Asap, Asap Condensed, Spline Sans, Tahoma, Arial, sans-serif;--mermaid-label-bg-color: #fff;--mermaid-label-fg-color: #2780e3;--mermaid-node-bg-color: rgba(39, 128, 227, 0.1);--mermaid-node-fg-color: #373a3c}@media print{:root{font-size:11pt}#quarto-sidebar,#TOC,.nav-page{display:none}.page-columns .content{grid-column-start:page-start}.fixed-top{position:relative}.panel-caption,.figure-caption,figcaption{color:#666}}.code-copy-button{position:absolute;top:0;right:0;border:0;margin-top:5px;margin-right:5px;background-color:rgba(0,0,0,0);z-index:3}.code-copy-button:focus{outline:none}.code-copy-button-tooltip{font-size:.75em}.code-copy-button>.bi::before{display:inline-block;height:1rem;width:1rem;content:"";vertical-align:-0.125em;background-image:url('data:image/svg+xml,');background-repeat:no-repeat;background-size:1rem 1rem}.code-copy-button-checked>.bi::before{background-image:url('data:image/svg+xml,')}.code-copy-button:hover>.bi::before{background-image:url('data:image/svg+xml,')}.code-copy-button-checked:hover>.bi::before{background-image:url('data:image/svg+xml,')}main ol ol,main ul ul,main ol ul,main ul ol{margin-bottom:1em}body{margin:0}main.page-columns>header>h1.title,main.page-columns>header>.title.h1{margin-bottom:0}@media(min-width: 992px){body .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start page-start-inset] 35px [body-start-outset] 35px [body-start] 1.5em [body-content-start] minmax(500px, calc( 850px - 3em )) [body-content-end] 1.5em [body-end] 35px [body-end-outset] minmax(75px, 145px) [page-end-inset] 35px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.fullcontent:not(.floating):not(.docked) .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start page-start-inset] 35px [body-start-outset] 35px [body-start] 1.5em [body-content-start] minmax(500px, calc( 850px - 3em )) [body-content-end] 1.5em [body-end] 35px [body-end-outset] 35px [page-end-inset page-end] 5fr [screen-end-inset] 1.5em}body.slimcontent:not(.floating):not(.docked) .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start page-start-inset] 35px [body-start-outset] 35px [body-start] 1.5em [body-content-start] minmax(500px, calc( 850px - 3em )) [body-content-end] 1.5em [body-end] 50px [body-end-outset] minmax(0px, 200px) [page-end-inset] 35px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.listing:not(.floating):not(.docked) .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start] minmax(50px, 100px) [page-start-inset] 50px [body-start-outset] 50px [body-start] 1.5em [body-content-start] minmax(500px, calc( 850px - 3em )) [body-content-end] 3em [body-end] 50px [body-end-outset] minmax(0px, 250px) [page-end-inset] minmax(50px, 100px) [page-end] 1fr [screen-end-inset] 1.5em [screen-end]}body:not(.floating):not(.docked) .page-columns.toc-left{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start] 35px [page-start-inset] minmax(0px, 175px) [body-start-outset] 35px [body-start] 1.5em [body-content-start] minmax(450px, calc( 800px - 3em )) [body-content-end] 1.5em [body-end] 35px [body-end-outset] minmax(0px, 175px) [page-end-inset] 35px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body:not(.floating):not(.docked) .page-columns.toc-left .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start] 35px [page-start-inset] minmax(0px, 175px) [body-start-outset] 35px [body-start] 1.5em [body-content-start] minmax(450px, calc( 800px - 3em )) [body-content-end] 1.5em [body-end] 35px [body-end-outset] minmax(0px, 175px) [page-end-inset] 35px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.floating .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start] minmax(25px, 50px) [page-start-inset] minmax(50px, 150px) [body-start-outset] minmax(25px, 50px) [body-start] 1.5em [body-content-start] minmax(500px, calc( 800px - 3em )) [body-content-end] 1.5em [body-end] minmax(25px, 50px) [body-end-outset] minmax(50px, 150px) [page-end-inset] minmax(25px, 50px) [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.docked .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start] minmax(50px, 100px) [page-start-inset] 50px [body-start-outset] 50px [body-start] 1.5em [body-content-start] minmax(500px, calc( 1000px - 3em )) [body-content-end] 1.5em [body-end] 50px [body-end-outset] minmax(50px, 100px) [page-end-inset] 50px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.docked.fullcontent .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start] minmax(50px, 100px) [page-start-inset] 50px [body-start-outset] 50px [body-start] 1.5em [body-content-start] minmax(500px, calc( 1000px - 3em )) [body-content-end] 1.5em [body-end body-end-outset page-end-inset page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.floating.fullcontent .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start] 50px [page-start-inset] minmax(50px, 150px) [body-start-outset] 50px [body-start] 1.5em [body-content-start] minmax(500px, calc( 800px - 3em )) [body-content-end] 1.5em [body-end body-end-outset page-end-inset page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.docked.slimcontent .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start] minmax(50px, 100px) [page-start-inset] 50px [body-start-outset] 50px [body-start] 1.5em [body-content-start] minmax(450px, calc( 750px - 3em )) [body-content-end] 1.5em [body-end] 50px [body-end-outset] minmax(0px, 200px) [page-end-inset] 50px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.docked.listing .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start] minmax(50px, 100px) [page-start-inset] 50px [body-start-outset] 50px [body-start] 1.5em [body-content-start] minmax(500px, calc( 1000px - 3em )) [body-content-end] 1.5em [body-end] 50px [body-end-outset] minmax(0px, 200px) [page-end-inset] 50px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.floating.slimcontent .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start] 50px [page-start-inset] minmax(50px, 150px) [body-start-outset] 50px [body-start] 1.5em [body-content-start] minmax(450px, calc( 750px - 3em )) [body-content-end] 1.5em [body-end] 50px [body-end-outset] minmax(50px, 150px) [page-end-inset] 50px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.floating.listing .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start] minmax(25px, 50px) [page-start-inset] minmax(50px, 150px) [body-start-outset] minmax(25px, 50px) [body-start] 1.5em [body-content-start] minmax(500px, calc( 800px - 3em )) [body-content-end] 1.5em [body-end] minmax(25px, 50px) [body-end-outset] minmax(50px, 150px) [page-end-inset] minmax(25px, 50px) [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}}@media(max-width: 991.98px){body .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start page-start-inset body-start-outset] 5fr [body-start] 1.5em [body-content-start] minmax(500px, calc( 800px - 3em )) [body-content-end] 1.5em [body-end] 35px [body-end-outset] minmax(75px, 145px) [page-end-inset] 35px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.fullcontent:not(.floating):not(.docked) .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start page-start-inset body-start-outset] 5fr [body-start] 1.5em [body-content-start] minmax(500px, calc( 800px - 3em )) [body-content-end] 1.5em [body-end body-end-outset page-end-inset page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.slimcontent:not(.floating):not(.docked) .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start page-start-inset body-start-outset] 5fr [body-start] 1.5em [body-content-start] minmax(500px, calc( 800px - 3em )) [body-content-end] 1.5em [body-end] 35px [body-end-outset] minmax(75px, 145px) [page-end-inset] 35px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.listing:not(.floating):not(.docked) .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start page-start-inset body-start-outset] 5fr [body-start] 1.5em [body-content-start] minmax(500px, calc( 1250px - 3em )) [body-content-end body-end body-end-outset page-end-inset page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body:not(.floating):not(.docked) .page-columns.toc-left{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start] 35px [page-start-inset] minmax(0px, 145px) [body-start-outset] 35px [body-start] 1.5em [body-content-start] minmax(450px, calc( 800px - 3em )) [body-content-end] 1.5em [body-end body-end-outset page-end-inset page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body:not(.floating):not(.docked) .page-columns.toc-left .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start] 35px [page-start-inset] minmax(0px, 145px) [body-start-outset] 35px [body-start] 1.5em [body-content-start] minmax(450px, calc( 800px - 3em )) [body-content-end] 1.5em [body-end body-end-outset page-end-inset page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.floating .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start page-start-inset body-start-outset body-start] 1.5em [body-content-start] minmax(500px, calc( 750px - 3em )) [body-content-end] 1.5em [body-end] 50px [body-end-outset] minmax(75px, 150px) [page-end-inset] 25px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.docked .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start page-start-inset body-start-outset body-start body-content-start] minmax(500px, calc( 750px - 3em )) [body-content-end] 1.5em [body-end] 50px [body-end-outset] minmax(25px, 50px) [page-end-inset] 50px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.docked.fullcontent .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start page-start-inset body-start-outset body-start body-content-start] minmax(500px, calc( 1000px - 3em )) [body-content-end] 1.5em [body-end body-end-outset page-end-inset page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.floating.fullcontent .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start page-start-inset body-start-outset body-start] 1em [body-content-start] minmax(500px, calc( 800px - 3em )) [body-content-end] 1.5em [body-end body-end-outset page-end-inset page-end] 4fr [screen-end-inset] 1.5em [screen-end]}body.docked.slimcontent .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start page-start-inset body-start-outset body-start body-content-start] minmax(500px, calc( 750px - 3em )) [body-content-end] 1.5em [body-end] 50px [body-end-outset] minmax(25px, 50px) [page-end-inset] 50px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.docked.listing .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start page-start-inset body-start-outset body-start body-content-start] minmax(500px, calc( 750px - 3em )) [body-content-end] 1.5em [body-end] 50px [body-end-outset] minmax(25px, 50px) [page-end-inset] 50px [page-end] 5fr [screen-end-inset] 1.5em [screen-end]}body.floating.slimcontent .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start page-start-inset body-start-outset body-start] 1em [body-content-start] minmax(500px, calc( 750px - 3em )) [body-content-end] 1.5em [body-end] 35px [body-end-outset] minmax(75px, 145px) [page-end-inset] 35px [page-end] 4fr [screen-end-inset] 1.5em [screen-end]}body.floating.listing .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset] 5fr [page-start page-start-inset body-start-outset body-start] 1em [body-content-start] minmax(500px, calc( 750px - 3em )) [body-content-end] 1.5em [body-end] 50px [body-end-outset] minmax(75px, 150px) [page-end-inset] 25px [page-end] 4fr [screen-end-inset] 1.5em [screen-end]}}@media(max-width: 767.98px){body .page-columns,body.fullcontent:not(.floating):not(.docked) .page-columns,body.slimcontent:not(.floating):not(.docked) .page-columns,body.docked .page-columns,body.docked.slimcontent .page-columns,body.docked.fullcontent .page-columns,body.floating .page-columns,body.floating.slimcontent .page-columns,body.floating.fullcontent .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start page-start-inset body-start-outset body-start body-content-start] minmax(0px, 1fr) [body-content-end body-end body-end-outset page-end-inset page-end screen-end-inset] 1.5em [screen-end]}body:not(.floating):not(.docked) .page-columns.toc-left{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start page-start-inset body-start-outset body-start body-content-start] minmax(0px, 1fr) [body-content-end body-end body-end-outset page-end-inset page-end screen-end-inset] 1.5em [screen-end]}body:not(.floating):not(.docked) .page-columns.toc-left .page-columns{display:grid;gap:0;grid-template-columns:[screen-start] 1.5em [screen-start-inset page-start page-start-inset body-start-outset body-start body-content-start] minmax(0px, 1fr) [body-content-end body-end body-end-outset page-end-inset page-end screen-end-inset] 1.5em [screen-end]}nav[role=doc-toc]{display:none}}body,.page-row-navigation{grid-template-rows:[page-top] max-content [contents-top] max-content [contents-bottom] max-content [page-bottom]}.page-rows-contents{grid-template-rows:[content-top] minmax(max-content, 1fr) [content-bottom] minmax(60px, max-content) [page-bottom]}.page-full{grid-column:screen-start/screen-end !important}.page-columns>*{grid-column:body-content-start/body-content-end}.page-columns.column-page>*{grid-column:page-start/page-end}.page-columns.column-page-left>*{grid-column:page-start/body-content-end}.page-columns.column-page-right>*{grid-column:body-content-start/page-end}.page-rows{grid-auto-rows:auto}.header{grid-column:screen-start/screen-end;grid-row:page-top/contents-top}#quarto-content{padding:0;grid-column:screen-start/screen-end;grid-row:contents-top/contents-bottom}body.floating .sidebar.sidebar-navigation{grid-column:page-start/body-start;grid-row:content-top/page-bottom}body.docked .sidebar.sidebar-navigation{grid-column:screen-start/body-start;grid-row:content-top/page-bottom}.sidebar.toc-left{grid-column:page-start/body-start;grid-row:content-top/page-bottom}.sidebar.margin-sidebar{grid-column:body-end/page-end;grid-row:content-top/page-bottom}.page-columns .content{grid-column:body-content-start/body-content-end;grid-row:content-top/content-bottom;align-content:flex-start}.page-columns .page-navigation{grid-column:body-content-start/body-content-end;grid-row:content-bottom/page-bottom}.page-columns .footer{grid-column:screen-start/screen-end;grid-row:contents-bottom/page-bottom}.page-columns .column-body{grid-column:body-content-start/body-content-end}.page-columns .column-body-fullbleed{grid-column:body-start/body-end}.page-columns .column-body-outset{grid-column:body-start-outset/body-end-outset;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-body-outset table{background:#fff}.page-columns .column-body-outset-left{grid-column:body-start-outset/body-content-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-body-outset-left table{background:#fff}.page-columns .column-body-outset-right{grid-column:body-content-start/body-end-outset;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-body-outset-right table{background:#fff}.page-columns .column-page{grid-column:page-start/page-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-page table{background:#fff}.page-columns .column-page-inset{grid-column:page-start-inset/page-end-inset;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-page-inset table{background:#fff}.page-columns .column-page-inset-left{grid-column:page-start-inset/body-content-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-page-inset-left table{background:#fff}.page-columns .column-page-inset-right{grid-column:body-content-start/page-end-inset;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-page-inset-right figcaption table{background:#fff}.page-columns .column-page-left{grid-column:page-start/body-content-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-page-left table{background:#fff}.page-columns .column-page-right{grid-column:body-content-start/page-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-page-right figcaption table{background:#fff}#quarto-content.page-columns #quarto-margin-sidebar,#quarto-content.page-columns #quarto-sidebar{z-index:1}@media(max-width: 991.98px){#quarto-content.page-columns #quarto-margin-sidebar.collapse,#quarto-content.page-columns #quarto-sidebar.collapse{z-index:1055}}#quarto-content.page-columns main.column-page,#quarto-content.page-columns main.column-page-right,#quarto-content.page-columns main.column-page-left{z-index:0}.page-columns .column-screen-inset{grid-column:screen-start-inset/screen-end-inset;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen-inset table{background:#fff}.page-columns .column-screen-inset-left{grid-column:screen-start-inset/body-content-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen-inset-left table{background:#fff}.page-columns .column-screen-inset-right{grid-column:body-content-start/screen-end-inset;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen-inset-right table{background:#fff}.page-columns .column-screen{grid-column:screen-start/screen-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen table{background:#fff}.page-columns .column-screen-left{grid-column:screen-start/body-content-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen-left table{background:#fff}.page-columns .column-screen-right{grid-column:body-content-start/screen-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen-right table{background:#fff}.page-columns .column-screen-inset-shaded{grid-column:screen-start/screen-end;padding:1em;background:#f8f9fa;z-index:998;transform:translate3d(0, 0, 0);margin-bottom:1em}.zindex-content{z-index:998;transform:translate3d(0, 0, 0)}.zindex-modal{z-index:1055;transform:translate3d(0, 0, 0)}.zindex-over-content{z-index:999;transform:translate3d(0, 0, 0)}img.img-fluid.column-screen,img.img-fluid.column-screen-inset-shaded,img.img-fluid.column-screen-inset,img.img-fluid.column-screen-inset-left,img.img-fluid.column-screen-inset-right,img.img-fluid.column-screen-left,img.img-fluid.column-screen-right{width:100%}@media(min-width: 992px){.margin-caption,div.aside,aside,.column-margin{grid-column:body-end/page-end !important;z-index:998}.column-sidebar{grid-column:page-start/body-start !important;z-index:998}.column-leftmargin{grid-column:screen-start-inset/body-start !important;z-index:998}.no-row-height{height:1em;overflow:visible}}@media(max-width: 991.98px){.margin-caption,div.aside,aside,.column-margin{grid-column:body-end/page-end !important;z-index:998}.no-row-height{height:1em;overflow:visible}.page-columns.page-full{overflow:visible}.page-columns.toc-left .margin-caption,.page-columns.toc-left div.aside,.page-columns.toc-left aside,.page-columns.toc-left .column-margin{grid-column:body-content-start/body-content-end !important;z-index:998;transform:translate3d(0, 0, 0)}.page-columns.toc-left .no-row-height{height:initial;overflow:initial}}@media(max-width: 767.98px){.margin-caption,div.aside,aside,.column-margin{grid-column:body-content-start/body-content-end !important;z-index:998;transform:translate3d(0, 0, 0)}.no-row-height{height:initial;overflow:initial}#quarto-margin-sidebar{display:none}#quarto-sidebar-toc-left{display:none}.hidden-sm{display:none}}.panel-grid{display:grid;grid-template-rows:repeat(1, 1fr);grid-template-columns:repeat(24, 1fr);gap:1em}.panel-grid .g-col-1{grid-column:auto/span 1}.panel-grid .g-col-2{grid-column:auto/span 2}.panel-grid .g-col-3{grid-column:auto/span 3}.panel-grid .g-col-4{grid-column:auto/span 4}.panel-grid .g-col-5{grid-column:auto/span 5}.panel-grid .g-col-6{grid-column:auto/span 6}.panel-grid .g-col-7{grid-column:auto/span 7}.panel-grid .g-col-8{grid-column:auto/span 8}.panel-grid .g-col-9{grid-column:auto/span 9}.panel-grid .g-col-10{grid-column:auto/span 10}.panel-grid .g-col-11{grid-column:auto/span 11}.panel-grid .g-col-12{grid-column:auto/span 12}.panel-grid .g-col-13{grid-column:auto/span 13}.panel-grid .g-col-14{grid-column:auto/span 14}.panel-grid .g-col-15{grid-column:auto/span 15}.panel-grid .g-col-16{grid-column:auto/span 16}.panel-grid .g-col-17{grid-column:auto/span 17}.panel-grid .g-col-18{grid-column:auto/span 18}.panel-grid .g-col-19{grid-column:auto/span 19}.panel-grid .g-col-20{grid-column:auto/span 20}.panel-grid .g-col-21{grid-column:auto/span 21}.panel-grid .g-col-22{grid-column:auto/span 22}.panel-grid .g-col-23{grid-column:auto/span 23}.panel-grid .g-col-24{grid-column:auto/span 24}.panel-grid .g-start-1{grid-column-start:1}.panel-grid .g-start-2{grid-column-start:2}.panel-grid .g-start-3{grid-column-start:3}.panel-grid .g-start-4{grid-column-start:4}.panel-grid .g-start-5{grid-column-start:5}.panel-grid .g-start-6{grid-column-start:6}.panel-grid .g-start-7{grid-column-start:7}.panel-grid .g-start-8{grid-column-start:8}.panel-grid .g-start-9{grid-column-start:9}.panel-grid .g-start-10{grid-column-start:10}.panel-grid .g-start-11{grid-column-start:11}.panel-grid .g-start-12{grid-column-start:12}.panel-grid .g-start-13{grid-column-start:13}.panel-grid .g-start-14{grid-column-start:14}.panel-grid .g-start-15{grid-column-start:15}.panel-grid .g-start-16{grid-column-start:16}.panel-grid .g-start-17{grid-column-start:17}.panel-grid .g-start-18{grid-column-start:18}.panel-grid .g-start-19{grid-column-start:19}.panel-grid .g-start-20{grid-column-start:20}.panel-grid .g-start-21{grid-column-start:21}.panel-grid .g-start-22{grid-column-start:22}.panel-grid .g-start-23{grid-column-start:23}@media(min-width: 576px){.panel-grid .g-col-sm-1{grid-column:auto/span 1}.panel-grid .g-col-sm-2{grid-column:auto/span 2}.panel-grid .g-col-sm-3{grid-column:auto/span 3}.panel-grid .g-col-sm-4{grid-column:auto/span 4}.panel-grid .g-col-sm-5{grid-column:auto/span 5}.panel-grid .g-col-sm-6{grid-column:auto/span 6}.panel-grid .g-col-sm-7{grid-column:auto/span 7}.panel-grid .g-col-sm-8{grid-column:auto/span 8}.panel-grid .g-col-sm-9{grid-column:auto/span 9}.panel-grid .g-col-sm-10{grid-column:auto/span 10}.panel-grid .g-col-sm-11{grid-column:auto/span 11}.panel-grid .g-col-sm-12{grid-column:auto/span 12}.panel-grid .g-col-sm-13{grid-column:auto/span 13}.panel-grid .g-col-sm-14{grid-column:auto/span 14}.panel-grid .g-col-sm-15{grid-column:auto/span 15}.panel-grid .g-col-sm-16{grid-column:auto/span 16}.panel-grid .g-col-sm-17{grid-column:auto/span 17}.panel-grid .g-col-sm-18{grid-column:auto/span 18}.panel-grid .g-col-sm-19{grid-column:auto/span 19}.panel-grid .g-col-sm-20{grid-column:auto/span 20}.panel-grid .g-col-sm-21{grid-column:auto/span 21}.panel-grid .g-col-sm-22{grid-column:auto/span 22}.panel-grid .g-col-sm-23{grid-column:auto/span 23}.panel-grid .g-col-sm-24{grid-column:auto/span 24}.panel-grid .g-start-sm-1{grid-column-start:1}.panel-grid .g-start-sm-2{grid-column-start:2}.panel-grid .g-start-sm-3{grid-column-start:3}.panel-grid .g-start-sm-4{grid-column-start:4}.panel-grid .g-start-sm-5{grid-column-start:5}.panel-grid .g-start-sm-6{grid-column-start:6}.panel-grid .g-start-sm-7{grid-column-start:7}.panel-grid .g-start-sm-8{grid-column-start:8}.panel-grid .g-start-sm-9{grid-column-start:9}.panel-grid .g-start-sm-10{grid-column-start:10}.panel-grid .g-start-sm-11{grid-column-start:11}.panel-grid .g-start-sm-12{grid-column-start:12}.panel-grid .g-start-sm-13{grid-column-start:13}.panel-grid .g-start-sm-14{grid-column-start:14}.panel-grid .g-start-sm-15{grid-column-start:15}.panel-grid .g-start-sm-16{grid-column-start:16}.panel-grid .g-start-sm-17{grid-column-start:17}.panel-grid .g-start-sm-18{grid-column-start:18}.panel-grid .g-start-sm-19{grid-column-start:19}.panel-grid .g-start-sm-20{grid-column-start:20}.panel-grid .g-start-sm-21{grid-column-start:21}.panel-grid .g-start-sm-22{grid-column-start:22}.panel-grid .g-start-sm-23{grid-column-start:23}}@media(min-width: 768px){.panel-grid .g-col-md-1{grid-column:auto/span 1}.panel-grid .g-col-md-2{grid-column:auto/span 2}.panel-grid .g-col-md-3{grid-column:auto/span 3}.panel-grid .g-col-md-4{grid-column:auto/span 4}.panel-grid .g-col-md-5{grid-column:auto/span 5}.panel-grid .g-col-md-6{grid-column:auto/span 6}.panel-grid .g-col-md-7{grid-column:auto/span 7}.panel-grid .g-col-md-8{grid-column:auto/span 8}.panel-grid .g-col-md-9{grid-column:auto/span 9}.panel-grid .g-col-md-10{grid-column:auto/span 10}.panel-grid .g-col-md-11{grid-column:auto/span 11}.panel-grid .g-col-md-12{grid-column:auto/span 12}.panel-grid .g-col-md-13{grid-column:auto/span 13}.panel-grid .g-col-md-14{grid-column:auto/span 14}.panel-grid .g-col-md-15{grid-column:auto/span 15}.panel-grid .g-col-md-16{grid-column:auto/span 16}.panel-grid .g-col-md-17{grid-column:auto/span 17}.panel-grid .g-col-md-18{grid-column:auto/span 18}.panel-grid .g-col-md-19{grid-column:auto/span 19}.panel-grid .g-col-md-20{grid-column:auto/span 20}.panel-grid .g-col-md-21{grid-column:auto/span 21}.panel-grid .g-col-md-22{grid-column:auto/span 22}.panel-grid .g-col-md-23{grid-column:auto/span 23}.panel-grid .g-col-md-24{grid-column:auto/span 24}.panel-grid .g-start-md-1{grid-column-start:1}.panel-grid .g-start-md-2{grid-column-start:2}.panel-grid .g-start-md-3{grid-column-start:3}.panel-grid .g-start-md-4{grid-column-start:4}.panel-grid .g-start-md-5{grid-column-start:5}.panel-grid .g-start-md-6{grid-column-start:6}.panel-grid .g-start-md-7{grid-column-start:7}.panel-grid .g-start-md-8{grid-column-start:8}.panel-grid .g-start-md-9{grid-column-start:9}.panel-grid .g-start-md-10{grid-column-start:10}.panel-grid .g-start-md-11{grid-column-start:11}.panel-grid .g-start-md-12{grid-column-start:12}.panel-grid .g-start-md-13{grid-column-start:13}.panel-grid .g-start-md-14{grid-column-start:14}.panel-grid .g-start-md-15{grid-column-start:15}.panel-grid .g-start-md-16{grid-column-start:16}.panel-grid .g-start-md-17{grid-column-start:17}.panel-grid .g-start-md-18{grid-column-start:18}.panel-grid .g-start-md-19{grid-column-start:19}.panel-grid .g-start-md-20{grid-column-start:20}.panel-grid .g-start-md-21{grid-column-start:21}.panel-grid .g-start-md-22{grid-column-start:22}.panel-grid .g-start-md-23{grid-column-start:23}}@media(min-width: 992px){.panel-grid .g-col-lg-1{grid-column:auto/span 1}.panel-grid .g-col-lg-2{grid-column:auto/span 2}.panel-grid .g-col-lg-3{grid-column:auto/span 3}.panel-grid .g-col-lg-4{grid-column:auto/span 4}.panel-grid .g-col-lg-5{grid-column:auto/span 5}.panel-grid .g-col-lg-6{grid-column:auto/span 6}.panel-grid .g-col-lg-7{grid-column:auto/span 7}.panel-grid .g-col-lg-8{grid-column:auto/span 8}.panel-grid .g-col-lg-9{grid-column:auto/span 9}.panel-grid .g-col-lg-10{grid-column:auto/span 10}.panel-grid .g-col-lg-11{grid-column:auto/span 11}.panel-grid .g-col-lg-12{grid-column:auto/span 12}.panel-grid .g-col-lg-13{grid-column:auto/span 13}.panel-grid .g-col-lg-14{grid-column:auto/span 14}.panel-grid .g-col-lg-15{grid-column:auto/span 15}.panel-grid .g-col-lg-16{grid-column:auto/span 16}.panel-grid .g-col-lg-17{grid-column:auto/span 17}.panel-grid .g-col-lg-18{grid-column:auto/span 18}.panel-grid .g-col-lg-19{grid-column:auto/span 19}.panel-grid .g-col-lg-20{grid-column:auto/span 20}.panel-grid .g-col-lg-21{grid-column:auto/span 21}.panel-grid .g-col-lg-22{grid-column:auto/span 22}.panel-grid .g-col-lg-23{grid-column:auto/span 23}.panel-grid .g-col-lg-24{grid-column:auto/span 24}.panel-grid .g-start-lg-1{grid-column-start:1}.panel-grid .g-start-lg-2{grid-column-start:2}.panel-grid .g-start-lg-3{grid-column-start:3}.panel-grid .g-start-lg-4{grid-column-start:4}.panel-grid .g-start-lg-5{grid-column-start:5}.panel-grid .g-start-lg-6{grid-column-start:6}.panel-grid .g-start-lg-7{grid-column-start:7}.panel-grid .g-start-lg-8{grid-column-start:8}.panel-grid .g-start-lg-9{grid-column-start:9}.panel-grid .g-start-lg-10{grid-column-start:10}.panel-grid .g-start-lg-11{grid-column-start:11}.panel-grid .g-start-lg-12{grid-column-start:12}.panel-grid .g-start-lg-13{grid-column-start:13}.panel-grid .g-start-lg-14{grid-column-start:14}.panel-grid .g-start-lg-15{grid-column-start:15}.panel-grid .g-start-lg-16{grid-column-start:16}.panel-grid .g-start-lg-17{grid-column-start:17}.panel-grid .g-start-lg-18{grid-column-start:18}.panel-grid .g-start-lg-19{grid-column-start:19}.panel-grid .g-start-lg-20{grid-column-start:20}.panel-grid .g-start-lg-21{grid-column-start:21}.panel-grid .g-start-lg-22{grid-column-start:22}.panel-grid .g-start-lg-23{grid-column-start:23}}@media(min-width: 1200px){.panel-grid .g-col-xl-1{grid-column:auto/span 1}.panel-grid .g-col-xl-2{grid-column:auto/span 2}.panel-grid .g-col-xl-3{grid-column:auto/span 3}.panel-grid .g-col-xl-4{grid-column:auto/span 4}.panel-grid .g-col-xl-5{grid-column:auto/span 5}.panel-grid .g-col-xl-6{grid-column:auto/span 6}.panel-grid .g-col-xl-7{grid-column:auto/span 7}.panel-grid .g-col-xl-8{grid-column:auto/span 8}.panel-grid .g-col-xl-9{grid-column:auto/span 9}.panel-grid .g-col-xl-10{grid-column:auto/span 10}.panel-grid .g-col-xl-11{grid-column:auto/span 11}.panel-grid .g-col-xl-12{grid-column:auto/span 12}.panel-grid .g-col-xl-13{grid-column:auto/span 13}.panel-grid .g-col-xl-14{grid-column:auto/span 14}.panel-grid .g-col-xl-15{grid-column:auto/span 15}.panel-grid .g-col-xl-16{grid-column:auto/span 16}.panel-grid .g-col-xl-17{grid-column:auto/span 17}.panel-grid .g-col-xl-18{grid-column:auto/span 18}.panel-grid .g-col-xl-19{grid-column:auto/span 19}.panel-grid .g-col-xl-20{grid-column:auto/span 20}.panel-grid .g-col-xl-21{grid-column:auto/span 21}.panel-grid .g-col-xl-22{grid-column:auto/span 22}.panel-grid .g-col-xl-23{grid-column:auto/span 23}.panel-grid .g-col-xl-24{grid-column:auto/span 24}.panel-grid .g-start-xl-1{grid-column-start:1}.panel-grid .g-start-xl-2{grid-column-start:2}.panel-grid .g-start-xl-3{grid-column-start:3}.panel-grid .g-start-xl-4{grid-column-start:4}.panel-grid .g-start-xl-5{grid-column-start:5}.panel-grid .g-start-xl-6{grid-column-start:6}.panel-grid .g-start-xl-7{grid-column-start:7}.panel-grid .g-start-xl-8{grid-column-start:8}.panel-grid .g-start-xl-9{grid-column-start:9}.panel-grid .g-start-xl-10{grid-column-start:10}.panel-grid .g-start-xl-11{grid-column-start:11}.panel-grid .g-start-xl-12{grid-column-start:12}.panel-grid .g-start-xl-13{grid-column-start:13}.panel-grid .g-start-xl-14{grid-column-start:14}.panel-grid .g-start-xl-15{grid-column-start:15}.panel-grid .g-start-xl-16{grid-column-start:16}.panel-grid .g-start-xl-17{grid-column-start:17}.panel-grid .g-start-xl-18{grid-column-start:18}.panel-grid .g-start-xl-19{grid-column-start:19}.panel-grid .g-start-xl-20{grid-column-start:20}.panel-grid .g-start-xl-21{grid-column-start:21}.panel-grid .g-start-xl-22{grid-column-start:22}.panel-grid .g-start-xl-23{grid-column-start:23}}@media(min-width: 1400px){.panel-grid .g-col-xxl-1{grid-column:auto/span 1}.panel-grid .g-col-xxl-2{grid-column:auto/span 2}.panel-grid .g-col-xxl-3{grid-column:auto/span 3}.panel-grid .g-col-xxl-4{grid-column:auto/span 4}.panel-grid .g-col-xxl-5{grid-column:auto/span 5}.panel-grid .g-col-xxl-6{grid-column:auto/span 6}.panel-grid .g-col-xxl-7{grid-column:auto/span 7}.panel-grid .g-col-xxl-8{grid-column:auto/span 8}.panel-grid .g-col-xxl-9{grid-column:auto/span 9}.panel-grid .g-col-xxl-10{grid-column:auto/span 10}.panel-grid .g-col-xxl-11{grid-column:auto/span 11}.panel-grid .g-col-xxl-12{grid-column:auto/span 12}.panel-grid .g-col-xxl-13{grid-column:auto/span 13}.panel-grid .g-col-xxl-14{grid-column:auto/span 14}.panel-grid .g-col-xxl-15{grid-column:auto/span 15}.panel-grid .g-col-xxl-16{grid-column:auto/span 16}.panel-grid .g-col-xxl-17{grid-column:auto/span 17}.panel-grid .g-col-xxl-18{grid-column:auto/span 18}.panel-grid .g-col-xxl-19{grid-column:auto/span 19}.panel-grid .g-col-xxl-20{grid-column:auto/span 20}.panel-grid .g-col-xxl-21{grid-column:auto/span 21}.panel-grid .g-col-xxl-22{grid-column:auto/span 22}.panel-grid .g-col-xxl-23{grid-column:auto/span 23}.panel-grid .g-col-xxl-24{grid-column:auto/span 24}.panel-grid .g-start-xxl-1{grid-column-start:1}.panel-grid .g-start-xxl-2{grid-column-start:2}.panel-grid .g-start-xxl-3{grid-column-start:3}.panel-grid .g-start-xxl-4{grid-column-start:4}.panel-grid .g-start-xxl-5{grid-column-start:5}.panel-grid .g-start-xxl-6{grid-column-start:6}.panel-grid .g-start-xxl-7{grid-column-start:7}.panel-grid .g-start-xxl-8{grid-column-start:8}.panel-grid .g-start-xxl-9{grid-column-start:9}.panel-grid .g-start-xxl-10{grid-column-start:10}.panel-grid .g-start-xxl-11{grid-column-start:11}.panel-grid .g-start-xxl-12{grid-column-start:12}.panel-grid .g-start-xxl-13{grid-column-start:13}.panel-grid .g-start-xxl-14{grid-column-start:14}.panel-grid .g-start-xxl-15{grid-column-start:15}.panel-grid .g-start-xxl-16{grid-column-start:16}.panel-grid .g-start-xxl-17{grid-column-start:17}.panel-grid .g-start-xxl-18{grid-column-start:18}.panel-grid .g-start-xxl-19{grid-column-start:19}.panel-grid .g-start-xxl-20{grid-column-start:20}.panel-grid .g-start-xxl-21{grid-column-start:21}.panel-grid .g-start-xxl-22{grid-column-start:22}.panel-grid .g-start-xxl-23{grid-column-start:23}}main{margin-top:1em;margin-bottom:1em}h1,.h1,h2,.h2{margin-top:2rem;margin-bottom:1rem}h1.title,.title.h1{margin-top:0}h2,.h2{border-bottom:1px solid #dee2e6;padding-bottom:.5rem}h3,.h3,h4,.h4{margin-top:1.5rem}.header-section-number{color:#747a7f}.nav-link.active .header-section-number{color:inherit}mark,.mark{padding:0em}.panel-caption,caption,.figure-caption{font-size:1rem}.panel-caption,.figure-caption,figcaption{color:#747a7f}.table-caption,caption{color:#373a3c}.quarto-layout-cell[data-ref-parent] caption{color:#747a7f}.column-margin figcaption,.margin-caption,div.aside,aside,.column-margin{color:#747a7f;font-size:.825rem}.panel-caption.margin-caption{text-align:inherit}.column-margin.column-container p{margin-bottom:0}.column-margin.column-container>*:not(.collapse){padding-top:.5em;padding-bottom:.5em;display:block}.column-margin.column-container>*.collapse:not(.show){display:none}@media(min-width: 768px){.column-margin.column-container .callout-margin-content:first-child{margin-top:4.5em}.column-margin.column-container .callout-margin-content-simple:first-child{margin-top:3.5em}}.margin-caption>*{padding-top:.5em;padding-bottom:.5em}@media(max-width: 767.98px){.quarto-layout-row{flex-direction:column}}.tab-content{margin-top:0px;border-left:#dee2e6 1px solid;border-right:#dee2e6 1px solid;border-bottom:#dee2e6 1px solid;margin-left:0;padding:1em;margin-bottom:1em}@media(max-width: 767.98px){.layout-sidebar{margin-left:0;margin-right:0}}.panel-sidebar,.panel-sidebar .form-control,.panel-input,.panel-input .form-control,.selectize-dropdown{font-size:.9rem}.panel-sidebar .form-control,.panel-input .form-control{padding-top:.1rem}.tab-pane div.sourceCode{margin-top:0px}.tab-pane>p{padding-top:1em}.tab-content>.tab-pane:not(.active){display:none !important}div.sourceCode{background-color:rgba(233,236,239,.65);border:1px solid rgba(233,236,239,.65);border-radius:.25rem}pre.sourceCode{background-color:rgba(0,0,0,0)}pre.sourceCode{border:none;font-size:.875em;overflow:visible !important;padding:.4em}.callout pre.sourceCode{padding-left:0}div.sourceCode{overflow-y:hidden}.callout div.sourceCode{margin-left:initial}.blockquote{font-size:inherit;padding-left:1rem;padding-right:1.5rem;color:#747a7f}.blockquote h1:first-child,.blockquote .h1:first-child,.blockquote h2:first-child,.blockquote .h2:first-child,.blockquote h3:first-child,.blockquote .h3:first-child,.blockquote h4:first-child,.blockquote .h4:first-child,.blockquote h5:first-child,.blockquote .h5:first-child{margin-top:0}pre{background-color:initial;padding:initial;border:initial}p code:not(.sourceCode),li code:not(.sourceCode),td code:not(.sourceCode){background-color:#f7f7f7;padding:.2em}nav p code:not(.sourceCode),nav li code:not(.sourceCode),nav td code:not(.sourceCode){background-color:rgba(0,0,0,0);padding:0}td code:not(.sourceCode){white-space:pre-wrap}#quarto-embedded-source-code-modal>.modal-dialog{max-width:1000px;padding-left:1.75rem;padding-right:1.75rem}#quarto-embedded-source-code-modal>.modal-dialog>.modal-content>.modal-body{padding:0}#quarto-embedded-source-code-modal>.modal-dialog>.modal-content>.modal-body div.sourceCode{margin:0;padding:.2rem .2rem;border-radius:0px;border:none}#quarto-embedded-source-code-modal>.modal-dialog>.modal-content>.modal-header{padding:.7rem}.code-tools-button{font-size:1rem;padding:.15rem .15rem;margin-left:5px;color:#6c757d;background-color:rgba(0,0,0,0);transition:initial;cursor:pointer}.code-tools-button>.bi::before{display:inline-block;height:1rem;width:1rem;content:"";vertical-align:-0.125em;background-image:url('data:image/svg+xml,');background-repeat:no-repeat;background-size:1rem 1rem}.code-tools-button:hover>.bi::before{background-image:url('data:image/svg+xml,')}#quarto-embedded-source-code-modal .code-copy-button>.bi::before{background-image:url('data:image/svg+xml,')}#quarto-embedded-source-code-modal .code-copy-button-checked>.bi::before{background-image:url('data:image/svg+xml,')}.sidebar{will-change:top;transition:top 200ms linear;position:sticky;overflow-y:auto;padding-top:1.2em;max-height:100vh}.sidebar.toc-left,.sidebar.margin-sidebar{top:0px;padding-top:1em}.sidebar.toc-left>*,.sidebar.margin-sidebar>*{padding-top:.5em}.sidebar.quarto-banner-title-block-sidebar>*{padding-top:1.65em}figure .quarto-notebook-link{margin-top:.5em}.quarto-notebook-link{font-size:.75em;color:#6c757d;margin-bottom:1em;text-decoration:none;display:block}.quarto-notebook-link:hover{text-decoration:underline;color:#28a87d}.quarto-notebook-link::before{display:inline-block;height:.75rem;width:.75rem;margin-bottom:0em;margin-right:.25em;content:"";vertical-align:-0.125em;background-image:url('data:image/svg+xml,');background-repeat:no-repeat;background-size:.75rem .75rem}.quarto-alternate-notebooks i.bi,.quarto-alternate-formats i.bi{margin-right:.4em}.quarto-notebook .cell-container{display:flex}.quarto-notebook .cell-container .cell{flex-grow:4}.quarto-notebook .cell-container .cell-decorator{padding-top:1.5em;padding-right:1em;text-align:right}.quarto-notebook h2,.quarto-notebook .h2{border-bottom:none}.sidebar .quarto-alternate-formats a,.sidebar .quarto-alternate-notebooks a{text-decoration:none}.sidebar .quarto-alternate-formats a:hover,.sidebar .quarto-alternate-notebooks a:hover{color:#28a87d}.sidebar .quarto-alternate-notebooks h2,.sidebar .quarto-alternate-notebooks .h2,.sidebar .quarto-alternate-formats h2,.sidebar .quarto-alternate-formats .h2,.sidebar nav[role=doc-toc]>h2,.sidebar nav[role=doc-toc]>.h2{font-size:.875rem;font-weight:400;margin-bottom:.5rem;margin-top:.3rem;font-family:inherit;border-bottom:0;padding-bottom:0;padding-top:0px}.sidebar .quarto-alternate-notebooks h2,.sidebar .quarto-alternate-notebooks .h2,.sidebar .quarto-alternate-formats h2,.sidebar .quarto-alternate-formats .h2{margin-top:1rem}.sidebar nav[role=doc-toc]>ul a{border-left:1px solid #e9ecef;padding-left:.6rem}.sidebar .quarto-alternate-notebooks h2>ul a,.sidebar .quarto-alternate-notebooks .h2>ul a,.sidebar .quarto-alternate-formats h2>ul a,.sidebar .quarto-alternate-formats .h2>ul a{border-left:none;padding-left:.6rem}.sidebar .quarto-alternate-notebooks ul a:empty,.sidebar .quarto-alternate-formats ul a:empty,.sidebar nav[role=doc-toc]>ul a:empty{display:none}.sidebar .quarto-alternate-notebooks ul,.sidebar .quarto-alternate-formats ul,.sidebar nav[role=doc-toc] ul{padding-left:0;list-style:none;font-size:.875rem;font-weight:300}.sidebar .quarto-alternate-notebooks ul li a,.sidebar .quarto-alternate-formats ul li a,.sidebar nav[role=doc-toc]>ul li a{line-height:1.1rem;padding-bottom:.2rem;padding-top:.2rem;color:inherit}.sidebar nav[role=doc-toc] ul>li>ul>li>a{padding-left:1.2em}.sidebar nav[role=doc-toc] ul>li>ul>li>ul>li>a{padding-left:2.4em}.sidebar nav[role=doc-toc] ul>li>ul>li>ul>li>ul>li>a{padding-left:3.6em}.sidebar nav[role=doc-toc] ul>li>ul>li>ul>li>ul>li>ul>li>a{padding-left:4.8em}.sidebar nav[role=doc-toc] ul>li>ul>li>ul>li>ul>li>ul>li>ul>li>a{padding-left:6em}.sidebar nav[role=doc-toc] ul>li>a.active,.sidebar nav[role=doc-toc] ul>li>ul>li>a.active{border-left:1px solid #28a87d;color:#28a87d !important}.sidebar nav[role=doc-toc] ul>li>a:hover,.sidebar nav[role=doc-toc] ul>li>ul>li>a:hover{color:#28a87d !important}kbd,.kbd{color:#373a3c;background-color:#f8f9fa;border:1px solid;border-radius:5px;border-color:#dee2e6}div.hanging-indent{margin-left:1em;text-indent:-1em}.citation a,.footnote-ref{text-decoration:none}.footnotes ol{padding-left:1em}.tippy-content>*{margin-bottom:.7em}.tippy-content>*:last-child{margin-bottom:0}.table a{word-break:break-word}.table>:not(:first-child){border-top-width:1px;border-top-color:#dee2e6}.table>thead{border-bottom:1px solid currentColor}.table>tbody{border-top:1px solid #dee2e6}.callout{margin-top:1.25rem;margin-bottom:1.25rem;border-radius:.25rem;overflow-wrap:break-word}.callout .callout-caption-container{overflow-wrap:anywhere}.callout.callout-style-simple{padding:.4em .7em;border-left:5px solid;border-right:1px solid #dee2e6;border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6}.callout.callout-style-default{border-left:5px solid;border-right:1px solid #dee2e6;border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6}.callout .callout-body-container{flex-grow:1}.callout.callout-style-simple .callout-body{font-size:.9rem;font-weight:400}.callout.callout-style-default .callout-body{font-size:.9rem;font-weight:400}.callout.callout-captioned .callout-body{margin-top:.2em}.callout:not(.no-icon).callout-captioned.callout-style-simple .callout-body{padding-left:1.6em}.callout.callout-captioned>.callout-header{padding-top:.2em;margin-bottom:-0.2em}.callout.callout-style-simple>div.callout-header{border-bottom:none;font-size:.9rem;font-weight:600;opacity:75%}.callout.callout-style-default>div.callout-header{border-bottom:none;font-weight:600;opacity:85%;font-size:.9rem;padding-left:.5em;padding-right:.5em}.callout.callout-style-default div.callout-body{padding-left:.5em;padding-right:.5em}.callout.callout-style-default div.callout-body>:first-child{margin-top:.5em}.callout>div.callout-header[data-bs-toggle=collapse]{cursor:pointer}.callout.callout-style-default .callout-header[aria-expanded=false],.callout.callout-style-default .callout-header[aria-expanded=true]{padding-top:0px;margin-bottom:0px;align-items:center}.callout.callout-captioned .callout-body>:last-child:not(.sourceCode),.callout.callout-captioned .callout-body>div>:last-child:not(.sourceCode){margin-bottom:.5rem}.callout:not(.callout-captioned) .callout-body>:first-child,.callout:not(.callout-captioned) .callout-body>div>:first-child{margin-top:.25rem}.callout:not(.callout-captioned) .callout-body>:last-child,.callout:not(.callout-captioned) .callout-body>div>:last-child{margin-bottom:.2rem}.callout.callout-style-simple .callout-icon::before,.callout.callout-style-simple .callout-toggle::before{height:1rem;width:1rem;display:inline-block;content:"";background-repeat:no-repeat;background-size:1rem 1rem}.callout.callout-style-default .callout-icon::before,.callout.callout-style-default .callout-toggle::before{height:.9rem;width:.9rem;display:inline-block;content:"";background-repeat:no-repeat;background-size:.9rem .9rem}.callout.callout-style-default .callout-toggle::before{margin-top:5px}.callout .callout-btn-toggle .callout-toggle::before{transition:transform .2s linear}.callout .callout-header[aria-expanded=false] .callout-toggle::before{transform:rotate(-90deg)}.callout .callout-header[aria-expanded=true] .callout-toggle::before{transform:none}.callout.callout-style-simple:not(.no-icon) div.callout-icon-container{padding-top:.2em;padding-right:.55em}.callout.callout-style-default:not(.no-icon) div.callout-icon-container{padding-top:.1em;padding-right:.35em}.callout.callout-style-default:not(.no-icon) div.callout-caption-container{margin-top:-1px}.callout.callout-style-default.callout-caution:not(.no-icon) div.callout-icon-container{padding-top:.3em;padding-right:.35em}.callout>.callout-body>.callout-icon-container>.no-icon,.callout>.callout-header>.callout-icon-container>.no-icon{display:none}div.callout.callout{border-left-color:#6c757d}div.callout.callout-style-default>.callout-header{background-color:#6c757d}div.callout-note.callout{border-left-color:#2780e3}div.callout-note.callout-style-default>.callout-header{background-color:#e9f2fc}div.callout-note:not(.callout-captioned) .callout-icon::before{background-image:url('data:image/svg+xml,');}div.callout-note.callout-captioned .callout-icon::before{background-image:url('data:image/svg+xml,');}div.callout-note .callout-toggle::before{background-image:url('data:image/svg+xml,')}div.callout-tip.callout{border-left-color:#3fb618}div.callout-tip.callout-style-default>.callout-header{background-color:#ecf8e8}div.callout-tip:not(.callout-captioned) .callout-icon::before{background-image:url('data:image/svg+xml,');}div.callout-tip.callout-captioned .callout-icon::before{background-image:url('data:image/svg+xml,');}div.callout-tip .callout-toggle::before{background-image:url('data:image/svg+xml,')}div.callout-warning.callout{border-left-color:#ff7518}div.callout-warning.callout-style-default>.callout-header{background-color:#fff1e8}div.callout-warning:not(.callout-captioned) .callout-icon::before{background-image:url('data:image/svg+xml,');}div.callout-warning.callout-captioned .callout-icon::before{background-image:url('data:image/svg+xml,');}div.callout-warning .callout-toggle::before{background-image:url('data:image/svg+xml,')}div.callout-caution.callout{border-left-color:#f0ad4e}div.callout-caution.callout-style-default>.callout-header{background-color:#fef7ed}div.callout-caution:not(.callout-captioned) .callout-icon::before{background-image:url('data:image/svg+xml,');}div.callout-caution.callout-captioned .callout-icon::before{background-image:url('data:image/svg+xml,');}div.callout-caution .callout-toggle::before{background-image:url('data:image/svg+xml,')}div.callout-important.callout{border-left-color:#ff0039}div.callout-important.callout-style-default>.callout-header{background-color:#ffe6eb}div.callout-important:not(.callout-captioned) .callout-icon::before{background-image:url('data:image/svg+xml,');}div.callout-important.callout-captioned .callout-icon::before{background-image:url('data:image/svg+xml,');}div.callout-important .callout-toggle::before{background-image:url('data:image/svg+xml,')}.quarto-toggle-container{display:flex;align-items:center}@media(min-width: 992px){.navbar .quarto-color-scheme-toggle{padding-left:.5rem;padding-right:.5rem}}@media(max-width: 767.98px){.navbar .quarto-color-scheme-toggle{padding-left:0;padding-right:0;padding-bottom:.5em}}.quarto-reader-toggle .bi::before,.quarto-color-scheme-toggle .bi::before{display:inline-block;height:1rem;width:1rem;content:"";background-repeat:no-repeat;background-size:1rem 1rem}.navbar-collapse .quarto-color-scheme-toggle{padding-left:.6rem;padding-right:0;margin-top:-12px}.sidebar-navigation{padding-left:20px}.sidebar-navigation .quarto-color-scheme-toggle .bi::before{padding-top:.2rem;margin-bottom:-0.2rem}.sidebar-tools-main .quarto-color-scheme-toggle .bi::before{padding-top:.2rem;margin-bottom:-0.2rem}.navbar .quarto-color-scheme-toggle .bi::before{padding-top:7px;margin-bottom:-7px;padding-left:2px;margin-right:2px}.navbar .quarto-color-scheme-toggle:not(.alternate) .bi::before{background-image:url('data:image/svg+xml,')}.navbar .quarto-color-scheme-toggle.alternate .bi::before{background-image:url('data:image/svg+xml,')}.sidebar-navigation .quarto-color-scheme-toggle:not(.alternate) .bi::before{background-image:url('data:image/svg+xml,')}.sidebar-navigation .quarto-color-scheme-toggle.alternate .bi::before{background-image:url('data:image/svg+xml,')}.quarto-sidebar-toggle{border-color:#dee2e6;border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem;border-style:solid;border-width:1px;overflow:hidden;border-top-width:0px;padding-top:0px !important}.quarto-sidebar-toggle-title{cursor:pointer;padding-bottom:2px;margin-left:.25em;text-align:center;font-weight:400;font-size:.775em}#quarto-content .quarto-sidebar-toggle{background:#fafafa}#quarto-content .quarto-sidebar-toggle-title{color:#373a3c}.quarto-sidebar-toggle-icon{color:#dee2e6;margin-right:.5em;float:right;transition:transform .2s ease}.quarto-sidebar-toggle-icon::before{padding-top:5px}.quarto-sidebar-toggle.expanded .quarto-sidebar-toggle-icon{transform:rotate(-180deg)}.quarto-sidebar-toggle.expanded .quarto-sidebar-toggle-title{border-bottom:solid #dee2e6 1px}.quarto-sidebar-toggle-contents{background-color:#fff;padding-right:10px;padding-left:10px;margin-top:0px !important;transition:max-height .5s ease}.quarto-sidebar-toggle.expanded .quarto-sidebar-toggle-contents{padding-top:1em;padding-bottom:10px}.quarto-sidebar-toggle:not(.expanded) .quarto-sidebar-toggle-contents{padding-top:0px !important;padding-bottom:0px}nav[role=doc-toc]{z-index:1020}#quarto-sidebar>*,nav[role=doc-toc]>*{transition:opacity .1s ease,border .1s ease}#quarto-sidebar.slow>*,nav[role=doc-toc].slow>*{transition:opacity .4s ease,border .4s ease}.quarto-color-scheme-toggle:not(.alternate).top-right .bi::before{background-image:url('data:image/svg+xml,')}.quarto-color-scheme-toggle.alternate.top-right .bi::before{background-image:url('data:image/svg+xml,')}#quarto-appendix.default{border-top:1px solid #dee2e6}#quarto-appendix.default{background-color:#fff;padding-top:1.5em;margin-top:2em;z-index:998}#quarto-appendix.default .quarto-appendix-heading{margin-top:0;line-height:1.4em;font-weight:600;opacity:.9;border-bottom:none;margin-bottom:0}#quarto-appendix.default .footnotes ol,#quarto-appendix.default .footnotes ol li>p:last-of-type,#quarto-appendix.default .quarto-appendix-contents>p:last-of-type{margin-bottom:0}#quarto-appendix.default .quarto-appendix-secondary-label{margin-bottom:.4em}#quarto-appendix.default .quarto-appendix-bibtex{font-size:.7em;padding:1em;border:solid 1px #dee2e6;margin-bottom:1em}#quarto-appendix.default .quarto-appendix-bibtex code.sourceCode{white-space:pre-wrap}#quarto-appendix.default .quarto-appendix-citeas{font-size:.9em;padding:1em;border:solid 1px #dee2e6;margin-bottom:1em}#quarto-appendix.default .quarto-appendix-heading{font-size:1em !important}#quarto-appendix.default *[role=doc-endnotes]>ol,#quarto-appendix.default .quarto-appendix-contents>*:not(h2):not(.h2){font-size:.9em}#quarto-appendix.default section{padding-bottom:1.5em}#quarto-appendix.default section *[role=doc-endnotes],#quarto-appendix.default section>*:not(a){opacity:.9;word-wrap:break-word}.btn.btn-quarto,div.cell-output-display .btn-quarto{color:#cbcccc;background-color:#373a3c;border-color:#373a3c}.btn.btn-quarto:hover,div.cell-output-display .btn-quarto:hover{color:#cbcccc;background-color:#555859;border-color:#4b4e50}.btn-check:focus+.btn.btn-quarto,.btn.btn-quarto:focus,.btn-check:focus+div.cell-output-display .btn-quarto,div.cell-output-display .btn-quarto:focus{color:#cbcccc;background-color:#555859;border-color:#4b4e50;box-shadow:0 0 0 .25rem rgba(77,80,82,.5)}.btn-check:checked+.btn.btn-quarto,.btn-check:active+.btn.btn-quarto,.btn.btn-quarto:active,.btn.btn-quarto.active,.show>.btn.btn-quarto.dropdown-toggle,.btn-check:checked+div.cell-output-display .btn-quarto,.btn-check:active+div.cell-output-display .btn-quarto,div.cell-output-display .btn-quarto:active,div.cell-output-display .btn-quarto.active,.show>div.cell-output-display .btn-quarto.dropdown-toggle{color:#fff;background-color:#5f6163;border-color:#4b4e50}.btn-check:checked+.btn.btn-quarto:focus,.btn-check:active+.btn.btn-quarto:focus,.btn.btn-quarto:active:focus,.btn.btn-quarto.active:focus,.show>.btn.btn-quarto.dropdown-toggle:focus,.btn-check:checked+div.cell-output-display .btn-quarto:focus,.btn-check:active+div.cell-output-display .btn-quarto:focus,div.cell-output-display .btn-quarto:active:focus,div.cell-output-display .btn-quarto.active:focus,.show>div.cell-output-display .btn-quarto.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(77,80,82,.5)}.btn.btn-quarto:disabled,.btn.btn-quarto.disabled,div.cell-output-display .btn-quarto:disabled,div.cell-output-display .btn-quarto.disabled{color:#fff;background-color:#373a3c;border-color:#373a3c}nav.quarto-secondary-nav.color-navbar{background-color:#d4eee5;color:#444c49}nav.quarto-secondary-nav.color-navbar h1,nav.quarto-secondary-nav.color-navbar .h1,nav.quarto-secondary-nav.color-navbar .quarto-btn-toggle{color:#444c49}@media(max-width: 991.98px){body.nav-sidebar .quarto-title-banner,body.nav-sidebar .quarto-title-banner{display:none}}p.subtitle{margin-top:.25em;margin-bottom:.5em}code a:any-link{color:inherit;text-decoration-color:#6c757d}/*! light */div.observablehq table thead tr th{background-color:var(--bs-body-bg)}input,button,select,optgroup,textarea{background-color:var(--bs-body-bg)}.code-annotation-gutter-bg{background-color:#fff}.code-annotation-gutter{background-color:rgba(233,236,239,.65)}.code-annotation-gutter,.code-annotation-gutter-bg{height:100%;width:calc(20px + .5em);position:absolute;top:0;right:0}dl.code-annotation-container-grid dt{margin-right:1em;margin-top:.25rem}dl.code-annotation-container-grid dt{font-family:var(--bs-font-monospace);color:#4f5457;border:solid #4f5457 1px;border-radius:50%;height:22px;width:22px;line-height:22px;font-size:11px;text-align:center;vertical-align:middle;text-decoration:none}dl.code-annotation-container-grid dt[data-target-cell]{cursor:pointer}dl.code-annotation-container-grid dt[data-target-cell].code-annotation-active{color:#fff;border:solid #aaa 1px;background-color:#aaa}pre.code-annotation-code{padding-top:0;padding-bottom:0}pre.code-annotation-code code{z-index:3}#code-annotation-line-highlight-gutter{width:100%;border-top:solid rgba(170,170,170,.2666666667) 1px;border-bottom:solid rgba(170,170,170,.2666666667) 1px;z-index:2;background-color:rgba(170,170,170,.1333333333)}#code-annotation-line-highlight{margin-left:-4em;width:calc(100% + 4em);border-top:solid rgba(170,170,170,.2666666667) 1px;border-bottom:solid rgba(170,170,170,.2666666667) 1px;z-index:2;background-color:rgba(170,170,170,.1333333333)}code.sourceCode .code-annotation-anchor.code-annotation-active{background-color:var(--quarto-hl-normal-color, #aaaaaa);border:solid var(--quarto-hl-normal-color, #aaaaaa) 1px;color:#e9ecef;font-weight:bolder}code.sourceCode .code-annotation-anchor{font-family:var(--bs-font-monospace);color:var(--quarto-hl-co-color);border:solid var(--quarto-hl-co-color) 1px;border-radius:50%;height:18px;width:18px;font-size:9px;margin-top:2px}code.sourceCode button.code-annotation-anchor{padding:2px}code.sourceCode a.code-annotation-anchor{line-height:18px;text-align:center;vertical-align:middle;cursor:default;text-decoration:none}@media print{.page-columns .column-screen-inset{grid-column:page-start-inset/page-end-inset;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen-inset table{background:#fff}.page-columns .column-screen-inset-left{grid-column:page-start-inset/body-content-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen-inset-left table{background:#fff}.page-columns .column-screen-inset-right{grid-column:body-content-start/page-end-inset;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen-inset-right table{background:#fff}.page-columns .column-screen{grid-column:page-start/page-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen table{background:#fff}.page-columns .column-screen-left{grid-column:page-start/body-content-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen-left table{background:#fff}.page-columns .column-screen-right{grid-column:body-content-start/page-end;z-index:998;transform:translate3d(0, 0, 0)}.page-columns .column-screen-right table{background:#fff}.page-columns .column-screen-inset-shaded{grid-column:page-start-inset/page-end-inset;padding:1em;background:#f8f9fa;z-index:998;transform:translate3d(0, 0, 0);margin-bottom:1em}}.quarto-video{margin-bottom:1em}a.external:after{display:inline-block;height:.75rem;width:.75rem;margin-bottom:.15em;margin-left:.25em;content:"";vertical-align:-0.125em;background-image:url('data:image/svg+xml,');background-repeat:no-repeat;background-size:.75rem .75rem}div.sourceCode code a.external:after{content:none}a.external:after:hover{cursor:pointer}.quarto-ext-icon{display:inline-block;font-size:.75em;padding-left:.3em}.code-with-filename .code-with-filename-file{margin-bottom:0;padding-bottom:2px;padding-top:2px;padding-left:.7em;border:var(--quarto-border-width) solid var(--quarto-border-color);border-radius:var(--quarto-border-radius);border-bottom:0;border-bottom-left-radius:0%;border-bottom-right-radius:0%}.code-with-filename div.sourceCode,.reveal .code-with-filename div.sourceCode{margin-top:0;border-top-left-radius:0%;border-top-right-radius:0%}.code-with-filename .code-with-filename-file pre{margin-bottom:0}.code-with-filename .code-with-filename-file,.code-with-filename .code-with-filename-file pre{background-color:rgba(219,219,219,.8)}.quarto-dark .code-with-filename .code-with-filename-file,.quarto-dark .code-with-filename .code-with-filename-file pre{background-color:#555}.code-with-filename .code-with-filename-file strong{font-weight:400}.quarto-title-banner{margin-bottom:1em;color:#444c49;background:#d4eee5}.quarto-title-banner .code-tools-button{color:#74827d}.quarto-title-banner .code-tools-button:hover{color:#444c49}.quarto-title-banner .code-tools-button>.bi::before{background-image:url('data:image/svg+xml,')}.quarto-title-banner .code-tools-button:hover>.bi::before{background-image:url('data:image/svg+xml,')}.quarto-title-banner .quarto-title .title{font-weight:600}.quarto-title-banner .quarto-categories{margin-top:.75em}@media(min-width: 992px){.quarto-title-banner{padding-top:2.5em;padding-bottom:2.5em}}@media(max-width: 991.98px){.quarto-title-banner{padding-top:1em;padding-bottom:1em}}main.quarto-banner-title-block>section:first-child>h2,main.quarto-banner-title-block>section:first-child>.h2,main.quarto-banner-title-block>section:first-child>h3,main.quarto-banner-title-block>section:first-child>.h3,main.quarto-banner-title-block>section:first-child>h4,main.quarto-banner-title-block>section:first-child>.h4{margin-top:0}.quarto-title .quarto-categories{display:flex;flex-wrap:wrap;row-gap:.5em;column-gap:.4em;padding-bottom:.5em;margin-top:.75em}.quarto-title .quarto-categories .quarto-category{padding:.25em .75em;font-size:.65em;text-transform:uppercase;border:solid 1px;border-radius:.25rem;opacity:.6}.quarto-title .quarto-categories .quarto-category a{color:inherit}#title-block-header.quarto-title-block.default .quarto-title-meta{display:grid;grid-template-columns:repeat(2, 1fr)}#title-block-header.quarto-title-block.default .quarto-title .title{margin-bottom:0}#title-block-header.quarto-title-block.default .quarto-title-author-orcid img{margin-top:-5px}#title-block-header.quarto-title-block.default .quarto-description p:last-of-type{margin-bottom:0}#title-block-header.quarto-title-block.default .quarto-title-meta-contents p,#title-block-header.quarto-title-block.default .quarto-title-authors p,#title-block-header.quarto-title-block.default .quarto-title-affiliations p{margin-bottom:.1em}#title-block-header.quarto-title-block.default .quarto-title-meta-heading{text-transform:uppercase;margin-top:1em;font-size:.8em;opacity:.8;font-weight:400}#title-block-header.quarto-title-block.default .quarto-title-meta-contents{font-size:.9em}#title-block-header.quarto-title-block.default .quarto-title-meta-contents a{color:#373a3c}#title-block-header.quarto-title-block.default .quarto-title-meta-contents p.affiliation:last-of-type{margin-bottom:.7em}#title-block-header.quarto-title-block.default p.affiliation{margin-bottom:.1em}#title-block-header.quarto-title-block.default .description,#title-block-header.quarto-title-block.default .abstract{margin-top:0}#title-block-header.quarto-title-block.default .description>p,#title-block-header.quarto-title-block.default .abstract>p{font-size:.9em}#title-block-header.quarto-title-block.default .description>p:last-of-type,#title-block-header.quarto-title-block.default .abstract>p:last-of-type{margin-bottom:0}#title-block-header.quarto-title-block.default .description .abstract-title,#title-block-header.quarto-title-block.default .abstract .abstract-title{margin-top:1em;text-transform:uppercase;font-size:.8em;opacity:.8;font-weight:400}#title-block-header.quarto-title-block.default .quarto-title-meta-author{display:grid;grid-template-columns:1fr 1fr}body{-webkit-font-smoothing:antialiased}.badge.bg-light{color:#373a3c}.progress .progress-bar{font-size:8px;line-height:8px}h1,.h1{font-family:"Literata","Bodoni MT","Georgia","Times New Roman",Times,serif;font-weight:800;font-style:italic}h2,.h2,h3,.h3,h4,.h4,span,body,.navbar-title{font-family:"Asap","Asap Condensed","Spline Sans","Tahoma","Arial",sans-serif;font-stretch:87.5%}h2,.h2{font-weight:600}.navbar-title{font-weight:800}code,.code{font-family:"Spline Sans Mono","Consolas",monospace}.question{border-left:3px solid #28a87d;padding:.5rem .5rem .2rem 1rem;margin-top:.5rem;margin-bottom:.3rem;background:#d9f6ec}.recap{border-left:3px solid #639;padding:.5rem .5rem .2rem 1rem;margin-top:.5rem;margin-bottom:.5rem;background:#e6d9f2}.navbar{padding-top:1px;padding-bottom:1px}.navbar-logo{max-height:60px}h1.title,.title.h1{font-size:2.5em}@media screen and (max-width: 768px){h1.title,.title.h1{font-size:1.7gith5em}}/*# sourceMappingURL=d6b77e37a12f878a50f9f8a85e535bdc.css.map */ diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 01d8962..22ff3fb 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -2,90 +2,90 @@ https://posit-conf-2023.github.io/dataviz-ggplot2/index.html - 2023-09-18T14:16:26.330Z + 2023-10-10T19:27:54.828Z https://posit-conf-2023.github.io/dataviz-ggplot2/license.html - 2023-09-18T14:16:26.507Z + 2023-10-10T19:27:55.065Z https://posit-conf-2023.github.io/dataviz-ggplot2/materials/00-welcome.html - 2023-09-18T14:16:28.203Z + 2023-10-10T19:27:56.131Z https://posit-conf-2023.github.io/dataviz-ggplot2/materials/01-fundamentals.html - 2023-09-18T14:16:29.619Z + 2023-10-10T19:28:30.704Z https://posit-conf-2023.github.io/dataviz-ggplot2/materials/02-text.html - 2023-09-18T14:16:34.253Z + 2023-10-10T19:28:35.284Z https://posit-conf-2023.github.io/dataviz-ggplot2/materials/03-colors.html - 2023-09-18T14:16:39.240Z + 2023-10-10T19:28:39.775Z https://posit-conf-2023.github.io/dataviz-ggplot2/materials/04-theming.html - 2023-09-18T14:16:49.752Z + 2023-10-10T19:28:51.138Z https://posit-conf-2023.github.io/dataviz-ggplot2/materials/solutions/01-fundamentals-solutions.html - 2023-09-18T14:16:51.481Z + 2023-10-10T19:28:52.866Z https://posit-conf-2023.github.io/dataviz-ggplot2/materials/solutions/02-text-solutions.html - 2023-09-18T14:16:52.066Z + 2023-10-10T19:28:53.335Z https://posit-conf-2023.github.io/dataviz-ggplot2/materials/solutions/03-colors-solutions.html - 2023-09-18T14:16:52.494Z + 2023-10-10T19:28:53.752Z https://posit-conf-2023.github.io/dataviz-ggplot2/materials/solutions/04-theming-solutions.html - 2023-09-18T14:16:52.911Z + 2023-10-10T19:28:57.819Z https://posit-conf-2023.github.io/dataviz-ggplot2/modules/s01-fundamentals.html - 2023-09-18T14:16:53.228Z + 2023-10-10T19:28:58.133Z https://posit-conf-2023.github.io/dataviz-ggplot2/modules/s02-break.html - 2023-09-18T14:16:53.396Z + 2023-10-10T19:28:58.306Z https://posit-conf-2023.github.io/dataviz-ggplot2/modules/s03-text.html - 2023-09-18T14:16:54.504Z + 2023-10-10T19:28:59.413Z https://posit-conf-2023.github.io/dataviz-ggplot2/modules/s04-lunch.html - 2023-09-18T14:16:54.681Z + 2023-10-10T19:28:59.611Z https://posit-conf-2023.github.io/dataviz-ggplot2/modules/s05-colors.html - 2023-09-18T14:16:55.712Z + 2023-10-10T19:29:00.966Z https://posit-conf-2023.github.io/dataviz-ggplot2/modules/s06-break.html - 2023-09-18T14:16:55.890Z + 2023-10-10T19:29:01.151Z https://posit-conf-2023.github.io/dataviz-ggplot2/modules/s07-theming.html - 2023-09-18T14:16:56.096Z + 2023-10-10T19:29:01.366Z https://posit-conf-2023.github.io/dataviz-ggplot2/prework.html - 2023-09-18T14:16:56.324Z + 2023-10-10T19:29:01.617Z https://posit-conf-2023.github.io/dataviz-ggplot2/resources.html - 2023-09-18T14:16:56.521Z + 2023-10-10T19:29:01.798Z https://posit-conf-2023.github.io/dataviz-ggplot2/schedule.html - 2023-09-18T14:16:56.829Z + 2023-10-10T19:29:02.139Z https://posit-conf-2023.github.io/dataviz-ggplot2/team.html - 2023-09-18T14:16:57.005Z + 2023-10-10T19:29:02.312Z diff --git a/materials/00-welcome.qmd b/materials/00-welcome.qmd index 51c0a67..f9cbce8 100644 --- a/materials/00-welcome.qmd +++ b/materials/00-welcome.qmd @@ -79,7 +79,7 @@ execute: -## {#cedric-blog data-menu-title="Cédric Blog"background-image="img/intro/blog.png" background-position="center" background-size="56%"} +## {#cedric-blog data-menu-title="Cédric Blog "background-image="img/intro/blog.png" background-position="center" background-size="56%"} ::: footer ::: diff --git a/materials/01-fundamentals.qmd b/materials/01-fundamentals.qmd index 0d77cae..90094a1 100644 --- a/materials/01-fundamentals.qmd +++ b/materials/01-fundamentals.qmd @@ -86,16 +86,16 @@ theme_set(theme_grey(base_size = 15)) Data ggplot(data)          - *The raw data that you want to visualize.* + *The raw data that you want to visualize (initialising a plot).* Aesthetics           aes() - *The mapping between variables and visual properties* + *The mapping between variables and visual properties.* Geometries geom_*() - *The geometric shapes representing the data.* + *The geometric shape of a layer representing the data.* @@ -117,7 +117,7 @@ theme_set(theme_grey(base_size = 15)) Data ggplot(data)          - *The raw data that you want to visualize.* + *The raw data that you want to visualize (initializing a plot).* Aesthetics           @@ -126,12 +126,12 @@ theme_set(theme_grey(base_size = 15)) Geometries geom_*() - *The geometric shapes representing the data.* + *The geometric shape of a layer representing the data.* Statistics stat_*() - *The statistical transformations applied to the data.* + *The statistical transformation of a layer applied to the data.* Scales @@ -146,7 +146,7 @@ theme_set(theme_grey(base_size = 15)) Facets facet_*() - *The arrangement of the data into a grid of small multiples.* + *The arrangement of the data into a set of small multiples.* Visual Themes diff --git a/materials/01-fundamentals_files/figure-revealjs/walkthrough-15-1.png b/materials/01-fundamentals_files/figure-revealjs/walkthrough-15-1.png index 13fc068..b6029c5 100644 Binary files a/materials/01-fundamentals_files/figure-revealjs/walkthrough-15-1.png and b/materials/01-fundamentals_files/figure-revealjs/walkthrough-15-1.png differ diff --git a/materials/01-fundamentals_files/figure-revealjs/walkthrough-full-1.png b/materials/01-fundamentals_files/figure-revealjs/walkthrough-full-1.png index 13fc068..b6029c5 100644 Binary files a/materials/01-fundamentals_files/figure-revealjs/walkthrough-full-1.png and b/materials/01-fundamentals_files/figure-revealjs/walkthrough-full-1.png differ diff --git a/materials/02-text.qmd b/materials/02-text.qmd index 447bf2e..0815626 100644 --- a/materials/02-text.qmd +++ b/materials/02-text.qmd @@ -1259,6 +1259,7 @@ ga + ) ``` + ## Add Arrows ```{r} diff --git a/materials/04-theming.qmd b/materials/04-theming.qmd index 460efd6..064d044 100644 --- a/materials/04-theming.qmd +++ b/materials/04-theming.qmd @@ -1179,7 +1179,7 @@ g + ::: -## Exercise 1 +## Exercise ::: question - **Create a corporate or funny custom theme.** diff --git a/materials/04-theming_files/figure-revealjs/systemfonts-font-variants-compare-proportional-1.png b/materials/04-theming_files/figure-revealjs/systemfonts-font-variants-compare-proportional-1.png index 3562e4c..c8ad4ed 100644 Binary files a/materials/04-theming_files/figure-revealjs/systemfonts-font-variants-compare-proportional-1.png and b/materials/04-theming_files/figure-revealjs/systemfonts-font-variants-compare-proportional-1.png differ diff --git a/materials/exercises/02-text-exercises.qmd b/materials/exercises/02-text-exercises.qmd index deedc10..2c66602 100644 --- a/materials/exercises/02-text-exercises.qmd +++ b/materials/exercises/02-text-exercises.qmd @@ -28,7 +28,7 @@ editor: source # Exercise 2 - **Create a function that plots the famous Gapminder chart, highlighting one of the continents.** - - Extend the code in `02-text-exercises.qmd` to annotate a continent your choice of with {ggforce}. + - Extend the code below to annotate a continent your choice of with {ggforce}. - Turn the code into a function with the utility to annotate any continent. - Optional: Create a second function to highlight a country. ::: diff --git a/materials/img/.DS_Store b/materials/img/.DS_Store index d7390c0..58551e5 100644 Binary files a/materials/img/.DS_Store and b/materials/img/.DS_Store differ diff --git a/materials/solutions/04-theming-solutions.qmd b/materials/solutions/04-theming-solutions.qmd index 3cfc8c9..6cf9e83 100644 --- a/materials/solutions/04-theming-solutions.qmd +++ b/materials/solutions/04-theming-solutions.qmd @@ -51,16 +51,8 @@ execute: ```{r} #| label: preparation -library(readr) -library(dplyr) library(ggplot2) - -## data -bikes <- - read_csv( - here::here("data", "london-bikes.csv"), - col_types = "Dcfffilllddddc" - ) +library(readr) ``` diff --git a/materials/solutions/04-theming-solutions_cache/revealjs/preparation_3f2648175fb5a1a910743afbb4692ad3.RData b/materials/solutions/04-theming-solutions_cache/revealjs/preparation_3f2648175fb5a1a910743afbb4692ad3.RData new file mode 100644 index 0000000..f7836a5 Binary files /dev/null and b/materials/solutions/04-theming-solutions_cache/revealjs/preparation_3f2648175fb5a1a910743afbb4692ad3.RData differ diff --git a/materials/solutions/04-theming-solutions_cache/revealjs/preparation_3f2648175fb5a1a910743afbb4692ad3.rdb b/materials/solutions/04-theming-solutions_cache/revealjs/preparation_3f2648175fb5a1a910743afbb4692ad3.rdb new file mode 100644 index 0000000..e69de29 diff --git a/materials/solutions/04-theming-solutions_cache/revealjs/preparation_3f2648175fb5a1a910743afbb4692ad3.rdx b/materials/solutions/04-theming-solutions_cache/revealjs/preparation_3f2648175fb5a1a910743afbb4692ad3.rdx new file mode 100644 index 0000000..6fb2189 Binary files /dev/null and b/materials/solutions/04-theming-solutions_cache/revealjs/preparation_3f2648175fb5a1a910743afbb4692ad3.rdx differ diff --git a/materials/solutions/04-theming-solutions_cache/revealjs/preparation_83f0588f9d117167edaaeba03e2c9061.RData b/materials/solutions/04-theming-solutions_cache/revealjs/preparation_83f0588f9d117167edaaeba03e2c9061.RData deleted file mode 100644 index e54e287..0000000 Binary files a/materials/solutions/04-theming-solutions_cache/revealjs/preparation_83f0588f9d117167edaaeba03e2c9061.RData and /dev/null differ diff --git a/materials/solutions/04-theming-solutions_cache/revealjs/preparation_83f0588f9d117167edaaeba03e2c9061.rdb b/materials/solutions/04-theming-solutions_cache/revealjs/preparation_83f0588f9d117167edaaeba03e2c9061.rdb deleted file mode 100644 index 4fdd343..0000000 Binary files a/materials/solutions/04-theming-solutions_cache/revealjs/preparation_83f0588f9d117167edaaeba03e2c9061.rdb and /dev/null differ diff --git a/materials/solutions/04-theming-solutions_cache/revealjs/preparation_83f0588f9d117167edaaeba03e2c9061.rdx b/materials/solutions/04-theming-solutions_cache/revealjs/preparation_83f0588f9d117167edaaeba03e2c9061.rdx deleted file mode 100644 index d3132ea..0000000 Binary files a/materials/solutions/04-theming-solutions_cache/revealjs/preparation_83f0588f9d117167edaaeba03e2c9061.rdx and /dev/null differ diff --git a/theme.scss b/theme.scss index 51e562c..cb87bff 100644 --- a/theme.scss +++ b/theme.scss @@ -63,3 +63,13 @@ code, .code { .navbar-logo { max-height: 60px; } + +h1.title { + font-size: 2.5em; +} + +@media screen and (max-width:768px) { + h1.title { + font-size: 1.7gith5em; + } +}