ylab("Maximum Storage Capacity")+
xlab("HUC2")+
legend()+
theme_classic()
storage_huc4_data$num <- 2
storage_huc4_no_data <- 1
test <- rbind(storage_huc4_no_data, storage_huc4_data, by = "join_HUC2") %>%
# Bar Plot #
total_data$Data_max_cap <- as.numeric(total_data$Data_max_cap)
test <- rbind(storage_huc4_no_data, storage_huc4_data, by = "join_HUC2")
View(test)
storage_huc4_data <- att_data %>% group_by(join_HUC2) %>%
summarize(max_cap = sum(MAXIMUM_STORAGE_CAPACITY, na.rm = TRUE))
missing_vector <- c(4,0)
storage_huc4_data <- rbind(storage_huc4_data, missing_vector)
storage_huc4_data <- storage_huc4_data[order(storage_huc4_data$join_HUC2),]
att_no_data$MAXIMUM_STORAGE_CAPACITY <- as.numeric(as.character(att_no_data$MAXIMUM_STORAGE_CAPACITY))
storage_huc4_no_data <- att_no_data %>% group_by(join_HUC2) %>%
summarize(max_cap = sum(MAXIMUM_STORAGE_CAPACITY, na.rm = TRUE))
total_data <- merge(storage_huc4_no_data, storage_huc4_data, by = "join_HUC2") %>%
rename(Total_Maximum_Cap = max_cap.x,
Data_max_cap = max_cap.y)
storage_huc4_data$num <- 2
storage_huc4_no_data$num <- 1
test <- rbind(storage_huc4_no_data, storage_huc4_data, by = "join_HUC2")
View(test)
# Bar Plot #
test$max_cap- as.numeric(test$max_cap)
test <- rbind(storage_huc4_no_data, storage_huc4_data, by = "join_HUC2")
# Bar Plot #
test$max_cap<- as.numeric(test$max_cap)
ggplot(test, aes(x = factor(join_HUC2), y = max_cap, fill = num)) +
geom_bar( stat = "identity")
ggplot(test, aes(x = join_HUC2, y = max_cap, fill = num)) +
geom_bar( stat = "identity")+
ylab("Maximum Storage Capacity")+
xlab("HUC2")+
legend()+
theme_classic()
ggplot(test, aes(x = join_HUC2, y = max_cap, fill = num)) +
geom_bar( stat = "identity")
test[order(test$join_HUC2),]
test <- test[order(test$join_HUC2),]
ggplot(test, aes(x = join_HUC2, y = max_cap, fill = num)) +
geom_bar( stat = "identity")+
ylab("Maximum Storage Capacity")+
xlab("HUC2")+
legend()+
theme_classic()
ggplot(test, aes(x = join_HUC2, y = max_cap, fill = num)) +
geom_bar( stat = "identity")+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
View(test)
test <- test[order(test$join_HUC2),]
View(test)
test <- test[order(as.numeric(test$join_HUC2)),]
ggplot(test, aes(x = join_HUC2, y = max_cap, fill = num)) +
geom_bar( stat = "identity")+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
nrow(test)
test <- test[1:36,]
tail(test)
ggplot(test, aes(x = join_HUC2, y = max_cap, fill = num)) +
geom_bar( stat = "identity")+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
ggplot(test, aes(x = join_HUC2, y = max_cap, fill = num)) +
geom_bar( stat = "identity")+
scale_fill_discrete(c("#F7F7F7","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
ggplot(test, aes(x = join_HUC2, y = max_cap, fill = num)) +
geom_bar( stat = "identity")+
scale_fill_continuous(c("#F7F7F7","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
ggplot(test, aes(x = join_HUC2, y = max_cap, fill = num)) +
geom_bar( stat = "identity")+
scale_fill_discrete(color = c("#F7F7F7","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
?scale_color_discrete
?scale_color_discrete
??scale_color_discrete
ggplot(test, aes(x = join_HUC2, y = max_cap, fill = num)) +
geom_bar( stat = "identity")+
scale_fill_manual(color = c("#F7F7F7","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
ggplot(test, aes(x = join_HUC2, y = max_cap, fill = num)) +
geom_bar( stat = "identity")+
scale_fill_manual("legend", values = c("#F7F7F7","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
ggplot(test, aes(x = join_HUC2, y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black")+
scale_fill_manual("legend", values = c("#F7F7F7","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
test$max_cap<- as.numeric(test$max_cap)
test <- test[order(as.numeric(test$join_HUC2)),]
test <- test[1:36,]
class(test$max_cap)
ggplot(test, aes(x = join_HUC2, y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black")+
scale_fill_manual("legend", values = c("#F7F7F7","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
ggplot(test, aes(x = join_HUC2, y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black")+
scale_fill_manual("legend", values = c("#F7F7F7","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
test[join_HUC2 == 10]
ggplot(test, aes(x = factor(join_HUC2), y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black")+
scale_fill_manual("legend", values = c("#F7F7F7","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
# Storage by Huc 2 data Paper Figure
# Jen Steyaert
# 2-4-2020
library(dplyr)
library(tidyverse)
library(readr)
library(ggplot2)
# Set Up #
setwd("~/Desktop/Research/Percentage_Area_Figure/")
HUC2 <- read_csv(file = "HUC2_CONUS_Res.csv")
setwd("~/Desktop/github/USRDATS/attributes/")
attributes<- read_csv(file = "Reservoir_Attributes_Publishable.csv")
att_data <- attributes %>% filter(is.na(AGENCY_CODE) == FALSE) %>%
merge(HUC2[,c(1,44)], by = "DAM_ID")
att_no_data <- attributes  %>%
merge(HUC2[,c(1,44)], by = "DAM_ID")
# Aggregate Storage by HUC 4 #
# for data we have and data we don't have #
att_data$MAXIMUM_STORAGE_CAPACITY <- as.numeric(as.character(att_data$MAXIMUM_STORAGE_CAPACITY))
storage_huc4_data <- att_data %>% group_by(join_HUC2) %>%
summarize(max_cap = sum(MAXIMUM_STORAGE_CAPACITY, na.rm = TRUE))
missing_vector <- c(4,0)
storage_huc4_data <- rbind(storage_huc4_data, missing_vector)
storage_huc4_data <- storage_huc4_data[order(storage_huc4_data$join_HUC2),]
att_no_data$MAXIMUM_STORAGE_CAPACITY <- as.numeric(as.character(att_no_data$MAXIMUM_STORAGE_CAPACITY))
storage_huc4_no_data <- att_no_data %>% group_by(join_HUC2) %>%
summarize(max_cap = sum(MAXIMUM_STORAGE_CAPACITY, na.rm = TRUE))
total_data <- merge(storage_huc4_no_data, storage_huc4_data, by = "join_HUC2") %>%
rename(Total_Maximum_Cap = max_cap.x,
Data_max_cap = max_cap.y)
storage_huc4_data$num <- 2
storage_huc4_no_data$num <- 1
test <- rbind(storage_huc4_no_data, storage_huc4_data, by = "join_HUC2")
# Bar Plot #
test$max_cap<- as.numeric(test$max_cap)
test <- test[order(as.numeric(test$join_HUC2)),]
test <- test[1:36,]
ggplot(test, aes(x = factor(join_HUC2), y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black")+
scale_fill_manual("legend", values = c("#F7F7F7","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
total_data$Data_max_cap <- as.numeric(total_data$Data_max_cap)
total_data$Total_Maximum_Cap <- as.numeric(total_data$Total_Maximum_Cap)
ggplot(total_data, aes(x = factor(join_HUC2))) +
geom_bar(aes( y =Total_Maximum_Cap), stat = "identity", fill ="white", color = "black" )+
geom_bar(aes( y = Data_max_cap), stat = "identity", fill = "#7FCDBB", color = "black")+
ylab("Maximum Storage Capacity")+
xlab("HUC2")+
legend()+
theme_classic()
ggplot(total_data, aes(x = factor(join_HUC2))) +
geom_bar(aes( y =Total_Maximum_Cap), stat = "identity", fill ="white", color = "black" )+
geom_bar(aes( y = Data_max_cap), stat = "identity", fill = "#7FCDBB", color = "black")+
ylab("Maximum Storage Capacity")+
xlab("HUC2")+
theme_classic()
class(total_data$Total_Maximum_Cap)
class(total_data$Data_max_cap)
class(test$max_cap)
test[19,2]
class(test[19,2])
total_data[10,2]
test <- matrix(test[1:36,])
class(test)
class(test[19,2])
test <- rbind(storage_huc4_no_data, storage_huc4_data, by = "join_HUC2")
# Bar Plot #
test$max_cap<- as.numeric(test$max_cap)
test <- test[order(as.numeric(test$join_HUC2)),]
test$max_cap<- as.numeric(test$max_cap)
test <- test[order(as.numeric(test$join_HUC2)),]
test <- data.matrix(test[1:36,])
class(test)
test[19,2]
ggplot(test, aes(x = factor(join_HUC2), y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black")+
scale_fill_manual("legend", values = c("#F7F7F7","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
class(total_data)
test_2 <- as.data.frame(test)
ggplot(test_2, aes(x = factor(join_HUC2), y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black")+
scale_fill_manual("legend", values = c("#F7F7F7","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
ggplot(test_2, aes(x = factor(join_HUC2), y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black")
ggplot(test, aes(x = factor(join_HUC2), y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black")+
scale_fill_manual("legend", values = c("#F7F7F7","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
class(test_2)
test_2[1,3]
head(total_data)
head(test)
head(test_2)
ggplot(test, aes(x = factor(join_HUC2), y = max_cap, fill = as.numeric(num))) +
geom_bar( stat = "identity", color = "black")
ggplot(test_2, aes(x = factor(join_HUC2), y = max_cap, fill = as.numeric(num))) +
geom_bar( stat = "identity", color = "black")
View(test)
View(test_2)
test <- rbind(storage_huc4_no_data, storage_huc4_data, by = "join_HUC2")
class(test)
class(total_data)
test <- as.data.frame(rbind(storage_huc4_no_data, storage_huc4_data, by = "join_HUC2") )
class(test)
# Bar Plot #
test$max_cap<- as.numeric(test$max_cap)
head(test)
test <- test[order(as.numeric(test$join_HUC2)),]
head(test)
test <- data.matrix(test[1:36,])
ggplot(test=, aes(x = factor(join_HUC2), y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black")+
scale_fill_manual("legend", values = c("#F7F7F7","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
ggplot(test, aes(x = factor(join_HUC2), y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black")
class(test)
test <- as.data.frame(rbind(storage_huc4_no_data, storage_huc4_data, by = "join_HUC2") )
# Bar Plot #
test$max_cap<- as.numeric(test$max_cap)
test <- test[order(as.numeric(test$join_HUC2)),]
ggplot(test, aes(x = factor(join_HUC2), y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black")
test <- as.data.frame(rbind(storage_huc4_no_data, storage_huc4_data, by = "join_HUC2") )
# Bar Plot #
test$max_cap<- as.numeric(test$max_cap)
test <- data.matrix(test[1:36,])
ggplot(test, aes(x = factor(join_HUC2), y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black")+
scale_fill_manual("legend", values = c("#F7F7F7","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
class(test)
test <- as.data.frame(rbind(storage_huc4_no_data, storage_huc4_data, by = "join_HUC2") )
# Bar Plot #
test$max_cap<- as.numeric(test$max_cap)
ggplot(test, aes(x = factor(join_HUC2), y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black")+
scale_fill_manual("legend", values = c("#F7F7F7","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
ggplot(test, aes(x = factor(join_HUC2), y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black")+
scale_fill_manual("legend", values = c("#F7F7F7","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")+
theme_classic()
test <- test[1:36,]
ggplot(test, aes(x = factor(join_HUC2), y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black")+
scale_fill_manual("legend", values = c("#F7F7F7","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")+
theme_classic()
ggplot(total_data, aes(x = factor(join_HUC2))) +
geom_bar(aes( y =Total_Maximum_Cap), stat = "identity", fill ="white", color = "black" )+
geom_bar(aes( y = Data_max_cap), stat = "identity", fill = "#7FCDBB", color = "black")+
ylab("Maximum Storage Capacity")+
xlab("HUC2")+
theme_classic()
?legend()
class(test)
class(total_data)
test[19,2]
test[10,2]
test[10,2]
class(test[10,2])
class(total_data[10,1])
class(total_data[10,2])
total_data[10,2]=
total_data[10,2]
s
ggplot(test, aes(x = factor(join_HUC2), y = as.numeric(max_cap), fill = factor(num))) +
geom_bar( stat = "identity", color = "black")+
scale_fill_manual("legend", values = c("#F7F7F7","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")+
theme_classic()
ggplot(test, aes(x = factor(join_HUC2), y = as.numeric(max_cap), fill = factor(num))) +
geom_bar( stat = "identity", color = "black")+
scale_fill_manual("legend", values = c("white","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")+
theme_classic()
ggplot(total_data, aes(x = factor(join_HUC2))) +
geom_bar(aes( y =Total_Maximum_Cap), stat = "identity", fill ="white", color = "black" )+
geom_bar(aes( y = Data_max_cap), stat = "identity", fill = "#7FCDBB", color = "black")+
legend
ggplot(total_data, aes(x = factor(join_HUC2))) +
geom_bar(aes( y =Total_Maximum_Cap), stat = "identity", fill ="white", color = "black" )+
geom_bar(aes( y = Data_max_cap), stat = "identity", fill = "#7FCDBB", color = "black")+
ylab("Maximum Storage Capacity")+
xlab("HUC2")+
theme_classic()
test <- test[order(as.numeric(test$join_HUC2)),]
ggplot(test, aes(x = factor(join_HUC2), y = as.numeric(max_cap), fill = factor(num))) +
geom_bar( stat = "identity", color = "black")+
scale_fill_manual("legend", values = c("white","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")+
theme_classic()
ggplot(test, aes(x = factor(join_HUC2, levels= c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18)),
y = as.numeric(max_cap), fill = factor(num))) +
geom_bar( stat = "identity", color = "black")+
scale_fill_manual("legend", values = c("white","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")+
theme_classic()
ggplot(total_data, aes(x = factor(join_HUC2))) +
geom_bar(aes( y =Total_Maximum_Cap), stat = "identity", fill ="white", color = "black" )+
geom_bar(aes( y = Data_max_cap), stat = "identity", fill = "#7FCDBB", color = "black")+
ylab("Maximum Storage Capacity")+
xlab("HUC2")+
theme_classic()
ggplot(test, aes(x = factor(join_HUC2, levels= c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18)),
y = as.numeric(max_cap), fill = 1))
test_2 <- filter(test, num==1)
head(test_2)
ggplot(test_2, aes(x = factor(join_HUC2), y = max_cap)
)
ggplot(test_2, aes(x = factor(join_HUC2), y = max_cap))+
geom_bar()
ggplot(test_2, aes(x = factor(join_HUC2), y = max_cap))+
geom_bar(stat = "identity")
ggplot(test, aes(x = factor(join_HUC2, levels= c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18)),
y = max_cap, fill = factor(num))) +
geom_bar( stat = "identity", color = "black")+
scale_fill_manual("legend", values = c("white","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")+
theme_classic()
ggplot(test_2, aes(x = factor(join_HUC2), y = max_cap))+
geom_bar(stat = "identity")
ggplot(test, aes(x = factor(join_HUC2, levels= c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18)),
y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black")+
scale_fill_manual("legend", values = c("white","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")+
theme_classic()
class(test$max_cap)
test[10,2]
ggplot(test, aes(x = factor(join_HUC2, levels= c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18)),
y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black")+
scale_fill_manual("legend", values = c("white","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
test_2 <- filter(test, num==1)
ggplot(test_2, aes(x = factor(join_HUC2), y = max_cap))+
geom_bar(stat = "identity")
ggplot(test, aes(x = factor(join_HUC2, levels= c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18)),
y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black")+
geom_text(aes(label = max_cap))+
scale_fill_manual("legend", values = c("white","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
ggplot(total_data, aes(x = factor(join_HUC2))) +
geom_bar(aes( y =Total_Maximum_Cap), stat = "identity", fill ="white", color = "black" )+
geom_bar(aes( y = Data_max_cap), stat = "identity", fill = "#7FCDBB", color = "black")+
geom_text(aes(label = max_cap))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")+
theme_classic()
ggplot(test_2, aes(x = factor(join_HUC2), y = max_cap))+
geom_text(aes(label = max_cap))+
geom_bar(stat = "identity")
ggplot(data = test, aes(x = factor(join_HUC2, levels= c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18)),
y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black")+
geom_text(aes(label = max_cap))+
scale_fill_manual("legend", values = c("white","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
ggplot(data = test, aes(x = factor(join_HUC2, levels= c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18)),
y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black", position = position_dodge())+
geom_text(aes(label = max_cap))+
scale_fill_manual("legend", values = c("white","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
ggplot(data = test, aes(x = factor(join_HUC2, levels= c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18)),
y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black", position = position_dodge())+
#geom_text(aes(label = max_cap))+
scale_fill_manual("legend", values = c("white","#7FCDBB" ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
scale_fill_manual
?scale_fill_manual
ggplot(data = test, aes(x = factor(join_HUC2, levels= c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18)),
y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black", position = position_dodge())+
#geom_text(aes(label = max_cap))+
scale_fill_manual("legend", values = c("white","#7FCDBB", labels = c("Total Storage", "Total Storage Collected") ))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
ggplot(data = test, aes(x = factor(join_HUC2, levels= c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18)),
y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black", position = position_dodge())+
#geom_text(aes(label = max_cap))+
scale_fill_manual("legend", values = c("white","#7FCDBB"), labels = c("Total Storage", "Total Storage Collected"))+
ylab("Maximum Storage Capacity")+
xlab("HUC2")
ggplot(data = test, aes(x = factor(join_HUC2, levels= c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18)),
y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black", position = position_dodge())+
#geom_text(aes(label = max_cap))+
scale_fill_manual("Legend", values = c("white","#7FCDBB"), labels = c("Total Storage", "Total Storage Collected"))+
ylab("Maximum Storage Capacity")+
ggtitle("Storage Collected Per HUC2")
xlab("HUC2")+
theme_classic()
ggplot(data = test, aes(x = factor(join_HUC2, levels= c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18)),
y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black", position = position_dodge())+
#geom_text(aes(label = max_cap))+
scale_fill_manual("Legend", values = c("white","#7FCDBB"), labels = c("Total Storage", "Total Storage Collected"))+
ylab("Maximum Storage Capacity (MCM)")+
ggtitle("Storage Collected Per HUC2")
xlab("HUC2")+
theme_classic()
ggplot(data = test, aes(x = factor(join_HUC2, levels= c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18)),
y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black", position = position_dodge())+
#geom_text(aes(label = max_cap))+
scale_fill_manual("Legend", values = c("white","#7FCDBB"), labels = c("Total Storage", "Total Storage Collected"))+
ylab("Maximum Storage Capacity (MCM)")+
ggtitle("Storage Collected Per HUC2")+
xlab("HUC2")+
theme_classic()
ggplot(total_data, aes(x = factor(join_HUC2))) +
geom_bar(aes( y =Total_Maximum_Cap), stat = "identity", fill ="white", color = "black" )+
geom_bar(aes( y = Data_max_cap), stat = "identity", fill = "#7FCDBB", color = "black")+
ylab("Maximum Storage Capacity (MCM)")+
ggtitle("Storage Collected Per HUC2")+
xlab("HUC2")+
theme_classic()
ggplot(data = test, aes(x = factor(join_HUC2, levels= c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18)),
y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black")+
#geom_text(aes(label = max_cap))+
scale_fill_manual("Legend", values = c("white","#7FCDBB"), labels = c("Total Storage", "Total Storage Collected"))+
ylab("Maximum Storage Capacity (MCM)")+
ggtitle("Storage Collected Per HUC2")+
xlab("HUC2")+
theme_classic()
ggplot(data = test, aes(x = factor(join_HUC2, levels= c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18)),
y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black", position = position_stack())+
#geom_text(aes(label = max_cap))+
scale_fill_manual("Legend", values = c("white","#7FCDBB"), labels = c("Total Storage", "Total Storage Collected"))+
ylab("Maximum Storage Capacity (MCM)")+
ggtitle("Storage Collected Per HUC2")+
xlab("HUC2")+
theme_classic()
ggplot(data = test, aes(x = factor(join_HUC2, levels= c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18)),
y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black", position = position_identity())+
#geom_text(aes(label = max_cap))+
scale_fill_manual("Legend", values = c("white","#7FCDBB"), labels = c("Total Storage", "Total Storage Collected"))+
ylab("Maximum Storage Capacity (MCM)")+
ggtitle("Storage Collected Per HUC2")+
xlab("HUC2")+
theme_classic()
ggplot(data = test, aes(x = factor(join_HUC2, levels= c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18)),
y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black", position = position_identity())+
#geom_text(aes(label = max_cap))+
scale_fill_manual("Legend", values = c("white","#7FCDBB"), labels = c("Total Storage", "Total Storage Collected"))+
ylab("Maximum Storage Capacity (MCM)")+
ggtitle("Storage Collected Per HUC2")+
xlab("HUC2")+
theme_classic()
ggplot(data = test, aes(x = factor(join_HUC2, levels= c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18)),
y = max_cap, fill = num)) +
geom_bar( stat = "identity", color = "black", position = position_dodge())+
#geom_text(aes(label = max_cap))+
scale_fill_manual("Legend", values = c("white","#7FCDBB"), labels = c("Total Storage", "Total Storage Collected"))+
ylab("Maximum Storage Capacity (MCM)")+
ggtitle("Storage Collected Per HUC2")+
xlab("HUC2")+
theme_classic()
