View source: R/clinical_theatre_data.R
clinical_theatre_data | R Documentation |
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,
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 purchased. Default is |
mixed |
Numeric value indicating the weight of mixed paper purchased. Default is |
paper |
Numeric value indicating the weight of paper purchased. Default is |
average |
Numeric value indicating the weight of an overall average plastic purchased. Default is |
average_film |
Numeric value indicating the weight of average film plastic purchased. Default is |
average_rigid |
Numeric value indicating the weight of average rigid plastic purchased. Default is |
HDPE |
Numeric value indicating the weight of HDPE plastic purchased. Default is |
LDPE |
Numeric value indicating the weight of LDPE plastic purchased. Default is |
LLDPE |
Numeric value indicating the weight of LLDPE plastic purchased. Default is |
PET |
Numeric value indicating the weight of PET plastic purchased. Default is |
PP |
Numeric value indicating the weight of PP plastic purchased. Default is |
PS |
Numeric value indicating the weight of PS plastic purchased. Default is |
PVC |
Numeric value indicating the weight of PVC plastic purchased. 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 the waste disposal method given in |
mixed_WD |
Numeric value indicating the weight of mixed paper disposed of using the waste disposal method given in |
paper_WD |
Numeric value indicating the weight of paper disposed of using the waste disposal method given in |
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 the waste disposal methods given in |
average_film_WD |
Numeric value indicating the weight of average film plastic disposed of using the waste disposal methods given in |
average_rigid_WD |
Numeric value indicating the weight of average rigid plastic disposed of using the waste disposal methods given in |
HDPE_WD |
Numeric value indicating the weight of HDPE plastic disposed of using the waste disposal methods given in |
LDPE_WD |
Numeric value indicating the weight of LDPE plastic disposed of using the waste disposal methods given in |
LLDPE_WD |
Numeric value indicating the weight of LLDPE plastic disposed of using the waste disposal methods given in |
PET_WD |
Numeric value indicating the weight of PET plastic disposed of using the waste disposal methods given in |
PP_WD |
Numeric value indicating the weight of PP plastic disposed of using the waste disposal methods given in |
PS_WD |
Numeric value indicating the weight of PS plastic disposed of using the waste disposal methods given in |
PVC_WD |
Numeric value indicating the weight of PVC plastic disposed of using the waste disposal methods given in |
fridges |
Numeric value indicating the weight of fridges purchased. Default is |
freezers |
Numeric value indicating the weight of freezers purchased. 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.