-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
34 lines (25 loc) · 1014 Bytes
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
title: "Advent of Code 2021"
always_allow_html: true
output: github_document
---
```{r setup, include = FALSE}
source("day02.R")
source("day05_plot_only.R")
source("day13.R")
knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE)
```
Solving the [advent of code](https://adventofcode.com/) puzzles in R.
Here is a little "radar plot" for the submarine on day 2.
```{r, out.width='90%'}
radar_plot
```
For day 5, I plotted the hydrothermal vents.
The colour scheme was inspired by the first picture in the [Wikipedia article](https://en.wikipedia.org/wiki/Hydrothermal_vent#/media/File:Champagne_vent_white_smokers.jpg), and I used the package [ggecho](https://coolbutuseless.github.io/2019/03/22/ggecho-an-experimental-ggplot-stat-for-blurring-elements/) to blurr the lines of the plot, because I thought that this is what represents the smoke of the vents best.
```{r, out.width='90%'}
vent_plot
```
Here is the "plot" for the origami of day 13:
```{r, out.width='90%'}
folded_plot
```