blob: 8477a8270a5233decbc614ba940c1ea95d55a847 [file] [log] [blame]
brentthorneb2fdd572019-01-04 23:32:17 -05001---
2#-YAML FRONTMATTER-#
3
4#ESSENTIALS
5title: 'Using \color{Red} `posterdown` \color{White} to generate reproducible conference posters via RMarkdown > Knitr > Markdown > Pandoc > Latex > PDF workflow as well as long titles...'
6author: "Brent Thorne^1^ Will Jones^2^"
7department: "^1^Department of Earth Science, Brock University; ^2^Deparment of Another Institution, Institution University"
8
9#COLOURS
10font_size: "30pt" # choose from the folowing options)
11title_bgcol: "000000" #Hex colour for background of poster title section (default is blue)
12poster_bgcol: "000000" #colour of the poster main background
13header_textcol: "red" #colour of the poster header titles
14
15
16#FORMATTING
17poster_height: "38in" # height in inches of poster
18poster_width: "45in" # width in inches of poster
19column_numbers: 3 # Number of columns that the poster has
20
21#OTHER
22bibliography: MyLibrary # name of the .bib file used for referencing
23output: posterdown::posterdown_memoir
24---
25
26```{r, include=FALSE}
27knitr::opts_chunk$set(echo = FALSE, results = 'asis',fig.height = 3.5, fig.width = 4.5, out.width = "100%", warning = FALSE, fig.align = 'center', message = FALSE, dev='cairo_pdf')
28```
29
30# Introduction
31
32Welcome to `posterdown` ! This is my attempt to provide a semi-smooth workflow for those who wish to take their `RMarkdown` skills to the conference world. Many creature comforts from `RMarkdown` are available in this package such as `Markdown` section notation, figure captioning, and even citations like this one [@holden_identifying_2012] The rest of this example poster will show how you can insert typical conference poster features into your own document.
33
34# Study Site
35
36Here is a map made to show the study site using `ggplot2`, `ggspatial`, and `sf`. Lorem ipsum dolor sit amet, [@middleton_geological_nodate] consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Phasellus vestibulum lorem sed risus ultricies tristique nulla. Mauris vitae ultricies leo integer malesuada nunc vel risus commodo. Suspendisse potenti nullam ac tortor vitae. Enim nunc faucibus a pellentesque sit amet porttitor eget. \vspace{15mm}
37
38```{r, fig.width=4.5, out.width="80%", fig.cap='This is a map of Canada, the ggspatial package is great for GIS folks in R!', cache=TRUE}
39library(ggplot2)
40library(ggspatial)
41library(ggthemes)
42library(sf)
43
44canada <- read_sf("data/Canada.geojson")
45
46
47ggplot() +
48 ggspatial::layer_spatial(canada, fill = "grey") +
49 ggspatial::annotation_north_arrow(location = "br", which_north = "true", style = north_arrow_nautical()) +
50 coord_sf() +
51 theme_solarized() +
52 NULL
53
54```
55
56
57# Objectives
58
59\large
60
611. Easy to use reproducible poster design.
622. Integration with `RMarkdown`.
633. Easy transition from `posterdown` to `thesisdown` or `rticles`
64
65\small
66
67# Methods
68
69This package uses the same workflow approach as the `RMarkdown` you know and love. Basically it goes from RMarkdown > Knitr > Markdown > Pandoc > Latex > PDF
70
71# Results
72
73Usually you want to have a nice table displaying some important results that you have calcualated. In posterdown this is as easy as using the `kable` table formatting you are probably use to as per typical `RMarkdown` formatting. I suggesting checking out the `kableExtra` package and its in depth documentation on customizing these tables found [here](https://haozhu233.github.io/kableExtra/awesome_table_in_pdf.pdf).
74
75```{r}
76library(kableExtra)
77library(ggplot2)
78
79data("iris")
80
81kable(iris[1:4,],align = "c", caption = "Tables are a breeze with Kable and Kable extra package!", booktabs = TRUE) %>%
82 kable_styling(latex_options = "striped",full_width = TRUE, font_size = 25)
83
84```
85
86\vspace{1in}
87
88```{r, out.width='75%', fig.width=4, fig.height=3, fig.cap='A typical plot using ggplot using the classic iris dataset.'}
89
90library(ggplot2)
91library(ggthemes)
92
93ggplot(data = iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Species)) +
94 geom_point() +
95 theme_fivethirtyeight() +
96 labs(x = "Sepal Length", y = "Sepeal Width") +
97 NULL
98
99```
100
101\vspace{1in}
102
103```{r, out.width='85%', fig.width=4.5, fig.height=4, fig.cap='Another typical plot using ggplot, this time with a different theme and r code chunk options for fig.width and fig.height.'}
104
105library(ggplot2)
106library(ggthemes)
107
108ggplot(data = iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Species)) +
109 geom_point() +
110 theme_hc() +
111 labs(x = "Sepal Length", y = "Sepeal Width") +
112 NULL
113
114```
115
116\vspace{1in}
117
118```{r, out.width='80%', fig.width=4.5, fig.align='center', echo=TRUE, fig.height=5, fig.cap='Another figure showing how base R plots might look on this poster!'}
119
120# Here is some code for people
121# to look at and be in awe of!!!!
122library(ggplot2)
123library(ggthemes)
124
125ggplot(data=iris,
126 aes(x = Sepal.Width,
127 y = Sepal.Length,
128 colour = Species)) +
129 geom_point() +
130 theme_stata() +
131 NULL
132
133```
134
135
136# Next Steps
137
138There is still **A LOT** of work to do on this package which include (but are note limited to):
139
140- Better softcoding for front end user options in YAML such as `posterwidth: 45in`.
141- Images in the title section for logo placement which is a common attribut to posters as far as I have come to know.
142- Figure out compatiability with `natbib` which wasn't working during the initial set up.
143- MUCH BETTER PACKAGE DOCUMENTATION. For example, there is nothing in the README...
144- Include References section only if initiated by the user like in RMarkdown.
145
146\small