Skip to content

emlab-ucsb/code-review-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

code-review-demo

emLab Study Club code review

Overview

This repository contains demonstration materials for teaching code review practices. It includes R scripts that work with the Palmer Penguins dataset to create various visualizations.

Repository Structure

code-review-demo/
├── code/           # R scripts for data analysis and visualization
├── figures/        # Output directory for generated plots
├── README.md
└── LICENSE

Files

The code/ directory contains 11 R scripts:

  • 00_demo.R - Demo script showing bill dimensions scatter plot
  • 01_group.R through 10_group.R - Group practice scripts with different visualizations

Each script:

  • Loads the Palmer Penguins dataset
  • Performs data manipulation
  • Creates a unique plot
  • Saves the plot to the figures/ directory

Usage

Prerequisites

You'll need R installed with the following packages:

install.packages("ggplot2")
install.packages("palmerpenguins")

Running Scripts

To run any script:

Rscript code/00_demo.R

Or in RStudio, open the script and click "Source" or press Ctrl+Shift+S (Cmd+Shift+S on Mac).

Code Review Practice

This repository is designed for hands-on practice with:

  1. Creating a new branch
  2. Making code changes
  3. Committing changes with meaningful messages
  4. Opening a pull request
  5. Reviewing code changes
  6. Merging changes into main

Suggested Exercises

  1. Modify a plot: Choose one of the group scripts and change the plot aesthetics (colors, themes, labels)
  2. Add a new analysis: Create a new script with a different visualization
  3. Fix an issue: Introduce a small bug and practice identifying it in review
  4. Improve code: Refactor code to improve readability or efficiency

License

MIT License - see LICENSE file for details

About

emLab Study Club code review

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages