Increased font to 20 on all figures
This commit is contained in:
parent
4c978fc024
commit
8921e11437
19
Visuals.r
19
Visuals.r
@ -28,7 +28,7 @@ COOL_DOWN <- as.numeric(EMPLOY_NUM[5,3])
|
|||||||
#EMPLOY_NUM
|
#EMPLOY_NUM
|
||||||
#EMPLOY_NUM %>% filter(Category=='Total') %>% arrange(Year)%>% print(n=100)
|
#EMPLOY_NUM %>% filter(Category=='Total') %>% arrange(Year)%>% print(n=100)
|
||||||
df <- data.frame(Year=c(2032.5,2034.25,2040.25,2059.75),Employment=c(MAX_VAL+50,COOL_DOWN,687+20,596+20),text=c("Peak of 2,521","Stabalized at 878" ,"687 in 2040","Ends at 596"))
|
df <- data.frame(Year=c(2032.5,2034.25,2040.25,2059.75),Employment=c(MAX_VAL+50,COOL_DOWN,687+20,596+20),text=c("Peak of 2,521","Stabalized at 878" ,"687 in 2040","Ends at 596"))
|
||||||
JOB_PLOT <- ggplot(EMPLOY_NUM %>% filter(Category!="Total"),aes(x=Year,y=Employment))+geom_area(position = "stack",aes(fill=Category,group=Category))+theme_bw()+scale_x_continuous(breaks=c(2029,seq(2025,2060,by=2)))+scale_fill_manual(values=COLORS)+geom_line(data=EMPLOY_NUM %>% filter(Category=="Total"),linewidth=1)+geom_text(data=df,aes(label = text), vjust = "inward", hjust = "inward")+theme(legend.position = "top")+scale_y_continuous(labels = scales::comma,breaks=seq(0,3000,by=250))
|
JOB_PLOT <- ggplot(EMPLOY_NUM %>% filter(Category!="Total"),aes(x=Year,y=Employment))+geom_area(position = "stack",aes(fill=Category,group=Category))+theme_bw()+scale_x_continuous(breaks=c(2029,seq(2035,2060,by=5)))+scale_fill_manual(values=COLORS)+geom_line(data=EMPLOY_NUM %>% filter(Category=="Total"),linewidth=1)+geom_text(data=df,aes(label = text), vjust = "inward", hjust = "inward")+theme(legend.position = "top")+scale_y_continuous(labels = scales::comma,breaks=seq(0,3000,by=250))
|
||||||
|
|
||||||
png(paste0(OUTPUT_DIR,"Job_plot.png" ) , units = "in", width = 11, height = 8, res = 600)
|
png(paste0(OUTPUT_DIR,"Job_plot.png" ) , units = "in", width = 11, height = 8, res = 600)
|
||||||
JOB_PLOT
|
JOB_PLOT
|
||||||
@ -42,7 +42,7 @@ OUTPUT_NUM <- rbind(OUTPUT_NUM %>% filter(!(Year %in% c(2028,2029))) ,OUTPUT_NU
|
|||||||
OUTPUT_NUM$Category <- gsub(" Output","",OUTPUT_NUM$Category)
|
OUTPUT_NUM$Category <- gsub(" Output","",OUTPUT_NUM$Category)
|
||||||
OUTPUT_NUM$Category <- factor(OUTPUT_NUM$Category,levels=rev(c("Direct","Indirect","Induced","Total")))
|
OUTPUT_NUM$Category <- factor(OUTPUT_NUM$Category,levels=rev(c("Direct","Indirect","Induced","Total")))
|
||||||
|
|
||||||
OUTPUT_PLOT <- ggplot(OUTPUT_NUM %>% filter(Category!="Total"),aes(x=Year,y=Output))+geom_area(position = "stack",aes(fill=Category,group=Category))+theme_bw()+scale_x_continuous(breaks=c(2029,seq(2025,2060,by=2)))+scale_fill_manual(values=COLORS)+geom_line(data=OUTPUT_NUM%>% filter(Category=="Total"),linewidth=1)+theme(legend.position = "top")+scale_y_continuous(labels = scales::comma,breaks=seq(0,600,by=25))+ylab("Economic Output (Million USD)")
|
OUTPUT_PLOT <- ggplot(OUTPUT_NUM %>% filter(Category!="Total"),aes(x=Year,y=Output))+geom_area(position = "stack",aes(fill=Category,group=Category))+theme_bw()+scale_x_continuous(breaks=c(2029,seq(2035,2060,by=5)))+scale_fill_manual(values=COLORS)+geom_line(data=OUTPUT_NUM%>% filter(Category=="Total"),linewidth=1)+theme(legend.position = "top")+scale_y_continuous(labels = scales::comma,breaks=seq(0,600,by=25))+ylab("Economic Output (Million USD)")
|
||||||
OUTPUT_PLOT
|
OUTPUT_PLOT
|
||||||
|
|
||||||
png(paste0(OUTPUT_DIR,"Output_plot.png"), units = "in", width = 10, height = 8, res = 600)
|
png(paste0(OUTPUT_DIR,"Output_plot.png"), units = "in", width = 10, height = 8, res = 600)
|
||||||
@ -61,14 +61,14 @@ GDP <- rbind(GDP %>% filter(Region %in% KEY_REGIONS),OTHER_GDP)
|
|||||||
GDP$Region <- factor(GDP$Region,levels=rev(c("Other Counties",KEY_REGIONS)))
|
GDP$Region <- factor(GDP$Region,levels=rev(c("Other Counties",KEY_REGIONS)))
|
||||||
GDP <- GDP %>% filter(Year>=2029)
|
GDP <- GDP %>% filter(Year>=2029)
|
||||||
|
|
||||||
GDP_SUB_REGION_PLOT <- ggplot(GDP %>% filter(Region!='Lincoln'),aes(x=Year,y=GDP,fill=Region))+geom_area(position='stack')+scale_x_continuous(breaks=c(2029,seq(2025,2060,by=2)))+scale_y_continuous(labels = scales::comma,breaks=seq(0,30,by=1))+theme(legend.position = "top")+theme_bw()+ylab("GDP (Million USD)")+scale_fill_manual(values=paletteer_d("PNWColors::Shuksan2"))
|
GDP_SUB_REGION_PLOT <- ggplot(GDP %>% filter(Region!='Lincoln'),aes(x=Year,y=GDP,fill=Region))+geom_area(position='stack')+scale_x_continuous(breaks=c(2029,seq(2035,2060,by=5)))+scale_y_continuous(labels = scales::comma,breaks=seq(0,30,by=2))+theme_bw()+theme(text = element_text(size = 20),legend.position = "top")+ylab("GDP (Million USD)")+scale_fill_manual(values=paletteer_d("PNWColors::Shuksan2"))
|
||||||
png(paste0(OUTPUT_DIR,"GDP_Other_Counties.png"), units = "in", width = 10, height = 8, res = 600)
|
png(paste0(OUTPUT_DIR,"GDP_Other_Counties.png"), units = "in", width = 10, height = 8, res = 600)
|
||||||
GDP_SUB_REGION_PLOT
|
GDP_SUB_REGION_PLOT
|
||||||
dev.off()
|
dev.off()
|
||||||
|
|
||||||
|
|
||||||
GDP_REGION_SUMMARY <- GDP %>% mutate(Region=factor(ifelse(Region=='Lincoln','Lincoln','Rest of Wyoming'),levels=rev(c('Lincoln','Rest of Wyoming')))) %>% group_by(Region,Year) %>% summarize(GDP=sum(GDP)) %>% ungroup
|
GDP_REGION_SUMMARY <- GDP %>% mutate(Region=factor(ifelse(Region=='Lincoln','Lincoln','Rest of Wyoming'),levels=rev(c('Lincoln','Rest of Wyoming')))) %>% group_by(Region,Year) %>% summarize(GDP=sum(GDP)) %>% ungroup
|
||||||
GDP_PLOT <- ggplot(GDP_REGION_SUMMARY ,aes(x=Year,y=GDP,fill=Region))+geom_area(position='stack')+scale_x_continuous(breaks=c(2029,seq(2025,2060,by=2)))+scale_y_continuous(labels = scales::comma,breaks=seq(0,1000,by=10))+theme(legend.position = "top")+theme_bw()+ylab("GDP (Million USD)")+scale_fill_manual(values=c(paletteer_d("PNWColors::Shuksan2")[c(5)],"mediumpurple4"))+theme(legend.position = "top")
|
GDP_PLOT <- ggplot(GDP_REGION_SUMMARY ,aes(x=Year,y=GDP,fill=Region))+geom_area(position='stack')+scale_x_continuous(breaks=c(2029,seq(2035,2060,by=5)))+scale_y_continuous(labels = scales::comma,breaks=seq(0,1000,by=25))+theme_bw()+theme(text = element_text(size = 20),legend.position = "top")+ylab("GDP (Million USD)")+scale_fill_manual(values=c(paletteer_d("PNWColors::Shuksan2")[c(5)],"mediumpurple4"))
|
||||||
|
|
||||||
png(paste0(OUTPUT_DIR,"GDP_Region_Plot.png"), units = "in", width = 10, height = 8, res = 600)
|
png(paste0(OUTPUT_DIR,"GDP_Region_Plot.png"), units = "in", width = 10, height = 8, res = 600)
|
||||||
GDP_PLOT
|
GDP_PLOT
|
||||||
@ -107,7 +107,7 @@ png(paste0(OUTPUT_DIR,"Job_Dist_Plot.png"), units = "in", width = 22, height = 1
|
|||||||
dev.off()
|
dev.off()
|
||||||
|
|
||||||
JOB_FACET_DATA <- INDUSTRY_JOBS %>% mutate(Period=ifelse(Year>2033,"Operating","Construction")) %>% group_by(Period,Industry) %>% summarize(Jobs=mean(Jobs)) %>% ungroup
|
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))
|
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=20),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)
|
png(paste0(OUTPUT_DIR,"Job_Facet_Plot.png"), units = "in", width = 11, height = 11, res = 600)
|
||||||
JOB_FACET
|
JOB_FACET
|
||||||
@ -118,7 +118,7 @@ GDP_TOTAL <- read_csv(paste0(DATA_DIR,'Gross Domestic Product - By Compone
|
|||||||
|
|
||||||
GDP_TOTAL <- GDP_TOTAL %>% filter(Category %in% c('Gross Domestic Product (GDP)','Consumption','Investment','Change in Private Inventories','Net Trade','Government Spending','Exogenous Final Demand'))
|
GDP_TOTAL <- GDP_TOTAL %>% filter(Category %in% c('Gross Domestic Product (GDP)','Consumption','Investment','Change in Private Inventories','Net Trade','Government Spending','Exogenous Final Demand'))
|
||||||
GDP_TOTAL <- GDP_TOTAL %>% filter(Category=='Gross Domestic Product (GDP)') %>% select(-Category) %>% rename(GDP=value)
|
GDP_TOTAL <- GDP_TOTAL %>% filter(Category=='Gross Domestic Product (GDP)') %>% select(-Category) %>% rename(GDP=value)
|
||||||
GDP_PLOT <- ggplot(GDP_TOTAL ,aes(x=Year,y=GDP))+geom_line(linewidth=1,color='slateblue')+theme_bw()+theme(text=element_text(size=16),legend.position="top")+ylab("Wyoming GDP (Million USD)")+scale_x_continuous(breaks=c(seq(2030,2060,by=2)))+scale_y_continuous(breaks=seq(0,500,by=25))
|
GDP_PLOT <- ggplot(GDP_TOTAL ,aes(x=Year,y=GDP))+geom_line(linewidth=1,color='slateblue')+theme_bw()+theme(text=element_text(size=20),legend.position="top")+ylab("Wyoming GDP (Million USD)")+scale_x_continuous(breaks=c(seq(2030,2060,by=2)))+scale_y_continuous(breaks=seq(0,500,by=25))
|
||||||
|
|
||||||
png(paste0(OUTPUT_DIR,"GDP_Time_Plot.png"), units = "in", width = 11, height = 8, res = 600)
|
png(paste0(OUTPUT_DIR,"GDP_Time_Plot.png"), units = "in", width = 11, height = 8, res = 600)
|
||||||
GDP_PLOT
|
GDP_PLOT
|
||||||
@ -152,7 +152,7 @@ DOLLAR_VALUES <- rbind(OUTPUT_NUM %>% filter(Category=='Total') %>% select(-Cate
|
|||||||
GDP_TOTAL %>% mutate(Metric='GDP') %>% rename('Million (USD)'=GDP),
|
GDP_TOTAL %>% mutate(Metric='GDP') %>% rename('Million (USD)'=GDP),
|
||||||
TOTAL_TAXES,
|
TOTAL_TAXES,
|
||||||
TOTAL_PERSONAL_INCOME %>% mutate(Metric='Wages Paid') %>% rename('Million (USD)'=Income))
|
TOTAL_PERSONAL_INCOME %>% mutate(Metric='Wages Paid') %>% rename('Million (USD)'=Income))
|
||||||
FACET_INDICATORS_PLOT <- ggplot(DOLLAR_VALUES, aes(x=Year,y=`Million (USD)`,fill=Metric))+geom_area()+facet_wrap(.~Metric,nrow=2)+theme_bw()+scale_x_continuous(breaks=c(2029,seq(2025,2060,by=2)))+scale_y_continuous(labels = scales::comma,breaks=seq(0,3000,by=50))+theme(legend.position = "top",text=element_text(size=16))+scale_fill_manual(values=paletteer::paletteer_d("calecopal::lupinus") )
|
FACET_INDICATORS_PLOT <- ggplot(DOLLAR_VALUES, aes(x=Year,y=`Million (USD)`,fill=Metric))+geom_area()+facet_wrap(.~Metric,nrow=2)+theme_bw()+scale_x_continuous(breaks=c(2029,seq(2035,2060,by=5)))+scale_y_continuous(labels = scales::comma,breaks=seq(0,3000,by=50))+theme(legend.position = "top",text=element_text(size=20))+scale_fill_manual(values=paletteer::paletteer_d("calecopal::lupinus") )
|
||||||
DOLLAR_VALUES
|
DOLLAR_VALUES
|
||||||
|
|
||||||
DIRECT_TAX <- c(10.408,22.355,24.647,58.221,55.835,53.449,51.062,48.676,46.290,43.904,41.518,39.132,37.318,35.766,34.214,32.662,31.110,29.557,28.005,26.453,24.901,23.349,21.797,20.244,18.692,17.140,15.588,14.036,12.484,10.931,9.379)
|
DIRECT_TAX <- c(10.408,22.355,24.647,58.221,55.835,53.449,51.062,48.676,46.290,43.904,41.518,39.132,37.318,35.766,34.214,32.662,31.110,29.557,28.005,26.453,24.901,23.349,21.797,20.244,18.692,17.140,15.588,14.036,12.484,10.931,9.379)
|
||||||
@ -161,16 +161,15 @@ DIRECT_TAX <- cbind(2030:2060,DIRECT_TAX ) %>% as_tibble
|
|||||||
colnames(DIRECT_TAX) <- c("Year","Tax")
|
colnames(DIRECT_TAX) <- c("Year","Tax")
|
||||||
DOLLAR_VALUES
|
DOLLAR_VALUES
|
||||||
DOLLAR_VALUES[DOLLAR_VALUES$Metric=='Wyoming Taxes','Million (USD)'] <- DOLLAR_VALUES[DOLLAR_VALUES$Metric=='Wyoming Taxes','Million (USD)'] + c(0,DIRECT_TAX$Tax)
|
DOLLAR_VALUES[DOLLAR_VALUES$Metric=='Wyoming Taxes','Million (USD)'] <- DOLLAR_VALUES[DOLLAR_VALUES$Metric=='Wyoming Taxes','Million (USD)'] + c(0,DIRECT_TAX$Tax)
|
||||||
TAX_PLOT <- ggplot(DOLLAR_VALUES %>% filter(Metric %in% c('Wyoming Taxes')), aes(x=Year,y=`Million (USD)`,fill=Metric))+geom_area()+theme_bw()+scale_x_continuous(breaks=c(2029,seq(2025,2060,by=2)))+scale_y_continuous(labels = scales::comma,breaks=seq(0,3000,by=5))+theme(legend.position = "top",text=element_text(size=16))+scale_fill_manual(values=paletteer::paletteer_d("calecopal::lupinus")[4] )
|
TAX_PLOT <- ggplot(DOLLAR_VALUES %>% filter(Metric %in% c('Wyoming Taxes')), aes(x=Year,y=`Million (USD)`,fill=Metric))+geom_area()+theme_bw()+scale_x_continuous(breaks=c(2029,seq(2035,2060,by=5)))+scale_y_continuous(labels = scales::comma,breaks=seq(0,3000,by=5))+theme(legend.position = "top",text=element_text(size=20))+scale_fill_manual(values=paletteer::paletteer_d("calecopal::lupinus")[4] )
|
||||||
png(paste0(OUTPUT_DIR,"Total_Tax_Plot.png"), units = "in", width = 1.5*11, height = 1.5*10, res = 600)
|
png(paste0(OUTPUT_DIR,"Total_Tax_Plot.png"), units = "in", width = 1.5*11, height = 1.5*10, res = 600)
|
||||||
TAX_PLOT
|
TAX_PLOT
|
||||||
dev.off()
|
dev.off()
|
||||||
|
|
||||||
FACET_INDICATORS_PLOT <- ggplot(DOLLAR_VALUES , aes(x=Year,y=`Million (USD)`,fill=Metric))+geom_area()+facet_wrap(.~Metric,nrow=2)+theme_bw()+scale_x_continuous(breaks=c(2029,seq(2025,2060,by=2)))+scale_y_continuous(labels = scales::comma,breaks=seq(0,3000,by=50))+theme(legend.position = "top",text=element_text(size=16))+scale_fill_manual(values=paletteer::paletteer_d("calecopal::lupinus") )
|
FACET_INDICATORS_PLOT <- ggplot(DOLLAR_VALUES , aes(x=Year,y=`Million (USD)`,fill=Metric))+geom_area()+facet_wrap(.~Metric,nrow=2)+theme_bw()+scale_x_continuous(breaks=c(2029,seq(2035,2060,by=5)))+scale_y_continuous(labels = scales::comma,breaks=seq(0,3000,by=50))+theme(legend.position = "top",text=element_text(size=20))+scale_fill_manual(values=paletteer::paletteer_d("calecopal::lupinus") )
|
||||||
FACET_INDICATORS_PLOT
|
FACET_INDICATORS_PLOT
|
||||||
|
|
||||||
|
|
||||||
FACET_INDICATORS_PLOT
|
|
||||||
|
|
||||||
png(paste0(OUTPUT_DIR,"Facet_Indicator_Plot.png"), units = "in", width = 1.5*11, height = 1.5*10, res = 600)
|
png(paste0(OUTPUT_DIR,"Facet_Indicator_Plot.png"), units = "in", width = 1.5*11, height = 1.5*10, res = 600)
|
||||||
FACET_INDICATORS_PLOT
|
FACET_INDICATORS_PLOT
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user