From c79c9cef2cba2a44e020a84142a064cb8dd8f3d9 Mon Sep 17 00:00:00 2001 From: Alex Gebben Work Date: Tue, 28 Apr 2026 12:49:05 -0600 Subject: [PATCH] Updated job figure --- Visuals.r | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Visuals.r b/Visuals.r index 94d0626..c69478c 100644 --- a/Visuals.r +++ b/Visuals.r @@ -94,14 +94,15 @@ INDUSTRY_JOBS <- INDUSTRY_JOBS %>% group_by(Year) %>% mutate(Rank=rank(-Jobs) ORDER <- c(INDUSTRY_JOBS %>% filter(Industry!='Other') %>% group_by(Industry) %>% summarize(MEAN=mean(Jobs)) %>% arrange(desc(MEAN)) %>% pull(Industry) %>% unique,"Other") INDUSTRY_JOBS$Industry <- factor(INDUSTRY_JOBS$Industry,levels=ORDER) +INDUSTRY_JOBS JOB_TYPE_PLOT <- ggplot(INDUSTRY_JOBS ,aes(x=Year,y=Jobs,fill=Industry))+geom_bar(stat='identity')+ paletteer::scale_fill_paletteer_d("colorBlindness::Blue2DarkRed18Steps")+theme_bw()+theme(text = element_text(size = 20),legend.position = "top")+guides(fill=guide_legend(nrow=2,byrow=TRUE)) +scale_x_continuous(breaks=seq(2029,2060,by=1))+scale_y_continuous(labels = scales::comma,breaks=seq(0,3000,by=250)) png(paste0(OUTPUT_DIR,"Job_Dist_Plot.png"), units = "in", width = 22, height = 16, res = 600) JOB_TYPE_PLOT dev.off() - -JOB_FACET <- ggplot(INDUSTRY_JOBS %>% filter(Year %in% c(2032,2040)),aes(x=factor(Year),y=Jobs,fill=factor(Year)))+geom_bar(stat='identity',width=0.99)+facet_wrap(.~Industry)+theme_bw()+xlab("Year")+theme(text=element_text(size=16),legend.position="top",palette.colour.discrete=c("darkslategray1","darkorchid1" ))+scale_fill_discrete(name = "Year") +scale_y_continuous(labels = scales::comma,breaks=seq(0,1000,by=100)) +JOB_FACET_DATA <- INDUSTRY_JOBS %>% mutate(Period=ifelse(Year>2033,"Operating","Construction")) %>% group_by(Period,Industry) %>% summarize(Jobs=mean(Jobs)) %>% ungroup +JOB_FACET <- ggplot(JOB_FACET_DATA,aes(x=Period,y=Jobs,fill=factor(Period)))+geom_bar(stat='identity',width=0.99)+facet_wrap(.~Industry,nrow=5)+theme_bw()+xlab("Year")+theme(text=element_text(size=16),legend.position="top",palette.colour.discrete=c("darkslategray1","darkorchid1" ))+scale_fill_discrete(name = "Year") +scale_y_continuous(labels = scales::comma,breaks=seq(0,1000,by=100)) png(paste0(OUTPUT_DIR,"Job_Facet_Plot.png"), units = "in", width = 11, height = 11, res = 600) JOB_FACET @@ -178,6 +179,7 @@ NPV_7 <- GDP_SUMMARY %>% pull(NPV_7) %>% sum NPV_SUMMARY <- round(t(c(NPV_3,NPV_5,NPV_7)),0) %>% as_tibble colnames(NPV_SUMMARY) <- c('3%','5%','7%') write_csv(NPV_SUMMARY,paste0(OUTPUT_DIR,"GDP_Net_Present_Value.csv" )) +NPV_SUMMARY