Directions:

Question #1

For this question you’ll use the “118th Congress” data set located at the URL:

https://remiller1450.github.io/data/congress_2024.csv

As a reminder, this data set documents the age and political party of all members of the 118th US Congress.

Before beginning, you should run the code provided below, which reads these data and uses the ifelse() function to create a new binary categorical variable “Baby_Boomer” that indicates whether a member of congress is part of the baby boomer demographic cohort.

## Read data
congress = read.csv("https://remiller1450.github.io/data/congress_2024.csv")

## Create the "Baby_Boomer" variable
congress$Baby_Boomer = ifelse(congress$Age > 60 & congress$Age < 79, "Boomer", "Not Boomer")

\(~\)

Question #2

For this question you’ll use the “Hollywood Movies” data set located at the URL:

https://remiller1450.github.io/data/HollywoodMovies.csv

This data set documents the box office performance and critic ratings of major films released between 2007 and 2013.