library(ggplot2)
data <- read.csv("/Users/ehersch2/Downloads/Final Project Dataset.csv")
head(data)
## date all X16.24 X25.54 X55.64 X65 high_school bachelor.s_degree
## 1 2023-07-01 3.6 7.8 3.1 2.4 2.7 4.8 2.4
## 2 2023-06-01 3.6 7.8 3.1 2.4 2.8 4.8 2.4
## 3 2023-05-01 3.6 7.9 3.0 2.4 2.8 4.8 2.4
## 4 2023-04-01 3.6 7.9 3.0 2.4 2.8 4.8 2.4
## 5 2023-03-01 3.6 8.0 3.0 2.5 2.8 4.8 2.4
## 6 2023-02-01 3.6 8.1 3.0 2.4 2.9 4.8 2.4
## advanced_degree women women_16.24 women_25.54 women_55.64 women_65.
## 1 1.7 3.5 7.1 3.1 2.3 2.7
## 2 1.7 3.5 7.1 3.1 2.3 2.8
## 3 1.7 3.5 7.2 3.1 2.4 2.8
## 4 1.7 3.5 7.2 3.1 2.4 2.8
## 5 1.7 3.5 7.3 3.1 2.4 2.8
## 6 1.7 3.5 7.4 3.1 2.4 2.9
## women_high_school women_bachelor.s_degree women_advanced_degree men men_16.24
## 1 4.9 2.4 1.7 3.6 8.5
## 2 4.9 2.4 1.7 3.6 8.5
## 3 4.9 2.5 1.7 3.6 8.5
## 4 4.9 2.5 1.7 3.6 8.5
## 5 5.0 2.5 1.7 3.6 8.7
## 6 5.0 2.4 1.7 3.6 8.8
## men_25.54 men_55.64 men_65. men_high_school men_bachelor.s_degree
## 1 3.1 2.5 2.7 4.7 2.4
## 2 3.0 2.5 2.8 4.7 2.4
## 3 3.0 2.5 2.8 4.7 2.4
## 4 3.0 2.5 2.8 4.7 2.3
## 5 3.0 2.5 2.8 4.7 2.4
## 6 3.0 2.5 2.9 4.7 2.4
## men_advanced_degree black black_16.24 black_25.54 black_55.64 black_65.
## 1 1.7 5.8 12.5 5.0 3.3 3.9
## 2 1.7 5.8 12.3 5.1 3.2 3.9
## 3 1.7 5.8 12.2 5.1 3.1 3.9
## 4 1.7 5.8 12.3 5.1 3.1 3.8
## 5 1.7 5.9 12.7 5.1 3.2 4.0
## 6 1.7 5.9 13.0 5.1 3.3 4.1
## black_high_school black_bachelor.s_degree black_advanced_degree black_women
## 1 7.9 3.4 2.1 5.8
## 2 7.9 3.4 2.1 5.8
## 3 7.7 3.4 2.0 5.8
## 4 7.6 3.5 1.9 5.8
## 5 7.7 3.6 1.9 5.8
## 6 7.7 3.6 2.0 6.0
## black_women_16.24 black_women_25.54 black_women_55.64 black_women_65.
## 1 12.4 5.1 3.1 3.9
## 2 12.1 5.2 2.9 4.1
## 3 11.7 5.2 2.9 4.1
## 4 11.9 5.2 2.9 4.1
## 5 12.2 5.2 3.2 4.3
## 6 12.8 5.2 3.3 4.4
## black_women_high_school black_women_bachelor.s_degree
## 1 8.3 3.8
## 2 8.3 3.7
## 3 8.0 3.8
## 4 8.0 3.9
## 5 8.0 4.0
## 6 8.1 3.9
## black_women_advanced_degree black_men black_men_16.24 black_men_25.54
## 1 2.0 5.8 12.6 5.0
## 2 2.0 5.8 12.4 5.0
## 3 2.0 5.8 12.8 4.9
## 4 1.9 5.8 12.7 4.9
## 5 1.9 5.9 13.1 5.0
## 6 1.9 5.9 13.2 5.0
## black_men_55.64 black_men_65. black_men_high_school
## 1 3.5 3.9 7.5
## 2 3.4 3.7 7.5
## 3 3.2 3.7 7.5
## 4 3.2 3.6 7.3
## 5 3.3 3.6 7.4
## 6 3.3 3.8 7.5
## black_men_bachelor.s_degree black_men_advanced_degree hispanic hispanic_16.24
## 1 2.9 2.3 4.4 8.5
## 2 3.0 2.2 4.4 8.5
## 3 3.0 2.1 4.4 8.5
## 4 3.1 2.0 4.4 8.7
## 5 3.3 2.0 4.4 8.7
## 6 3.2 2.1 4.3 8.6
## hispanic_25.54 hispanic_55.64 hispanic_65. hispanic_high_school
## 1 3.6 3.4 3.9 5.2
## 2 3.6 3.4 4.0 5.1
## 3 3.6 3.4 3.8 5.1
## 4 3.6 3.4 4.0 5.0
## 5 3.5 3.4 4.1 5.0
## 6 3.5 3.2 4.0 4.9
## hispanic_bachelor.s_degree hispanic_advanced_degree hispanic_women
## 1 2.9 1.7 4.3
## 2 2.7 1.8 4.3
## 3 2.8 1.9 4.4
## 4 2.9 1.9 4.5
## 5 2.8 1.9 4.4
## 6 2.7 1.9 4.4
## hispanic_women_16.24 hispanic_women_25.54 hispanic_women_55.64
## 1 7.6 3.6 3.6
## 2 7.7 3.6 3.5
## 3 7.9 3.6 3.7
## 4 8.1 3.7 3.7
## 5 8.0 3.7 3.6
## 6 7.8 3.7 3.4
## hispanic_women_65. hispanic_women_high_school
## 1 3.3 5.1
## 2 3.3 5.1
## 3 3.1 5.1
## 4 3.3 5.2
## 5 3.4 5.2
## 6 3.5 5.1
## hispanic_women_bachelor.s_degree hispanic_women_advanced_degree hispanic_men
## 1 2.9 1.9 4.4
## 2 2.8 2.2 4.4
## 3 2.9 2.2 4.4
## 4 3.0 2.3 4.4
## 5 2.9 2.5 4.3
## 6 2.7 2.4 4.3
## hispanic_men_16.24 hispanic_men_25.54 hispanic_men_55.64 hispanic_men_65.
## 1 9.3 3.6 3.2 4.2
## 2 9.2 3.5 3.3 4.4
## 3 9.1 3.5 3.3 4.4
## 4 9.2 3.5 3.1 4.6
## 5 9.3 3.4 3.2 4.7
## 6 9.4 3.4 3.1 4.3
## hispanic_men_high_school hispanic_men_bachelor.s_degree
## 1 5.2 2.9
## 2 5.1 2.7
## 3 5.1 2.7
## 4 4.9 2.7
## 5 4.8 2.7
## 6 4.7 2.6
## hispanic_men_advanced_degree white white_16.24 white_25.54 white_55.64
## 1 1.5 2.8 6.3 2.5 2.0
## 2 1.5 2.8 6.3 2.4 2.1
## 3 1.4 2.9 6.4 2.4 2.1
## 4 1.5 2.9 6.4 2.4 2.1
## 5 1.3 2.9 6.5 2.4 2.2
## 6 1.3 2.9 6.6 2.4 2.2
## white_65. white_high_school white_bachelor.s_degree white_advanced_degree
## 1 2.5 3.8 2.1 1.6
## 2 2.5 3.8 2.1 1.6
## 3 2.5 3.8 2.1 1.6
## 4 2.5 3.8 2.1 1.6
## 5 2.5 3.9 2.1 1.6
## 6 2.6 3.9 2.1 1.6
## white_women white_women_16.24 white_women_25.54 white_women_55.64
## 1 2.7 5.6 2.4 2.0
## 2 2.7 5.6 2.4 2.0
## 3 2.8 5.8 2.4 2.1
## 4 2.7 5.8 2.4 2.1
## 5 2.8 5.9 2.4 2.1
## 6 2.8 5.9 2.4 2.1
## white_women_65. white_women_high_school white_women_bachelor.s_degree
## 1 2.5 3.7 2.1
## 2 2.6 3.7 2.2
## 3 2.6 3.8 2.2
## 4 2.6 3.8 2.2
## 5 2.6 3.9 2.2
## 6 2.6 4.0 2.1
## white_women_advanced_degree white_men white_men_16.24 white_men_25.54
## 1 1.5 2.9 7.0 2.5
## 2 1.6 2.9 7.0 2.5
## 3 1.6 2.9 7.0 2.5
## 4 1.5 2.9 7.0 2.5
## 5 1.5 3.0 7.1 2.5
## 6 1.5 3.0 7.2 2.5
## white_men_55.64 white_men_65. white_men_high_school
## 1 2.1 2.4 3.8
## 2 2.1 2.5 3.8
## 3 2.1 2.5 3.8
## 4 2.2 2.5 3.8
## 5 2.2 2.5 3.9
## 6 2.2 2.6 3.9
## white_men_bachelor.s_degree white_men_advanced_degree
## 1 2.1 1.6
## 2 2.1 1.6
## 3 2.1 1.6
## 4 2.1 1.6
## 5 2.1 1.7
## 6 2.1 1.7
#Showing the leading data in each individual column. We then used this expansive data set throughout our project in order to identify trends in unemployment regarding gender, age, race, and level of education.
data$date <- as.Date(data$date)
data <- data[complete.cases(data), ]
ggplot(data, aes(x = date)) +
geom_line(aes(y = all, color = "all")) +
geom_line(aes(y = women, color = "women")) +
geom_line(aes(y = men, color = "men")) +
labs(title = "Unemployment Rates Over Time", y = "Rate", x = "date") +
theme_minimal()
ggplot(data, aes(x = date)) +
geom_line(aes(y = black, color = "black")) +
geom_line(aes(y = hispanic, color = "hispanic")) +
geom_line(aes(y = white, color = "white")) +
labs(title = "Unemployment rates by Racial Demographic Over Time", y = "Rate", x = "Date") +
theme_minimal()
#Provided graphs of both general historical unemployment trends over time and unemployment trends over time in reference to racial demographics specifically.
ggplot(data, aes(x = date)) +
geom_line(aes(y = high_school, color = "high school")) +
geom_line(aes(y = bachelor.s_degree, color = "bachelor's degree")) +
geom_line(aes(y = advanced_degree, color = "advanced degree")) +
labs(title = "Unemployment rates by Education Level Over Time", y = "Rate", x = "Date") +
theme_minimal()
#Graphically evaluating trends between unemployment rates and level of education attained over time.
ggplot(data, aes(x = date)) +
geom_line(aes(y = X16.24, color = "16-24")) +
geom_line(aes(y = X25.54, color = "25-54")) +
geom_line(aes(y = X55.64, color = "55-64")) +
geom_line(aes(y = X65, color = "65+")) +
labs(title = "Unemployment rates by Age Over Time", y = "Rate", x = "Date") +
theme_minimal()
#Graphically evaluating the trends between unemployment and age over time.