From 2c94e6c06778df4b96083bc7a00847af81c46ac1 Mon Sep 17 00:00:00 2001 From: Alex Gebben Work Date: Wed, 29 Apr 2026 11:51:55 -0600 Subject: [PATCH] Fixed a calc issue with avg. employment --- Visuals.r | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Visuals.r b/Visuals.r index 5d56c40..d60701f 100644 --- a/Visuals.r +++ b/Visuals.r @@ -15,6 +15,11 @@ EMPLOY_NUM <- rbind(EMPLOY_NUM %>% filter(!(Year %in% c(2028,2029))) ,EMPLOY_NU EMPLOY_NUM$Category <- gsub(" Employment","",EMPLOY_NUM$Category) EMPLOY_NUM$Category <- factor(EMPLOY_NUM$Category,levels=rev(c("Direct","Indirect","Induced","Total"))) EMPLOY_NUM %>% filter(Employment=='Direct') +EMPLOY_NUM +EMPLOY_NUM %>% filter(Category=='Total',Employment!=0)%>% mutate(Period=ifelse(Year>2033,"Operating","Construction")) %>% group_by(Period) %>% summarize(Employment=mean(Employment)) +EMPLOY_NUM %>% filter(Category=='Total')%>% mutate(Period=ifelse(Year>2033,"Operating","Construction")) %>% group_by(Period) %>% summarize(Employment=mean(Employment)) +EMPLOY_NUM %>% filter(Category=='Total') %>% print(n=100) + COLORS <- rev(paletteer_d("fishualize::Alosa_fallax",n=4,direction=1)[-2]) MAX_VAL <- round(max(EMPLOY_NUM$Employment)) @@ -190,6 +195,7 @@ write_csv(NPV_SUMMARY,paste0(OUTPUT_DIR,"GDP_Net_Present_Value.csv" )) ####################### TAX <- DOLLAR_VALUES %>% filter(Metric=='Wyoming Taxes') %>% select(Year,Tax=`Million (USD)`) +TAX %>% mutate(Period=ifelse(Year>2033,"Operating","Construction")) %>% group_by(Period) %>% summarize(Mean_Tax=mean(Tax),Max_Tax=max(Tax)) TAX_SUMMARY <- TAX %>% group_by(Year) %>% summarize(Tax=sum(Tax),NPV_3=(Tax/((1+0.03)^(Year-2029))),NPV_5=(Tax/((1+0.05)^(Year-2029))),NPV_7=(Tax/((1+0.07)^(Year-2029)))) %>% ungroup NPV_3 <- TAX_SUMMARY %>% pull(NPV_3) %>% sum