Added New Mexico, Updated figures
This commit is contained in:
parent
d3c74e2749
commit
b816c060f3
59
Analysis.r
59
Analysis.r
@ -2,21 +2,34 @@ library(tidyverse)
|
|||||||
library(scales)
|
library(scales)
|
||||||
library(RcppRoll)
|
library(RcppRoll)
|
||||||
RES <- readRDS("Results/Storage_Values_by_Facility_and_Variable_Discounts.Rds")
|
RES <- readRDS("Results/Storage_Values_by_Facility_and_Variable_Discounts.Rds")
|
||||||
RES
|
|
||||||
RES_REDUCED_FEE <- RES
|
RES_REDUCED_FEE <- RES
|
||||||
RES_INCREASED_FEE <- RES
|
RES_INCREASED_FEE <- RES
|
||||||
|
|
||||||
CV <- 1.3074*(10607030-1060703)
|
CV1 <- 1.3074*(10607030-1060703) #Data from Texas Report, converted from 2018 to Dec 2025 dollars
|
||||||
|
CV2 <- 1.2874*(6984013-1117442) #Data from New Mexico Report, Converted from 2019 to Dec 2025
|
||||||
|
|
||||||
LENGTH <- length(RES)
|
LENGTH <- length(RES)
|
||||||
SUPPLY_RESULTS <- list()
|
SUPPLY_RESULTS <- list()
|
||||||
|
SUPPLY_RESULTS_WITH_SHIPPING <- list() #This shows the amount availble to ship today, the SUPPLY_RESULTS shows the demand to have a CIFS available sometime in the future (present value brought forward with a discount). This SUPPLY_RESULTS_WITH_SHIPPING shows only SNF that has a current Net Present Cost high enough to exceed the shipping costs.
|
||||||
|
|
||||||
|
|
||||||
|
SHIPPING_COST <- 1.2874*26000 #Inflation adjusted from New Mexico Report
|
||||||
for(i in 1:LENGTH){
|
for(i in 1:LENGTH){
|
||||||
RES[[i]]$Revenue <-CV*as.numeric(RES[[i]]$Revenue)
|
RES[[i]] <- RES[[i]] %>% filter(!(Facility %in% c("Palo Verde","Vogtle"))) #The shipping cost is higher than the marginal value per SNF at these locations in the lat period of study 2083.
|
||||||
|
RES[[i]]$Revenue <-CV2*as.numeric(RES[[i]]$Revenue)
|
||||||
RES[[i]]$Year<-as.numeric(RES[[i]]$Year)
|
RES[[i]]$Year<-as.numeric(RES[[i]]$Year)
|
||||||
DISCOUNT <- as.numeric(gsub("Per_","",names(RES)[i]))/100
|
DISCOUNT <- as.numeric(gsub("Per_","",names(RES)[i]))/100
|
||||||
SUPPLY_RESULTS[[i]] <- RES[[i]] %>% left_join(read_csv("Data/Raw_Data/Curie_Spent_Fuel_Site_Totals.csv")) %>% mutate(Marginal_Value=Revenue/Total_Tons) %>% select(Year,Marginal_Value,Total_Tons) %>% group_by(Year) %>% arrange(Year,desc(Marginal_Value)) %>% mutate(Q=cumsum(Total_Tons),Discount=factor(percent(DISCOUNT,1),levels=c("3%","5%","7%","10%")))
|
SUPPLY_RESULTS[[i]] <- RES[[i]] %>% left_join(read_csv("Data/Raw_Data/Curie_Spent_Fuel_Site_Totals.csv")) %>% mutate(Marginal_Value=Revenue/Total_Tons) %>% select(Year,Marginal_Value,Total_Tons) %>% group_by(Year) %>% arrange(Year,desc(Marginal_Value)) %>% mutate(Q=cumsum(Total_Tons),Discount=factor(percent(DISCOUNT,1),levels=c("3%","5%","7%","10%")))
|
||||||
|
|
||||||
|
SUPPLY_RESULTS_WITH_SHIPPING[[i]] <- RES[[i]] %>% left_join(read_csv("Data/Raw_Data/Curie_Spent_Fuel_Site_Totals.csv")) %>% mutate(Marginal_Value=Revenue/Total_Tons) %>% filter(Marginal_Value>=SHIPPING_COST) %>% select(Year,Marginal_Value,Total_Tons) %>% group_by(Year) %>% arrange(Year,desc(Marginal_Value)) %>% mutate(Q=cumsum(Total_Tons),Discount=factor(percent(DISCOUNT,1),levels=c("3%","5%","7%","10%")))
|
||||||
}
|
}
|
||||||
names(SUPPLY_RESULTS) <- names(RES)
|
names(SUPPLY_RESULTS) <- names(RES)
|
||||||
KEY_DATA <- do.call(rbind,SUPPLY_RESULTS[c("Per_3","Per_5","Per_7","Per_10")])
|
names(SUPPLY_RESULTS_WITH_SHIPPING) <- names(RES)
|
||||||
|
|
||||||
|
KEY_DATA <- do.call(rbind,SUPPLY_RESULTS[c("Per_3","Per_5","Per_7","Per_10")]) %>% ungroup
|
||||||
|
SUPPLY_RESULTS_WITH_SHIPPING
|
||||||
|
KEY_DATA_WITH_SHIPPING <- do.call(rbind,SUPPLY_RESULTS_WITH_SHIPPING[c("Per_3","Per_5","Per_7","Per_10")]) %>% ungroup
|
||||||
|
|
||||||
KEY_YEARS <- c(1986,2026,2066)
|
KEY_YEARS <- c(1986,2026,2066)
|
||||||
#Data for reduced and increased fee at 5% and 2026
|
#Data for reduced and increased fee at 5% and 2026
|
||||||
FEE_DATA <- rbind(KEY_DATA %>% filter(Year %in% 2026 ,Q>=500,Discount=="5%") %>% mutate(Fee="Current Fee"),KEY_DATA %>% filter(Year %in% 2026 ,Q>=500,Discount=="5%") %>% mutate(Marginal_Value=Marginal_Value/2,Fee="Reduced Fee"),KEY_DATA %>% filter(Year %in% 2026 ,Q>=500,Discount=="5%") %>% mutate(Marginal_Value=2*Marginal_Value,Fee="Increased Fee"))
|
FEE_DATA <- rbind(KEY_DATA %>% filter(Year %in% 2026 ,Q>=500,Discount=="5%") %>% mutate(Fee="Current Fee"),KEY_DATA %>% filter(Year %in% 2026 ,Q>=500,Discount=="5%") %>% mutate(Marginal_Value=Marginal_Value/2,Fee="Reduced Fee"),KEY_DATA %>% filter(Year %in% 2026 ,Q>=500,Discount=="5%") %>% mutate(Marginal_Value=2*Marginal_Value,Fee="Increased Fee"))
|
||||||
@ -26,11 +39,14 @@ FEE_DATA$Fee <- factor(FEE_DATA$Fee,levels=c("Reduced Fee","Current Fee","Increa
|
|||||||
DEMAND_CURVE_YEARS <- ggplot(KEY_DATA %>% filter(Year %in% KEY_YEARS ,Q>=500,Discount=="5%") ,aes(x=Q/1000,y=Marginal_Value/1000,group=Year,color=Year))+geom_step(linewidth=1,arrow = arrow(length = unit(0.25, "cm")))+theme_bw()+scale_color_binned(high= "#132B43", low= "#56B1F7",breaks = KEY_YEARS)+scale_y_continuous(breaks=seq(0,2000,by=50))+scale_x_continuous(breaks=seq(0,150,by=5))+ylab("Price ($1000 per ton)")+xlab("Quantity (Thousand Tons)")+theme(text = element_text(size = 16),legend.position = "top")+ guides(color = guide_legend(reverse = FALSE))
|
DEMAND_CURVE_YEARS <- ggplot(KEY_DATA %>% filter(Year %in% KEY_YEARS ,Q>=500,Discount=="5%") ,aes(x=Q/1000,y=Marginal_Value/1000,group=Year,color=Year))+geom_step(linewidth=1,arrow = arrow(length = unit(0.25, "cm")))+theme_bw()+scale_color_binned(high= "#132B43", low= "#56B1F7",breaks = KEY_YEARS)+scale_y_continuous(breaks=seq(0,2000,by=50))+scale_x_continuous(breaks=seq(0,150,by=5))+ylab("Price ($1000 per ton)")+xlab("Quantity (Thousand Tons)")+theme(text = element_text(size = 16),legend.position = "top")+ guides(color = guide_legend(reverse = FALSE))
|
||||||
DEMAND_CURVE_YEARS
|
DEMAND_CURVE_YEARS
|
||||||
|
|
||||||
|
DEMAND_CURVE_YEARS_WITH_SHIPPING <- ggplot(KEY_DATA_WITH_SHIPPING %>% filter(Year %in% KEY_YEARS ,Q>=500,Discount=="5%") ,aes(x=Q/1000,y=Marginal_Value/1000,group=Year,color=Year))+geom_step(linewidth=1,arrow = arrow(length = unit(0.25, "cm")))+theme_bw()+scale_color_binned(high= "#132B43", low= "#56B1F7",breaks = KEY_YEARS)+scale_y_continuous(breaks=seq(0,2000,by=50))+scale_x_continuous(breaks=seq(0,150,by=5))+ylab("Price ($1000 per ton)")+xlab("Quantity (Thousand Tons)")+theme(text = element_text(size = 16),legend.position = "top")+ guides(color = guide_legend(reverse = FALSE))
|
||||||
|
DEMAND_CURVE_YEARS_WITH_SHIPPING
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DEMAND_CURVE_YEARS_PLOT_FULL <-ggplot(KEY_DATA %>% filter(Year %in% KEY_YEARS,Discount=="5%" ) ,aes(x=Q/1000,y=log(Marginal_Value),group=Year,color=Year))+geom_step(linewidth=2,arrow = arrow(length = unit(0.3, "cm")))+theme_bw()+scale_color_binned(high= "#132B43", low= "#56B1F7",breaks = KEY_YEARS)+ guides(color = guide_legend(reverse = TRUE))+scale_y_continuous(breaks=c(seq(4,20,by=0.5)))+scale_x_continuous(breaks=seq(0,150,by=5))+ylab("Price (Log dollar per Ton)")+xlab("Quantity (Thousand Tons)")+theme(text = element_text(size = 16),legend.position = "top")+ guides(color = guide_legend(reverse = FALSE))
|
DEMAND_CURVE_YEARS_PLOT_FULL <-ggplot(KEY_DATA %>% filter(Year %in% KEY_YEARS,Discount=="5%" ) ,aes(x=Q/1000,y=log(Marginal_Value),group=Year,color=Year))+geom_step(linewidth=2,arrow = arrow(length = unit(0.3, "cm")))+theme_bw()+scale_color_binned(high= "#132B43", low= "#56B1F7",breaks = KEY_YEARS)+ guides(color = guide_legend(reverse = TRUE))+scale_y_continuous(breaks=c(seq(4,20,by=0.5)))+scale_x_continuous(breaks=seq(0,150,by=5))+ylab("Price (Log dollar per Ton)")+xlab("Quantity (Thousand Tons)")+theme(text = element_text(size = 16),legend.position = "top")+ guides(color = guide_legend(reverse = FALSE))
|
||||||
DEMAND_CURVE_YEARS_PLOT_FULL
|
DEMAND_CURVE_YEARS_PLOT_FULL
|
||||||
|
|
||||||
|
|
||||||
DEMAND_CURVE_DISCOUNT <- ggplot(KEY_DATA %>% filter(Year %in% KEY_YEARS ,Q>=500,Year==2026) ,aes(x=Q/1000,y=Marginal_Value/1000,group=Discount,color=Discount))+geom_step(linewidth=1,arrow = arrow(length = unit(0.1, "cm")))+theme_bw()+scale_y_continuous(breaks=seq(0,2000,by=50))+scale_x_continuous(breaks=seq(0,150,by=5))+ylab("Price ($1000 per ton)")+xlab("Quantity (Thousand Tons)")+theme(text = element_text(size = 16),legend.position = "top")+ guides(color = guide_legend(reverse = FALSE))+scale_color_manual(values = c("tomato1", "tomato2", "tomato3","tomato4"))
|
DEMAND_CURVE_DISCOUNT <- ggplot(KEY_DATA %>% filter(Year %in% KEY_YEARS ,Q>=500,Year==2026) ,aes(x=Q/1000,y=Marginal_Value/1000,group=Discount,color=Discount))+geom_step(linewidth=1,arrow = arrow(length = unit(0.1, "cm")))+theme_bw()+scale_y_continuous(breaks=seq(0,2000,by=50))+scale_x_continuous(breaks=seq(0,150,by=5))+ylab("Price ($1000 per ton)")+xlab("Quantity (Thousand Tons)")+theme(text = element_text(size = 16),legend.position = "top")+ guides(color = guide_legend(reverse = FALSE))+scale_color_manual(values = c("tomato1", "tomato2", "tomato3","tomato4"))
|
||||||
DEMAND_CURVE_DISCOUNT
|
DEMAND_CURVE_DISCOUNT
|
||||||
|
|
||||||
@ -45,6 +61,7 @@ DEMAND_CURVE_FACET
|
|||||||
|
|
||||||
DEMAND_CURVE_YEARS_PLOT_FULL
|
DEMAND_CURVE_YEARS_PLOT_FULL
|
||||||
DEMAND_CURVE_YEARS
|
DEMAND_CURVE_YEARS
|
||||||
|
DEMAND_CURVE_YEARS_WITH_SHIPPING
|
||||||
DEMAND_CURVE_DISCOUNT
|
DEMAND_CURVE_DISCOUNT
|
||||||
DEMAND_CURVE_FEE
|
DEMAND_CURVE_FEE
|
||||||
DEMAND_CURVE_FACET
|
DEMAND_CURVE_FACET
|
||||||
@ -52,14 +69,28 @@ DEMAND_CURVE_FACET
|
|||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
CIFS <- readRDS("Data/Cleaned_Data/Texas_CIFS_Costs.Rds")
|
CIFS <- rbind(readRDS("Data/Cleaned_Data/Texas_CIFS_Costs.Rds"),readRDS("Data/Cleaned_Data/New_Mexico_CIFS_Costs.Rds"))
|
||||||
CIFS %>% mutate(NPC=Total/(1+0.05)^Year) %>% group_by(Phase) %>% summarize(Cost=sum(NPC)) %>% mutate(Marginal=Cost/ifelse(Phase=="Partial",5000,40000)/1000)
|
|
||||||
#Added cost per unit
|
|
||||||
M <- (3373397183-1401068722)/(40000-5000)/1000
|
|
||||||
#Added cost for intial project
|
|
||||||
C <- 1401068722/5000/1000
|
|
||||||
|
|
||||||
|
NPC <- CIFS %>% select(Year,Location,Phase,Capacity,Cost_Assumption,Total) %>% group_by(Year,Location,Cost_Assumption,Total,Phase,Capacity) %>% summarize(Total=mean(Total)) %>% arrange(Location,Phase,Year) %>% mutate(Cost_3=Total/(1+0.03)^Year,Cost_5=Total/(1+0.05)^Year,Cost_7=Total/(1+0.07)^Year,Cost_10=Total/(1+0.1)^Year) %>% ungroup %>% group_by(Location,Phase,Capacity,Cost_Assumption) %>% summarize('3%'=sum(Cost_3),'5%'=sum(Cost_5),"7%"=sum(Cost_7),"10%"=sum(Cost_10)) %>% pivot_longer(c(-Phase,-Location,-Cost_Assumption,-Capacity),names_to="Discount",values_to="CIFS_Cost")
|
||||||
|
NPC <- NPC %>% filter(Cost_Assumption=="Average") %>% select(-Cost_Assumption)
|
||||||
|
NPC
|
||||||
|
KEY_DATA
|
||||||
|
|
||||||
|
RETURN_DATA <- KEY_DATA %>% left_join(NPC) %>% filter(Q<=Capacity) %>% group_by(Year,Discount,Location,Phase,Capacity,CIFS_Cost) %>% summarize(Q=sum(Total_Tons),Revenue=sum(Marginal_Value*Total_Tons),P=Revenue/Q,Profit=sum(Revenue-CIFS_Cost)) %>% ungroup
|
||||||
|
|
||||||
|
RETURN_DATA <- RETURN_DATA %>% group_by(Discount,Location,Phase,Capacity,CIFS_Cost) %>% arrange(Discount,Location,Phase,Capacity,CIFS_Cost,Year) %>% mutate(FOC=(lead(Profit)-Profit)-Profit*(parse_number(Discount)/100))
|
||||||
####This is a plot of the supply curve in orange UNDER A COMPETITVE MARKET. Add in the monoplosty wating function next (value is gained by waiting another year.
|
####This is a plot of the supply curve in orange UNDER A COMPETITVE MARKET. Add in the monoplosty wating function next (value is gained by waiting another year.
|
||||||
|
#Added cost per unit
|
||||||
|
#M <- (3373397183-1401068722)/(40000-5000)/1000
|
||||||
|
#Added cost for intial project
|
||||||
|
#C <- 1401068722/5000/1000
|
||||||
|
#EXTENDED_COST <- (M*(100000-5000) - +C)*1000
|
||||||
|
#RETURN_DATA
|
||||||
|
|
||||||
|
#RETURN_DATA <- RETURN_DATA %>% mutate(size=ifelse(Phase=="Partial","5,000 MTU Capacity (Phase 1)","40,000 MTU Capacity (Full Build Out)"))
|
||||||
|
|
||||||
|
|
||||||
|
FOC_PLOT <- ggplot(RETURN_DATA,aes(x=Year,y=FOC/10^6,group=Discount,color=Discount))+facet_wrap(~Capacity,ncol=2)+scale_x_continuous(breaks=seq(1960,2083,by=10))+geom_point(size=0.5)+geom_step(linewidth=0.75)+ geom_hline(yintercept = 0, color = "black", linetype = "solid", size = 1)+theme(text = element_text(size = 16),legend.position = "top")+ylab("Million Dollars")
|
||||||
|
FOC_PLOT
|
||||||
|
|
||||||
DEMAND_CURVE_YEARS+geom_segment(aes(x = 0, y = C, xend = 5, yend = C),color="orange")+geom_segment(aes(x = 5, y = C, xend = 5, yend = M),color="orange")+geom_segment(aes(x = 5, y = M, xend = 140, yend = M),color="orange",arrow = arrow(length = unit(0.4, "cm")))
|
DEMAND_CURVE_YEARS+geom_segment(aes(x = 0, y = C, xend = 5, yend = C),color="orange")+geom_segment(aes(x = 5, y = C, xend = 5, yend = M),color="orange")+geom_segment(aes(x = 5, y = M, xend = 140, yend = M),color="orange",arrow = arrow(length = unit(0.4, "cm")))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,53 +1,12 @@
|
|||||||
library(tidyverse)
|
library(tidyverse)
|
||||||
library(fixest)
|
|
||||||
ISFSI <- read_csv("./Data/Raw_Data/Cost_Tables/Table_C-9_Number_of_ISFSIs_by_Project_Plan.csv")
|
|
||||||
ONE <- ISFSI[1:3]
|
|
||||||
colnames(ONE) <- c("Year","Active","Decom")
|
|
||||||
ONE <- ONE %>% mutate(Phase="Partial",Cost_Assumption="Low")
|
|
||||||
|
|
||||||
TWO <- ISFSI[,c(1,4:5)]
|
|
||||||
colnames(TWO) <- c("Year","Active","Decom")
|
|
||||||
TWO <- TWO%>% mutate(Phase="Full",Cost_Assumption="Low")
|
|
||||||
|
|
||||||
THREE <- ISFSI[,c(1,6:7)]
|
|
||||||
colnames(THREE) <- c("Year","Active","Decom")
|
|
||||||
THREE <- THREE %>% mutate(Phase="Partial",Cost_Assumption="High")
|
|
||||||
|
|
||||||
FOUR <- ISFSI[,c(1,8:9)]
|
|
||||||
colnames(FOUR) <- c("Year","Active","Decom")
|
|
||||||
FOUR <- FOUR %>% mutate(Phase="Full",Cost_Assumption="High")
|
|
||||||
ISFSI_NUM <- rbind(ONE,TWO,THREE,FOUR)
|
|
||||||
SAVE_DIR <- "./Data/Cleaned_Data/"
|
|
||||||
dir.create(SAVE_DIR,showWarnings=FALSE,recursive=TRUE)
|
|
||||||
saveRDS(ISFSI_NUM,paste0(SAVE_DIR,"ISFSI_Data.Rds"))
|
|
||||||
rm(ONE,TWO,THREE,FOUR)
|
|
||||||
######CIFS costs
|
######CIFS costs
|
||||||
CIFS <- rbind( read_csv("./Data/Raw_Data/Cost_Tables/Table_C-3_Undiscounted_Cost_Estimates_Phase_1_Low.csv") %>% mutate(Phase='Partial',Cost_Assumption="Low"),read_csv("./Data/Raw_Data/Cost_Tables/Table_C-4_Undiscounted_Cost_Estimates_Phase_1_High.csv") %>% mutate(Phase='Partial',Cost_Assumption="High"), read_csv("./Data/Raw_Data/Cost_Tables/Table_C-5_Undiscounted_Cost_Estimates_Full_Low.csv") %>% mutate(Phase='Full',Cost_Assumption="Low"), read_csv("./Data/Raw_Data/Cost_Tables/Table_C-6_Undiscounted_Cost_Estimates_Full_High.csv") %>% mutate(Phase='Full',Cost_Assumption="High"))
|
CIFS_TEXAS <- rbind( read_csv("./Data/Raw_Data/Cost_Tables/Texas/Table_C-3_Undiscounted_Cost_Estimates_Phase_1_Low.csv") %>% mutate(Phase='Partial',Cost_Assumption="Low"),read_csv("./Data/Raw_Data/Cost_Tables/Texas/Table_C-4_Undiscounted_Cost_Estimates_Phase_1_High.csv") %>% mutate(Phase='Partial',Cost_Assumption="High"), read_csv("./Data/Raw_Data/Cost_Tables/Texas/Table_C-5_Undiscounted_Cost_Estimates_Full_Low.csv") %>% mutate(Phase='Full',Cost_Assumption="Low"), read_csv("./Data/Raw_Data/Cost_Tables/Texas/Table_C-6_Undiscounted_Cost_Estimates_Full_High.csv") %>% mutate(Phase='Full',Cost_Assumption="High")) %>% mutate(Location="Texas",Capacity=ifelse(Phase=='Partial',5000,8*5000)) %>% select(Year,Location,Phase,Capacity,Cost_Assumption,Total,everything())
|
||||||
saveRDS(CIFS,"Data/Cleaned_Data/Texas_CIFS_Costs.Rds")
|
|
||||||
|
|
||||||
######Onsite costs
|
CIFS_TEXAS <- rbind(CIFS_TEXAS,CIFS_TEXAS %>% group_by(Year,Location,Phase,Capacity) %>% summarize(Cost_Assumption="Average",Total=mean(Total),Construction=mean(Construction),Transportation_to_CISF=mean(Transportation_to_CISF),Operations=mean(Operations),Transportation_to_Repository=mean(Transportation_to_Repository),Decommissioning=mean(Decommissioning)) %>% ungroup)
|
||||||
ONSITE <- rbind( read_csv("./Data/Raw_Data/Cost_Tables/Table_C-10_Undiscounted_No_Action_Phase_1_Low.csv") %>% mutate(Phase='Partial',Cost_Assumption="Low"),read_csv("./Data/Raw_Data/Cost_Tables/Table_C-11_Undiscounted_No_Action_Phase_1_High.csv") %>% mutate(Phase='Partial',Cost_Assumption="High"), read_csv("./Data/Raw_Data/Cost_Tables/Table_C-12_Undiscounted_No_Action_Full_Low.csv") %>% mutate(Phase='Full',Cost_Assumption="Low"), read_csv("./Data/Raw_Data/Cost_Tables/Table_C-13_Undiscounted_No_Action_Full_High.csv") %>% mutate(Phase='Full',Cost_Assumption="High"))
|
|
||||||
ISFSI_NUM %>% filter(Year>=30,Phase=='Full') %>% print(n=100)
|
|
||||||
#######
|
|
||||||
SUMMARY <- ONSITE %>% inner_join(ISFSI_NUM) %>% group_by(Year,Cost_Assumption) %>% summarize(Decom_num=Decom,OP=Operations_Active/ifelse(Active==0,1,Active),Decom=Operations_Decom/ifelse(Decom==0,1,Decom))
|
|
||||||
OP <- SUMMARY %>% filter(OP!=0) %>% pull(OP) %>% mean
|
|
||||||
TEST <-SUMMARY %>% filter(Cost_Assumption=='High') %>% unique
|
|
||||||
hist(TEST$Decom)
|
|
||||||
|
|
||||||
TEST <-SUMMARY %>% unique
|
saveRDS(CIFS_TEXAS,"Data/Cleaned_Data/Texas_CIFS_Costs.Rds")
|
||||||
hist(TEST$Decom)
|
|
||||||
TEST %>% filter(OP!=0,Year>28) %>% print(n=100)
|
|
||||||
SUMMARY <- SUMMARY %>% mutate(CLOSING=ifelse(Year>=31,1,0))
|
|
||||||
SUMMARY
|
|
||||||
(10*77964491)/36
|
|
||||||
(2*125682289)/9
|
|
||||||
TEST
|
|
||||||
77964491/108647430
|
|
||||||
feols(Decom~Decom_num+CLOSING*Year,SUMMARY %>% filter(OP!=0))
|
|
||||||
hist(SUMMARY$Decom)
|
|
||||||
#####
|
|
||||||
M <- (779644907-251364578)/(40000-5000)
|
|
||||||
C <- 779644907-M*40000
|
|
||||||
(M*150000+C)/10^6
|
|
||||||
|
|
||||||
|
CIFS_NEW_MEXICO <- rbind( read_csv("./Data/Raw_Data/Cost_Tables/New_Mexico/Table_C-3_Undiscounted_Cost_Estimates_Phase_1_Low.csv") %>% mutate(Phase='Partial',Cost_Assumption="Low"),read_csv("./Data/Raw_Data/Cost_Tables/New_Mexico/Table_C-4_Undiscounted_Cost_Estimates_Phase_1_High.csv") %>% mutate(Phase='Partial',Cost_Assumption="High"), read_csv("./Data/Raw_Data/Cost_Tables/New_Mexico/Table_C-5_Undiscounted_Cost_Estimates_Full_Low.csv") %>% mutate(Phase='Full',Cost_Assumption="Low"), read_csv("./Data/Raw_Data/Cost_Tables/New_Mexico/Table_C-6_Undiscounted_Cost_Estimates_Full_High.csv") %>% mutate(Phase='Full',Cost_Assumption="High"))%>% mutate(Location="New Mexico",Capacity=ifelse(Phase=='Partial',8680,8680+5000*19))%>% select(Year,Location,Phase,Capacity,Cost_Assumption,Total,everything())
|
||||||
|
CIFS_NEW_MEXICO <- rbind(CIFS_NEW_MEXICO,CIFS_NEW_MEXICO %>% group_by(Year,Location,Phase,Capacity) %>% summarize(Cost_Assumption="Average",Total=mean(Total),Construction=mean(Construction),Transportation_to_CISF=mean(Transportation_to_CISF),Operations=mean(Operations),Transportation_to_Repository=mean(Transportation_to_Repository),Decommissioning=mean(Decommissioning)) %>% ungroup)
|
||||||
|
saveRDS(CIFS_NEW_MEXICO,"Data/Cleaned_Data/New_Mexico_CIFS_Costs.Rds")
|
||||||
|
|
||||||
|
|||||||
|
|
|
|
|
|
|
|
@ -0,0 +1,42 @@
|
|||||||
|
Year,Construction,Transportation_to_CISF,Operations,Transportation_to_Repository,Decommissioning,Total
|
||||||
|
1,116859908,0,0,0,0,116859908
|
||||||
|
2,116859908,0,0,0,0,116859908
|
||||||
|
3,269883561,4709983,0,0,0,274593543
|
||||||
|
4,0,4709983,0,0,0,4709983
|
||||||
|
5,0,4709983,0,0,0,4709983
|
||||||
|
6,0,4709983,0,0,0,4709983
|
||||||
|
7,0,4709983,0,0,0,4709983
|
||||||
|
8,0,4709983,0,0,0,4709983
|
||||||
|
9,0,4709983,0,0,0,4709983
|
||||||
|
10,0,4709983,0,0,0,4709983
|
||||||
|
11,0,4709983,0,0,0,4709983
|
||||||
|
12,0,4709983,0,0,0,4709983
|
||||||
|
13,0,4709983,0,0,0,4709983
|
||||||
|
14,0,4709983,0,0,0,4709983
|
||||||
|
15,0,4709983,0,0,0,4709983
|
||||||
|
16,0,4709983,0,0,0,4709983
|
||||||
|
17,0,4709983,0,0,0,4709983
|
||||||
|
18,0,4709983,0,0,0,4709983
|
||||||
|
19,0,4709983,0,0,0,4709983
|
||||||
|
20,0,4709983,0,0,0,4709983
|
||||||
|
21,0,4709983,0,0,0,4709983
|
||||||
|
22,0,4709983,0,0,0,4709983
|
||||||
|
23,0,4709983,0,0,0,4709983
|
||||||
|
24,0,4709983,0,0,0,4709983
|
||||||
|
25,0,4709983,0,0,0,4709983
|
||||||
|
26,0,4709983,0,0,0,4709983
|
||||||
|
27,0,4709983,0,0,0,4709983
|
||||||
|
28,0,4709983,0,0,0,4709983
|
||||||
|
29,0,4709983,0,0,0,4709983
|
||||||
|
30,0,4709983,0,0,0,4709983
|
||||||
|
31,0,4709983,0,0,0,4709983
|
||||||
|
32,0,4709983,0,0,0,4709983
|
||||||
|
33,0,4709983,0,0,0,4709983
|
||||||
|
34,0,4709983,0,0,0,4709983
|
||||||
|
35,0,4709983,0,0,0,4709983
|
||||||
|
36,0,4709983,0,0,0,4709983
|
||||||
|
37,0,4709983,0,0,0,4709983
|
||||||
|
38,0,4709983,0,0,0,4709983
|
||||||
|
39,0,4709983,0,0,0,4709983
|
||||||
|
40,269883561,4709983,0,0,0,274593543
|
||||||
|
41,0,0,0,0,24822656,24822656
|
||||||
|
@ -0,0 +1,43 @@
|
|||||||
|
Year,Construction,Transportation_to_CISF,Operations,Transportation_to_Repository,Decommissioning,Total
|
||||||
|
1,116859908,0,0,0,0,116859908
|
||||||
|
2,116859908,0,0,0,0,116859908
|
||||||
|
3,269883561,0,27892625,0,0,297776186
|
||||||
|
4,0,0,27892625,0,0,27892625
|
||||||
|
5,0,0,27892625,0,0,27892625
|
||||||
|
6,0,0,27892625,0,0,27892625
|
||||||
|
7,0,0,27892625,0,0,27892625
|
||||||
|
8,0,0,27892625,0,0,27892625
|
||||||
|
9,0,0,27892625,0,0,27892625
|
||||||
|
10,0,0,27892625,0,0,27892625
|
||||||
|
11,0,0,27892625,0,0,27892625
|
||||||
|
12,0,0,27892625,0,0,27892625
|
||||||
|
13,0,0,27892625,0,0,27892625
|
||||||
|
14,0,0,27892625,0,0,27892625
|
||||||
|
15,0,0,27892625,0,0,27892625
|
||||||
|
16,0,0,27892625,0,0,27892625
|
||||||
|
17,0,0,27892625,0,0,27892625
|
||||||
|
18,0,0,27892625,0,0,27892625
|
||||||
|
19,0,0,27892625,0,0,27892625
|
||||||
|
20,0,0,27892625,0,0,27892625
|
||||||
|
21,0,0,27892625,0,0,27892625
|
||||||
|
22,0,0,27892625,0,0,27892625
|
||||||
|
23,0,0,27892625,0,0,27892625
|
||||||
|
24,0,0,27892625,0,0,27892625
|
||||||
|
25,0,0,27892625,0,0,27892625
|
||||||
|
26,0,0,27892625,0,0,27892625
|
||||||
|
27,0,0,27892625,0,0,27892625
|
||||||
|
28,0,0,27892625,0,0,27892625
|
||||||
|
29,0,0,27892625,0,0,27892625
|
||||||
|
30,0,0,27892625,0,0,27892625
|
||||||
|
31,0,0,27892625,0,0,27892625
|
||||||
|
32,0,0,27892625,0,0,27892625
|
||||||
|
33,0,0,27892625,0,0,27892625
|
||||||
|
34,0,0,27892625,0,0,27892625
|
||||||
|
35,0,0,27892625,0,0,27892625
|
||||||
|
36,0,0,27892625,0,0,27892625
|
||||||
|
37,0,0,27892625,0,0,27892625
|
||||||
|
38,0,0,27892625,0,0,27892625
|
||||||
|
39,0,0,27892625,0,0,27892625
|
||||||
|
40,0,0,27892625,269883561,0,297776186
|
||||||
|
41,0,0,0,0,24822656,24822656
|
||||||
|
|
||||||
|
@ -0,0 +1,43 @@
|
|||||||
|
|
||||||
|
Year,Construction,Transportation_to_CISF,Operations,Transportation_to_Repository,Decommissioning,Total
|
||||||
|
1,116859908,0,0,0,0,116859908
|
||||||
|
2,116859908,0,0,0,0,116859908
|
||||||
|
3,103399272,269883561,4709983,0,0,377992816
|
||||||
|
4,103399272,155462880,4709983,0,0,263572135
|
||||||
|
5,103399272,155462880,4709983,0,0,263572135
|
||||||
|
6,103399272,155462880,4709983,0,0,263572135
|
||||||
|
7,103399272,155462880,4709983,0,0,263572135
|
||||||
|
8,103399272,155462880,4709983,0,0,263572135
|
||||||
|
9,103399272,155462880,4709983,0,0,263572135
|
||||||
|
10,103399272,155462880,4709983,0,0,263572135
|
||||||
|
11,103399272,155462880,4709983,0,0,263572135
|
||||||
|
12,103399272,155462880,4709983,0,0,263572135
|
||||||
|
13,103399272,155462880,4709983,0,0,263572135
|
||||||
|
14,103399272,155462880,4709983,0,0,263572135
|
||||||
|
15,103399272,155462880,4709983,0,0,263572135
|
||||||
|
16,103399272,155462880,4709983,0,0,263572135
|
||||||
|
17,103399272,155462880,4709983,0,0,263572135
|
||||||
|
18,103399272,155462880,4709983,0,0,263572135
|
||||||
|
19,103399272,155462880,4709983,0,0,263572135
|
||||||
|
20,103399272,155462880,4709983,0,0,263572135
|
||||||
|
21,103399272,155462880,4709983,0,0,263572135
|
||||||
|
22,0,155462880,4709983,0,0,160172863
|
||||||
|
23,0,0,4709983,167022002,0,171731985
|
||||||
|
24,0,0,4709983,167022002,0,171731985
|
||||||
|
25,0,0,4709983,167022002,0,171731985
|
||||||
|
26,0,0,4709983,167022002,0,171731985
|
||||||
|
27,0,0,4709983,167022002,0,171731985
|
||||||
|
28,0,0,4709983,167022002,0,171731985
|
||||||
|
29,0,0,4709983,167022002,0,171731985
|
||||||
|
30,0,0,4709983,167022002,0,171731985
|
||||||
|
31,0,0,4709983,167022002,0,171731985
|
||||||
|
32,0,0,4709983,167022002,0,171731985
|
||||||
|
33,0,0,4709983,167022002,0,171731985
|
||||||
|
34,0,0,4709983,167022002,0,171731985
|
||||||
|
35,0,0,4709983,167022002,0,171731985
|
||||||
|
36,0,0,4709983,167022002,0,171731985
|
||||||
|
37,0,0,4709983,167022002,0,171731985
|
||||||
|
38,0,0,4709983,167022002,0,171731985
|
||||||
|
39,0,0,4709983,167022002,0,171731985
|
||||||
|
40,0,0,4709983,167022002,0,171731985
|
||||||
|
41,0,0,0,0,496453127,496453127
|
||||||
|
@ -0,0 +1,42 @@
|
|||||||
|
Year,Construction,Transportation_to_CISF,Operations,Transportation_to_Repository,Decommissioning,Total
|
||||||
|
1,116859908,0,0,0,0,116859908
|
||||||
|
2,116859908,0,0,0,0,116859908
|
||||||
|
3,103399272,269883561,27892625,0,0,401175458
|
||||||
|
4,103399272,155462880,27892625,0,0,286754777
|
||||||
|
5,103399272,155462880,27892625,0,0,286754777
|
||||||
|
6,103399272,155462880,27892625,0,0,286754777
|
||||||
|
7,103399272,155462880,27892625,0,0,286754777
|
||||||
|
8,103399272,155462880,27892625,0,0,286754777
|
||||||
|
9,103399272,155462880,27892625,0,0,286754777
|
||||||
|
10,103399272,155462880,27892625,0,0,286754777
|
||||||
|
11,103399272,155462880,27892625,0,0,286754777
|
||||||
|
12,103399272,155462880,27892625,0,0,286754777
|
||||||
|
13,103399272,155462880,27892625,0,0,286754777
|
||||||
|
14,103399272,155462880,27892625,0,0,286754777
|
||||||
|
15,103399272,155462880,27892625,0,0,286754777
|
||||||
|
16,103399272,155462880,27892625,0,0,286754777
|
||||||
|
17,103399272,155462880,27892625,0,0,286754777
|
||||||
|
18,103399272,155462880,27892625,0,0,286754777
|
||||||
|
19,103399272,155462880,27892625,0,0,286754777
|
||||||
|
20,103399272,155462880,27892625,0,0,286754777
|
||||||
|
21,103399272,155462880,27892625,0,0,286754777
|
||||||
|
22,0,155462880,27892625,0,0,183355505
|
||||||
|
23,0,0,27892625,167022002,0,194914627
|
||||||
|
24,0,0,27892625,167022002,0,194914627
|
||||||
|
25,0,0,27892625,167022002,0,194914627
|
||||||
|
26,0,0,27892625,167022002,0,194914627
|
||||||
|
27,0,0,27892625,167022002,0,194914627
|
||||||
|
28,0,0,27892625,167022002,0,194914627
|
||||||
|
29,0,0,27892625,167022002,0,194914627
|
||||||
|
30,0,0,27892625,167022002,0,194914627
|
||||||
|
31,0,0,27892625,167022002,0,194914627
|
||||||
|
32,0,0,27892625,167022002,0,194914627
|
||||||
|
33,0,0,27892625,167022002,0,194914627
|
||||||
|
34,0,0,27892625,167022002,0,194914627
|
||||||
|
35,0,0,27892625,167022002,0,194914627
|
||||||
|
36,0,0,27892625,167022002,0,194914627
|
||||||
|
37,0,0,27892625,167022002,0,194914627
|
||||||
|
38,0,0,27892625,167022002,0,194914627
|
||||||
|
39,0,0,27892625,167022002,0,194914627
|
||||||
|
40,0,0,27892625,167022002,0,194914627
|
||||||
|
41,0,0,0,0,496453127,496453127
|
||||||
|
|
|
57
Data/Raw_Data/Cost_Tables/New_Mexico/test.r
Normal file
57
Data/Raw_Data/Cost_Tables/New_Mexico/test.r
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
library(tidyverse)
|
||||||
|
#########CIFS Costs
|
||||||
|
DAT <- read_csv("Table_C-3_Undiscounted_Cost_Estimates_Phase_1_Low.csv")
|
||||||
|
rowSums(DAT[,2:6])-DAT$Total
|
||||||
|
sum(DAT[,2:6])
|
||||||
|
|
||||||
|
|
||||||
|
DAT <- read_csv("Table_C-4_Undiscounted_Cost_Estimates_Phase_1_High.csv")
|
||||||
|
rowSums(DAT[,2:6])-DAT$Total
|
||||||
|
sum(DAT[,2:6])
|
||||||
|
sum(DAT[,7])
|
||||||
|
DAT[5,7]-sum(DAT[5,2:6])
|
||||||
|
61242023-(40629430+7642396+12970196)
|
||||||
|
|
||||||
|
DAT <- read_csv("Table_C-5_Undiscounted_Cost_Estimates_Full_Low.csv")
|
||||||
|
rowSums(DAT[,2:6])-DAT$Total
|
||||||
|
sum(DAT[,2:6])
|
||||||
|
sum(DAT$Total)
|
||||||
|
|
||||||
|
|
||||||
|
DAT <- read_csv("Table_C-6_Undiscounted_Cost_Estimates_Full_High.csv")
|
||||||
|
rowSums(DAT[,2:6])-DAT$Total
|
||||||
|
sum(DAT[,2:6])
|
||||||
|
|
||||||
|
################ISFS
|
||||||
|
DAT <- read_csv("Table_C-9_Number_of_ISFSIs_by_Project_Plan.csv")
|
||||||
|
ONE <- DAT[1:3]
|
||||||
|
colnames(ONE) <- c("Year","Active","Decom")
|
||||||
|
ONE <- ONE %>% mutate(Phase="Partial",Cost_Assumption="Low")
|
||||||
|
|
||||||
|
TWO <- DAT[,c(1,4:5)]
|
||||||
|
colnames(TWO) <- c("Year","Active","Decom")
|
||||||
|
TWO <- TWO%>% mutate(Phase="Full",Cost_Assumption="Low")
|
||||||
|
|
||||||
|
THREE <- DAT[,c(1,6:7)]
|
||||||
|
colnames(THREE) <- c("Year","Active","Decom")
|
||||||
|
THREE <- THREE %>% mutate(Phase="Partial",Cost_Assumption="High")
|
||||||
|
|
||||||
|
FOUR <- DAT[,c(1,8:9)]
|
||||||
|
colnames(FOUR) <- c("Year","Active","Decom")
|
||||||
|
FOUR <- FOUR %>% mutate(Phase="Full",Cost_Assumption="High")
|
||||||
|
ISFSI_NUM <- rbind(ONE,TWO,THREE,FOUR)
|
||||||
|
ISFSI_NUM %>% filter(Year==40)
|
||||||
|
|
||||||
|
####No Action Costs
|
||||||
|
DAT <- read_csv("Table_C-10_Undiscounted_No_Action_Phase_1_Low.csv")
|
||||||
|
rowSums(DAT[,2:4])-DAT$Total
|
||||||
|
sum(DAT$Total)
|
||||||
|
#Table 11 is identical to Table 10 so not check needed
|
||||||
|
DAT <- read_csv("Table_C-12_Undiscounted_No_Action_Full_Low.csv")
|
||||||
|
rowSums(DAT[,2:4])-DAT$Total
|
||||||
|
sum(DAT$Total)
|
||||||
|
|
||||||
|
DAT <- read_csv("Table_C-13_Undiscounted_No_Action_Full_High.csv")
|
||||||
|
rowSums(DAT[,2:4])-DAT$Total
|
||||||
|
sum(DAT$Total)
|
||||||
|
|
||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
Year,Construction,Transportation_to_CISF,Operations,Transportation_to_Repository,Decommissioning,Total
|
Year,Construction,Transportation_to_CISF,Operations,Transportation_to_Repository,Decommissioning,Total
|
||||||
1,76552618,73711378,12170532,0,0,162434529
|
1,76552618,73711378,12170532,0,0,162434529
|
||||||
2,65910317,224660997,12170532,0,0,302741846
|
2,65910317,224660997,12170532,0,0,302741846
|
||||||
|
Loading…
x
Reference in New Issue
Block a user