library(tidyverse)
library(dslabs)
<- murders |>
pop_x slice(1:6) |>
select(state, population)
<- results_us_election_2016 |>
elec_vote_y filter(state %in% c("Alabama", "Alaska", "Arizona",
"California", "Connecticut", "Delaware")) |>
select(state, electoral_votes) |>
rename(elec_vote = electoral_votes)
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
Reading and Resources
Exercise
https://www.jaredlander.com/data/DiamondColors.csv
ggplot2::diamonds
Back to course schedule ⏎