library(tidyverse) energy <- read_csv("Downloads/archive-2/energy_dataset.csv") library(PerformanceAnalytics) chart.Correlation(energy) library(lubridate) Year <- year(energy$time) Year View(Year) ?mutate energy <- energy %>% mutate(Year) Month <- month(energy$time) energy <- energy %>% mutate(Month) energy <- energy %>% mutate(DoM = mday(energy$time)) energy <- energy %>% mutate(HoD = hour(energy$time)) plot(energy$time, energy$`generation solar`, cex=0.01) ggplot(energy)+ geom_path(aes(energy$time, energy$`generation solar`), size=0.2) ggplot(energy)+ geom_path(aes(energy$time, energy$`generation hydro water reservoir`), colour='green') energynew <- energy %>% select(-time, -`generation fossil coal-derived gas`, -(`generation fossil oil shale`:`generation hydro pumped storage aggregated`), -`generation marine`, -`generation wind offshore`, -`forecast wind offshore eday ahead` ) summary(energynew) #chart.Correlation(energynew) require(ggstatsplot) ggcorrmat(energynew) ggplot(energy)+ geom_path(aes(time, `generation solar`))+ facet_wrap(~Month) energy %>% filter(Year == 2016, Month == 7, DoM==15) %>% ggplot()+geom_line(aes(time, `generation solar`), size=2, colour='orange')+labs(title = 'July 15, 2016', x = NULL, y='Hourly Solar Generation (MW)')+ylim(0,6000) str(energy) plot(energy$`total load forecast`, energy$`total load actual`)