Home knowledge science – power use

[This article was first published on R – scottishsnow, and kindly contributed to R-bloggers]. (You may report difficulty concerning the content material on this web page right here)


Wish to share your content material on R-bloggers? click on right here if in case you have a weblog, or right here in case you do not.

I wrote beforehand about my house electrical energy use. We’ve an open house power monitor logging our import of electrical energy. Our home isn’t typical for the UK, we don’t have a gasoline provide and our house and water heating is by way of an air supply warmth pump (which runs on electrical energy).

In my earlier weblog publish I discussed we had been contemplating having Photo voltaic PV put in. We’ve just lately accomplished this, however this weblog isn’t about photo voltaic. We’ve additionally been considering of switching power suppliers. Our present provider, Ecotricity, expenses a flat price for kWh used, with a further standing cost. Nevertheless the wholesale worth of electrical energy will not be static for power suppliers, it varies by means of the day based mostly on the quantity of power out there and the way a lot shoppers want/need to use (provide – demand). Usually there’s a spike in power prices at tea time when most people get house from work and placed on the kettle for a brew and prepare dinner their tea. Octopus is one other inexperienced power provider, however their agile tariff varies their worth of electrical energy by means of the day and even between days.

Should you’d like to modify to Octopus you need to use this referral code to provide us each £50 credit score.

This weblog publish compares how a lot our electrical energy price from Ecotricity with how a lot it may cost from Octopus. Octopus publish their costs for the earlier 12 months, I’ve two years of their knowledge which have a 30 time step. I’ve a bit greater than 12 months of my very own consumption knowledge at a 10 second time step. Ecotricity cost a flat price, nevertheless it did change in Sept, I’ve used their earlier (decrease) price for my comparability.

For knowledge prep, I’ve eliminated the 12 months from the Octopus knowledge to check my single 12 months of observations to a number of years. The time interval for which we have now full overlaps is from 2019-01-31 to 2019-12-20.

Code for the evaluation is on the backside of the publish.

First, how do costs range by means of the day? We will see that for many of the day Octopus is less expensive, it’s solely the tea time spike for which they cost extra. So to ensure that us to save cash, the majority of our use must keep away from the tea time spike.

price

price

How does our use range by means of the day? I’ve adjusted our 10 knowledge to 30 minute home windows to assist with comparability. We warmth our water at noon and in addition a high up at about 9 pm, therefore these spikes. Our heating comes on at round four or 5 within the morning, therefore the heavy use then. Our tea time use is inline with these different heavy durations.

use

use

What if we multiply my power use by the associated fee for every hour? As we’d count on Octopus is cheaper for almost all of hours (factors under the 1:1 line), however a while durations is costlier.

hourly_cost

hourly_cost

We will mixture these prices to a every day time step, and embrace the standing cost. The Octopus standing cost is ~ 10 p a day lower than Ecotricity, so worth gaps begin to develop into fairly massive. At their 2019 costs, Octopus is cheaper on on daily basis of the 12 months. That is particularly so in winter once we use lots of electrical energy throughout off-peak durations (for house heating).

daily_cost

daily_cost

What’s the full distinction over the 12 months (2019-01-31 to 2019-12-20)? The next figures are with out us altering our electrical energy consumption patterns. A 30% discount in our annual invoice is big. Unsurprisingly I’ve requested a swap of provider.

  • Ecotricity prices £ 950 for the time interval.
  • Octopus 2018 prices £ 779 for the time interval.
  • Octopus 2019 prices £ 628 for the time interval.

Lastly, if we will eradicate the 4pm to 7pm peak, how a lot may we save? If we will reduce electrical energy use/import throughout this costly interval we should always be capable to cut back our payments even additional. 50-60p a day doesn’t appear rather a lot, however over a 12 months it’ll add up. Over the time interval from 2019-01-31 to 2019-12-20 our 4pm to 7pm Octopus price would have been £232 at 2018 costs and £198 at 2019 costs.

peak

peak

Evaluation and graphics code under. I ought to most likely have manipulated my knowledge to let me plot the hourly and every day scatter plots with sides as a substitute of patchwork. For some cause wordpress will not be displaying pipes (%>%) appropriately, I’ve contacted wordpress.com to see find out how to repair it.

# Packages
library(tidyverse)
library(readxl)
library(lubridate)
library(patchwork) # knowledge
tarrif_2018 = read_excel("agile_rates.2018-12-20.xlsx", sheet = "South Scotland") %>% choose(date_2018 = date, from_2018 = from, rate_2018 = unit_rate_excl_vat) %>% mutate(date_2018 = date_2018 + years(1), date_2018 = str_sub(date_2018, 1, 10)) tarrif_2019 = read_excel("agile_rates_2019.xlsx", sheet = "South Scotland") %>% choose(date_2019 = date, from_2019 = from, rate_2019 = unit_rate_excl_vat) %>% mutate(date_2019 = str_sub(date_2019, 1, 10)) f = record.information(".", sample = "elec*")
use = lapply(f, perform(i){ read_csv(i, col_names = F) %>% mutate(datetime = dmy_hms(X1)) %>% choose(datetime, Watts = X2)
})
use = do.name("rbind.knowledge.body", use) use = use[!duplicated(use$datetime), ] # Hourly worth
tarrif_2018 %>% mutate(12 months = 2018) %>% choose(12 months, from = from_2018, price = rate_2018) %>% bind_rows(tarrif_2019 %>% mutate(12 months = 2019) %>% choose(12 months, from = from_2019, price = rate_2019)) %>% group_by(12 months, from) %>% summarise(rate_med = median(price), rate_25 = quantile(price, .25), rate_75 = quantile(price, .75)) %>% mutate(from = str_sub(from, 1, 5)) %>% ggplot(aes(from, rate_med, color = as.issue(12 months))) + geom_pointrange(aes(ymin = rate_25, ymax = rate_75)) + geom_hline(yintercept = 17.74, measurement = 1.2) + annotate("textual content", x = 5, y = 18.5, angle = 270, label = "Ecotricity 2019") + coord_flip() + scale_color_brewer(kind = "qual", palette = "Dark2") + labs(title = "How does worth range by means of the day?", subtitle = "Octopus median and interquartile vary", x = "Time of day", y = "Worth (p/kWh)", color = "Octopus") + theme_minimal() + theme(textual content = element_text(measurement = 15), plot.margin = margin(5, 10, 2, 2, "pt")) # Chunk use to 30 min intervals
use_30 = use %>% mutate(mi = minute(datetime), mi = if_else(mi % group_by(date, hr, mi) %>% summarise(kWh = sum(kWh)) %>% mutate(from = paste(hr, mi, "00", sep = ":")) %>% ungroup() # Hourly use
use_30 %>% group_by(from) %>% summarise(kWh_med = median(kWh), kWh_25 = quantile(kWh, .25), kWh_75 = quantile(kWh, .75)) %>% mutate(from = str_sub(from, 1, 5)) %>% ggplot(aes(from, kWh_med)) + geom_pointrange(aes(ymin = kWh_25, ymax = kWh_75)) + annotate("rect", xmin = "16:00", xmax = "19:00", ymin=0, ymax=Inf, alpha=0.2, fill="purple") + coord_flip() + labs(title = "How does our use range by means of the day?", subtitle = "Highlighted space is pricey Octopus time", x = "Time of day", y = "Use (kWh)") + theme_minimal() + theme(textual content = element_text(measurement = 15), plot.margin = margin(5, 10, 2, 2, "pt")) # Be a part of worth and use
price = use_30 %>% left_join(tarrif_2018, by = c(date = "date_2018", from = "from_2018")) %>% left_join(tarrif_2019, by = c(date = "date_2019", from = "from_2019")) %>% filter(!is.na(rate_2018) & !is.na(rate_2019)) %>% mutate(ecotricity = kWh * .1774, octopus_2018 = kWh * rate_2018 / 100, octopus_2019 = kWh * rate_2019 / 100) # Hourly price
x = price %>% choose(from, ecotricity, octopus_2018, octopus_2019) %>% collect(provider, price, -from) %>% group_by(from, provider) %>% summarise(cost_med = median(price)) %>% ungroup() %>% mutate(from = str_sub(from, 1, 5)) %>% unfold(provider, cost_med) %>% mutate(time = seq(0, 23.5, by = 0.5)) ggplot(x, aes(x = ecotricity, y = octopus_2018, color = time)) + geom_point() + geom_abline(slope = 1) + scale_colour_viridis_c() + labs(title = "Hourly price between suppliers", subtitle = "Octopus 2018", x = "Ecotricity (£)", y = "Octopus (£)", color = "Hour") + theme_minimal() + theme(textual content = element_text(measurement = 15), plot.margin = margin(5, 10, 2, 2, "pt"), legend.place="none") + ggplot(x, aes(x = ecotricity, y = octopus_2019, color = time)) + geom_point() + geom_abline(slope = 1) + scale_colour_viridis_c() + labs(subtitle = "Octopus 2019", x = "Ecotricity (£)", y = "Octopus (£)", color = "Hour") + theme_minimal() + theme(textual content = element_text(measurement = 15), plot.margin = margin(5, 10, 2, 2, "pt")) # Every day price
cost_daily = price %>% choose(date, ecotricity, octopus_2018, octopus_2019) %>% group_by(date) %>% summarise(ecotricity = sum(ecotricity), octopus_2018 = sum(octopus_2018), octopus_2019 = sum(octopus_2019)) %>% mutate(ecotricity = ecotricity + .2959, octopus_2018 = octopus_2018 + .21, octopus_2019 = octopus_2019 + .21, jul = yday(as.Date(date))) ggplot(cost_daily, aes(ecotricity, octopus_2018)) + geom_point(aes(color = jul), alpha = 0.8) + scale_colour_viridis_c() + geom_abline(slope = 1) + labs(title = "Every day electrical energy price", subtitle = "Octopus 2018", x = "Ecotricity (£)", y = "Octopus (£)", color = "Day of 12 months") + theme_minimal() + theme(textual content = element_text(measurement = 15), legend.place="none") + ggplot(cost_daily, aes(ecotricity, octopus_2019)) + geom_point(aes(color = jul), alpha = 0.8) + scale_colour_viridis_c() + geom_abline(slope = 1) + labs(subtitle = "Octopus 2019", x = "Ecotricity (£)", y = "Octopus (£)", color = "Day of 12 months") + theme_minimal() + theme(textual content = element_text(measurement = 15)) # Peak use
x = price %>% choose(date, from, octopus_2018, octopus_2019) %>% filter(from %in% c("16:00:00", "16:30:00", "17:00:00", "17:30:00", "18:00:00", "18:30:00", "19:00:00")) %>% group_by(date) %>% summarise(octopus_2018 = sum(octopus_2018), octopus_2019 = sum(octopus_2019)) x %>% collect(12 months, price, -date) %>% ggplot(aes(12 months, price)) + geom_boxplot(fill = "yellow") + coord_flip() + labs(title = "How a lot will we spend throughout peak worth?", subtitle = "Every day unfold of price between 4pm and 7pm", x = "", y = "Value (£/day)") + theme_minimal() + theme(textual content = element_text(measurement = 15))



Should you obtained this far, why not subscribe for updates from the positioning? Select your taste: e-mail, twitter, RSS, or fb

Leave a Reply

Your email address will not be published. Required fields are marked *