knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(Team05Lab05)
For this lab, we created a package which connects to the carbon intensity API. You can follow this link to the Carbon Intensity UK API
The API connects to data from 17 different regions. You can see the regions here or calling the regions() function.
regions()
The check_fuel_region_time function returns a dataframe with the fuels used in an interval of time. When calling the function, you have to add the following parameters.
Using the following command
check_fuel_region_time("Scotland", "2018-11-16T09:00Z", "2018-12-10T16:00Z")
we will get a data frame containing the fuels used between the time interval [from, to] in the specified region.
check_fuel_region_time("Scotland", "2018-11-16T09:00Z", "2018-12-10T16:00Z")
The pie_API_2 function returns a plot of the fuels used in an interval of time. When calling the function, you have to add the following parameters.
Using the following command
pie_API_2("Scotland", "2018-11-16T09:00Z", "2018-12-10T16:00Z")
we will get a plot of the fuels used between the time interval [from, to] in the specified region.
pie_API_2("Scotland", "2018-11-16T09:00Z", "2018-12-10T16:00Z")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.