Week 8

Data Wrangling

Important

Participate

🖥️ Slides - Data Wrangling (one data frame)

🖥️ Slides - Data Wrangling - two data frames

Data - Pop_x and elec_vote_y

library(tidyverse)
library(dslabs)
pop_x <- murders |> 
    slice(1:6) |>
    select(state, population)

elec_vote_y <- results_us_election_2016 |> 
    filter(state %in% c("Alabama", "Alaska", "Arizona", 
                        "California", "Connecticut", "Delaware")) |> 
    select(state, electoral_votes) |> 
    rename(elec_vote = electoral_votes)

Data - Customers

Reading and Resources

📖 R for Data Science - Joins

📖 R for Data Science - Data tidying

Exercise

📋 Lab-15 dplyr

Data - Murders

📋 Lab-16 Joining tables

https://www.jaredlander.com/data/DiamondColors.csv

ggplot2::diamonds



Back to course schedule