Creating Your Website

Session 1: R Markdown and GitHub

2.1 R Markdown and Distill

R Markdown

What is R Markdown? R Markdown is a framework to create documents in R. One main reason to use R Markdown is to share your R analyses in a reproducible and dynamic report. Many researchers create an R Markdown document to accompany their publications, in order to promote open data and transparent reporting.

Watch the 1-minute video What is R Markdown? from RStudio, Inc. on Vimeo for a quick explanation on R Markdown.

Distill

What is Distill? Distill is a web publishing format specifically created for R Markdown documents. This is one of the simplest ways to turn your R Markdown documents into (pre)webpages. There many different formats (i.e., Hugo, bookdown), but Distill is a very stable format which require less maintenance and is easy to learn.

Read this article on how to create a website in Distill.

2.3 GitHub

What is Github? GitHub is a platform to store, track, and collaborate on software projects. In our CDS Hackathon events, we use GitHub to jointly work on a data analytic project.

Watch the 3-minute video What is GitHub? from GitHub on Youtube for a quick explanation on R Markdown.

Assignment

Your assignment is to create your own website on R Markdown using Distill and host it on GitHub. Creating the basic website will take you less than an hour, but personalizing it will take you longer. Give yourself an additional 10-20 hours to complete your website according to the requirements below. We expect you to have your website ready for the midterm meeting with your supervisor.

Step 1: Installations

  1. Install the the following packages in RStudio:
install.packages(c("distill", "rmarkdown", "postcards"))
  1. Create a GitHub account
  2. Install GitHub Desktop

Step 2: Setting Up

Create your basic website template by following the instructions on our BEACON 2022 Workshop website. Make sure to create your website with Version 2.

Step 3: Personalization

Personalize your website! Your website should contain the following pages:

  1. A landing page: Include author, published date, an introductory text, and a photo related to your website.
  2. An about me page: Include your photo, a text about you, and a few links of your choice (i.e., Email, LinkedIn). Tip 1: This article from Alison Hill has great step-by-step details on how to make postcards.
  3. A project page: Include a description of your project, a table using the knitr’s kable function and a plot using ggplot2. Tip 2: Check out this chapter on R Markdown in R for Data Science. They use other formats to process and publish, but they have a great explanation and some exercises as well!
  4. A footer and a table of contents on each page.

Feel free to add any customizations you want on your website. You can play around with changing the template (i.e., changing themes) or adding emojis 😃.

Tip 3: Download the R Markdown Cheatsheet for an overview of commands!