library(tidyverse) PERM <- read_csv("./Data/Raw_Data/TerraPower_Report_Data/Monthly_In_Migration_Operations_Workforce.csv") NUM_YEARS <- ceiling(nrow(PERM)/12) c(8:12,rep(1:12,ceiling(nrow(PERM)/12)))[1:nrow(PERM)] DATES <- as.Date(paste0(2025,"-",8:12,"-",18)) for(YEAR in 2026:(2026+NUM_YEARS)){ DATES <- c(DATES,as.Date(paste0(YEAR,"-",1:12,"-",18))) } PERM$Date <- DATES[1:nrow(PERM)] PERM$Year <- year(PERM$Date) PERM$Add_Emp <- c(0,diff(PERM$In_Migration)) PERM <- PERM %>% group_by(Year) %>% summarize(Perm_Emp_Migration=sum(Add_Emp),Total_Wages=sum(Average_Wages_Present_USD*In_Migration),Current_Perm_Workers=round(mean(In_Migration) )) PERM[7,3]<-PERM[7,3]*3 #4 months (1/3) year only seen in sample PERM[,"Total_Migration"] <- round(PERM[,2]+PERM[,2]*0.8*3.05) #TerraPower assumes 80% have families and the average family is 3.2 people, but in wyoming the average is stated as 3.05 TEMP <- read_csv("./Data/Raw_Data/TerraPower_Report_Data/Monthly_In_Migration_Construction_Workforce.csv") TEMP[,1] <- TEMP[,1]*0.41 #TerraPower assumes 41% migrate into Lincoln TEMP[,1] <- TEMP[,1]*0.80 #I assume 80% of lincoln will be in Kemmerer TEMP$Date <- DATES[1:nrow(TEMP)] TEMP$Year <- year(TEMP$Date) TEMP$Add_Emp <- c(0,diff(TEMP$In_Migration)) TEMP <- TEMP %>% group_by(Year) %>% summarize(Temp_Emp_Migration=sum(Add_Emp),Total_Wages=sum(Average_Wages_Present_USD*In_Migration),Current_Temp_Workers=round(mean(In_Migration) )) TEMP[,"Total_Migration"] <- round(TEMP[,2]+TEMP[,2]*0.37*3.05) #TerraPower assumes 37% will bring families and the average family is 3.2 people, but states Wyoming averages 3.05 family save TEMP[,2] <- round(TEMP[,2]) TEMP[4:7,2] <- TEMP[4:7,2]-1 TEMP[7,2] <- TEMP[7,2]-1 TEMP[4:7,5] <- TEMP[4:7,5] -2 TEMP[7,5] <- TEMP[7,5] -1