diff --git a/vignettes/Clinical_emissions.Rmd b/vignettes/Clinical_emissions.Rmd new file mode 100644 index 0000000..efe8aa3 --- /dev/null +++ b/vignettes/Clinical_emissions.Rmd @@ -0,0 +1,125 @@ +--- +title: "Clinical Emissions Vignette" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{Clinical Emissions Vignette} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +## Calculating Clinical Theatre Emissions + +This vignette provides an overview of the `clinical_theatre_emissions` function, guiding users through calculating CO₂-equivalent emissions for various clinical resources in an operating theatre, such as clinical waste, utilities, and materials. This function is designed to offer flexibility for different units and waste types, making it adaptable to various clinical settings. + +### Overview of Parameters + +The `clinical_theatre_emissions` function includes a wide range of parameters to capture emissions across clinical activities. Here’s a breakdown of the main categories: + +- **Clinical Waste**: Accounts for wet clinical waste typically incinerated in a clinical setting. The input can be in kilograms or tonnes to ensure flexibility for different data sources. +- **Anaesthetic Gases**: Emissions from various gases commonly used in surgical procedures, such as desflurane, sevoflurane, and nitrous oxide (N₂O). +- **Utilities**: Includes water usage (in cubic meters or million liters), electricity (kWh), and heating (kWh). Each utility parameter offers options to adjust for transmission and distribution losses (TD) and well-to-tank (WTT) factors to capture indirect emissions. +- **Materials**: Includes emissions from material waste, including glass, paper, and plastic. This category allows for waste disposal types, such as recycling or landfill, to assess the environmental impact of different disposal methods. + +## Examples + +The following examples demonstrate how to use the `clinical_theatre_emissions` function in different scenarios. + +### Load the Package + +To use this function, first load the required package: + +```{r} +# Load necessary packages for this vignette +library(carbonr) +library(dplyr) +``` + +### Example 1: Basic Calculation with Default Values + +In this example, we calculate emissions for clinical waste, water supply, electricity, and heat with default values. This example is useful for a straightforward scenario without specific anaesthetic gases or waste types. + +In this calculation, `wet_clinical_waste` is provided in kilograms (150 kg). We use cubic metres as the unit for `water_supply`, and the electricity and heating inputs are provided in kWh. This setup calculates the emissions from basic clinical waste and utility usage. + +```{r example_data, message = FALSE, warning = FALSE, eval=FALSE, include=TRUE} +# Create an example data frame, called example_data. +example_data <- data.frame( + wet_clinical_waste = 150, # 150 kg of wet clinical waste + water_supply = 100, # 100 cubic meters of water + electricity_kWh = 500, # 500 kWh of electricity + heat_kWh = 200 # 200 kWh of heating +) +example_data +``` + +```{r, message = FALSE, warning = FALSE, echo = FALSE} +example_data <- data.frame( + wet_clinical_waste = 150, # 150 kg of wet clinical waste + water_supply = 100, # 100 cubic meters of water + electricity_kWh = 500, # 500 kWh of electricity + heat_kWh = 200 # 200 kWh of heating +) +example_data %>% knitr::kable() +``` + +```{r emissions, message = FALSE, warning = FALSE, eval=FALSE, include=TRUE} +# We can call our example_data frame to get the values +example_data %>% + dplyr::mutate(emissions = clinical_theatre_emissions( + wet_clinical_waste = wet_clinical_waste, + wet_clinical_waste_unit = "kg", + electricity_kWh = electricity_kWh, + heat_kWh = heat_kWh, + water_supply = water_supply, + water_unit = "cubic metres") +) +``` + +```{r, message = FALSE, warning = FALSE, echo = FALSE} +example_data %>% + dplyr::mutate(emissions = clinical_theatre_emissions( + wet_clinical_waste = wet_clinical_waste, + wet_clinical_waste_unit = "kg", + electricity_kWh = electricity_kWh, + heat_kWh = heat_kWh, + water_supply = water_supply, + water_unit = "cubic metres")) %>% + knitr::kable() +``` + +### Example 2: Including Anaesthetic Gases + +This example includes emissions from anaesthetic gases along with clinical waste, electricity, heating, and water. Adding anaesthetic gases can give a more comprehensive view of the emissions, particularly in settings with significant use of these gases. + +This example demonstrates emissions including anaesthetic gases - specifically, desflurane, sevoflurane, and N₂O. These gases have high greenhouse gas potential, so their inclusion can significantly affect total emissions in a clinical setting where they are frequently used. + +```{r emissions_with_gases, eval=FALSE} +# We do not have to call from a data frame. For example, here we just input the values +emissions_with_gases <- clinical_theatre_emissions( + wet_clinical_waste = 150, # Wet clinical waste in kg + wet_clinical_waste_unit = "kg", + desflurane = 10, # 10 liters of desflurane + sevoflurane = 5, # 5 liters of sevoflurane + N2O = 100, # 100 liters of N₂O + electricity_kWh = 500, + heat_kWh = 200, + water_supply = 100 +) +print(emissions_with_gases) +``` + +### Example 3: Reducing Waste and Emissions + +This example shows how reduced resource usage affects emissions. Reductions in clinical waste, water, electricity, and heat are used to model a more sustainable scenario. + +In this, `wet_clinical_waste` is significantly reduced to 0.1 tonnes, demonstrating the effect of minimised clinical waste on emissions. This example also shows the impact of reduced utility usage, providing insights into how efficient resource management can decrease the environmental footprint of clinical operations. + +```{r reduced_emissions, eval=FALSE} +reduced_emissions <- clinical_theatre_emissions( + wet_clinical_waste = 0.1, # Clinical waste in tonnes + wet_clinical_waste_unit = "tonnes", + electricity_kWh = 300, # Reduced electricity + heat_kWh = 100, # Reduced heating + water_supply = 50 # Reduced water +) +print(reduced_emissions) +``` diff --git a/vignettes/Company_emissions.Rmd b/vignettes/Company_emissions.Rmd new file mode 100644 index 0000000..4db0be9 --- /dev/null +++ b/vignettes/Company_emissions.Rmd @@ -0,0 +1,168 @@ +--- +title: "Company Emissions" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{Company Emissions} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +## Company Emissions with carbonr + This vignette demonstrates a step-by-step process for calculating and combining different types of company emissions, including office emissions, hotel emissions, and travel emissions, using various functions to track and calculate the carbon footprint associated with different company activities. + + +### Introduction +Understanding the overall carbon footprint of a company is important to meet company sustainability goals. This vignette details the process for calculating emissions from company office operations, employee travel (e.g., car, air, ferry, rail), and hotel accommodations, ultimately allowing the organisation to identify high-emission areas and take action to reduce them. + +To begin, install and load the necessary packages. +```{r} +library(carbonr) +library(dplyr) +library(purrr) +``` + +## Office Emissions: +Start by calculating emissions from office-related activities such as energy consumption, waste production, and equipment usage. + +### Example Office Emission Calculation + For calculating office emissions, use `office_emissions()` function from the `carbonr` package. This function requires input values for energy use (e.g., electricity and heating). + +```{r, message = FALSE, warning = FALSE, eval=FALSE, include=TRUE} + carbonr::office_emissions(specify = TRUE, + electricity_kWh = 200, + water_supply = 100, + water_unit = "cubic metres", + water_trt = FALSE + ) +``` + +### Hotel Emissions: +We calculate emissions related to hotel stays for business trips using `hotel_emissions()`. This function calculates the emissions based on the number of nights, room type, and occupancy rate. + +### Example Hotel Emission Calculation +```{r, message = FALSE, warning = FALSE, eval=FALSE, include=TRUE} +carbonr::hotel_emissions(location = "Fiji", nights = 2, rooms = 1) +``` + +## Travel-related Emissions + +### Airplane Emissions +Using the `carbonr` package, we can calculate emissions for a flight between Nairobi and Kisumu by first finding the airport codes. + +```{r, message = FALSE, warning = FALSE, eval=FALSE, include=TRUE} + airport_finder(name = "Nairobi") +``` + +```{r, message = FALSE, warning = FALSE, echo = FALSE} +airport_finder(name = "Nairobi") %>% + knitr::kable() +``` + +```{r find_airport_kisumu, eval=FALSE, message=FALSE, warning=FALSE} + airport_finder(name = "Kisumu") +``` + +```{r, message = FALSE, warning = FALSE, echo = FALSE} +airport_finder(name = "Kisumu") %>% + knitr::kable() +``` + +With the IATA codes (`"NBO"` for Nairobi and `"KIS"` for Kisumu), we can calculate emissions + +```{r airplane_emissions_chunk, message=FALSE, warning=FALSE} +airplane_emissions("NBO", "KIS") +``` + +### Ferry Emissions +To estimate emissions for ferry travel, for instance, from Shimoni to Giohar, we start by locating seaport codes: + +```{r, message = FALSE, warning = FALSE, eval=FALSE, include=TRUE} + seaport_finder(city = "Shimoni") +``` + +```{r, message = FALSE, warning = FALSE, echo = FALSE} +seaport_finder(city = "Shimoni") %>% + knitr::kable() +``` + +```{r, eval=FALSE, message=FALSE, warning=FALSE} + seaport_finder(city = "Giohar") +``` + +```{r, message = FALSE, warning = FALSE, echo = FALSE} +seaport_finder(city = "Giohar") %>% + knitr::kable() +``` + +With codes `"SMN"` for Shimoni and `"GHR"` for Giohar we can now calculate the ferry emissions: + +```{r ferry_example, message=FALSE, warning=FALSE} +ferry_emissions("SMN", "GHR", round_trip = TRUE) +``` + +### Train Emissions +For the UK we can calculate emissions for a train journey. Like with `airplane_emissions()` and `ferry_emissions()`, the distances are calculated using the Haversine formula - this is calculated as the crow flies. As before, we first find the stations. As always, for a more accurate estimation we can include via points: + +To calculate emissions for a train journey from Bristol Temple Meads to Edinburgh Waverley, via Birmingham New Street. We can use a data frame and `purrr::map()` to read through the data easier. + +```{r, message = FALSE, warning = FALSE, eval=FALSE, include=TRUE} +multiple_ind <- tibble::tribble(~ID, ~station, + "From", "Bristol", + "To", "Edinburgh", + "Via", "Birmingham") +purrr::map(.x = multiple_ind$station, .f = ~rail_finder(.x)) %>% + dplyr::bind_rows() +``` +```{r, message = FALSE, warning = FALSE, echo=FALSE} +multiple_ind <- tibble::tribble(~ID, ~station, + "From", "Bristol", + "To", "Edinburgh", + "Via", "Birmingham") +purrr::map(.x = multiple_ind$station, .f = ~rail_finder(.x)) %>% + dplyr::bind_rows() %>% + knitr::kable() +``` + +Then we can estimate the overall tCO2e emissions for the journey: +```{r, message = FALSE, warning = FALSE} +rail_emissions(from = "Bristol Temple Meads", to = "Edinburgh", via = "Birmingham New Street") +``` + +## Aggregating Emissions for Multiple Individuals +Using data frames and mapping functions, we can calculate combined emissions for multiple travel types. + +```{r, message = FALSE, warning = FALSE, eval=FALSE, include=TRUE} +multiple_ind <- tibble::tribble( + ~ID, ~rail_from, ~rail_to, ~air_from, ~air_to, ~air_via, +"Clint", "Bristol Temple Meads", "Paddington", "LHR", "KIS", "NBO", +"Zara", "Bristol Temple Meads", "Paddington", "LHR", "LAX", "ORL" + ) + +multiple_ind %>% + rowwise() %>% + mutate( + plane_emissions = carbonr::airplane_emissions(air_from, air_to, air_via), + train_emissions = carbonr::rail_emissions(rail_from, rail_to) + ) %>% + mutate(total_emissions = plane_emissions + train_emissions) +``` + +```{r, message = FALSE, warning = FALSE, echo=FALSE} +multiple_ind <- tibble::tribble( + ~ID, ~rail_from, ~rail_to, ~air_from, ~air_to, ~air_via, +"Clint", "Bristol Temple Meads", "Paddington", "LHR", "KIS", "NBO", +"Zara", "Bristol Temple Meads", "Paddington", "LHR", "LAX", "ORL" + ) + +multiple_ind %>% + rowwise() %>% + mutate( + plane_emissions = carbonr::airplane_emissions(air_from, air_to, air_via), + train_emissions = carbonr::rail_emissions(rail_from, rail_to) + ) %>% + mutate(total_emissions = plane_emissions + train_emissions) %>% + knitr::kable() +``` + +## References: +Emission factors are based on the UK Government’s 2024 greenhouse gas reporting conversion factors: [Greenhouse Gas Conversion Factors](https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2024). diff --git a/vignettes/Personal_carbon_emissions.Rmd b/vignettes/Personal_carbon_emissions.Rmd new file mode 100644 index 0000000..2fcd428 --- /dev/null +++ b/vignettes/Personal_carbon_emissions.Rmd @@ -0,0 +1,340 @@ +--- +title: "Introduction to carbonr" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{Personal Carbon Emissions} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +## Personal Carbon Emissions with carbonr + +### Introduction +Personal carbon emissions refer to the total amount of greenhouse gases, primarily carbon dioxide (CO₂), that an individual is responsible for emitting directly and indirectly through their daily activities. The `carbonr` package in R provides a convenient way to calculate these emissions. + +The emissions values used in these calculations primarily derive from the [UK Government report (2024)](https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2024), where available. If calculations are based on sources other than the UK Government report, it will be specified accordingly. + +The aim of calculating Personal Carbon Emissions is to provide a reliable and reproducible method for assessing individual carbon footprints. This ensures that results can be easily saved, edited, and redistributed, fostering transparency and accuracy in carbon emission reporting. + +### Installation +To install the development version of `carbonr`, you can use the following commands to download it from [GitHub](https://github.com/): + +```{r install_package, eval = FALSE} +# Uncomment the following line if you haven't installed devtools yet +# install.packages("devtools") +devtools::install_github("IDEMSInternational/carbonr") +``` + +Once installed, load the `carbonr` package with the following command: +```{r} +library(carbonr) +library(dplyr) +``` + +### Usage +The `carbonr` package allows users to calculate personal emissions from various sources, including travel-related activities, building energy use, and household emissions. For personal emissions, we consider the following categories: + +*Travel-Related Emissions*: + +airplane_emissions() Calculates emissions from air travel. +ferry_emissions() Estimates emissions from ferry travel +land_emissions() Computes emissions from land-based travel. +rail_emissions() Determines emissions from rail travel. +vehicle_emissions() Assesses emissions from personal vehicle use. + +*Household Emissions*: +household_emissions() Estimates emissions from household activities. + +*Building Emissions*: +building_emissions() Calculates emissions associated with building energy use. + +These all return carbon-equivalent emissions in tonnes. + +A shiny app is also available by `shiny_emissions()` to calculate carbon-equivalent emissions with a GUI. + +We give some small examples in using the functions in `carbonr()`. We start by Travel related Emissions. + +#### Travel-Related Emissions +To calculate emissions for a flight between Nairobi and Kisumu, we first want to find the name of the airports. We do this using the `airport_finder()` function: + +Using the `carbonr` package, we can calculate emissions for a flight between Nairobi and Kisumu by first finding the airport codes. + +```{r, message = FALSE, warning = FALSE, eval=FALSE, include=TRUE} + airport_finder(name = "Nairobi") +``` + +```{r, message = FALSE, warning = FALSE, echo = FALSE} +airport_finder(name = "Nairobi") %>% + knitr::kable() +``` + +```{r find_airport_kisumu, eval=FALSE, message=FALSE, warning=FALSE} + airport_finder(name = "Kisumu") +``` + +```{r, message = FALSE, warning = FALSE, echo = FALSE} +airport_finder(name = "Kisumu") %>% + knitr::kable() +``` + +Now we can find the overall emission value using the appropriate IATA code. These distances are calculated using the Haversine formula: + +```{r, message = FALSE, warning = FALSE, echo = FALSE} +carbonr::airplane_emissions("NBO", "KIS") +``` + +A similar approach can be performed for ferry emissions. For example, to calculate emissions for a round trip ferry from Shimoni to Giohar, we first find the appropriate seaport code with the `seaport_finder()` function: + +```{r, message = FALSE, warning = FALSE, eval=FALSE, include=TRUE} + seaport_finder(city = "Shimoni") +``` + +```{r, message = FALSE, warning = FALSE, echo = FALSE} +seaport_finder(city = "Shimoni") %>% + knitr::kable() +``` + +```{r, eval=FALSE, message=FALSE, warning=FALSE} + seaport_finder(city = "Giohar") +``` + +```{r, message = FALSE, warning = FALSE, echo = FALSE} +seaport_finder(city = "Giohar") %>% + knitr::kable() +``` + +Now we can find the overall emission value using the appropriate seaport code: + +```{r ferry_example, message = FALSE, warning = FALSE} +carbonr::ferry_emissions("SMN", "GHR", round_trip = TRUE) +``` + +For the UK we can calculate emissions for a train journey. Like with `airplane_emissions()` and `ferry_emissions()`, the distances are calculated using the Haversine formula - this is calculated as the crow flies. As before, we first find the stations. As always, for a more accurate estimation we can include via points: + +To calculate emissions for a train journey from Bristol Temple Meads to Edinburgh Waverley, via Birmingham New Street. We can use a data frame and `purrr::map()` to read through the data easier: +```{r load_stations, message = FALSE, warning = FALSE} +data("stations", package = "carbonr") +``` + +```{r multiple_example, message = FALSE, warning = FALSE, eval=FALSE, include=TRUE} +multiple_ind <- tibble::tribble(~ID, ~station, + "From", "Bristol", + "To", "Edinburgh", + "Via", "Birmingham") +purrr::map(.x = multiple_ind$station, .f = ~rail_finder(.x)) %>% + dplyr::bind_rows() +``` +```{r multiple_eg, message = FALSE, warning = FALSE, echo=FALSE} +multiple_ind <- tibble::tribble(~ID, ~station, + "From", "Bristol", + "To", "Edinburgh", + "Via", "Birmingham") +purrr::map(.x = multiple_ind$station, .f = ~carbonr::rail_finder(.x)) %>% + dplyr::bind_rows() %>% + knitr::kable() +``` + +Then we can estimate the overall tCO2e emissions for the journey: +```{r rail_em, message = FALSE, warning = FALSE} +result <- carbonr::rail_emissions(from = "Bristol Temple Meads", to = "Edinburgh", via = "Birmingham New Street") +knitr::kable(result) +``` + +We can use a data frame to read through the data easier in general. For example, if we had data for multiple individuals, or journeys: +```{r, message = FALSE, warning = FALSE, eval=FALSE, include=TRUE} +multiple_ind <- tibble::tribble(~ID, ~rail_from, ~rail_to, ~air_from, ~air_to, ~air_via, + "Clint", "Bristol Temple Meads", "Paddington", "LHR", "KIS", "NBO", + "Zara", "Bristol Temple Meads", "Paddington", "LHR", "LAX", "ORL") +multiple_ind %>% + dplyr::rowwise() %>% + dplyr::mutate(plane_emissions = carbonr::airplane_emissions(air_from, + air_to, + air_via)) %>% + dplyr::mutate(train_emissions = carbonr::rail_emissions(rail_from, + rail_to)) %>% + dplyr::mutate(total_emissions = plane_emissions + train_emissions) +``` +```{r, message = FALSE, warning = FALSE, echo = FALSE} +multiple_ind <- tibble::tribble(~ID, ~rail_from, ~rail_to, ~air_from, ~air_to, ~air_via, + "Clint", "Bristol Temple Meads", "Paddington", "LHR", "KIS", "NBO", + "Zara", "Bristol Temple Meads", "Paddington", "LHR", "LAX", "ORL") +multiple_ind %>% + dplyr::rowwise() %>% + dplyr::mutate(plane_emissions = carbonr::airplane_emissions(air_from, + air_to, + air_via)) %>% + dplyr::mutate(train_emissions = carbonr::rail_emissions(rail_from, + rail_to)) %>% + dplyr::mutate(total_emissions = plane_emissions + train_emissions) %>% + knitr::kable() +``` + +For land-based travel, we use the `land_emissions()` function. This allows you to calculate emissions based on vehicle type and fuel type. + +```{r land_emissions_example, message = FALSE, warning = FALSE} +result<-carbonr::land_emissions(distance = 100, vehicle = "Bus", fuel = "Petrol") +knitr::kable(result) +``` + +The `vehicle_emissions()` function estimates emissions from personal vehicle use based on distance, fuel type, and fuel consumption. + +```{r vehicle_emissions_example, message = FALSE, warning = FALSE} +result <- carbonr::vehicle_emissions(distance = 150, fuel = "Petrol", car_type = "Dual purpose 4X4" ) +knitr::kable(result) +``` + +#### Household Emissions + +Additional emissions can be calculated as well. For example, household and building emissions. The `household_emissions()` is used to estimate carbon-equivalent emissions based on household energy use. It allows users to input various types of energy sources, such as electricity or gas, and calculates the emissions based on the consumption levels provided. + +We can find the [total household waste per 1000 households](https://lginform.local.gov.uk/reports/lgastandard?mod-metric=19664&mod-area=E92000001&mod-group=AllRegions_England&mod-type=namedComparisonGroup&mod-period=1) in the UK is 947 tonnes. This is 0.947 tonnes per household. Using the `household_emissions()` function, we can find the average CO2-equivalent emissions of total household waste in a year. + +```{r, message = FALSE, warning = FALSE, eval=TRUE, include=TRUE} +household_emissions(household_residual_waste = 0.947, + hh_waste_disposal = "Landfill", + units = "tonnes") +``` + +We can get a more accurate picture by giving more precise measurements. + +```{r, message = FALSE, warning = FALSE, eval=FALSE, include=TRUE} +# Create a data frame of the estimates with sources +average_disposal <- data.frame( + Category = c( + "Glass", "Clothing", "Disposed Clothing", "Food", "Paper", "Plastic", + "Small Electrical Items", "Batteries Alkaline (bought)", "Batteries Alkaline (disposed)", + "Aluminium Cans (bought)", "Aluminium Cans (disposed)", "Residual waste" + ), + Estimated_Average_Disposal_kg_per_year = c( + 125, 26.7, 10.8, 237.4, 450, 520, 5.57, + 1.932, 0.720, 5.1, 5.1, 516.53 + ), + Notes = c( + "Bottles, jars, and glass containers.", + "New clothing purchased.", + "Textiles and old garments disposed.", + "Includes food scraps and leftovers.", + "Newspapers, magazines, and office paper.", + "Non-recyclable or mixed plastic types.", + "Gadgets, small appliances, and electronics.", + "Household AA/AAA and other alkaline batteries.", + "Household AA/AAA and other alkaline batteries.", + "Soda cans and other aluminium beverage containers.", + "Soda cans and other aluminium beverage containers.", + "Any collected household waste that is not sent for reuse, recycling, or composting." + ), + Source = c( + "Average UK household uses approximately 500 glass bottles and jars annually (3.1). Given that one tonne of glass equates to about 4,000 bottles and jars, this translates to an estimated 125 kilograms of glass waste per household per year (Busy Bins, 2020).", + "Average of 26.7kg of new clothes each year (Recycle More)", + "300,000 tonnes disposed yearly approximately in the UK, or 10.8kg per household (Recycle More)", + "Estimated 6.6 million tonnes of food waste yearly, which is 237.4kg per household (Recycle More)", + "In the UK, approximately 12.5 million tonnes of paper are used annually. This is an average of about 450kg per household per year (Recycle More)", + "Over 1447000 tonnes of plastic packaging consumed by households. Over 27.8 million households, this is approx. 520g bought and disposed (Recycle More)", + "Approximately 155,000 tonnes of domestic electrical waste are disposed each year. This is approximately 5.57kg of electrical waste per household each year (Recycle More)", + "Every person in the UK uses about 21 batteries a year. A household of four uses 84. At 23g a battery, this is 1.932kg per household (Recycle More)", + "20,000 tonnes of batteries are sent to landfill site in the UK each year, which is approximately 0.720kg per household. (Recycle More)", + "An estimated 340 aluminium drink cans are consumed per household each year. At 15g a can, it is 5.1 kg consumed, and 5.1kg disposed (Recycle More)", + "An estimated 340 aluminium drink cans are consumed per household each year. At 15g a can, it is 5.1 kg consumed, and 5.1kg disposed (Recycle More)", + "From DEFRA via LG Inform (DEFRA, 2024)" + ) +) +``` + + +```{r, message = FALSE, warning = FALSE, echo = FALSE} +# Create a data frame of the estimates +average_disposal <- data.frame( + Category = c( + "Glass", "Clothing", "Disposed Clothing", "Food", "Paper", "Plastic", + "Small Electrical Items", "Batteries Alkaline (bought)", "Batteries Alkaline (disposed)", + "Aluminium Cans (bought)", "Aluminium Cans (disposed)", "Residual waste" + ), + Estimated_Average_Disposal_kg_per_year = c( + 125, 26.7, 10.8, 237.4, 450, 520, 5.57, + 1.932, 0.720, 5.1, 5.1, 516.53 + ), + Notes = c( + "Bottles, jars, and glass containers.", + "New clothing purchased.", + "Textiles and old garments disposed.", + "Includes food scraps and leftovers.", + "Newspapers, magazines, and office paper.", + "Non-recyclable or mixed plastic types.", + "Gadgets, small appliances, and electronics.", + "Household AA/AAA and other alkaline batteries.", + "Household AA/AAA and other alkaline batteries.", + "Soda cans and other aluminium beverage containers.", + "Soda cans and other aluminium beverage containers.", + "Any collected household waste that is not sent for reuse, recycling, or composting." + ), + Source = c( + "Average UK household uses approximately 500 glass bottles and jars annually (3.1). Given that one tonne of glass equates to about 4,000 bottles and jars, this translates to an estimated 125 kilograms of glass waste per household per year (Busy Bins, 2020).", + "Average of 26.7kg of new clothes each year (Recycle More)", + "300,000 tonnes disposed yearly approximately in the UK, or 10.8kg per household (Recycle More)", + "Estimated 6.6 million tonnes of food waste yearly, which is 237.4kg per household (Recycle More)", + "In the UK, approximately 12.5 million tonnes of paper are used annually. This is an average of about 450kg per household per year (Recycle More)", + "Over 1447000 tonnes of plastic packaging consumed by households. Over 27.8 million households, this is approx. 520g bought and disposed (Recycle More)", + "Approximately 155,000 tonnes of domestic electrical waste are disposed each year. This is approximately 5.57kg of electrical waste per household each year (Recycle More)", + "Every person in the UK uses about 21 batteries a year. A household of four uses 84. At 23g a battery, this is 1.932kg per household (Recycle More)", + "20,000 tonnes of batteries are sent to landfill site in the UK each year, which is approximately 0.720kg per household. (Recycle More)", + "An estimated 340 aluminium drink cans are consumed per household each year. At 15g a can, it is 5.1 kg consumed, and 5.1kg disposed (Recycle More)", + "An estimated 340 aluminium drink cans are consumed per household each year. At 15g a can, it is 5.1 kg consumed, and 5.1kg disposed (Recycle More)", + "From DEFRA via LG Inform (DEFRA, 2024)" + ) +) + +# Render the table in the vignette +knitr::kable( + average_disposal, + caption = "Average Annual Household Disposal Estimates for the UK with Sources" +) +``` + +```{r, message = FALSE, warning = FALSE, echo = FALSE} +average_disposal %>% + dplyr::select(-c(Notes, Source)) %>% + tidyr::pivot_wider(names_from = Category, values_from = Estimated_Average_Disposal_kg_per_year) %>% + mutate(emissions = household_emissions(glass_WD = Glass, + clothing = Clothing, + clothing_WD = `Disposed Clothing`, + gcb_waste_disposal = "Closed-loop", + food_WD = Food, + paper_WD = Paper, + average_WD = Plastic, + small_electrical_WD = `Small Electrical Items`, + alkaline_batteries = `Batteries Alkaline (bought)`, + alkaline_batteries_WD = `Batteries Alkaline (disposed)`, + aluminuim_cans = `Aluminium Cans (bought)`, + aluminuim_cans_WD = `Aluminium Cans (disposed)`, + household_residual_waste = `Residual waste`, + hh_waste_disposal = "Landfill", + units = "kg")) %>% + dplyr::pull(emissions) +``` + +### Building Emissions +The `building_emissions()`calculates carbon-equivalent emissions based on energy consumption in a building. The function considers various energy sources, such as electricity, natural gas, and oil, and returns emissions in tonnes of CO₂-equivalent. + +```{r building_emissions_example, message = FALSE, warning = FALSE} +result <- carbonr::building_emissions(electricity_kWh = 500, water_supply = 1000, water_unit = "cubic metres") +knitr::kable(result) +``` + +## Shiny App + +An interactive calculator using Shiny can be accessed by the `shiny_emissions()` function. This calculator uses some of the functions in the `carbonr` package: +```{r, eval = FALSE} +shiny_emissions() +``` + +## References + +1. UK Government Report: Department for Energy Security and Net Zero. (2024). [Greenhouse Gas Reporting: Conversion Factors 2024](https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2024). + +2. Radiative Forcing Factor: DEFRA, 2016. Government GHG conversion factors for company reporting. + +3. On the Household waste measurements: +[Busy Bins](https://busybins.co.uk/blog/glass-recycling-guide.) +WRAP, ‘Valuing our clothes: the evidence base’ (2012), p.2 +[Recycle More](https://www.recycle-more.co.uk/what-can-i-recycle/recycling-facts) +[DEFRA, 2024](https://lginform.local.gov.uk/reports/lgastandard?mod-area=E92000001&mod-group=AllRegions_England&mod-metric=45&mod-type=namedComparisonGroup) diff --git a/vignettes/Personal_use.Rmd b/vignettes/Personal_use.Rmd new file mode 100644 index 0000000..30365ec --- /dev/null +++ b/vignettes/Personal_use.Rmd @@ -0,0 +1,19 @@ +--- +title: "Personal_use" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{Personal_use} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>" +) +``` + +```{r setup} +library(carbonr) +```