Skip to content

lgaborini/ggplot2-introduction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Introduction à ggplot2

This repository contains the slides and the material for the Café des Doctorants.
It is a quite thorough introduction to 📦 ggplot2, with some advanced concepts.

⚠ Written in French! ⚠

Browse the slides!
Download the slides in PDF! (not always updated)

Prerequisites

Slides built with 📦 xaringan, an R wrapper around remark.js.
Just clone the repository and open the html!

To build the presentation, one needs the 📦 tidyverse package and some required packages to build the individual slides:

The HTML slides are built by knitting the file index.Rmd in the docs subdirectory.

To build the PDF slides, one needs the package 📦 pagedown with Chrome installed.

A small makefile is supplied.

Technology

The presentation was made as a weekend project, using R Markdown and the package 📦 xaringan.

It contains several customizations, tricks and hacks:

  • basic knitr stuff:
    usage of child chunks to avoid recompiling everything, with eval=FALSE as chunk options.

  • the "advanced" CSS ribbon on difficult slides: docs/assets/css/ribbon-advanced.css
    It is always present (layout slide), but shown only if a slide has CSS class slide-class-advanced.

  • the half-opaque overlay with CSS id #overlay, to shield the content behind a popup.
    It is always present (layout slide) but hidden. Currently not used!

  • Code wrapping in code chunks: docs/assets/css/custom.css.
    CSS class .left-code. Has some issues with spaces, but it works more or less.

  • the remarkjs macro to link to CRAN: docs/assets/js/macros.js
    Usage: write somewhere ![:package_cran xaringan] to make a pretty link with emoji.

  • some CSS popups: docs/assets/css/custom.css
    Usage: Make a div with class heavy-box

  • Embedding plotly into xaringan using the 📦 htmltools hack.
    Save the plotly object to html file, then manually embed it in iframe.

  • Embedding a previously-made gganimate animation by saving to docs/assets/img directory (offline).

  • Gradient background on CSS class slide-class-advanced slides: docs/assets/css/custom.css.

(To CSS pros: I'm sorry!)

Releases

No releases published

Packages

No packages published