Skip to content

Commit

Permalink
Update example_run_upscaling.R
Browse files Browse the repository at this point in the history
  • Loading branch information
phoebeheywood committed Oct 21, 2021
1 parent bdffec2 commit a5b7fda
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions upscale_disconnections/example_run_upscaling.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source("load_tool_environment.R")
exclude_solar_edge <- FALSE
region_to_load <- 'QLD'
load_start_time <- '2021-05-25'
circuit_summary <- read.csv(file = "data/Luceo_circ_sum_active2309.csv", header = TRUE, stringsAsFactors = FALSE)
circuit_summary <- read.csv(file = "circuit_summary.csv", header = TRUE, stringsAsFactors = FALSE)
manufacturer_install_data <- read.csv(file = "inbuilt_data/cer_cumulative_capacity_and_number_by_manufacturer.csv",
header = TRUE, stringsAsFactors = FALSE)

Expand All @@ -15,11 +15,6 @@ if (exclude_solar_edge){
manufacturer_install_data <- manufacturer_install_data
}

# These 2 lines are different to what the shiny app does
circuits_to_summarise <- mutate(circuits_to_summarise, manufacturer=ifelse(is.na(manufacturer), 'Other', manufacturer))
manufacturer_install_data <- mutate(manufacturer_install_data,
manufacturer=ifelse(is.na(manufacturer), 'Other', manufacturer))

manufacturer_install_data <- calc_installed_capacity_by_standard_and_manufacturer(manufacturer_install_data)

upsc_results <- get_upscaling_results_excluding_ufls_affected_circuits(circuits_to_summarise, manufacturer_install_data,
Expand All @@ -30,7 +25,7 @@ upscaled_disconnections <- upsc_results$upscaled_disconnections
manufacturers_missing_from_cer <- upsc_results$manufacturers_missing_from_cer
manufacturers_missing_from_input_db <- upsc_results$manufacturers_missing_from_input_db

write.csv(disconnection_summary, "data/Luceo_active_disconnection_summary0610.csv", row.names = FALSE)
write.csv(upscaled_disconnections, "data/Luceo_active_upscaled_disconnections0610.csv", row.names = FALSE)
#write.csv(manufacturers_missing_from_cer, "test_manufacturers_missing_from_cer.csv", row.names=FALSE)
#write.csv(manufacturers_missing_from_input_db, "test_manufacturers_missing_from_input_db.csv", row.names=FALSE)
write.csv(disconnection_summary, "test_disconnection_summary.csv", row.names = FALSE)
write.csv(upscaled_disconnections, "test_upscaled_disconnections.csv", row.names = FALSE)
write.csv(manufacturers_missing_from_cer, "test_manufacturers_missing_from_cer.csv", row.names=FALSE)
write.csv(manufacturers_missing_from_input_db, "test_manufacturers_missing_from_input_db.csv", row.names=FALSE)

0 comments on commit a5b7fda

Please sign in to comment.