Graph 1
econ_time <- as.data.frame(economics)
graph14_var <- econ_time %>%
mutate(unemployrate = (unemploy / pop) * 100)
ggplot(graph14_var, aes(x = date, y = unemployrate)) + geom_line(color = "blue", size = 1) + theme_minimal() + ggtitle("Annual Unemployment Percent") + labs(x = "Year", y = "Unemployment Percent") + scale_y_continuous(limits = c(1, 6), expand = c(0.25, 0), breaks = c(1, 2, 3, 4, 5, 6), labels = c("1%", "2%", "3%", "4%", "5%", "6%")) + scale_x_date(expand = c(0.075, 0), breaks = as.Date(c("1965-01-01", "1970-01-01", "1975-01-01", "1980-01-01", "1985-01-01", "1990-01-01", "1995-01-01", "2000-01-01", "2005-01-01", "2010-01-01", "2015-01-01")), labels = c("1965", "1970", "1975", "1980", "1985", "1990", "1995", "2000", "2005", "2010", "2015")) + theme(axis.text = element_text(size = 12)) + theme(axis.title = element_text(size = 13)) + theme(plot.title = element_text(face = "bold", size = 17))

Graph 2
setwd("C:/SW/Grad_Wvu/693c/A6/ggplot2_pretty")
runoff <- read.csv("runoff_data_by_month.csv")
ggplot(runoff, aes(x = month, y = runoff, fill = month)) + theme_grey() + geom_boxplot() + labs(x = "Month", y = "Runoff [mm]") + ggtitle("Monthly Stream Runoff Near Parsons, WV") + scale_x_discrete(limits = month.abb) + scale_y_continuous(limits = c(0, 300), expand = c(0.1, 0), breaks = c(0, 50, 100, 150, 200, 250, 300), labels = c("0 mm", "50 mm", "100 mm", "150 mm", "200 mm", "250 mm", "300 mm")) + theme(axis.text = element_text(size = 11)) + theme(axis.title = element_text(size = 12)) + theme(plot.title = element_text(face = "bold", size = 14)) + theme(legend.position = "None")

Graph 3
gapmind <- as.data.frame(gapminder)
gapmind07 <- gapmind %>%
filter(year == "2007")
ggplot(gapmind07, aes(x = gdpPercap, y = lifeExp, color = continent, size = pop)) + geom_point() + theme_minimal() + ggtitle("GDP per Capita and Life Expectancy in 2007") + labs(x = "GDP per Capita", y = "Life Expectancy in Years", size = "Population", color = "Continent") + scale_x_continuous(limits = c(0, 50000), breaks = c(0, 10000, 20000, 30000, 40000, 50000),labels = c("0", "10,000", "20,000", "30,000", "40,000", "50,000")) + theme(axis.text = element_text(size = 10)) + theme(axis.title = element_text(size = 13)) + theme(plot.title = element_text(face = "bold", size = 15))

Graph 4
graph4 <- gapminder %>%
filter(year == "1997" | year == "2007") %>%
filter(continent == "Africa" | continent == "Europe")
ggplot(graph4, aes(x = gdpPercap, y = lifeExp, size = pop)) + theme_light() + facet_grid(year ~ continent) + geom_point() + ggtitle("GDP per Capita and Life Expectancy for Africa and Europe in 1997 and 2007") + labs(x = "GDP per Capita", y = "Life Expectancy in Years", size = "Population") + scale_size_continuous(limits = c(5e+04, 1.5e+08), breaks = c(5e+04, 1e+05, 1e+06, 1e+07, 1e+08,
1.5e+08), labels = c("50 Thousand", "100 Thousand", "1 Million", "10 Million", "100 Million", "150 Million")) + theme(axis.text = element_text(size = 10)) + theme(axis.title = element_text(size = 14)) + theme(plot.title = element_text(face = "bold", size = 16))

Graph 5
setwd("C:/SW/Grad_Wvu/693c/A6/ggplot2_pretty")
mine <- read.csv("mine_classification_with_lidar.csv")
ggplot(mine, aes(x = class, y = ndvi, fill = class)) + theme_minimal() + geom_boxplot() + ggtitle("NDVI by Land Cover Type") + labs(x = "Land Cover Type (Class)", y = "Normalized Difference Vegetation Index (NDVI)") + theme_light() + theme(legend.position = "None") + theme(axis.text = element_text(size = 12)) + theme(axis.title = element_text(size = 13)) + theme(plot.title = element_text(face = "bold", size = 16)) + scale_x_discrete(labels = c("Barren", "Forest", "Herbaceous", "Woodlands", "Water")) + scale_fill_manual(values = c("tan", "light green", "light yellow", "purple", "light blue"))
