Reproduce an Economist graph found on the article: [Safe Skies]
This is a weekend exercise. Our objective is to reproduce an Economist graph found on the article: Safe Skies. The Economist article came in light of the MH370 incident, and argued that despite the recent tragedy, air flights are getting safer.
Because we are reproducing a graph from scratch, this project involves the collection of data from the original sources. However, since the primary objective of this exercise is concerned with the use of ggplot2 and the various techniques in generating an Economist-like graph, I have compiled the data into a dataset, aviation.csv
, which is included in the repo. Our approach in recreating the Economist graph will be as follow:
showtext
librarytheme_safeskies
, that will be used for our graphtextGrob
using the grid
libraryThe project is completed using R notebook, and exported to both HTML and PDF. All three files (Rmd, HTML and PDF) along with the dataset I've prepared, aviation.csv
, are available in this repo. At the end of the exercise, I have attempted to re-create the original graph from scratch using only the vanilla ggplot library (without the use of ggthemes
or other theming library) and in the process showed how we can create a custom theme for our own projects.