---
layout: post
title: "Using dplyr's group_by function with and without summarize (CC233)"
blurb: "Calculating group averages and normalizing temperature data"
author: "PD Schloss"
date: 2022-07-25 11:00
comments: false
youtube: 9D1wZ2zWyqI
start_hash: f2394f445e06d73ec7a0525950cf8c63bd1dedd1
end_hash: dbb92ea282c7dd4cf9685eb6d67c35f713573671
---

Did you know you can use dplyr's group_by function without summarize? This is a powerful tool that we'll use to normalize monthly average temperatures to the monthly averages between 1951 and 1980. Along the way we'll see some cool date functions like `today`, `year`, and `month` from the lubridate package and we'll plot the data with `geom_line` using the ggplot2 package. We'll do everything within RStudio.


<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/climate_viz/tree/{{ page.start_hash }})
* [end of the episode](https://github.com/riffomonas/climate_viz/tree/{{ page.end_hash }})
