---
layout: post
title: "Live coding in R: No edits! Pat calculates the z-score (CC256)"
blurb: "Normalizing failure"
author: "PD Schloss"
date: 2022-10-13 11:00
comments: false
youtube: eNpt6hz-UGo
start_hash: 5b8fce306852f2969bee1a0a0cd19d724984bf9a
end_hash: 933c54314be449dcf9c630772a0228fe2dab73ee
---

In this episode Pat recorded the video in one take by live coding in R to show that typos, error messages, flaws in logic, confusion, and more are normal parts of programming. Pat shows one way to calculate the z-score of the amount of monthly precipitation relative to the same month over the past century. He does this using `inner_join`, `rename`, `filter`, `group_by`, `mutate`, and `summarize`. 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.

<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}})
