-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathVisualization.R
More file actions
53 lines (49 loc) · 2 KB
/
Copy pathVisualization.R
File metadata and controls
53 lines (49 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#---0. Pkg loading---------------------------------------------
library(dplyr)
library(ggplot2) # plots
library(stringr)
library(RColorBrewer) # color pallettes
library(RSQLite) #Database
library(maps)
library(gridExtra)
library(dplyr)
library(reshape)
library(rgdal)
library(ggrepel)
library(ggmap)
library(tidyverse)
library(viridis)
library(RColorBrewer)
library(hrbrthemes)
#---1. ADMIN - Include libraries and other important-----------
setwd("/Users/qingyuxu/Documents/PJM_QX_2030")
codepath <- "/Users/qingyuxu/Documents/Graphic Rscripts/";
path <- "/Users/qingyuxu/Documents/PJM_QX_2030"
outpath <- path
all_inputs = read.csv(file="sample_inputs_pjm.csv", header=TRUE,na.strings="")
ordered_set <- na.omit(all_inputs$Interested_Set[all_inputs$Interested_Set!= ""])
resource_mapping <- select(all_inputs, Resource, Fuel)
resource_list <- unique(all_inputs$Fuel)
Interested_Regions <- as.character(na.omit(all_inputs$Interested_Regions))
Deep_Dive <- as.character(na.omit(all_inputs$Deep_Dive))
Total <- as.character(na.omit(all_inputs$Total))
Total_title <- as.character(na.omit(all_inputs$Total_title))
cases <- na.omit(all_inputs$Interested_Set[all_inputs$Interested_Set!= ""])
years <- as.character(na.omit(all_inputs$list_years))
#---2. Combining Result files----------------------------------
source(paste0(codepath,"Post_process_resultsvPJM.R"));
#note that this depends on the naming of the cases.
#if each period has 4 days, then the factor should be 96 = 24*4.
#don't divide if your load sums are already weighed correctly!
#---4. Pie-Charts-------------------
source(paste0(codepath,"pie_chart_power_viz_v2.R"));
#---5. Capacity Bar Chart-------------------
source(paste0(codepath,"yearbyyearcomp.R"));
#---6. Total Cost and Emission----------------
source(paste0(codepath,"cost_emission.R"));
#---7. Map-----------------
source(paste0(codepath,"map_plot_transmission_pjm.R"));
#---8. Prices--------------
source(paste0(codepath,"RPS_ResMar_prices.R"));
#---9. Settlement----------
source(paste0(codepath,"Settlement.R"));