glimpse(df)
## Rows: 720
## Columns: 6
## $ Tarih <chr> "01.09.20 00:00", "01.09.20 01:...
## $ PTF <chr> "302,39", "300,25", "292,64", "...
## $ SMF <chr> "332,39", "325,25", "317,64", "...
## $ Pozitif.Dengesizlik.Fiyatı..TL.MWh. <chr> "293,32", "291,24", "283,86", "...
## $ Negatif.Dengesizlik.Fiyatı..TL.MWh. <chr> "342,36", "335,01", "327,17", "...
## $ SMF.Yön <chr> "? Enerji Açığı", "? Enerji Açı...
summary(df)
## Tarih PTF SMF
## Length:720 Length:720 Length:720
## Class :character Class :character Class :character
## Mode :character Mode :character Mode :character
## Pozitif.Dengesizlik.Fiyatı..TL.MWh. Negatif.Dengesizlik.Fiyatı..TL.MWh.
## Length:720 Length:720
## Class :character Class :character
## Mode :character Mode :character
## SMF.Yön
## Length:720
## Class :character
## Mode :character
The data (named as df) have taken from the Market & Financial Settlement Center’s general report database and includes the energy market’s balance figures for the September of 2020. As a glimpse of the data, it consists of 6 columns and 720 rows. It gives the information about the Market Clearance Price, System Marginal Price, Imbalance Prices and Energy Status(Deficit/Surplus)
ggplot(df, aes(x = Hour, y = Day, color = SMF.Yön)) +
geom_point(position = "jitter") +
scale_color_manual(values=c("blue", "red", "green")) +
labs(title = "Energy Management Distribution in Days and Hours in September")
As we can see from the scatter plot, most of the days and hours, there are energy deficits in September. However there are some green spots that lie in a line such as the day of around 5th and 19th which were Saturdays. And the occurrence of green spots seems more before 8 o’clock in a day.
ggplot(day_yon, aes(x = Day_name, y=n, fill = factor(SMF.Yön, levels = c("Balanced", "Surplus", "Deficit")))) +
geom_col(position = "stack") +
labs(title="Energy Management Frequencies by Days",
x="Days of the Week",
y= "Count of the Energy Management")+
scale_fill_discrete(name="Energy Management")
If we apply further investigation based on the days of the week, we can see that, especially on week days there are mostly energy deficits. On the other hand, energy surplus occurs mostly in Saturdays.
ggplot(hour_yon, aes(x = Hour, y=n, fill = factor(SMF.Yön, levels = c("Balanced", "Surplus", "Deficit")))) +
geom_col(position = "stack") +
labs(title="Energy Management Frequencies by Hours",
x="Hours",
y= "Count of the Energy Management")+
scale_fill_discrete(name="Energy Management")
Additionally, energy management chart by hours depicts, most of the energy surplus occurs between 0 am. and 8 am. which supports the thesis that mentioned above.
ggplot(df) +
geom_point(aes(x = id,y = PTF), colour = "red") +
geom_point(aes(x=id, y=SMF), colour="blue") +
labs(title = "PTF & SMF comparison",
x = "ID",
y= "PTF & SMF")
As we can see from the chart, SMF values are at above of the PTF values due to energy deficits. In addition, there are some outliers in SMF, such as; 2000 between the id number of 50 and 100, and also 1000, around the id number of 400. A further investigation may be needed for these outliers’ reasons.
deneme <- df
deneme$PTF_SMF_Ratio <- deneme$PTF / deneme$SMF
a_sd <- sd(deneme$PTF_SMF_Ratio)
a_mean <-mean(deneme$PTF_SMF_Ratio)
ggplot(deneme, aes(x = id, y = PTF_SMF_Ratio))+
geom_line(size= 1.2)+
geom_segment(aes(x = 0, y = a_mean + 3*a_sd, xend = 720, yend = a_mean + 3*a_sd), color ="red")+
geom_segment(aes(x = 0, y = a_mean - 3*a_sd, xend = 720, yend = a_mean - 3*a_sd), color ="red")
The red lines are represents the 3 standard deviation distance from the mean of the PTF/SMF Ratio. The outliers can be seen more clear by the help of their ratios and there are at least 4 outliers. Besides the outliers, the chart gives the information by the number of upward spikes as, energy deficits occurs more than the energy surpluses.
To wrap up, we can conclude that, there are mostly lack of energy according to the one month energy market’s figures. There is a huge potential for the energy trading companies such as; AYESAŞ and Boğaziçi Elektrik, to decrease their costs by predicting more accurately the energy consumption in a day.