Generating PDF Cut Sheets with R Markdown, Pagedown, and HTML/CSS

markdown gtfs

An example (for SEPTA’s Bus Network Redesign) of how to generate PDF cut sheets using R Markdown, Pagedown, and HTML/CSS.

Bryan Blanc https://github.com/bpb824
2022-09-22

This content was presented to Nelson\Nygaard Staff at a Lunch and Learn webinar on Thursday, September 22nd, 2022, and is available as a recording here and embedded below.

Today’s Agenda

R Markdown Refresher

I am going to refresh our memories on what R Markdown is by referring to a previous webinar

Then we are going to talk about Pagedown, which will create paged HTML outputs for us, that will enable us to utilize the power of CSS styling to format a printable PDF document.

Data Preparation

We will be going through the ETL (Extract, Transform, Load) script I developed to ingest several sources of information and produce the processed data utilized in generating cut sheets.

This data processing includes several key points:

Styling

CSS – Cascading Style Sheets is a powerful tool that is used to style web pages. We will be taking advantage of CSS to style our cut sheets in a programmatic way.

Key points to note about using CSS to style in R Markdown & Pagedown: