Title: | Calculate Carbon-Equivalent Emissions |
---|---|
Description: | Provides a flexible tool for calculating carbon-equivalent emissions. Mostly using data from the UK Government's Greenhouse Gas Conversion Factors report <https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2023>, it facilitates transparent emissions calculations for various sectors, including travel, accommodation, and clinical activities. The package is designed for easy integration into R workflows, with additional support for 'shiny' applications and community-driven extensions. |
Authors: | Lily Clements [aut, cre]
|
Maintainer: | Lily Clements <[email protected]> |
License: | LGPL (>= 3) |
Version: | 0.2.1 |
Built: | 2025-02-14 04:57:24 UTC |
Source: | https://github.com/cran/carbonr |
For use in the shiny_emissions()
function. Adding an unknown quantity of textInputs.
add_inputs(numeric_input, label, value)
add_inputs(numeric_input, label, value)
numeric_input |
Name of numerical input that controls the number of items to add. |
label |
Label of new textInput. |
value |
Value of new textInput. |
Returns textInput for use in the shiny_emissions()
function.
if(interactive()) { ui <- shinydashboard::dashboardPage(header = shinydashboard::dashboardHeader(), sidebar = shinydashboard::dashboardSidebar(), shinydashboard::dashboardBody( shiny::fluidRow( shiny::column(12, align = "left", shiny::splitLayout(shinydashboard::box(width = NULL, shiny::numericInput("newbox_add", "Number of new boxes:", value = 0, min = 0), shiny::uiOutput("newbox_input"))))))) server <- function(input, output) { K_plane <- shiny::reactive({ input$newbox_add }) output$newbox_input <- shiny::renderUI({ add_inputs(numeric_input = K_plane(), label = "New Box:", value = "textbox") }) } shiny::shinyApp(ui, server) }
if(interactive()) { ui <- shinydashboard::dashboardPage(header = shinydashboard::dashboardHeader(), sidebar = shinydashboard::dashboardSidebar(), shinydashboard::dashboardBody( shiny::fluidRow( shiny::column(12, align = "left", shiny::splitLayout(shinydashboard::box(width = NULL, shiny::numericInput("newbox_add", "Number of new boxes:", value = 0, min = 0), shiny::uiOutput("newbox_input"))))))) server <- function(input, output) { K_plane <- shiny::reactive({ input$newbox_add }) output$newbox_input <- shiny::renderUI({ add_inputs(numeric_input = K_plane(), label = "New Box:", value = "textbox") }) } shiny::shinyApp(ui, server) }
This function calculates the CO2e emissions between airports based on the provided parameters. The distances are calculated using the "airport_distance" function from the "airportr" package.
airplane_emissions( from, to, via = NULL, num_people = 1, radiative_force = TRUE, include_WTT = TRUE, round_trip = FALSE, class = c("Average passenger", "Economy class", "Business class", "Premium economy class", "First class") )
airplane_emissions( from, to, via = NULL, num_people = 1, radiative_force = TRUE, include_WTT = TRUE, round_trip = FALSE, class = c("Average passenger", "Economy class", "Business class", "Premium economy class", "First class") )
from |
Three-letter IATA code corresponding to the departure airport. You can check the IATA code using the "airport_finder" function. |
to |
Three-letter IATA code corresponding to the destination airport. You can check the IATA code using the "airport_finder" function. |
via |
Optional. Vector of three-letter IATA codes corresponding to airports for any layovers or stops along the route. |
num_people |
Number of people taking the flight. Must be a single numerical value. |
radiative_force |
Logical. Determines whether radiative forcing should be taken into account. It is recommended to set this parameter as TRUE since emissions from airplanes at higher altitudes have a greater impact on climate change than those at ground level. |
include_WTT |
Logical. Determines whether emissions associated with extracting, refining, and transporting fuels should be included. It is recommended to set this parameter as TRUE. |
round_trip |
Logical. Determines if the flight is round trip (return) or one-way. Default is FALSE (one-way). |
class |
Class flown in. Options include "Average passenger", "Economy class", "Business class", "Premium economy class", and "First class". |
The distances are calculated using the "airport_distance" function from the "airportr" package. This means that the distances between locations uses the Haversine formula. This is calculated as the crow flies.
Returns CO2e emissions in tonnes.
# Calculate emissions for a flight between Vancouver (YVR) and Toronto (YYZ) airplane_emissions("YVR", "YYZ") # Calculate emissions for a flight between London Heathrow (LHR) # and Kisumu Airport (KIS), with layovers in Amsterdam (AMS) and Nairobi # (NBO), flying in Economy class. airplane_emissions("LHR", "KIS", via = c("AMS", "NBO"), class = "Economy class")
# Calculate emissions for a flight between Vancouver (YVR) and Toronto (YYZ) airplane_emissions("YVR", "YYZ") # Calculate emissions for a flight between London Heathrow (LHR) # and Kisumu Airport (KIS), with layovers in Amsterdam (AMS) and Nairobi # (NBO), flying in Economy class. airplane_emissions("LHR", "KIS", via = c("AMS", "NBO"), class = "Economy class")
Find the name, city, country, and IATA code of an airport. For use in the airplane_emissions
function.
airport_finder( name, city, country, IATA_code, distance = 0.1, ignore.case = FALSE )
airport_finder( name, city, country, IATA_code, distance = 0.1, ignore.case = FALSE )
name |
Name of the airport. |
city |
City that the airport is in. |
country |
Country that the airport is in. |
IATA_code |
The IATA code. |
distance |
Maximum distance allowed for a match between the name/country/city given, and that of the value in the data set. |
ignore.case |
If |
Data frame containing the name, city, country, and IATA code of an airport.
# Can get the IATA code from the name of an airport. Gets similar matches. airport_finder(name = "Bristo") # Can get the IATA code from the name and city of an airport airport_finder(name = "Bristo", country = "United Kingdom") # Can find the name and city of an airport given the IATA code airport_finder(IATA_code = "BRS")
# Can get the IATA code from the name of an airport. Gets similar matches. airport_finder(name = "Bristo") # Can get the IATA code from the name and city of an airport airport_finder(name = "Bristo", country = "United Kingdom") # Can find the name and city of an airport given the IATA code airport_finder(IATA_code = "BRS")
This dataset is adapted from the airportr
package. Full credit and acknowledgment go to the original authors of the airportr
package for their contribution.
A dataset containing names, codes, locations, altitude, and timezones for airports.
airports
airports
A data frame with 7698 rows and 14 variables:
OpenFlights database ID
Airport name, sometimes contains name of the city
Name of the city served by the airport
3-letter IATA code
4-letter ICAO code
Country name as in OpenFlights database. Note that country names may not be ISO 3166-1 standard.
ISO 3166-1 numeric country code
Two-letter ISO country code
Three-letter ISO country code
Latitude in decimal degrees
Longitude in decimal degrees
Altitude in feet
Hours offset from UTC
Daylight Savings Time. One of E (Europe), A (US/Canada), S (South America), O (Australia), Z (New Zealand), N (None) or U (Unknown)
Timezone in Olson format
Type of airport (e.g., large airport, medium airport, small airport)
Source of data, generally sourced from OurAirports
https://cran.r-project.org/package=airportr
Estimates the CO2e emissions associated with different anaesthetic agents.
anaesthetic_emissions( desflurane = 0, sevoflurane = 0, isoflurane = 0, N2O = 0, methoxyflurane = 0, propofol = 0 )
anaesthetic_emissions( desflurane = 0, sevoflurane = 0, isoflurane = 0, N2O = 0, methoxyflurane = 0, propofol = 0 )
desflurane |
Amount of desflurane used in KG (default: 0). |
sevoflurane |
Amount of sevoflurane used in KG (default: 0). |
isoflurane |
Amount of isoflurane used in KG (default: 0). |
N2O |
Amount of nitrous oxide (N2O) used in KG (default: 0). |
methoxyflurane |
Amount of methoxyflurane used in KG (default: 0). |
propofol |
Amount of propofol used in KG (default: 0). |
These estimates are based on available literature and may vary depending on factors such as specific anaesthetic agents, usage conditions, and waste gas management practices.
The total CO2e emissions in tonnes.
McGain F, Muret J, Lawson C, Sherman JD. Environmental sustainability in anaesthesia and critical care. Br J Anaesth. 2020 Nov;125(5):680-692. DOI: 10.1016/j.bja.2020.06.055. Epub 2020 Aug 12. PMID: 32798068; PMCID: PMC7421303.
ACS Sustainable Chem. Eng. 2019, 7, 7, 6580–6591. Publication Date: January 20, 2019. Link
Sherman, Jodi MD*; Le, Cathy; Lamers, Vanessa; Eckelman, Matthew PhD. Life Cycle Greenhouse Gas Emissions of Anesthetic Drugs. Anesthesia & Analgesia 114(5):p 1086-1090, May 2012. DOI: 10.1213/ANE.0b013e31824f6940. Link
anaesthetic_emissions(desflurane = 200, sevoflurane = 30, N2O = 5)
anaesthetic_emissions(desflurane = 200, sevoflurane = 30, N2O = 5)
Further options are given in the raw_fuels
function.
building_emissions( water_supply = 0, water_trt = TRUE, water_unit = c("cubic metres", "million litres"), electricity_kWh = 0, electricity_TD = TRUE, electricity_WTT = TRUE, heat_kWh = 0, heat_TD = TRUE, heat_WTT = TRUE )
building_emissions( water_supply = 0, water_trt = TRUE, water_unit = c("cubic metres", "million litres"), electricity_kWh = 0, electricity_TD = TRUE, electricity_WTT = TRUE, heat_kWh = 0, heat_TD = TRUE, heat_WTT = TRUE )
water_supply |
Amount of water used in the building. |
water_trt |
logical. Default |
water_unit |
Unit for |
electricity_kWh |
Electricity used in kWh. |
electricity_TD |
logical. Default |
electricity_WTT |
logical. Default |
heat_kWh |
heat and steam used in kWh. |
heat_TD |
logical. Default |
heat_WTT |
logical. Default |
Returns CO2e emissions in tonnes.
Descriptions from 2022 UK Government Report: https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2022
# specify emissions in an office building_emissions(electricity_kWh = 200, heat_kWh = 100, water_supply = 100, water_trt = FALSE)
# specify emissions in an office building_emissions(electricity_kWh = 200, heat_kWh = 100, water_supply = 100, water_trt = FALSE)
This function calculates the carbon price credit for a given jurisdiction, year, period, and CO2e value. It uses CPI (Carbon Price Index) data to determine the carbon price for the specified jurisdiction and time period. The carbon price credit is calculated by multiplying the CO2e value by the corresponding carbon price.
carbon_price_credit( jurisdiction = NULL, year = NULL, period = 0, manual_price = NULL, co2e_val )
carbon_price_credit( jurisdiction = NULL, year = NULL, period = 0, manual_price = NULL, co2e_val )
jurisdiction |
A character string specifying the jurisdiction for which the carbon price credit should be calculated. |
year |
An optional numeric value specifying the year for which the carbon price credit should be calculated.
If |
period |
An optional numeric value specifying the period within the specified year for which the carbon price credit should be calculated.
If |
manual_price |
An option to manually input a carbon price index to override the value in the World Bank Data. This should be a value of the carbon credit price per tCO2e. |
co2e_val |
A numeric value specifying the CO2e (carbon dioxide equivalent) value for which the carbon price credit should be calculated. |
The calculated carbon price credit in USD ($).
# Calculate carbon price credit for the United Kingdom in the year 2000, # period 2, and CO2e value of 100 carbon_price_credit("United Kingdom", 2022, 2, co2e_val = 100) # Or manually enter a value carbon_price_credit(manual_price = 66.9, co2e_val = 100)
# Calculate carbon price credit for the United Kingdom in the year 2000, # period 2, and CO2e value of 100 carbon_price_credit("United Kingdom", 2022, 2, co2e_val = 100) # Or manually enter a value carbon_price_credit(manual_price = 66.9, co2e_val = 100)
The carbonr
package provides a flexible tool for calculating carbon-equivalent emissions.
Maintainer: Lily Clements [email protected] (ORCID)
See the README on GitHub
Find jurisdictions available in the Carbon Credits data. If a jurisdiction is specified, find the years associated with that jurisdiction.
check_CPI(jurisdiction = NULL, period = FALSE)
check_CPI(jurisdiction = NULL, period = FALSE)
jurisdiction |
(optional) A character string specifying the jurisdiction to filter the data by. |
period |
(logical) If TRUE, include the Period column in the output data frame. |
A vector or data frame containing the information.
which_jur <- check_CPI() which_years <- check_CPI(jurisdiction = "Switzerland") which_years_and_period <- check_CPI(jurisdiction = "Switzerland", period = TRUE)
which_jur <- check_CPI() which_years <- check_CPI(jurisdiction = "Switzerland") which_years_and_period <- check_CPI(jurisdiction = "Switzerland", period = TRUE)
Get the clinical theatre emissions after a data frame is inputted into the function.
clinical_theatre_data( data, time, date_format = c("%d/%m/%Y"), name, wet_clinical_waste = 0, wet_clinical_waste_unit = c("tonnes", "kg"), desflurane = 0, sevoflurane = 0, isoflurane = 0, methoxyflurane = 0, N2O = 0, propofol = 0, water_supply = 0, water_trt = TRUE, water_unit = c("cubic metres", "million litres"), electricity_kWh = 0, electricity_TD = TRUE, electricity_WTT = TRUE, heat_kWh = 0, heat_TD = TRUE, heat_WTT = TRUE, glass = 0, board = 0, mixed = 0, paper = 0, average = 0, average_film = 0, average_rigid = 0, HDPE = 0, LDPE = 0, LLDPE = 0, PET = 0, PP = 0, PS = 0, PVC = 0, glass_WD = 0, glass_waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"), board_WD = 0, mixed_WD = 0, paper_WD = 0, paper_waste_disposal = c("Closed-loop", "Combustion", "Composting", "Landfill"), average_WD = 0, average_film_WD = 0, average_rigid_WD = 0, HDPE_WD = 0, LDPE_WD = 0, LLDPE_WD = 0, PET_WD = 0, PP_WD = 0, PS_WD = 0, PVC_WD = 0, plastic_waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"), fridges = 0, freezers = 0, electric_waste_disposal = c("Landfill", "Open-loop"), glass_units = c("kg", "tonnes"), paper_units = c("kg", "tonnes"), plastic_units = c("kg", "tonnes"), electrical_units = c("kg", "tonnes"), include_cpi = FALSE, jurisdiction = NULL, year = NULL, period = 0, manual_price = NULL, gti_by = c("default", "month", "year"), overall_by = c("default", "month", "year"), single_sheet = FALSE )
clinical_theatre_data( data, time, date_format = c("%d/%m/%Y"), name, wet_clinical_waste = 0, wet_clinical_waste_unit = c("tonnes", "kg"), desflurane = 0, sevoflurane = 0, isoflurane = 0, methoxyflurane = 0, N2O = 0, propofol = 0, water_supply = 0, water_trt = TRUE, water_unit = c("cubic metres", "million litres"), electricity_kWh = 0, electricity_TD = TRUE, electricity_WTT = TRUE, heat_kWh = 0, heat_TD = TRUE, heat_WTT = TRUE, glass = 0, board = 0, mixed = 0, paper = 0, average = 0, average_film = 0, average_rigid = 0, HDPE = 0, LDPE = 0, LLDPE = 0, PET = 0, PP = 0, PS = 0, PVC = 0, glass_WD = 0, glass_waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"), board_WD = 0, mixed_WD = 0, paper_WD = 0, paper_waste_disposal = c("Closed-loop", "Combustion", "Composting", "Landfill"), average_WD = 0, average_film_WD = 0, average_rigid_WD = 0, HDPE_WD = 0, LDPE_WD = 0, LLDPE_WD = 0, PET_WD = 0, PP_WD = 0, PS_WD = 0, PVC_WD = 0, plastic_waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"), fridges = 0, freezers = 0, electric_waste_disposal = c("Landfill", "Open-loop"), glass_units = c("kg", "tonnes"), paper_units = c("kg", "tonnes"), plastic_units = c("kg", "tonnes"), electrical_units = c("kg", "tonnes"), include_cpi = FALSE, jurisdiction = NULL, year = NULL, period = 0, manual_price = NULL, gti_by = c("default", "month", "year"), overall_by = c("default", "month", "year"), single_sheet = FALSE )
data |
Data frame containing all data to be used in the emissions calculation |
time |
Variable in |
date_format |
The date format for the time variable (optional, default: c("%d/%m/%Y")). |
name |
Variable in |
wet_clinical_waste |
Amount of (wet) clinical waste that is usually incinerated. |
wet_clinical_waste_unit |
Unit for |
desflurane |
Amount of desflurane used in KG (default: 0). |
sevoflurane |
Amount of sevoflurane used in KG (default: 0). |
isoflurane |
Amount of isoflurane used in KG (default: 0). |
methoxyflurane |
Amount of methoxyflurane used in KG (default: 0). |
N2O |
Amount of nitrous oxide (N2O) used in KG (default: 0). |
propofol |
Amount of propofol used in KG (default: 0). |
water_supply |
Amount of water used in the building. |
water_trt |
logical. Default |
water_unit |
Unit for |
electricity_kWh |
Electricity used in kWh. |
electricity_TD |
logical. Default |
electricity_WTT |
logical. Default |
heat_kWh |
heat and steam used in kWh. |
heat_TD |
logical. Default |
heat_WTT |
logical. Default |
glass |
Numeric value representing the amount of glass. Default is |
board |
Numeric value indicating the weight of paperboard. Default is |
mixed |
Numeric value indicating the weight of mixed paper. Default is |
paper |
Numeric value indicating the weight of paper. Default is |
average |
Numeric value indicating the weight of average plastic. Default is |
average_film |
Numeric value indicating the weight of average film plastic. Default is |
average_rigid |
Numeric value indicating the weight of average rigid plastic. Default is |
HDPE |
Numeric value indicating the weight of HDPE plastic. Default is |
LDPE |
Numeric value indicating the weight of LDPE plastic. Default is |
LLDPE |
Numeric value indicating the weight of LLDPE plastic. Default is |
PET |
Numeric value indicating the weight of PET plastic. Default is |
PP |
Numeric value indicating the weight of PP plastic. Default is |
PS |
Numeric value indicating the weight of PS plastic. Default is |
PVC |
Numeric value indicating the weight of PVC plastic. Default is |
glass_WD |
Numeric value representing the amount of glass waste with disposal. Default is |
glass_waste_disposal |
Character vector specifying the waste disposal method to use for metal for calculating emissions. Possible values: |
board_WD |
Numeric value indicating the weight of paperboard disposed of using waste disposal methods. Default is |
mixed_WD |
Numeric value indicating the weight of mixed paper disposed of using waste disposal methods. Default is |
paper_WD |
Numeric value indicating the weight of paper disposed of using waste disposal methods. Default is |
paper_waste_disposal |
Character vector specifying the waste disposal method for paper to use for calculating emissions. Possible values: |
average_WD |
Numeric value indicating the weight of average plastic disposed of using waste disposal methods. Default is |
average_film_WD |
Numeric value indicating the weight of average film plastic disposed of using waste disposal methods. Default is |
average_rigid_WD |
Numeric value indicating the weight of average rigid plastic disposed of using waste disposal methods. Default is |
HDPE_WD |
Numeric value indicating the weight of HDPE plastic disposed of using waste disposal methods. Default is |
LDPE_WD |
Numeric value indicating the weight of LDPE plastic disposed of using waste disposal methods. Default is |
LLDPE_WD |
Numeric value indicating the weight of LLDPE plastic disposed of using waste disposal methods. Default is |
PET_WD |
Numeric value indicating the weight of PET plastic disposed of using waste disposal methods. Default is |
PP_WD |
Numeric value indicating the weight of PP plastic disposed of using waste disposal methods. Default is |
PS_WD |
Numeric value indicating the weight of PS plastic disposed of using waste disposal methods. Default is |
PVC_WD |
Numeric value indicating the weight of PVC plastic disposed of using waste disposal methods. Default is |
plastic_waste_disposal |
Character vector specifying the waste disposal method for plastic to use for calculating emissions. Possible values: |
fridges |
Numeric value indicating the weight of fridges. Default is |
freezers |
Numeric value indicating the weight of freezers. Default is |
electric_waste_disposal |
Character vector specifying the waste disposal method for electrical items to use for calculating emissions. Possible values: |
glass_units |
Character vector specifying the units of the emissions related to glass. Possible values: |
paper_units |
Character vector specifying the units of the emissions related to paper. Possible values: |
plastic_units |
Character vector specifying the units of the emissions related to plastic materials. Possible values: |
electrical_units |
Character vector specifying the units of the emissions related to electrical materials. Possible values: |
include_cpi |
Logical variable specifying whether to calculate carbon price credit as well as emissions. |
jurisdiction |
A character string specifying the jurisdiction for which the carbon price credit should be calculated. Available jurisdictions can be found by |
year |
An optional numeric value specifying the year for which the carbon price credit should be calculated.
If |
period |
An optional numeric value specifying the period within the specified year for which the carbon price credit should be calculated.
If |
manual_price |
An option to manually input a carbon price index to override the value in the World Bank Data. |
gti_by |
The grouping type for calculating the GTI ("default", "month", "year"). |
overall_by |
The grouping type for the total output plot ("default", "month", "year"). This is a plot of the emissions if |
single_sheet |
Options are |
Returns list containing two objects. A table containing CO2e emissions for each row of data (and carbon price index in USD if include_cpi
is TRUE
), and a ggplot2
object plotting the CO2e emissions. The second object is a single sheet containing summaries if single_sheet = TRUE
.
# Example with dummy data df <- data.frame(time = c("10/04/2000", "10/04/2000", "11/04/2000", "11/04/2000", "12/04/2000", "12/04/2000"), theatre = rep(c("A", "B"), times = 3), clinical_waste = c(80, 90, 80, 100, 120, 110), electricity_kwh = c(100, 110, 90, 100, 100, 110), general_waste = c(65, 55, 70, 50, 60, 30)) clinical_theatre_data(df, time = time, name = theatre, wet_clinical_waste = clinical_waste, wet_clinical_waste_unit = "kg", desflurane = 10, average = general_waste, plastic_units = "kg", electricity_kWh = electricity_kwh, include_cpi = TRUE, jurisdiction = "Australia", year = 2023, single_sheet = FALSE)
# Example with dummy data df <- data.frame(time = c("10/04/2000", "10/04/2000", "11/04/2000", "11/04/2000", "12/04/2000", "12/04/2000"), theatre = rep(c("A", "B"), times = 3), clinical_waste = c(80, 90, 80, 100, 120, 110), electricity_kwh = c(100, 110, 90, 100, 100, 110), general_waste = c(65, 55, 70, 50, 60, 30)) clinical_theatre_data(df, time = time, name = theatre, wet_clinical_waste = clinical_waste, wet_clinical_waste_unit = "kg", desflurane = 10, average = general_waste, plastic_units = "kg", electricity_kWh = electricity_kwh, include_cpi = TRUE, jurisdiction = "Australia", year = 2023, single_sheet = FALSE)
Calculate carbon-equivalent emissions following an operating theatre
clinical_theatre_emissions( wet_clinical_waste, wet_clinical_waste_unit = c("tonnes", "kg"), desflurane = 0, sevoflurane = 0, isoflurane = 0, methoxyflurane = 0, N2O = 0, propofol = 0, water_supply = 0, water_trt = TRUE, water_unit = c("cubic metres", "million litres"), electricity_kWh = 0, electricity_TD = TRUE, electricity_WTT = TRUE, heat_kWh = 0, heat_TD = TRUE, heat_WTT = TRUE, glass = 0, board = 0, mixed = 0, paper = 0, average = 0, average_film = 0, average_rigid = 0, HDPE = 0, LDPE = 0, LLDPE = 0, PET = 0, PP = 0, PS = 0, PVC = 0, glass_WD = 0, glass_waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"), board_WD = 0, mixed_WD = 0, paper_WD = 0, fridges = 0, freezers = 0, electric_waste_disposal = c("Landfill", "Open-loop"), electrical_units = c("kg", "tonnes"), paper_waste_disposal = c("Closed-loop", "Combustion", "Composting", "Landfill"), average_WD = 0, average_film_WD = 0, average_rigid_WD = 0, HDPE_WD = 0, LDPE_WD = 0, LLDPE_WD = 0, PET_WD = 0, PP_WD = 0, PS_WD = 0, PVC_WD = 0, plastic_waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"), glass_units = c("kg", "tonnes"), paper_units = c("kg", "tonnes"), plastic_units = c("kg", "tonnes") )
clinical_theatre_emissions( wet_clinical_waste, wet_clinical_waste_unit = c("tonnes", "kg"), desflurane = 0, sevoflurane = 0, isoflurane = 0, methoxyflurane = 0, N2O = 0, propofol = 0, water_supply = 0, water_trt = TRUE, water_unit = c("cubic metres", "million litres"), electricity_kWh = 0, electricity_TD = TRUE, electricity_WTT = TRUE, heat_kWh = 0, heat_TD = TRUE, heat_WTT = TRUE, glass = 0, board = 0, mixed = 0, paper = 0, average = 0, average_film = 0, average_rigid = 0, HDPE = 0, LDPE = 0, LLDPE = 0, PET = 0, PP = 0, PS = 0, PVC = 0, glass_WD = 0, glass_waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"), board_WD = 0, mixed_WD = 0, paper_WD = 0, fridges = 0, freezers = 0, electric_waste_disposal = c("Landfill", "Open-loop"), electrical_units = c("kg", "tonnes"), paper_waste_disposal = c("Closed-loop", "Combustion", "Composting", "Landfill"), average_WD = 0, average_film_WD = 0, average_rigid_WD = 0, HDPE_WD = 0, LDPE_WD = 0, LLDPE_WD = 0, PET_WD = 0, PP_WD = 0, PS_WD = 0, PVC_WD = 0, plastic_waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"), glass_units = c("kg", "tonnes"), paper_units = c("kg", "tonnes"), plastic_units = c("kg", "tonnes") )
wet_clinical_waste |
Amount of (wet) clinical waste that is usually incinerated. |
wet_clinical_waste_unit |
Unit for |
desflurane |
Amount of desflurane used in KG (default: 0). |
sevoflurane |
Amount of sevoflurane used in KG (default: 0). |
isoflurane |
Amount of isoflurane used in KG (default: 0). |
methoxyflurane |
Amount of methoxyflurane used in KG (default: 0). |
N2O |
Amount of nitrous oxide (N2O) used in KG (default: 0). |
propofol |
Amount of propofol used in KG (default: 0). |
water_supply |
Amount of water used in the building. |
water_trt |
logical. Default |
water_unit |
Unit for |
electricity_kWh |
Electricity used in kWh. |
electricity_TD |
logical. Default |
electricity_WTT |
logical. Default |
heat_kWh |
heat and steam used in kWh. |
heat_TD |
logical. Default |
heat_WTT |
logical. Default |
glass |
Numeric value representing the amount of glass. Default is |
board |
Numeric value indicating the weight of paperboard. Default is |
mixed |
Numeric value indicating the weight of mixed paper. Default is |
paper |
Numeric value indicating the weight of paper. Default is |
average |
Numeric value indicating the weight of average plastic. Default is |
average_film |
Numeric value indicating the weight of average film plastic. Default is |
average_rigid |
Numeric value indicating the weight of average rigid plastic. Default is |
HDPE |
Numeric value indicating the weight of HDPE plastic. Default is |
LDPE |
Numeric value indicating the weight of LDPE plastic. Default is |
LLDPE |
Numeric value indicating the weight of LLDPE plastic. Default is |
PET |
Numeric value indicating the weight of PET plastic. Default is |
PP |
Numeric value indicating the weight of PP plastic. Default is |
PS |
Numeric value indicating the weight of PS plastic. Default is |
PVC |
Numeric value indicating the weight of PVC plastic. Default is |
glass_WD |
Numeric value representing the amount of glass waste with disposal. Default is |
glass_waste_disposal |
Character vector specifying the waste disposal method to use for metal for calculating emissions. Possible values: |
board_WD |
Numeric value indicating the weight of paperboard disposed of using waste disposal methods. Default is |
mixed_WD |
Numeric value indicating the weight of mixed paper disposed of using waste disposal methods. Default is |
paper_WD |
Numeric value indicating the weight of paper disposed of using waste disposal methods. Default is |
fridges |
Numeric value indicating the weight of fridges. Default is |
freezers |
Numeric value indicating the weight of freezers. Default is |
electric_waste_disposal |
Character vector specifying the waste disposal method for electrical items to use for calculating emissions. Possible values: |
electrical_units |
Character vector specifying the units of the emissions related to electrical materials. Possible values: |
paper_waste_disposal |
Character vector specifying the waste disposal method for paper to use for calculating emissions. Possible values: |
average_WD |
Numeric value indicating the weight of average plastic disposed of using waste disposal methods. Default is |
average_film_WD |
Numeric value indicating the weight of average film plastic disposed of using waste disposal methods. Default is |
average_rigid_WD |
Numeric value indicating the weight of average rigid plastic disposed of using waste disposal methods. Default is |
HDPE_WD |
Numeric value indicating the weight of HDPE plastic disposed of using waste disposal methods. Default is |
LDPE_WD |
Numeric value indicating the weight of LDPE plastic disposed of using waste disposal methods. Default is |
LLDPE_WD |
Numeric value indicating the weight of LLDPE plastic disposed of using waste disposal methods. Default is |
PET_WD |
Numeric value indicating the weight of PET plastic disposed of using waste disposal methods. Default is |
PP_WD |
Numeric value indicating the weight of PP plastic disposed of using waste disposal methods. Default is |
PS_WD |
Numeric value indicating the weight of PS plastic disposed of using waste disposal methods. Default is |
PVC_WD |
Numeric value indicating the weight of PVC plastic disposed of using waste disposal methods. Default is |
plastic_waste_disposal |
Character vector specifying the waste disposal method for plastic to use for calculating emissions. Possible values: |
glass_units |
Character vector specifying the units of the emissions related to glass. Possible values: |
paper_units |
Character vector specifying the units of the emissions related to paper. Possible values: |
plastic_units |
Character vector specifying the units of the emissions related to plastic materials. Possible values: |
Returns CO2e emissions in tonnes.
# clinical theatre emissions for the default options, with 100kg of wet clinical waste clinical_theatre_emissions(wet_clinical_waste = 100, wet_clinical_waste_unit = "kg")
# clinical theatre emissions for the default options, with 100kg of wet clinical waste clinical_theatre_emissions(wet_clinical_waste = 100, wet_clinical_waste_unit = "kg")
: This function calculates the construction emissions based on the input parameters.
construction_emissions( aggregates = 0, average = 0, asbestos = 0, asphalt = 0, bricks = 0, concrete = 0, insulation = 0, metals = 0, soils = 0, mineral_oil = 0, plasterboard = 0, tyres = 0, wood = 0, aggregates_WD = 0, average_WD = 0, asbestos_WD = 0, asphalt_WD = 0, bricks_WD = 0, concrete_WD = 0, insulation_WD = 0, metals_WD = 0, soils_WD = 0, mineral_oil_WD = 0, plasterboard_WD = 0, tyres_WD = 0, wood_WD = 0, units = c("kg", "tonnes"), waste_disposal = c("Closed-loop", "Combustion", "Composting", "Landfill", "Open-loop") )
construction_emissions( aggregates = 0, average = 0, asbestos = 0, asphalt = 0, bricks = 0, concrete = 0, insulation = 0, metals = 0, soils = 0, mineral_oil = 0, plasterboard = 0, tyres = 0, wood = 0, aggregates_WD = 0, average_WD = 0, asbestos_WD = 0, asphalt_WD = 0, bricks_WD = 0, concrete_WD = 0, insulation_WD = 0, metals_WD = 0, soils_WD = 0, mineral_oil_WD = 0, plasterboard_WD = 0, tyres_WD = 0, wood_WD = 0, units = c("kg", "tonnes"), waste_disposal = c("Closed-loop", "Combustion", "Composting", "Landfill", "Open-loop") )
aggregates |
The weight of aggregates used in construction. Default is |
average |
The weight of average material used in construction. Default is |
asbestos |
The weight of asbestos used in construction. Default is |
asphalt |
The weight of asphalt used in construction. Default is |
bricks |
The weight of bricks used in construction. Default is |
concrete |
The weight of concrete used in construction. Default is |
insulation |
The weight of insulation material used in construction. Default is |
metals |
The weight of metals used in construction. Default is |
soils |
The weight of soils used in construction. Default is |
mineral_oil |
The weight of mineral oil used in construction. Default is |
plasterboard |
The weight of plasterboard used in construction. Default is |
tyres |
The weight of tyres used in construction. Default is |
wood |
The weight of wood used in construction. Default is |
aggregates_WD |
The weight of aggregates disposed of as waste. Default is |
average_WD |
The weight of average material disposed of as waste. Default is |
asbestos_WD |
The weight of asbestos disposed of as waste. Default is |
asphalt_WD |
The weight of asphalt disposed of as waste. Default is |
bricks_WD |
The weight of bricks disposed of as waste. Default is |
concrete_WD |
The weight of concrete disposed of as waste. Default is |
insulation_WD |
The weight of insulation material disposed of as waste. Default is |
metals_WD |
The weight of metals disposed of as waste. Default is |
soils_WD |
The weight of soils disposed of as waste. Default is |
mineral_oil_WD |
The weight of mineral oil disposed of as waste. Default is |
plasterboard_WD |
The weight of plasterboard disposed of as waste. Default is |
tyres_WD |
The weight of tyres disposed of as waste. Default is |
wood_WD |
The weight of wood disposed of as waste. Default is |
units |
The units in which the emissions should be returned ( |
waste_disposal |
The method of waste disposal. Options are, |
The function calculates the construction emissions based on the input quantities of different materials used in construction and the quantities of those materials disposed of as waste. The emissions values are obtained from a data source and are multiplied by the corresponding quantities to calculate the total emissions. The units of emissions can be specified as either kilograms (kg) or tonnes.
All assume Primary material production
for the material used in construction, except soils which assumes Closed-loop
The waste disposal method can be selected from the options: "Closed-loop"
, "Combustion"
,
"Composting"
, "Landfill"
, or "Open-loop"
.
Note that: "Closed-loop"
is valid for aggregates, average, asphalt, concrete, insulation,
metal, soils, mineral oil, plasterboard, tyres, and wood.
"Combustion"
is valid for average, mineral oil, and wood.
"Composting"
is valid for wood only.
"Landfill"
is valid for everything except average, mineral oil, and tyres.
"Open-loop"
is valid for aggregates, average, asphalt, bricks, concrete,
If one of these is used for a value that does not provide it, then an "NA"
is given.
The calculated construction emissions as a numeric value in tonnes.
#Calculate construction emissions with default values construction_emissions() #Calculate construction emissions with specified quantities construction_emissions(aggregates = 1000, concrete = 500, wood = 2000, units = "kg", waste_disposal = "Landfill")
#Calculate construction emissions with default values construction_emissions() #Calculate construction emissions with specified quantities construction_emissions(aggregates = 1000, concrete = 500, wood = 2000, units = "kg", waste_disposal = "Landfill")
Convert degrees to radians.
degree_conversion(deg)
degree_conversion(deg)
deg |
Degree value to convert. |
Value in radians.
# Convert 90 degrees into radians degree_conversion(90)
# Convert 90 degrees into radians degree_conversion(90)
Calculate distances between locations in miles using the Haversine formula. This is calculated as the crow flies.
distance_calc(lat1, lat2, long1, long2)
distance_calc(lat1, lat2, long1, long2)
lat1 |
Latitude of the first location. |
lat2 |
Latitude of the second location. |
long1 |
Longitude of the first location. |
long2 |
Longitude of the second location. |
Distance between locations in miles
# Distance between the London Eye and the Eiffel Tower in miles distance_calc(51.5033, 48.8584, 0.1196, 2.2945)
# Distance between the London Eye and the Eiffel Tower in miles distance_calc(51.5033, 48.8584, 0.1196, 2.2945)
This function calculates the emissions produced from different electrical items and their waste disposal based on the specified inputs. It considers emissions from primary material production and waste disposal of electrical items.
electrical_emissions( fridges = 0, freezers = 0, large = 0, IT = 0, small = 0, alkaline_batteries = 0, LiIon_batteries = 0, NiMh_batteries = 0, fridges_WD = 0, freezers_WD = 0, large_WD = 0, IT_WD = 0, small_WD = 0, alkaline_batteries_WD = 0, LiIon_batteries_WD = 0, NiMh_batteries_WD = 0, waste_disposal = c("Landfill", "Open-loop"), units = c("kg", "tonnes") )
electrical_emissions( fridges = 0, freezers = 0, large = 0, IT = 0, small = 0, alkaline_batteries = 0, LiIon_batteries = 0, NiMh_batteries = 0, fridges_WD = 0, freezers_WD = 0, large_WD = 0, IT_WD = 0, small_WD = 0, alkaline_batteries_WD = 0, LiIon_batteries_WD = 0, NiMh_batteries_WD = 0, waste_disposal = c("Landfill", "Open-loop"), units = c("kg", "tonnes") )
fridges |
Numeric value indicating the weight of fridges. Default is |
freezers |
Numeric value indicating the weight of freezers. Default is |
large |
Numeric value indicating the weight of large electrical items. Default is |
IT |
Numeric value indicating the weight of IT (Information Technology) equipment. Default is |
small |
Numeric value indicating the weight of small electrical items. Default is |
alkaline_batteries |
Numeric value indicating the weight of alkaline batteries. Default is |
LiIon_batteries |
Numeric value indicating the weight of Lithium-ion batteries. Default is |
NiMh_batteries |
Numeric value indicating the weight of Nickel Metal Hydride batteries. Default is |
fridges_WD |
Numeric value indicating the weight of fridges disposed of using waste disposal methods. Default is |
freezers_WD |
Numeric value indicating the weight of freezers disposed of using waste disposal methods. Default is |
large_WD |
Numeric value indicating the weight of large electrical items disposed of using waste disposal methods. Default is |
IT_WD |
Numeric value indicating the weight of IT equipment disposed of using waste disposal methods. Default is |
small_WD |
Numeric value indicating the weight of small electrical items disposed of using waste disposal methods. Default is |
alkaline_batteries_WD |
Numeric value indicating the weight of alkaline batteries disposed of using waste disposal methods. Default is |
LiIon_batteries_WD |
Numeric value indicating the weight of Lithium-ion batteries disposed of using waste disposal methods. Default is |
NiMh_batteries_WD |
Numeric value indicating the weight of Nickel Metal Hydride batteries disposed of using waste disposal methods. Default is |
waste_disposal |
Character vector specifying the waste disposal method to use for calculating emissions. Possible values: |
units |
Character vector specifying the units of the emissions output. Possible values: |
The calculated electrical emissions as a numeric value in tonnes.
# Calculate electrical emissions using default values electrical_emissions() # Calculate electrical emissions with specific quantities and waste disposal # method electrical_emissions(fridges = 10, IT = 5, alkaline_batteries = 100, waste_disposal = "Open-loop", units = "tonnes")
# Calculate electrical emissions using default values electrical_emissions() # Calculate electrical emissions with specific quantities and waste disposal # method electrical_emissions(fridges = 10, IT = 5, alkaline_batteries = 100, waste_disposal = "Open-loop", units = "tonnes")
This dataset contains activities within a clinical theatre setting related to healthcare services or medical supplies. It is structured to facilitate analysis of healthcare operations, costs, and estimate CO2e emissions.
example_clinical_theatre
example_clinical_theatre
A data frame with 4,386 rows and 6 columns, including:
The date of transaction or activity in DDMMYYYY format.
The cost associated with each transaction or activity in AUD, related to services provided or medical supplies used.
The amount or volume of a product or service provided, indicating the number of items used or procedures performed.
A unique identifier for each type of product or service, such as medical supplies, medications, or surgical procedures.
A code identifying the department, supplier, or healthcare provider involved in the transaction, or the entity receiving the product or service.
Categorises the clinical theatre activities into medical specialties or types of procedures, with 'ent' (Ear, Nose, and Throat), 'colorectal', 'hbt' (hematology or blood treatment), 'ortho' (orthopedics), 'paedsurg' (pediatric surgery), and 'gensurg' (general surgery).
The dataset provides an overview of clinical theatre operations.
A function that calculates CO2e emissions between ferry ports.
ferry_emissions( from, to, via = NULL, type = c("Foot", "Car", "Average"), num_people = 1, times_journey = 1, include_WTT = TRUE, round_trip = FALSE )
ferry_emissions( from, to, via = NULL, type = c("Foot", "Car", "Average"), num_people = 1, times_journey = 1, include_WTT = TRUE, round_trip = FALSE )
from |
Port code for the port departing from. Use |
to |
Port code for the port arriving from. Use |
via |
Optional. Takes a vector containing the port code that the ferry travels through. Use |
type |
Whether the journey is taken on foot or by car. Options are |
num_people |
Number of people taking the journey. Takes a single numerical value. |
times_journey |
Number of times the journey is taken. |
include_WTT |
logical. Recommended |
round_trip |
Whether the journey is one-way or return. |
The distances are calculated using the Haversine formula. This is calculated as the crow flies.
Returns CO2e emissions in tonnes for the ferry journey.
# Emissions for a ferry journey between Belfast and New York City seaport_finder(city = "Belfast") seaport_finder(city = "New York") ferry_emissions(from = "BEL", to = "BOY")
# Emissions for a ferry journey between Belfast and New York City seaport_finder(city = "Belfast") seaport_finder(city = "New York") ferry_emissions(from = "BEL", to = "BOY")
This function creates a value box for use in reports.
gg_value_box(values, information, icons)
gg_value_box(values, information, icons)
values |
A vector of numeric values to be displayed in the value box. |
information |
A vector of strings providing information or labels for the values. |
icons |
A vector of Font Awesome unicode symbols to be displayed as icons. |
This function creates a value box with customizable values, information, and icons.
The function takes inputs for the values, information, icons, and color of the value box.
The values and information are provided as vectors, while the icons are specified using
Font Awesome unicode symbols. The color of the value box can be customized using a factor
variable. The resulting value box is a ggplot2
object that can be further customized or
combined with other plots or elements in a report.
A ggplot2
object with a value box for report use.
Modified from Stack Overflow post: https://stackoverflow.com/questions/47105282/valuebox-like-function-for-static-reports
# Create a value box with custom values and icons gg_value_box( values = c(100, 500, 1000), information = c("Sales", "Revenue", "Customers"), icons = c("\U0000f155", "\U0000f155", "\U0000f0f7") )
# Create a value box with custom values and icons gg_value_box( values = c(100, 500, 1000), information = c("Sales", "Revenue", "Customers"), icons = c("\U0000f155", "\U0000f155", "\U0000f0f7") )
Indirect emissions from a stay at a hotel. Values to calculate emissions are from UK government 2022 report.
hotel_emissions(location = "UK", nights = 1, rooms = 1)
hotel_emissions(location = "UK", nights = 1, rooms = 1)
location |
Location of the hotel stay. Current accepted locations are |
nights |
Number of nights stayed in the hotel. |
rooms |
Number of rooms used in the hotel. |
Tonnes of CO2e emissions for a stay in a hotel.
# Emissions for a two night stay in Fiji. hotel_emissions(location = "Fiji", nights = 2)
# Emissions for a two night stay in Fiji. hotel_emissions(location = "Fiji", nights = 2)
Calculate household material emissions
household_emissions( glass = 0, clothing = 0, food = 0, drink = 0, compost_from_garden = 0, compost_from_food_and_garden = 0, board = 0, mixed = 0, paper = 0, fridges = 0, freezers = 0, large_electrical = 0, IT = 0, small_electrical = 0, alkaline_batteries = 0, LiIon_batteries = 0, NiMh_batteries = 0, aluminuim_cans = 0, aluminuim_foil = 0, mixed_cans = 0, scrap = 0, steel_cans = 0, average = 0, average_film = 0, average_rigid = 0, HDPE = 0, LDPE = 0, LLDPE = 0, PET = 0, PP = 0, PS = 0, PVC = 0, glass_WD = 0, books_WD = 0, clothing_WD = 0, gcb_waste_disposal = c("Closed-loop", "Combustion", "Landfill"), household_residual_waste = 0, hh_waste_disposal = c("Combustion", "Landfill"), food_WD = 0, drink_WD = 0, compost_from_garden_WD = 0, compost_from_food_and_garden_WD = 0, compost_waste_disposal = c("Anaerobic digestion", "Combustion", "Composting", "Landfill"), aluminuim_cans_WD = 0, aluminuim_foil_WD = 0, mixed_cans_WD = 0, scrap_WD = 0, steel_cans_WD = 0, metal_waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"), board_WD = 0, mixed_WD = 0, paper_WD = 0, paper_waste_disposal = c("Closed-loop", "Combustion", "Composting", "Landfill"), average_WD = 0, average_film_WD = 0, average_rigid_WD = 0, HDPE_WD = 0, LDPE_WD = 0, LLDPE_WD = 0, PET_WD = 0, PP_WD = 0, PS_WD = 0, PVC_WD = 0, plastic_waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"), fridges_WD = 0, freezers_WD = 0, large_electrical_WD = 0, IT_WD = 0, small_electrical_WD = 0, alkaline_batteries_WD = 0, LiIon_batteries_WD = 0, NiMh_batteries_WD = 0, electric_waste_disposal = c("Landfill", "Open-loop"), units = c("kg", "tonnes") )
household_emissions( glass = 0, clothing = 0, food = 0, drink = 0, compost_from_garden = 0, compost_from_food_and_garden = 0, board = 0, mixed = 0, paper = 0, fridges = 0, freezers = 0, large_electrical = 0, IT = 0, small_electrical = 0, alkaline_batteries = 0, LiIon_batteries = 0, NiMh_batteries = 0, aluminuim_cans = 0, aluminuim_foil = 0, mixed_cans = 0, scrap = 0, steel_cans = 0, average = 0, average_film = 0, average_rigid = 0, HDPE = 0, LDPE = 0, LLDPE = 0, PET = 0, PP = 0, PS = 0, PVC = 0, glass_WD = 0, books_WD = 0, clothing_WD = 0, gcb_waste_disposal = c("Closed-loop", "Combustion", "Landfill"), household_residual_waste = 0, hh_waste_disposal = c("Combustion", "Landfill"), food_WD = 0, drink_WD = 0, compost_from_garden_WD = 0, compost_from_food_and_garden_WD = 0, compost_waste_disposal = c("Anaerobic digestion", "Combustion", "Composting", "Landfill"), aluminuim_cans_WD = 0, aluminuim_foil_WD = 0, mixed_cans_WD = 0, scrap_WD = 0, steel_cans_WD = 0, metal_waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"), board_WD = 0, mixed_WD = 0, paper_WD = 0, paper_waste_disposal = c("Closed-loop", "Combustion", "Composting", "Landfill"), average_WD = 0, average_film_WD = 0, average_rigid_WD = 0, HDPE_WD = 0, LDPE_WD = 0, LLDPE_WD = 0, PET_WD = 0, PP_WD = 0, PS_WD = 0, PVC_WD = 0, plastic_waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"), fridges_WD = 0, freezers_WD = 0, large_electrical_WD = 0, IT_WD = 0, small_electrical_WD = 0, alkaline_batteries_WD = 0, LiIon_batteries_WD = 0, NiMh_batteries_WD = 0, electric_waste_disposal = c("Landfill", "Open-loop"), units = c("kg", "tonnes") )
glass |
Numeric value representing the amount of glass. Default is |
clothing |
Numeric value representing the amount of clothing. Default is |
food |
Numeric value representing the amount of food. Default is |
drink |
Numeric value representing the amount of drink. Default is |
compost_from_garden |
Numeric value representing the amount of compost from garden waste. Default is |
compost_from_food_and_garden |
Numeric value representing the amount of compost from food and garden waste. Default is |
board |
Numeric value indicating the weight of paperboard. Default is |
mixed |
Numeric value indicating the weight of mixed paper. Default is |
paper |
Numeric value indicating the weight of paper. Default is |
fridges |
Numeric value indicating the weight of fridges. Default is |
freezers |
Numeric value indicating the weight of freezers. Default is |
large_electrical |
Numeric value indicating the weight of large electrical items. Default is |
IT |
Numeric value indicating the weight of IT (Information Technology) equipment. Default is |
small_electrical |
Numeric value indicating the weight of small electrical items. Default is |
alkaline_batteries |
Numeric value indicating the weight of alkaline batteries. Default is |
LiIon_batteries |
Numeric value indicating the weight of Lithium-ion batteries. Default is |
NiMh_batteries |
Numeric value indicating the weight of Nickel Metal Hydride batteries. Default is |
aluminuim_cans |
Numeric value indicating the weight of aluminum cans. Default is |
aluminuim_foil |
Numeric value indicating the weight of aluminum foil. Default is |
mixed_cans |
Numeric value indicating the weight of mixed metal cans. Default is |
scrap |
Numeric value indicating the weight of metal scrap. Default is |
steel_cans |
Numeric value indicating the weight of steel cans. Default is |
average |
Numeric value indicating the weight of average plastic. Default is |
average_film |
Numeric value indicating the weight of average film plastic. Default is |
average_rigid |
Numeric value indicating the weight of average rigid plastic. Default is |
HDPE |
Numeric value indicating the weight of HDPE plastic. Default is |
LDPE |
Numeric value indicating the weight of LDPE plastic. Default is |
LLDPE |
Numeric value indicating the weight of LLDPE plastic. Default is |
PET |
Numeric value indicating the weight of PET plastic. Default is |
PP |
Numeric value indicating the weight of PP plastic. Default is |
PS |
Numeric value indicating the weight of PS plastic. Default is |
PVC |
Numeric value indicating the weight of PVC plastic. Default is |
glass_WD |
Numeric value representing the amount of glass waste with disposal. Default is |
books_WD |
Numeric value representing the amount of books waste with disposal. Default is |
clothing_WD |
Numeric value representing the amount of clothing waste with disposal. Default is |
gcb_waste_disposal |
Character value specifying the waste disposal method for glass, clothing, and books waste (options: |
household_residual_waste |
Numeric value representing the amount of household residual waste. Default is |
hh_waste_disposal |
Character value specifying the waste disposal method for waste (options: |
food_WD |
Numeric value indicating the weight of food disposed of using waste disposal methods. Default is |
drink_WD |
Numeric value indicating the weight of drink disposed of using waste disposal methods. Default is |
compost_from_garden_WD |
Numeric value indicating the weight of compost from garden waste disposed of using waste disposal methods. Default is |
compost_from_food_and_garden_WD |
Numeric value indicating the weight of compost from garden and food waste disposed of using waste disposal methods. Default is |
compost_waste_disposal |
Character value specifying the waste disposal method for compost waste (options: |
aluminuim_cans_WD |
Numeric value indicating the weight of aluminum cans disposed of using waste disposal methods. Default is |
aluminuim_foil_WD |
Numeric value indicating the weight of aluminum foil disposed of using waste disposal methods. Default is |
mixed_cans_WD |
Numeric value indicating the weight of mixed metal cans disposed of using waste disposal methods. Default is |
scrap_WD |
Numeric value indicating the weight of metal scrap disposed of using waste disposal methods. Default is |
steel_cans_WD |
Numeric value indicating the weight of steel cans disposed of using waste disposal methods. Default is |
metal_waste_disposal |
Character vector specifying the waste disposal method to use for metal for calculating emissions. Possible values: "Closed-loop", "Combustion", "Landfill", "Open-loop". Default is "Closed-loop". See |
board_WD |
Numeric value indicating the weight of paperboard disposed of using waste disposal methods. Default is |
mixed_WD |
Numeric value indicating the weight of mixed paper disposed of using waste disposal methods. Default is |
paper_WD |
Numeric value indicating the weight of paper disposed of using waste disposal methods. Default is |
paper_waste_disposal |
Character vector specifying the waste disposal method for paper to use for calculating emissions. Possible values: |
average_WD |
Numeric value indicating the weight of average plastic disposed of using waste disposal methods. Default is |
average_film_WD |
Numeric value indicating the weight of average film plastic disposed of using waste disposal methods. Default is |
average_rigid_WD |
Numeric value indicating the weight of average rigid plastic disposed of using waste disposal methods. Default is |
HDPE_WD |
Numeric value indicating the weight of HDPE plastic disposed of using waste disposal methods. Default is |
LDPE_WD |
Numeric value indicating the weight of LDPE plastic disposed of using waste disposal methods. Default is |
LLDPE_WD |
Numeric value indicating the weight of LLDPE plastic disposed of using waste disposal methods. Default is |
PET_WD |
Numeric value indicating the weight of PET plastic disposed of using waste disposal methods. Default is |
PP_WD |
Numeric value indicating the weight of PP plastic disposed of using waste disposal methods. Default is |
PS_WD |
Numeric value indicating the weight of PS plastic disposed of using waste disposal methods. Default is |
PVC_WD |
Numeric value indicating the weight of PVC plastic disposed of using waste disposal methods. Default is |
plastic_waste_disposal |
Character vector specifying the waste disposal method for plastic to use for calculating emissions. Possible values: |
fridges_WD |
Numeric value indicating the weight of fridges disposed of using waste disposal methods. Default is |
freezers_WD |
Numeric value indicating the weight of freezers disposed of using waste disposal methods. Default is |
large_electrical_WD |
Numeric value indicating the weight of large electrical items disposed of using waste disposal methods. Default is |
IT_WD |
Numeric value indicating the weight of IT equipment disposed of using waste disposal methods. Default is |
small_electrical_WD |
Numeric value indicating the weight of small electrical items disposed of using waste disposal methods. Default is |
alkaline_batteries_WD |
Numeric value indicating the weight of alkaline batteries disposed of using waste disposal methods. Default is |
LiIon_batteries_WD |
Numeric value indicating the weight of Lithium-ion batteries disposed of using waste disposal methods. Default is |
NiMh_batteries_WD |
Numeric value indicating the weight of Nickel Metal Hydride batteries disposed of using waste disposal methods. Default is |
electric_waste_disposal |
Character vector specifying the waste disposal method for electrical items to use for calculating emissions. Possible values: |
units |
Character vector specifying the units of the emissions output. Possible values: |
*_waste_disposal
methods:
"Open-loop"
is the process of recycling material into other products.
"Closed-loop"
is the process of recycling material back into the same product.
"Combustion"
energy is recovered from the waste through incineration and subsequent generation of electricity.
"Compost"
CO2e emitted as a result of composting a waste stream.
"Landfill"
the product goes to landfill after use.
"Anaerobic digestion"
energy is recovered from the waste through anaerobic digestion.
The calculated household emissions as a numeric value in tonnes.
household_emissions(glass = 100, clothing = 10, glass_WD = 10, units = "kg")
household_emissions(glass = 100, clothing = 10, glass_WD = 10, units = "kg")
This function uses the downloaded data from the World Bank Carbon Pricing Dashboard (https://carbonpricingdashboard.worldbank.org/). It imports data from an Excel file containing CPI (Carbon Price Index) data. It filters the data for ETS (Emissions Trading Scheme) instruments, performs necessary transformations, and returns a processed data frame.
import_CPI(path, sheet = "Data_Price", skip = 2)
import_CPI(path, sheet = "Data_Price", skip = 2)
path |
A character string specifying the file path of the Excel file. |
sheet |
A character string specifying the name of the sheet in the Excel file to read data from. |
skip |
An integer specifying the number of rows to skip while reading the Excel sheet. |
A processed data frame containing CPI data.
A function that calculates CO2e emissions on a journey on land.
land_emissions( distance, units = c("miles", "km"), num = 1, vehicle = c("Cars", "Motorbike", "Taxis", "Bus", "National rail", "International rail", "Light rail and tram", "London Underground", "Coach"), fuel = c("Petrol", "Diesel", "Unknown", "Battery Electric Vehicle", "Plug-in Hybrid Electric Vehicle"), car_type = c("Average car", "Small car", "Medium car", "Large car", "Mini", "Supermini", "Lower medium", "Upper medium", "Executive", "Luxury", "Sports", "Dual purpose 4X4", "MPV"), bike_type = c("Average", "Small", "Medium", "Large"), bus_type = c("Local bus (not London)", "Local London bus", "Average local bus"), taxi_type = c("Regular taxi", "Black cab"), TD = TRUE, include_WTT = TRUE, include_electricity = TRUE, owned_by_org = TRUE )
land_emissions( distance, units = c("miles", "km"), num = 1, vehicle = c("Cars", "Motorbike", "Taxis", "Bus", "National rail", "International rail", "Light rail and tram", "London Underground", "Coach"), fuel = c("Petrol", "Diesel", "Unknown", "Battery Electric Vehicle", "Plug-in Hybrid Electric Vehicle"), car_type = c("Average car", "Small car", "Medium car", "Large car", "Mini", "Supermini", "Lower medium", "Upper medium", "Executive", "Luxury", "Sports", "Dual purpose 4X4", "MPV"), bike_type = c("Average", "Small", "Medium", "Large"), bus_type = c("Local bus (not London)", "Local London bus", "Average local bus"), taxi_type = c("Regular taxi", "Black cab"), TD = TRUE, include_WTT = TRUE, include_electricity = TRUE, owned_by_org = TRUE )
distance |
Distance in km or miles of the journey made (this can be calculated with other tools, such as google maps.). |
units |
Units for the distance travelled. Options are |
num |
Number of passengers if |
vehicle |
Vehicle used for the journey. Options are |
fuel |
Fuel type used for the journey. For car, |
car_type |
Size/type of vehicle for car.
Options are |
bike_type |
Size of vehicle for motorbike.
Options are |
bus_type |
Options are |
taxi_type |
Whether a taxi is regular or black cab. Options are |
TD |
logical.Whether to account for transmission and distribution (TD) for electric vehicles (only |
include_WTT |
logical. Well-to-tank (include_WTT) - whether to account for emissions associated with extraction, refining and transportation of the fuels (for non-electric vehicles). |
include_electricity |
logical. Whether to account for ... for electric vehicles (car and van). |
owned_by_org |
logical. Whether the vehicle used is owned by the organisation or not (only for |
Tonnes of CO2e emissions per mile travelled.
# Emissions for a 100 mile car journey land_emissions(distance = 100) # Emissions for a 100 mile motorbike journey where the motorbike is 500+cc land_emissions(distance = 100, vehicle = "Motorbike", bike_type = "Large")
# Emissions for a 100 mile car journey land_emissions(distance = 100) # Emissions for a 100 mile motorbike journey where the motorbike is 500+cc land_emissions(distance = 100, vehicle = "Motorbike", bike_type = "Large")
Material (and waste) emissions
material_emissions( glass = 0, board = 0, mixed = 0, paper = 0, fridges = 0, freezers = 0, large_electrical = 0, IT = 0, small_electrical = 0, alkaline_batteries = 0, LiIon_batteries = 0, NiMh_batteries = 0, aluminuim_cans = 0, aluminuim_foil = 0, mixed_cans = 0, scrap = 0, steel_cans = 0, average = 0, average_film = 0, average_rigid = 0, HDPE = 0, LDPE = 0, LLDPE = 0, PET = 0, PP = 0, PS = 0, PVC = 0, glass_WD = 0, glass_waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"), industrial_waste = 0, industrial_waste_disposal = c("Combustion", "Landfill"), aluminuim_cans_WD = 0, aluminuim_foil_WD = 0, mixed_cans_WD = 0, scrap_WD = 0, steel_cans_WD = 0, metal_waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"), board_WD = 0, mixed_WD = 0, paper_WD = 0, paper_waste_disposal = c("Closed-loop", "Combustion", "Composting", "Landfill"), average_WD = 0, average_film_WD = 0, average_rigid_WD = 0, HDPE_WD = 0, LDPE_WD = 0, LLDPE_WD = 0, PET_WD = 0, PP_WD = 0, PS_WD = 0, PVC_WD = 0, plastic_waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"), fridges_WD = 0, freezers_WD = 0, large_electrical_WD = 0, IT_WD = 0, small_electrical_WD = 0, alkaline_batteries_WD = 0, LiIon_batteries_WD = 0, NiMh_batteries_WD = 0, electric_waste_disposal = c("Landfill", "Open-loop"), aggregates = 0, construction_average = 0, asbestos = 0, asphalt = 0, bricks = 0, concrete = 0, insulation = 0, metals = 0, soils = 0, mineral_oil = 0, plasterboard = 0, tyres = 0, wood = 0, aggregates_WD = 0, construction_average_WD = 0, asbestos_WD = 0, asphalt_WD = 0, bricks_WD = 0, concrete_WD = 0, insulation_WD = 0, metals_WD = 0, soils_WD = 0, mineral_oil_WD = 0, plasterboard_WD = 0, tyres_WD = 0, wood_WD = 0, construction_waste_disposal = c("Closed-loop", "Combustion", "Composting", "Landfill", "Open-loop"), construction_units = c("kg", "tonnes"), metal_units = c("kg", "tonnes"), glass_units = c("kg", "tonnes"), paper_units = c("kg", "tonnes"), plastic_units = c("kg", "tonnes"), electrical_units = c("kg", "tonnes") )
material_emissions( glass = 0, board = 0, mixed = 0, paper = 0, fridges = 0, freezers = 0, large_electrical = 0, IT = 0, small_electrical = 0, alkaline_batteries = 0, LiIon_batteries = 0, NiMh_batteries = 0, aluminuim_cans = 0, aluminuim_foil = 0, mixed_cans = 0, scrap = 0, steel_cans = 0, average = 0, average_film = 0, average_rigid = 0, HDPE = 0, LDPE = 0, LLDPE = 0, PET = 0, PP = 0, PS = 0, PVC = 0, glass_WD = 0, glass_waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"), industrial_waste = 0, industrial_waste_disposal = c("Combustion", "Landfill"), aluminuim_cans_WD = 0, aluminuim_foil_WD = 0, mixed_cans_WD = 0, scrap_WD = 0, steel_cans_WD = 0, metal_waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"), board_WD = 0, mixed_WD = 0, paper_WD = 0, paper_waste_disposal = c("Closed-loop", "Combustion", "Composting", "Landfill"), average_WD = 0, average_film_WD = 0, average_rigid_WD = 0, HDPE_WD = 0, LDPE_WD = 0, LLDPE_WD = 0, PET_WD = 0, PP_WD = 0, PS_WD = 0, PVC_WD = 0, plastic_waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"), fridges_WD = 0, freezers_WD = 0, large_electrical_WD = 0, IT_WD = 0, small_electrical_WD = 0, alkaline_batteries_WD = 0, LiIon_batteries_WD = 0, NiMh_batteries_WD = 0, electric_waste_disposal = c("Landfill", "Open-loop"), aggregates = 0, construction_average = 0, asbestos = 0, asphalt = 0, bricks = 0, concrete = 0, insulation = 0, metals = 0, soils = 0, mineral_oil = 0, plasterboard = 0, tyres = 0, wood = 0, aggregates_WD = 0, construction_average_WD = 0, asbestos_WD = 0, asphalt_WD = 0, bricks_WD = 0, concrete_WD = 0, insulation_WD = 0, metals_WD = 0, soils_WD = 0, mineral_oil_WD = 0, plasterboard_WD = 0, tyres_WD = 0, wood_WD = 0, construction_waste_disposal = c("Closed-loop", "Combustion", "Composting", "Landfill", "Open-loop"), construction_units = c("kg", "tonnes"), metal_units = c("kg", "tonnes"), glass_units = c("kg", "tonnes"), paper_units = c("kg", "tonnes"), plastic_units = c("kg", "tonnes"), electrical_units = c("kg", "tonnes") )
glass |
Numeric value representing the amount of glass. Default is |
board |
Numeric value indicating the weight of paperboard. Default is |
mixed |
Numeric value indicating the weight of mixed paper. Default is |
paper |
Numeric value indicating the weight of paper. Default is |
fridges |
Numeric value indicating the weight of fridges. Default is |
freezers |
Numeric value indicating the weight of freezers. Default is |
large_electrical |
Numeric value indicating the weight of large electrical items. Default is |
IT |
Numeric value indicating the weight of IT (Information Technology) equipment. Default is |
small_electrical |
Numeric value indicating the weight of small electrical items. Default is |
alkaline_batteries |
Numeric value indicating the weight of alkaline batteries. Default is |
LiIon_batteries |
Numeric value indicating the weight of Lithium-ion batteries. Default is |
NiMh_batteries |
Numeric value indicating the weight of Nickel Metal Hydride batteries. Default is |
aluminuim_cans |
Numeric value indicating the weight of aluminum cans. Default is |
aluminuim_foil |
Numeric value indicating the weight of aluminum foil. Default is |
mixed_cans |
Numeric value indicating the weight of mixed metal cans. Default is |
scrap |
Numeric value indicating the weight of metal scrap. Default is |
steel_cans |
Numeric value indicating the weight of steel cans. Default is |
average |
Numeric value indicating the weight of average plastic. Default is |
average_film |
Numeric value indicating the weight of average film plastic. Default is |
average_rigid |
Numeric value indicating the weight of average rigid plastic. Default is |
HDPE |
Numeric value indicating the weight of HDPE plastic. Default is |
LDPE |
Numeric value indicating the weight of LDPE plastic. Default is |
LLDPE |
Numeric value indicating the weight of LLDPE plastic. Default is |
PET |
Numeric value indicating the weight of PET plastic. Default is |
PP |
Numeric value indicating the weight of PP plastic. Default is |
PS |
Numeric value indicating the weight of PS plastic. Default is |
PVC |
Numeric value indicating the weight of PVC plastic. Default is |
glass_WD |
Numeric value representing the amount of glass waste with disposal. Default is |
glass_waste_disposal |
Character vector specifying the waste disposal method to use for metal for calculating emissions. Possible values: |
industrial_waste |
Numeric value representing the amount of household residual waste. Default is |
industrial_waste_disposal |
Character vector specifying the waste disposal method to use for metal for calculating emissions. Possible values: |
aluminuim_cans_WD |
Numeric value indicating the weight of aluminum cans disposed of using waste disposal methods. Default is |
aluminuim_foil_WD |
Numeric value indicating the weight of aluminum foil disposed of using waste disposal methods. Default is |
mixed_cans_WD |
Numeric value indicating the weight of mixed metal cans disposed of using waste disposal methods. Default is |
scrap_WD |
Numeric value indicating the weight of metal scrap disposed of using waste disposal methods. Default is |
steel_cans_WD |
Numeric value indicating the weight of steel cans disposed of using waste disposal methods. Default is |
metal_waste_disposal |
Character vector specifying the waste disposal method to use for metal for calculating emissions. Possible values: |
board_WD |
Numeric value indicating the weight of paperboard disposed of using waste disposal methods. Default is |
mixed_WD |
Numeric value indicating the weight of mixed paper disposed of using waste disposal methods. Default is |
paper_WD |
Numeric value indicating the weight of paper disposed of using waste disposal methods. Default is |
paper_waste_disposal |
Character vector specifying the waste disposal method for paper to use for calculating emissions. Possible values: |
average_WD |
Numeric value indicating the weight of average plastic disposed of using waste disposal methods. Default is |
average_film_WD |
Numeric value indicating the weight of average film plastic disposed of using waste disposal methods. Default is |
average_rigid_WD |
Numeric value indicating the weight of average rigid plastic disposed of using waste disposal methods. Default is |
HDPE_WD |
Numeric value indicating the weight of HDPE plastic disposed of using waste disposal methods. Default is |
LDPE_WD |
Numeric value indicating the weight of LDPE plastic disposed of using waste disposal methods. Default is |
LLDPE_WD |
Numeric value indicating the weight of LLDPE plastic disposed of using waste disposal methods. Default is |
PET_WD |
Numeric value indicating the weight of PET plastic disposed of using waste disposal methods. Default is |
PP_WD |
Numeric value indicating the weight of PP plastic disposed of using waste disposal methods. Default is |
PS_WD |
Numeric value indicating the weight of PS plastic disposed of using waste disposal methods. Default is |
PVC_WD |
Numeric value indicating the weight of PVC plastic disposed of using waste disposal methods. Default is |
plastic_waste_disposal |
Character vector specifying the waste disposal method for plastic to use for calculating emissions. Possible values: |
fridges_WD |
Numeric value indicating the weight of fridges disposed of using waste disposal methods. Default is |
freezers_WD |
Numeric value indicating the weight of freezers disposed of using waste disposal methods. Default is |
large_electrical_WD |
Numeric value indicating the weight of large electrical items disposed of using waste disposal methods. Default is |
IT_WD |
Numeric value indicating the weight of IT equipment disposed of using waste disposal methods. Default is |
small_electrical_WD |
Numeric value indicating the weight of small electrical items disposed of using waste disposal methods. Default is |
alkaline_batteries_WD |
Numeric value indicating the weight of alkaline batteries disposed of using waste disposal methods. Default is |
LiIon_batteries_WD |
Numeric value indicating the weight of Lithium-ion batteries disposed of using waste disposal methods. Default is |
NiMh_batteries_WD |
Numeric value indicating the weight of Nickel Metal Hydride batteries disposed of using waste disposal methods. Default is |
electric_waste_disposal |
Character vector specifying the waste disposal method for electrical items to use for calculating emissions. Possible values: |
aggregates |
The weight of aggregates used in construction. Default is |
construction_average |
The weight of average material used in construction. Default is |
asbestos |
The weight of asbestos used in construction. Default is |
asphalt |
The weight of asphalt used in construction. Default is |
bricks |
The weight of bricks used in construction. Default is |
concrete |
The weight of concrete used in construction. Default is |
insulation |
The weight of insulation material used in construction. Default is |
metals |
The weight of metals used in construction. Default is |
soils |
The weight of soils used in construction. Default is |
mineral_oil |
The weight of mineral oil used in construction. Default is |
plasterboard |
The weight of plasterboard used in construction. Default is |
tyres |
The weight of tyres used in construction. Default is |
wood |
The weight of wood used in construction. Default is |
aggregates_WD |
The weight of aggregates disposed of as waste. Default is |
construction_average_WD |
The weight of average material disposed of as waste. Default is |
asbestos_WD |
The weight of asbestos disposed of as waste. Default is |
asphalt_WD |
The weight of asphalt disposed of as waste. Default is |
bricks_WD |
The weight of bricks disposed of as waste. Default is |
concrete_WD |
The weight of concrete disposed of as waste. Default is |
insulation_WD |
The weight of insulation material disposed of as waste. Default is |
metals_WD |
The weight of metals disposed of as waste. Default is |
soils_WD |
The weight of soils disposed of as waste. Default is |
mineral_oil_WD |
The weight of mineral oil disposed of as waste. Default is |
plasterboard_WD |
The weight of plasterboard disposed of as waste. Default is |
tyres_WD |
The weight of tyres disposed of as waste. Default is |
wood_WD |
The weight of wood disposed of as waste. Default is |
construction_waste_disposal |
Character vector specifying the waste disposal method for electrical items to use for calculating emissions. Options are, |
construction_units |
Character vector specifying the units of the emissions related to construction. Possible values: |
metal_units |
Character vector specifying the units of the emissions related to metal. Possible values: |
glass_units |
Character vector specifying the units of the emissions related to glass. Possible values: |
paper_units |
Character vector specifying the units of the emissions related to paper. Possible values: |
plastic_units |
Character vector specifying the units of the emissions related to plastic materials. Possible values: |
electrical_units |
Character vector specifying the units of the emissions related to electrical materials. Possible values: |
*_waste_disposal
methods:
"Open-loop"
is the process of recycling material into other products.
"Closed-loop"
is the process of recycling material back into the same product.
"Combustion"
energy is recovered from the waste through incineration and subsequent generation of electricity.
"Compost"
CO2e emitted as a result of composting a waste stream.
"Landfill"
the product goes to landfill after use.
"Anaerobic digestion"
energy is recovered from the waste through anaerobic digestion.
The calculated household emissions as a numeric value in tonnes.
material_emissions(glass = 100, glass_WD = 10, glass_units = "kg")
material_emissions(glass = 100, glass_WD = 10, glass_units = "kg")
This function calculates the emissions produced from different metal sources based on the specified inputs. It considers emissions from primary material production and waste disposal of various metal types.
metal_emissions( aluminuim_cans = 0, aluminuim_foil = 0, mixed_cans = 0, scrap = 0, steel_cans = 0, aluminuim_cans_WD = 0, aluminuim_foil_WD = 0, mixed_cans_WD = 0, scrap_WD = 0, steel_cans_WD = 0, waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"), units = c("kg", "tonnes") )
metal_emissions( aluminuim_cans = 0, aluminuim_foil = 0, mixed_cans = 0, scrap = 0, steel_cans = 0, aluminuim_cans_WD = 0, aluminuim_foil_WD = 0, mixed_cans_WD = 0, scrap_WD = 0, steel_cans_WD = 0, waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"), units = c("kg", "tonnes") )
aluminuim_cans |
Numeric value indicating the weight of aluminum cans. Default is |
aluminuim_foil |
Numeric value indicating the weight of aluminum foil. Default is |
mixed_cans |
Numeric value indicating the weight of mixed metal cans. Default is |
scrap |
Numeric value indicating the weight of metal scrap. Default is |
steel_cans |
Numeric value indicating the weight of steel cans. Default is |
aluminuim_cans_WD |
Numeric value indicating the weight of aluminum cans disposed of using waste disposal methods. Default is |
aluminuim_foil_WD |
Numeric value indicating the weight of aluminum foil disposed of using waste disposal methods. Default is |
mixed_cans_WD |
Numeric value indicating the weight of mixed metal cans disposed of using waste disposal methods. Default is |
scrap_WD |
Numeric value indicating the weight of metal scrap disposed of using waste disposal methods. Default is |
steel_cans_WD |
Numeric value indicating the weight of steel cans disposed of using waste disposal methods. Default is |
waste_disposal |
Character vector specifying the waste disposal method to use for calculating emissions. Possible values: "Closed-loop", "Combustion", "Landfill", "Open-loop". Default is "Closed-loop".
|
units |
Character vector specifying the units of the emissions output. Possible values: "kg", "tonnes". Default is "kg". |
The function returns the calculated CO2-equivalent emissions as a numeric value in tonnes.
metal_emissions(aluminuim_cans = 1.4, units = "tonnes")
metal_emissions(aluminuim_cans = 1.4, units = "tonnes")
Office emissions
office_emissions( specify = FALSE, office_num = 1, WFH_num = 0, WFH_hours = 0, WFH_type = c("Office Equipment", "Heating"), water_supply = 0, water_trt = TRUE, water_unit = c("cubic metres", "million litres"), electricity_kWh = 0, electricity_TD = TRUE, electricity_WTT = TRUE, heat_kWh = 0, heat_TD = TRUE, heat_WTT = TRUE )
office_emissions( specify = FALSE, office_num = 1, WFH_num = 0, WFH_hours = 0, WFH_type = c("Office Equipment", "Heating"), water_supply = 0, water_trt = TRUE, water_unit = c("cubic metres", "million litres"), electricity_kWh = 0, electricity_TD = TRUE, electricity_WTT = TRUE, heat_kWh = 0, heat_TD = TRUE, heat_WTT = TRUE )
specify |
logical. Whether an average should be used, or if the amount of energy used will be specified. |
office_num |
If |
WFH_num |
Number of people working from home. |
WFH_hours |
Number of hours working from home (per individual). |
WFH_type |
Whether to account for |
water_supply |
Amount of water used in the office. |
water_trt |
logical. Default |
water_unit |
Unit for |
electricity_kWh |
Electricity used in kWh. |
electricity_TD |
logical. Default |
electricity_WTT |
logical. Default |
heat_kWh |
heat and steam used in kWh. |
heat_TD |
logical. Default |
heat_WTT |
logical. Default |
Returns CO2e emissions in tonnes.
Descriptions from 2022 UK Government Report: https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2022
# specify emissions in an office office_emissions(specify = TRUE, electricity_kWh = 200, heat_kWh = 100, water_supply = 100, water_trt = FALSE)
# specify emissions in an office office_emissions(specify = TRUE, electricity_kWh = 200, heat_kWh = 100, water_supply = 100, water_trt = FALSE)
This function generates a grid of plots and tables, including a value box, data table, relative GPI plot, and total output plot.
output_display( data = x$data, time = time, date_format = c("%d/%m/%Y"), name = theatre, relative_gpi_val = emissions, gti_by = c("default", "month", "year"), plot_val = carbon_price_credit, plot_by = "default", pdf = TRUE )
output_display( data = x$data, time = time, date_format = c("%d/%m/%Y"), name = theatre, relative_gpi_val = emissions, gti_by = c("default", "month", "year"), plot_val = carbon_price_credit, plot_by = "default", pdf = TRUE )
data |
The data frame containing the data. |
time |
The variable representing the time dimension. |
date_format |
The date format for the time variable (optional, default: "%d/%m/%Y"). |
name |
The variable representing the grouping variable. |
relative_gpi_val |
The variable representing the relative GPI (Growth to Previous Index) value. |
gti_by |
The grouping type for calculating the GTI ("default", "month", "year"). |
plot_val |
The variable to plot in the total output plot. |
plot_by |
The grouping type for the total output plot ("default", "month", "year"). |
pdf |
Whether to export the plots to a PDF file (default: TRUE). |
The function utilises other auxiliary functions such as relative_gti() and total_output().
A grid of plots and tables showing the value box, data table, relative GPI plot, and total output plot.
This function calculates the emissions produced from different paper sources based on the specified inputs. It considers emissions from primary material production and waste disposal of paper materials.
paper_emissions( board = 0, mixed = 0, paper = 0, board_WD = 0, mixed_WD = 0, paper_WD = 0, waste_disposal = c("Closed-loop", "Combustion", "Composting", "Landfill"), units = c("kg", "tonnes") )
paper_emissions( board = 0, mixed = 0, paper = 0, board_WD = 0, mixed_WD = 0, paper_WD = 0, waste_disposal = c("Closed-loop", "Combustion", "Composting", "Landfill"), units = c("kg", "tonnes") )
board |
Numeric value indicating the weight of paperboard. Default is |
mixed |
Numeric value indicating the weight of mixed paper. Default is |
paper |
Numeric value indicating the weight of paper. Default is |
board_WD |
Numeric value indicating the weight of paperboard disposed of using waste disposal methods. Default is |
mixed_WD |
Numeric value indicating the weight of mixed paper disposed of using waste disposal methods. Default is |
paper_WD |
Numeric value indicating the weight of paper disposed of using waste disposal methods. Default is |
waste_disposal |
Character vector specifying the waste disposal method to use for calculating emissions. Possible values: |
units |
Character vector specifying the units of the emissions output. Possible values: |
The function returns the calculated paper emissions as a numeric value in tonnes.
paper_emissions(board = 10, board_WD = 10, paper = 100, paper_WD = 100, units = "kg")
paper_emissions(board = 10, board_WD = 10, paper = 100, paper_WD = 100, units = "kg")
This function calculates the emissions produced from different plastic sources based on the specified inputs. It considers emissions from primary material production and waste disposal of plastic materials.
plastic_emissions( average = 0, average_film = 0, average_rigid = 0, HDPE = 0, LDPE = 0, LLDPE = 0, PET = 0, PP = 0, PS = 0, PVC = 0, average_WD = 0, average_film_WD = 0, average_rigid_WD = 0, HDPE_WD = 0, LDPE_WD = 0, LLDPE_WD = 0, PET_WD = 0, PP_WD = 0, PS_WD = 0, PVC_WD = 0, waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"), units = c("kg", "tonnes") )
plastic_emissions( average = 0, average_film = 0, average_rigid = 0, HDPE = 0, LDPE = 0, LLDPE = 0, PET = 0, PP = 0, PS = 0, PVC = 0, average_WD = 0, average_film_WD = 0, average_rigid_WD = 0, HDPE_WD = 0, LDPE_WD = 0, LLDPE_WD = 0, PET_WD = 0, PP_WD = 0, PS_WD = 0, PVC_WD = 0, waste_disposal = c("Closed-loop", "Combustion", "Landfill", "Open-loop"), units = c("kg", "tonnes") )
average |
Numeric value indicating the weight of average plastic. Default is |
average_film |
Numeric value indicating the weight of average film plastic. Default is |
average_rigid |
Numeric value indicating the weight of average rigid plastic. Default is |
HDPE |
Numeric value indicating the weight of HDPE plastic. Default is |
LDPE |
Numeric value indicating the weight of LDPE plastic. Default is |
LLDPE |
Numeric value indicating the weight of LLDPE plastic. Default is |
PET |
Numeric value indicating the weight of PET plastic. Default is |
PP |
Numeric value indicating the weight of PP plastic. Default is |
PS |
Numeric value indicating the weight of PS plastic. Default is |
PVC |
Numeric value indicating the weight of PVC plastic. Default is |
average_WD |
Numeric value indicating the weight of average plastic disposed of using waste disposal methods. Default is |
average_film_WD |
Numeric value indicating the weight of average film plastic disposed of using waste disposal methods. Default is |
average_rigid_WD |
Numeric value indicating the weight of average rigid plastic disposed of using waste disposal methods. Default is |
HDPE_WD |
Numeric value indicating the weight of HDPE plastic disposed of using waste disposal methods. Default is |
LDPE_WD |
Numeric value indicating the weight of LDPE plastic disposed of using waste disposal methods. Default is |
LLDPE_WD |
Numeric value indicating the weight of LLDPE plastic disposed of using waste disposal methods. Default is |
PET_WD |
Numeric value indicating the weight of PET plastic disposed of using waste disposal methods. Default is |
PP_WD |
Numeric value indicating the weight of PP plastic disposed of using waste disposal methods. Default is |
PS_WD |
Numeric value indicating the weight of PS plastic disposed of using waste disposal methods. Default is |
PVC_WD |
Numeric value indicating the weight of PVC plastic disposed of using waste disposal methods. Default is |
waste_disposal |
Character vector specifying the waste disposal method to use for calculating emissions. Possible values: |
units |
Character vector specifying the units of the emissions output. Possible values: |
The calculated plastic emissions as a numeric value in tonnes.
# Calculate plastic emissions using default values plastic_emissions() # Calculate plastic emissions with specific quantities and waste disposal # method plastic_emissions(average = 100, HDPE = 50, PET = 25, waste_disposal = "Combustion", units = "tonnes")
# Calculate plastic emissions using default values plastic_emissions() # Calculate plastic emissions with specific quantities and waste disposal # method plastic_emissions(average = 100, HDPE = 50, PET = 25, waste_disposal = "Combustion", units = "tonnes")
A function that calculates CO2e emissions between train stations in the UK.
rail_emissions( from, to, via = NULL, num_people = 1, times_journey = 1, include_WTT = TRUE, round_trip = FALSE )
rail_emissions( from, to, via = NULL, num_people = 1, times_journey = 1, include_WTT = TRUE, round_trip = FALSE )
from |
Station departing from. |
to |
Station arriving to |
via |
Optional. Takes a vector containing the stations the train travels via. |
num_people |
Number of people taking the journey. Takes a single numerical value. |
times_journey |
Number of times the journey is taken. |
include_WTT |
logical. Recommended |
round_trip |
Whether the journey is one-way or return. |
The distances are calculated using the Haversine formula. This is calculated as the crow flies. As a result, inputting the "via" journeys will make for a more reliable function.
Returns CO2e emissions in tonnes for the train journey.
# Emissions for a train journey between Southampton Central and # Manchester Piccadilly Station rail_emissions("Southampton Central", "Manchester Piccadilly") # Emissions for a train journey between Bristol Temple Meads and # London Paddington via Bath, Swindon, and Reading # Use the \code{rail_finder} function to find the name of London Paddington rail_finder(region = "London") # Then calculate emissions rail_emissions("Bristol Temple Meads", "Paddington", via = c("Bath Spa", "Swindon", "Reading"))
# Emissions for a train journey between Southampton Central and # Manchester Piccadilly Station rail_emissions("Southampton Central", "Manchester Piccadilly") # Emissions for a train journey between Bristol Temple Meads and # London Paddington via Bath, Swindon, and Reading # Use the \code{rail_finder} function to find the name of London Paddington rail_finder(region = "London") # Then calculate emissions rail_emissions("Bristol Temple Meads", "Paddington", via = c("Bath Spa", "Swindon", "Reading"))
Find the name, area, and code of a train station in the UK. For use in the rail_emissions
function.
rail_finder( station, region, county, district, station_code, distance = 0.1, ignore.case = FALSE )
rail_finder( station, region, county, district, station_code, distance = 0.1, ignore.case = FALSE )
station |
Name of train station. |
region |
Region the train station is in. One of |
county |
County the train station is in. |
district |
District the train station is in. |
station_code |
Code of the train station. |
distance |
Maximum distance allowed for a match between the name/country/city given, and that of the value in the data set. |
ignore.case |
If |
Data frame containing the station code, station name, region, county, district, latitude, and longitude of a train station in the UK.
# Can get the station code from the station. Gets similar matches. rail_finder(station = "Bristo") # Can get the code from the station and city. rail_finder(station = "Bristo", county = "Bristol") # Can find the name and district of a train station given the IATA code rail_finder(station_code = "BRI")
# Can get the station code from the station. Gets similar matches. rail_finder(station = "Bristo") # Can get the code from the station and city. rail_finder(station = "Bristo", county = "Bristol") # Can find the name and district of a train station given the IATA code rail_finder(station_code = "BRI")
Raw Fuels Emissions
raw_fuels( num_people = 1, butane = 0, CNG = 0, LPG = 0, LNG = 0, natural_gas = 0, natural_gas_mineral = 0, other_petroleum_gas = 0, propane = 0, aviation = 0, aviation_fuel = 0, burning_oil = 0, diesel = 0, diesel_mineral = 0, fuel_oil = 0, gas_oil = 0, lubricants = 0, naptha = 0, petrol_biofuel = 0, petrol_mineral = 0, residual_oil = 0, distillate = 0, refinery_miscellaneous = 0, waste_oils = 0, marine_gas = 0, marine_fuel = 0, coal_industrial = 0, coal_electricity_gen = 0, coal_domestic = 0, coking_coal = 0, petroleum_coke = 0, coal_home_produced_gen = 0, bioethanol = 0, biodiesel = 0, biomethane = 0, biodiesel_cooking_oil = 0, biodiesel_tallow = 0, biodiesel_HVO = 0, biopropane = 0, bio_petrol = 0, renewable_petrol = 0, wood_log = 0, wood_chips = 0, wood_pellets = 0, grass = 0, biogas = 0, landfill_gas = 0, butane_units = c("kwh", "litres", "tonnes"), CNG_units = c("kwh", "litres", "tonnes"), LPG_units = c("kwh", "litres", "tonnes"), LNG_units = c("kwh", "litres", "tonnes"), natural_gas_units = c("kwh", "cubic metres", "tonnes"), natural_gas_mineral_units = c("kwh", "cubic metres", "tonnes"), other_petroleum_gas_units = c("kwh", "litres", "tonnes"), propane_units = c("kwh", "litres", "tonnes"), aviation_units = c("kwh", "litres", "tonnes"), aviation_fuel_units = c("kwh", "litres", "tonnes"), burning_oil_units = c("kwh", "litres", "tonnes"), diesel_units = c("kwh", "litres", "tonnes"), diesel_mineral_units = c("kwh", "litres", "tonnes"), fuel_oil_units = c("kwh", "litres", "tonnes"), gas_oil_units = c("kwh", "litres", "tonnes"), lubricants_units = c("kwh", "litres", "tonnes"), naptha_units = c("kwh", "litres", "tonnes"), petrol_biofuel_units = c("kwh", "litres", "tonnes"), petrol_mineral_units = c("kwh", "litres", "tonnes"), residual_oil_units = c("kwh", "litres", "tonnes"), distillate_units = c("kwh", "litres", "tonnes"), refinery_miscellaneous_units = c("kwh", "litres", "tonnes"), waste_oils_units = c("kwh", "tonnes"), marine_gas_units = c("kwh", "tonnes"), marine_fuel_units = c("kwh", "tonnes"), coal_industrial_units = c("kwh", "tonnes"), coal_electricity_gen_units = c("kwh", "tonnes"), coal_domestic_units = c("kwh", "tonnes"), coking_coal_units = c("kwh", "tonnes"), petroleum_coke_units = c("kwh", "tonnes"), coal_home_produced_gen_units = c("kwh", "tonnes"), bioethanol_units = c("litres", "GJ", "kg"), biodiesel_units = c("litres", "GJ", "kg"), biomethane_units = c("litres", "GJ", "kg"), biodiesel_cooking_oil_units = c("litres", "GJ", "kg"), biodiesel_tallow_units = c("litres", "GJ", "kg"), biodiesel_HVO_units = c("litres", "GJ", "kg"), biopropane_units = c("litres", "GJ", "kg"), bio_petrol_units = c("litres", "GJ", "kg"), renewable_petrol_units = c("litres", "GJ", "kg"), wood_log_units = c("kwh", "tonnes"), wood_chips_units = c("kwh", "tonnes"), wood_pellets_units = c("kwh", "tonnes"), grass_units = c("kwh", "tonnes"), biogas_units = c("kwh", "tonnes"), landfill_gas_units = c("kwh", "tonnes") )
raw_fuels( num_people = 1, butane = 0, CNG = 0, LPG = 0, LNG = 0, natural_gas = 0, natural_gas_mineral = 0, other_petroleum_gas = 0, propane = 0, aviation = 0, aviation_fuel = 0, burning_oil = 0, diesel = 0, diesel_mineral = 0, fuel_oil = 0, gas_oil = 0, lubricants = 0, naptha = 0, petrol_biofuel = 0, petrol_mineral = 0, residual_oil = 0, distillate = 0, refinery_miscellaneous = 0, waste_oils = 0, marine_gas = 0, marine_fuel = 0, coal_industrial = 0, coal_electricity_gen = 0, coal_domestic = 0, coking_coal = 0, petroleum_coke = 0, coal_home_produced_gen = 0, bioethanol = 0, biodiesel = 0, biomethane = 0, biodiesel_cooking_oil = 0, biodiesel_tallow = 0, biodiesel_HVO = 0, biopropane = 0, bio_petrol = 0, renewable_petrol = 0, wood_log = 0, wood_chips = 0, wood_pellets = 0, grass = 0, biogas = 0, landfill_gas = 0, butane_units = c("kwh", "litres", "tonnes"), CNG_units = c("kwh", "litres", "tonnes"), LPG_units = c("kwh", "litres", "tonnes"), LNG_units = c("kwh", "litres", "tonnes"), natural_gas_units = c("kwh", "cubic metres", "tonnes"), natural_gas_mineral_units = c("kwh", "cubic metres", "tonnes"), other_petroleum_gas_units = c("kwh", "litres", "tonnes"), propane_units = c("kwh", "litres", "tonnes"), aviation_units = c("kwh", "litres", "tonnes"), aviation_fuel_units = c("kwh", "litres", "tonnes"), burning_oil_units = c("kwh", "litres", "tonnes"), diesel_units = c("kwh", "litres", "tonnes"), diesel_mineral_units = c("kwh", "litres", "tonnes"), fuel_oil_units = c("kwh", "litres", "tonnes"), gas_oil_units = c("kwh", "litres", "tonnes"), lubricants_units = c("kwh", "litres", "tonnes"), naptha_units = c("kwh", "litres", "tonnes"), petrol_biofuel_units = c("kwh", "litres", "tonnes"), petrol_mineral_units = c("kwh", "litres", "tonnes"), residual_oil_units = c("kwh", "litres", "tonnes"), distillate_units = c("kwh", "litres", "tonnes"), refinery_miscellaneous_units = c("kwh", "litres", "tonnes"), waste_oils_units = c("kwh", "tonnes"), marine_gas_units = c("kwh", "tonnes"), marine_fuel_units = c("kwh", "tonnes"), coal_industrial_units = c("kwh", "tonnes"), coal_electricity_gen_units = c("kwh", "tonnes"), coal_domestic_units = c("kwh", "tonnes"), coking_coal_units = c("kwh", "tonnes"), petroleum_coke_units = c("kwh", "tonnes"), coal_home_produced_gen_units = c("kwh", "tonnes"), bioethanol_units = c("litres", "GJ", "kg"), biodiesel_units = c("litres", "GJ", "kg"), biomethane_units = c("litres", "GJ", "kg"), biodiesel_cooking_oil_units = c("litres", "GJ", "kg"), biodiesel_tallow_units = c("litres", "GJ", "kg"), biodiesel_HVO_units = c("litres", "GJ", "kg"), biopropane_units = c("litres", "GJ", "kg"), bio_petrol_units = c("litres", "GJ", "kg"), renewable_petrol_units = c("litres", "GJ", "kg"), wood_log_units = c("kwh", "tonnes"), wood_chips_units = c("kwh", "tonnes"), wood_pellets_units = c("kwh", "tonnes"), grass_units = c("kwh", "tonnes"), biogas_units = c("kwh", "tonnes"), landfill_gas_units = c("kwh", "tonnes") )
num_people |
Number of people to account for. |
butane |
amount of Butane used. |
CNG |
amount used. Compressed natural gas (CNG). A compressed version of the natural gas used in homes. An alternative transport fuel. |
LPG |
amount used. Liquid petroleum gas. Used to power cooking stoves or heaters off-grid and fuel some vehicles (e.g. fork-lift trucks and vans). |
LNG |
amount used. Liquefied natural gas. An alternative transport fuel. |
natural_gas |
amount used. Standard natural gas received through the gas mains grid network in the UK. |
natural_gas_mineral |
amount used. Natural gas (100% mineral blend) factor is natural gas not obtained through the grid and therefore does not contain any biogas content. It can be used for calculating bespoke fuel mixtures. |
other_petroleum_gas |
amount used. Consists mainly of ethane, plus other hydrocarbons, (excludes butane and propane). |
propane |
amount used. |
aviation |
amount used. Fuel for piston-engined aircraft - a high octane petrol (aka AVGAS). |
aviation_fuel |
amount used. Fuel for turbo-prop aircraft and jets (aka jet fuel). Similar to kerosene used as a heating fuel, but refined to a higher quality. |
burning_oil |
amount used. Main purpose is for heating/lighting on a domestic scale (also known as kerosene). |
diesel |
amount used. Standard diesel bought from any local filling station (across the board forecourt fuel typically contains biofuel content). |
diesel_mineral |
amount used. Diesel that has not been blended with biofuel (non-forecourt diesel). |
fuel_oil |
amount used. Heavy oil used as fuel in furnaces and boilers of power stations, in industry, for industrial heating and in ships. |
gas_oil |
amount used. Medium oil used in diesel engines and heating systems (also known as red diesel). |
lubricants |
amount used. Waste petroleum-based lubricating oils recovered for use as fuels |
naptha |
amount used. A product of crude oil refining - often used as a solvent. |
petrol_biofuel |
amount used. Standard petrol bought from any local filling station (across the board forecourt fuel typically contains biofuel content). |
petrol_mineral |
amount used. Petrol that has not been blended with biofuel (non forecourt petrol). |
residual_oil |
amount used. Waste oils meeting the 'residual' oil definition contained in the 'Processed Fuel Oil Quality Protocol'. |
distillate |
amount used. Waste oils meeting the 'distillate' oil definition contained in the 'Processed Fuel Oil Quality Protocol'. |
refinery_miscellaneous |
amount used. Includes aromatic extracts, defoament solvents and other minor miscellaneous products |
waste_oils |
amount used. Recycled oils outside of the 'Processed Fuel Oil Quality Protocol' definitions. |
marine_gas |
amount used. Distillate fuels are commonly called "Marine gas oil". Distillate fuel is composed of petroleum fractions of crude oil that are separated in a refinery by a boiling or "distillation" process. |
marine_fuel |
amount used. Residual fuels are called "Marine fuel oil". Residual fuel or "residuum" is the fraction that did not boil, sometimes referred to as "tar" or "petroleum pitch". |
coal_industrial |
amount used. Coal used in sources other than power stations and domestic use. |
coal_electricity_gen |
amount used. Coal used in power stations to generate electricity. |
coal_domestic |
amount used. Coal used domestically. |
coking_coal |
amount used. Coke may be used as a heating fuel and as a reducing agent in a blast furnace. |
petroleum_coke |
amount used. Normally used in cement manufacture and power plants. |
coal_home_produced_gen |
amount used. Coal used in power stations to generate electricity (only for coal produced in the UK). |
bioethanol |
amount used. Renewable fuel derived from common crops (such as sugar cane and sugar beet). |
biodiesel |
amount used. Renewable fuel almost exclusively derived from common natural oils (for example, vegetable oils). |
biomethane |
amount used. The methane constituent of biogas. Biogas comes from anaerobic digestion of organic matter. |
biodiesel_cooking_oil |
amount used. Renewable fuel almost exclusively derived from common natural oils (such as vegetable oils). |
biodiesel_tallow |
amount used. Renewable fuel almost exclusively derived from common natural oils (such as vegetable oils). |
biodiesel_HVO |
amount used. |
biopropane |
amount used. |
bio_petrol |
amount used. |
renewable_petrol |
amount used. |
wood_log |
amount used. |
wood_chips |
amount used. |
wood_pellets |
amount used. Compressed low quality wood (such as sawdust and shavings) made into pellet form |
grass |
amount used. |
biogas |
amount used. A naturally occurring gas from the anaerobic digestion of organic materials (such as sewage and food waste), or produced intentionally as a fuel from the anaerobic digestion of biogenic substances (such as energy crops and agricultural residues). |
landfill_gas |
amount used. Gas collected from a landfill site. This may be used for electricity generation, collected and purified for use as a transport fuel, or be flared off |
butane_units |
units that the gas is given in. Options are |
CNG_units |
units that the gas is given in. Options are |
LPG_units |
units that the gas is given in. Options are |
LNG_units |
units that the gas is given in. Options are |
natural_gas_units |
units that the gas is given in. Options are |
natural_gas_mineral_units |
units that the gas is given in. Options are |
other_petroleum_gas_units |
units that the gas is given in. Options are |
propane_units |
units that the gas is given in. Options are |
aviation_units |
units that the fuel is given in. Options are |
aviation_fuel_units |
units that the fuel is given in. Options are |
burning_oil_units |
units that the fuel is given in. Options are |
diesel_units |
units that the fuel is given in. Options are |
diesel_mineral_units |
units that the fuel is given in. Options are |
fuel_oil_units |
units that the fuel is given in. Options are |
gas_oil_units |
units that the fuel is given in. Options are |
lubricants_units |
units that the fuel is given in. Options are |
naptha_units |
units that the fuel is given in. Options are |
petrol_biofuel_units |
units that the fuel is given in. Options are |
petrol_mineral_units |
units that the fuel is given in. Options are |
residual_oil_units |
units that the fuel is given in. Options are |
distillate_units |
units that the fuel is given in. Options are |
refinery_miscellaneous_units |
units that the fuel is given in. Options are |
waste_oils_units |
units that the fuel is given in. Options are |
marine_gas_units |
units that the fuel is given in. Options are |
marine_fuel_units |
units that the fuel is given in. Options are |
coal_industrial_units |
units that the fuel is given in. Options are |
coal_electricity_gen_units |
units that the fuel is given in. Options are |
coal_domestic_units |
units that the fuel is given in. Options are |
coking_coal_units |
units that the fuel is given in. Options are |
petroleum_coke_units |
units that the fuel is given in. Options are |
coal_home_produced_gen_units |
units that the fuel is given in. Options are |
bioethanol_units |
units that the biofuel is given in. Options are |
biodiesel_units |
units that the biofuel is given in. Options are |
biomethane_units |
units that the biofuel is given in. Options are |
biodiesel_cooking_oil_units |
units that the biofuel is given in. Options are |
biodiesel_tallow_units |
units that the biofuel is given in. Options are |
biodiesel_HVO_units |
units that the biofuel is given in. Options are |
biopropane_units |
units that the biofuel is given in. Options are |
bio_petrol_units |
units that the biofuel is given in. Options are |
renewable_petrol_units |
units that the biofuel is given in. Options are |
wood_log_units |
units that the biomass is given in. Options are |
wood_chips_units |
units that the biomass is given in. Options are |
wood_pellets_units |
units that the biomass is given in. Options are |
grass_units |
units that the biomass is given in. Options are |
biogas_units |
units that the biogas is given in. Options are |
landfill_gas_units |
units that the biogas is given in. Options are |
This function calculates CO2e emissions from a wide variety of fuels, considering different unit conversions for each type of fuel. It supports the calculation of emissions from commonly used fuels such as diesel, petrol, natural gas, and biodiesel, as well as more specific fuels like aviation fuel, marine fuel, and landfill gas.
Unit conversions are done internally based on the specified units for each type of fuel (e.g., kWh, litres, tonnes). The function is useful for assessing the carbon footprint associated with different fuel sources over a specified time period.
A data frame with calculated emissions in tonnes of CO2e for each type of fuel input.
DEFRA Conversion Factors for Greenhouse Gas (GHG) Reporting: https://www.gov.uk/government/collections/government-conversion-factors-for-company-reporting
Descriptions from 2021 UK Government Report: https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2021
# Calculate emissions for 100 litres of diesel and 500 kWh of natural gas: raw_fuels( diesel = 100, diesel_units = "litres", natural_gas = 500, natural_gas_units = "kwh", ) # Calculate emissions for 10 tonnes of aviation fuel: raw_fuels( aviation_fuel = 10, aviation_fuel_units = "tonnes", )
# Calculate emissions for 100 litres of diesel and 500 kWh of natural gas: raw_fuels( diesel = 100, diesel_units = "litres", natural_gas = 500, natural_gas_units = "kwh", ) # Calculate emissions for 10 tonnes of aviation fuel: raw_fuels( aviation_fuel = 10, aviation_fuel_units = "tonnes", )
Calculate and plot the relative growth to index (GTI) over time
relative_gti( data = data, time = time, date_format = c("%d/%m/%Y"), name = theatre, val = emissions, gti_by = c("default", "month", "year") )
relative_gti( data = data, time = time, date_format = c("%d/%m/%Y"), name = theatre, val = emissions, gti_by = c("default", "month", "year") )
data |
The data frame containing the data. |
time |
The variable representing the time dimension. |
date_format |
The date format for the time variable (optional, default: c("%d/%m/%Y")). |
name |
The variable representing the grouping variable. |
val |
The variable representing the value. |
gti_by |
The grouping type for calculating the GTI ("default", "month", "year"). |
A ggplot2 object showing the relative GTI (Growth to Index) over time.
# Example dataset emission_data <- data.frame( theatre = c("Theatre A", "Theatre A", "Theatre B", "Theatre B", "Theatre A", "Theatre B"), emissions = c(200, 250, 150, 180, 300, 220), date = c("01/01/2023", "01/02/2023", "01/01/2023", "01/02/2023", "01/03/2023", "01/03/2023") ) # Using the relative_gti function relative_gti_plot <- relative_gti( data = emission_data, time = date, date_format = "%d/%m/%Y", # Date format used in the dataset name = theatre, val = emissions, gti_by = "default" # Calculating based on default time period ) # Plot the relative GTI print(relative_gti_plot)
# Example dataset emission_data <- data.frame( theatre = c("Theatre A", "Theatre A", "Theatre B", "Theatre B", "Theatre A", "Theatre B"), emissions = c(200, 250, 150, 180, 300, 220), date = c("01/01/2023", "01/02/2023", "01/01/2023", "01/02/2023", "01/03/2023", "01/03/2023") ) # Using the relative_gti function relative_gti_plot <- relative_gti( data = emission_data, time = date, date_format = "%d/%m/%Y", # Date format used in the dataset name = theatre, val = emissions, gti_by = "default" # Calculating based on default time period ) # Plot the relative GTI print(relative_gti_plot)
Find the name and/or code of a seaport. For use in the ferry_emissions
function.
seaport_finder(city, country, port_code, distance = 0.1, ignore.case = FALSE)
seaport_finder(city, country, port_code, distance = 0.1, ignore.case = FALSE)
city |
Name of the city. |
country |
Name of the country. |
port_code |
Name of the port. |
distance |
Maximum distance allowed for a match between the country/city given, and that of the value in the data set. |
ignore.case |
If |
Data frame containing the country, city, country code, port code, latitude, and longitude of a seaport.
# Look up the city of Aberdeen to find the port_code for it seaport_finder(city = "Aberdeen") # Search for a country and city and it finds matches seaport_finder(country = "United", city = "borunemouth", ignore.case = TRUE)
# Look up the city of Aberdeen to find the port_code for it seaport_finder(city = "Aberdeen") # Search for a country and city and it finds matches seaport_finder(country = "United", city = "borunemouth", ignore.case = TRUE)
A dataset containing the country, country code, city, city code, and coordinates of seaports
data(seaports)
data(seaports)
A data frame with 8736 rows and 7 variables:
Name of the country with the port
Name of the city with the port
Code of the country name
Code of the city port
Latitude of the port
Longitude of the port
https://www.kaggle.com/therohk/world-seaport-airport-dataset-and-codes/script
Runs a GUI to the functions in the 'carbonr' package to calculate carbon-equivalent emissions.
shiny_emissions()
shiny_emissions()
'shiny' app to calculate carbon-equivalent emissions
if(interactive()){shiny_emissions()}
if(interactive()){shiny_emissions()}
A dataset containing the city, station code, and coordinates of seaports
data(stations)
data(stations)
A data frame with 2608 rows and 4 variables:
Name of the station
Code of the station
Region of the station. One of "London", "Scotland", "Wales - Cymru", "North West", "West Midlands", "North East", "East", "South East", "East Midlands", "Yorkshire And The Humber", "South West", NA
County of the station
District of the station
Latitude of the station
Longitude of the station
https://www.theguardian.com/news/datablog/2011/may/19/train-stations-listed-rail#data
This function calculates the total output and generates a plot based on the specified parameters.
total_output( data = x$data, time = time, date_format = c("%d/%m/%Y"), name = theatre, val = carbon_price_credit, plot_by = c("default", "month", "year") )
total_output( data = x$data, time = time, date_format = c("%d/%m/%Y"), name = theatre, val = carbon_price_credit, plot_by = c("default", "month", "year") )
data |
The data frame containing the data. |
time |
The variable representing the time dimension. |
date_format |
The date format for the time variable (optional, default: c("%d/%m/%Y")). |
name |
The variable representing the grouping variable. |
val |
The variable to calculate the total output for (default: carbon_price_credit). |
plot_by |
The grouping type for the total output plot ("default", "month", "year"). |
This function calculates the total output by grouping the data based on the specified parameters (grouping variable and time dimension). It then summarises the specified variable (CPI or emissions) using the sum function. The resulting data is used to create a line plot showing the total output over time, with each group represented by a different color. The plot can be grouped by the default grouping, month, or year, based on the plot_by parameter.
A ggplot object showing the total output plot.
A function that calculates CO2e emissions on a journey on land.
vehicle_emissions( distance, units = c("miles", "km"), num = 1, vehicle = c("Cars", "Motorbike"), fuel = c("Petrol", "Diesel", "Unknown", "Battery Electric Vehicle", "Plug-in Hybrid Electric Vehicle"), car_type = c("Average car", "Small car", "Medium car", "Large car", "Mini", "Supermini", "Lower medium", "Upper medium", "Executive", "Luxury", "Sports", "Dual purpose 4X4", "MPV"), bike_type = c("Average", "Small", "Medium", "Large"), TD = TRUE, include_WTT = TRUE, include_electricity = TRUE, owned_by_org = TRUE )
vehicle_emissions( distance, units = c("miles", "km"), num = 1, vehicle = c("Cars", "Motorbike"), fuel = c("Petrol", "Diesel", "Unknown", "Battery Electric Vehicle", "Plug-in Hybrid Electric Vehicle"), car_type = c("Average car", "Small car", "Medium car", "Large car", "Mini", "Supermini", "Lower medium", "Upper medium", "Executive", "Luxury", "Sports", "Dual purpose 4X4", "MPV"), bike_type = c("Average", "Small", "Medium", "Large"), TD = TRUE, include_WTT = TRUE, include_electricity = TRUE, owned_by_org = TRUE )
distance |
Distance in km or miles of the journey made (this can be calculated with other tools, such as google maps.). |
units |
Units for the distance travelled. Options are |
num |
Number of vehicles used. |
vehicle |
Vehicle used for the journey. Options are |
fuel |
Fuel type used for the journey. For car, |
car_type |
Size/type of vehicle for car.
Options are |
bike_type |
Size of vehicle for motorbike.
Options are |
TD |
logical.Whether to account for transmission and distribution (TD) for electric vehicles (only |
include_WTT |
logical. Well-to-tank (include_WTT) - whether to account for emissions associated with extraction, refining and transportation of the fuels (for non-electric vehicles). |
include_electricity |
logical. Whether to account for ... for electric vehicles (car and van). |
owned_by_org |
logical. Whether the vehicle used is owned by the organisation or not (only for |
Tonnes of CO2e emissions per mile travelled.
# Emissions for a 100 mile car journey vehicle_emissions(distance = 100) # Emissions for a 100 mile motorbike journey where the motorbike is 500+cc vehicle_emissions(distance = 100, vehicle = "Motorbike", bike_type = "Large")
# Emissions for a 100 mile car journey vehicle_emissions(distance = 100) # Emissions for a 100 mile motorbike journey where the motorbike is 500+cc vehicle_emissions(distance = 100, vehicle = "Motorbike", bike_type = "Large")