---
layout: post
title: "How to add maps to a ggplot2 figure in R (CC264)"
blurb: "Adding country outlines"
author: "PD Schloss"
date: 2022-11-10 11:00
comments: false
youtube: r_Q4s0XcP40
start_hash: 6b1f5d82d2295617dfcb781936881595e78a2240
end_hash: 719f620fa622a48f8a784945088a1a2f0c4bfa3d
---

Pat shows how to add a world map to his ggplot2 generated heatmap in R to better display the country boundaries. Along the way he'll stylize the figure and work through some problems with pushing his changes to GitHub. The overall goal of this project is to highlight reproducible research practices using a number of tools. The specific output from this project will be a map-based visual that shows the level of drought across the globe. The website we generate in this episode can be found at https://www.riffomonas.org/drought_index.

<iframe style="margin: 0 auto;display:block;" width="560" height="315" src="https://www.youtube.com/embed/{{ page.youtube }}" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

## Code

You can browse the state of the repository at the

* [beginning of the episode](https://github.com/riffomonas/drought_index/tree/{{page.start_hash}})
* [end of the episode](https://github.com/riffomonas/drought_index/tree/{{page.end_hash}})
