Skip to contents


ghgtools is designed to make greenhouse gas (GHG) accounting more accessible and standardized. Tracking, measuring, and reporting GHG emissions is essential to understand risks and identify opportunities related to climate change and the transition towards a renewable energy economy. The goal of this package is to advance the practice of GHG accounting with tools rooted in uncompromising transparency, rigorous data quality, and purposeful versatility.

The Basics

The GHG inventory of any entity can be summarized as follows: Assets, such as buildings, vehicles, and equipment, engage in Activities, such as electricity consumption, travel, or purchasing, which each have a specific Emission Factor that tells us the rate at which that activity generates GHG emissions. These three variables - assets, actives, and emission factors - compose the underlying calculation methodology. ghgtools uses a set of standardized data templates to match each record of activity data to an emission factor using information about your assets. Our methodology is built on the best practices set forth by the GHG Protocol Corporate Standard.

The following data sets are required to use ghgtools and calculate GHG emissions. When you library(ghgtools), these data sets are available.

Emission Factor Library - EFLibrary - The catalog of emission factors for a variety of activities. Our team consolidates emission factors from a collection of reputable sources, such as the EPA’s Emission Factor Hub. Unless you want to add your own custom emission factors (which you certainly can, these tools are open source after all!), you don’t need to worry about the emission factor library. It is pre-populated and ready to go.

Asset Portfolio - AssetPortfolio - The list of all your assets. This likely includes buildings and vehicles. You may also designate an Enterprise asset to calculate scope 3 emissions for purchasing, business travel, and other supply chain related activities.

Activity Data - ActivityData - The record of energy consumption and other GHG-producing activities across each of your assets.

Data and Templates

First, we need to load ghgtools

The emission factor library, EFLibrary, is loaded from the ghgtools package. There is a row of data for each greenhouse gas produced by the activity. For example, burning natural gas will generate CO2, CH4 and N2O. EFLibrary is loaded when you library ghgtools. An example of the emission factors for Aviation Gasoline is provided below. Check out the Emission Factor Library article for more guidance and information.


ef_source ef_publishdate ef_activeyear supplier service_type emission_category service_subcategory1 service_subcategory2 unit emission_scope country subregion ghg ghg_unit source_emission_factor unit_conversion conversion_factor kg_ghg_perunit
EPA CCCL Emission Factors for GHG Inventories 2025-01-15 2024 anthracite stationary short ton scope 1 global co2 kg 2602 1 kg_per_kg 2602
EPA CCCL Emission Factors for GHG Inventories 2025-01-15 2024 bituminous stationary short ton scope 1 global co2 kg 2325 1 kg_per_kg 2325
EPA CCCL Emission Factors for GHG Inventories 2025-01-15 2024 sub-bituminous stationary short ton scope 1 global co2 kg 1676 1 kg_per_kg 1676


ghgtools comes with templates for activity data and the asset portoflio. You can use create_templates() to write these templates to excel files in your working directory. create_templates() also writes the full emission factor library to an excel file in your working directory.

create_templates()
#> [1] "Success! Check your directory for ActivityData.csv, AssetPortfolio.csv, and EFLibrary.csv"

See below for some example data from the templates.

Activity Data Template - See ActivityData reference documentation for more information about the activity data template.

asset_id supplier account_id meter_number date year cost service_type emission_category service_subcategory1 service_subcategory2 unit usage
B1456 2023 electricity indirect energy kWh 31231.91
B1457 2023 electricity indirect energy kWh 19389.59
B1458 2023 electricity indirect energy kWh 185862.41
B1458 2023 natural gas stationary therm 2569.69


Asset Portfolio Template - See AssetPortfolio reference documentation for more information about the asset portfolio template.

asset_id asset_name asset_description address city state zip country sqft region business_unit asset_type asset_subtype year_built
B1456 Bellingham Washington 98226 USA 342 West Coast Operations Building Office 1993
B1457 Bellingham Washington 98225 USA 3280 West Coast Operations Building Office 2005
B1458 Bellingham Washington 98225 USA 20142 West Coast Operations Building Office 2003


Running ghg_inventory()

The core function of ghgtools is ghg_inventory(). This function requires activity data, an asset portoflio, and a GWP selection.You may choose to provide an emission factor library, otherwise ghg_inventory() will default to the internal emission factor library EFLibrary

  • Activity Data must be a data frame following the structure of the activity data template.
  • Asset Portfolio must be a data frame following the structure of the asset portfolio template.
  • GWP choose a global wamring potential to use for the GHG inventory calcualtions. Choices are “SAR”, “AR4”, “AR5”, or “AR6”. If you have no preference for GWPs, we recommend following UNFCCC guidelines, which require the use of GWP values from the IPCC’s Fifth Assessment Report (AR5).
  • Emission Factor Library must be a data frame following the structure of EFLibrary. You may have custom or unique emission factors that you wish to use in ghgtools, in which case you can load your own emission factor library into r studio. You may also append additional emission factors onto the default EFLibrary.

You may prefer to use excel to overwrite the activity data and asset portfolio data templates with your own data. This is why create_templates() writes an excel file in your working directory. Once you add your data to the templates, you can use the fread() function to create global environment variables for use in ghgtools. If you decide to make any changes to the emission factor library, again use fread() to create a global environment variable.

library(data.table)
My_ActivityData <- fread("ActivityData.csv")
My_AssetPortfolio <- fread("AssetPortfolio.csv")
My_EFLibrary <- fread("EFLibrary.csv")

With the variables created above, you can run ghg_inventory().

GHG_rawdata <- ghg_inventory(My_ActivityData, My_AssetPortfolio, "ar5", My_EFLibrary)

Let’s take a look at the ghg inventory that was calculated:

asset_id asset_name asset_type asset_subtype asset_description address city state zip country region subregion business_unit year_built sqft service_type unit supplier account_id meter_number date year cost usage emission_category service_subcategory1 service_subcategory2 emission_scope co2_kgperunit ch4_kgperunit n2o_kgperunit otherghgs_kgco2eperunit gwps_ar co2_gwp ch4_gwp n2o_gwp kgco2e_perunit kg_co2 kg_ch4 kg_n2o kg_co2e mt_co2e ef_source ef_publishdate
B1456 Building Office Bellingham Washington 98226 USA West Coast NWPP Operations 1993 342 electricity kWh 2023 31231.907 indirect energy scope 2 0.2731025 2.54e-05 3.60e-06 0.0000000 ar5 1 28 265 0.2747753 8529.5111 0.7933269 0.1133324 8581.7574 8.5817574 eGRID2022 2024-01-30
B1457 Building Office Bellingham Washington 98225 USA West Coast NWPP Operations 2005 3280 electricity kWh 2023 19389.588 indirect energy scope 2 0.2731025 2.54e-05 3.60e-06 0.0000000 ar5 1 28 265 0.2747753 5295.3445 0.4925182 0.0703597 5327.7803 5.3277803 eGRID2022 2024-01-30
B1458 Building Office Bellingham Washington 98225 USA West Coast NWPP Operations 2003 20142 electricity kWh 2023 185862.407 indirect energy scope 2 0.2731025 2.54e-05 3.60e-06 0.0000000 ar5 1 28 265 0.2747753 50759.4836 4.7211223 0.6744460 51070.4032 51.0704032 eGRID2022 2024-01-30
B1458 Building Office Bellingham Washington 98225 USA West Coast Operations 2003 20142 natural gas therm 2023 2569.690 stationary scope 1 5.3060000 1.00e-04 1.00e-05 0.0000000 ar5 1 28 265 5.3114500 13634.7751 0.2569690 0.0256969 13648.7800 13.6487800 EPA CCCL Emission Factors for GHG Inventories 2024-06-05
B1564 Building Office Woodinville Washington 98072 USA West Coast NWPP Operations 1990 3636 electricity kWh 2023 47302.603 indirect energy scope 2 0.2731025 2.54e-05 3.60e-06 0.0000000 ar5 1 28 265 0.2747753 12918.4580 1.2015414 0.1716488 12997.5881 12.9975881 eGRID2022 2024-01-30
B1564 Building Office Woodinville Washington 98072 USA West Coast Operations 1990 3636 natural gas therm 2023 1382.843 stationary scope 1 5.3060000 1.00e-04 1.00e-05 0.0000000 ar5 1 28 265 5.3114500 7337.3650 0.1382843 0.0138284 7344.9015 7.3449015 EPA CCCL Emission Factors for GHG Inventories 2024-06-05
B1662 Building Office Portland Oregon 97202 USA West Coast NWPP Operations 2007 4821 electricity kWh 2023 106760.001 indirect energy scope 2 0.2731025 2.54e-05 3.60e-06 0.0000000 ar5 1 28 265 0.2747753 29156.4206 2.7118288 0.3874041 29335.0139 29.3350139 eGRID2022 2024-01-30
B1662 Building Office Portland Oregon 97202 USA West Coast Operations 2007 4821 natural gas therm 2023 3541.052 stationary scope 1 5.3060000 1.00e-04 1.00e-05 0.0000000 ar5 1 28 265 5.3114500 18788.8219 0.3541052 0.0354105 18808.1206 18.8081206 EPA CCCL Emission Factors for GHG Inventories 2024-06-05
B1663 Building Office Portland Oregon 97229 USA West Coast NWPP Operations 2015 4316 electricity kWh 2023 74746.451 indirect energy scope 2 0.2731025 2.54e-05 3.60e-06 0.0000000 ar5 1 28 265 0.2747753 20413.4408 1.8986472 0.2712353 20538.4803 20.5384803 eGRID2022 2024-01-30
B1663 Building Office Portland Oregon 97229 USA West Coast Operations 2015 4316 natural gas therm 2023 1793.131 stationary scope 1 5.3060000 1.00e-04 1.00e-05 0.0000000 ar5 1 28 265 5.3114500 9514.3531 0.1793131 0.0179313 9524.1256 9.5241256 EPA CCCL Emission Factors for GHG Inventories 2024-06-05
B1866 Building Office Sacramento California 95816 USA West Coast CAMX Operations 1999 6074 electricity kWh 2023 85928.162 indirect energy scope 2 0.2256363 1.36e-05 1.80e-06 0.0000000 ar5 1 28 265 0.2264981 19388.5135 1.1692906 0.1559054 19462.5685 19.4625685 eGRID2022 2024-01-30
B1867 Building Office Sacramento California 95825 USA West Coast CAMX Operations 2004 3959 electricity kWh 2023 44956.454 indirect energy scope 2 0.2256363 1.36e-05 1.80e-06 0.0000000 ar5 1 28 265 0.2264981 10143.8084 0.6117570 0.0815676 10182.5530 10.1825530 eGRID2022 2024-01-30
B1868 Building Office Sacramento California 95825 USA West Coast CAMX Operations 2004 8070 electricity kWh 2023 106728.394 indirect energy scope 2 0.2256363 1.36e-05 1.80e-06 0.0000000 ar5 1 28 265 0.2264981 24081.8011 1.4523353 0.1936447 24173.7823 24.1737823 eGRID2022 2024-01-30
B2074 Building Office Indio California 92203 USA West Coast AZNM Operations 2010 3543 electricity kWh 2023 49348.000 indirect energy scope 2 0.3520039 2.31e-05 3.20e-06 0.0000000 ar5 1 28 265 0.3534931 17370.6908 1.1415775 0.1566871 17444.1771 17.4441771 eGRID2022 2024-01-30
B2074 Building Office Indio California 92203 USA West Coast Operations 2010 3543 natural gas therm 2023 25.981 stationary scope 1 5.3060000 1.00e-04 1.00e-05 0.0000000 ar5 1 28 265 5.3114500 137.8552 0.0025981 0.0002598 137.9968 0.1379968 EPA CCCL Emission Factors for GHG Inventories 2024-06-05
LS101 Equipment Mobile Landscaping equipment Bellingham Washington 98226 USA West Coast Operations motor gasoline gallon 2023 708.000 mobile scope 1 8.7800000 3.80e-04 8.00e-05 0.0000000 ar5 1 28 265 8.8118400 6216.2400 0.2690400 0.0566400 6238.7827 6.2387827 EPA CCCL Emission Factors for GHG Inventories 2024-06-05
Enterprise Enterprise USA West Coast capital goods usd 2023 22219.240 supply chain electronic computer manufacturing scope 3 0.0490000 2.03e-04 7.80e-06 0.0016187 ar5 1 28 265 0.0583617 1088.7428 4.5105057 0.1726435 1296.7537 1.2967537 US EPA supply chain greenhouse gas emission factors v1.3 by naics-6 2024-07-10
Enterprise Enterprise USA West Coast capital goods usd 2023 424731.110 supply chain all other miscellaneous general purpose machinery manufacturing scope 3 0.2260000 4.90e-04 1.95e-05 0.0044154 ar5 1 28 265 0.2493029 95989.2309 208.1182439 8.2822566 105886.7026 105.8867026 US EPA supply chain greenhouse gas emission factors v1.3 by naics-6 2024-07-10
Enterprise Enterprise USA West Coast purchased goods and services usd 2023 533840.640 supply chain all other legal services scope 3 0.0342000 1.66e-04 5.10e-06 0.0012316 ar5 1 28 265 0.0414443 18257.3499 88.6175462 2.7492793 22124.6573 22.1246573 US EPA supply chain greenhouse gas emission factors v1.3 by naics-6 2024-07-10
Enterprise Enterprise USA West Coast purchased goods and services usd 2023 130615.220 supply chain human resources consulting services scope 3 0.0648000 2.60e-04 9.80e-06 0.0029779 ar5 1 28 265 0.0776549 8463.8663 33.9599572 1.2800292 10142.9058 10.1429058 US EPA supply chain greenhouse gas emission factors v1.3 by naics-6 2024-07-10
Enterprise Enterprise USA West Coast purchased goods and services usd 2023 988346.400 supply chain landscape architectural services scope 3 0.0875000 2.97e-04 1.74e-05 0.0029476 ar5 1 28 265 0.1033746 86480.3100 293.5388808 17.1972274 102169.8782 102.1698782 US EPA supply chain greenhouse gas emission factors v1.3 by naics-6 2024-07-10
Enterprise Enterprise USA West Coast purchased goods and services usd 2023 154157.660 supply chain facilities support services scope 3 0.1740000 5.47e-04 2.32e-05 0.0036002 ar5 1 28 265 0.1990642 26823.4328 84.3242400 3.5764577 30687.2785 30.6872785 US EPA supply chain greenhouse gas emission factors v1.3 by naics-6 2024-07-10
Enterprise Enterprise USA West Coast purchased goods and services usd 2023 42621.180 supply chain janitorial services scope 3 0.1480000 5.80e-04 4.36e-05 0.0372984 ar5 1 28 265 0.2130924 6307.9346 24.7202844 1.8582834 9082.2487 9.0822487 US EPA supply chain greenhouse gas emission factors v1.3 by naics-6 2024-07-10
Enterprise Enterprise USA West Coast purchased goods and services usd 2023 160131.340 supply chain office administrative services scope 3 0.0835000 3.62e-04 1.70e-05 0.0020639 ar5 1 28 265 0.1002049 13370.9669 57.9675451 2.7222328 16045.9447 16.0459447 US EPA supply chain greenhouse gas emission factors v1.3 by naics-6 2024-07-10
Enterprise Enterprise USA West Coast purchased goods and services usd 2023 15929.275 supply chain security systems services (except locksmiths) scope 3 0.0631000 2.50e-04 8.70e-06 0.0016453 ar5 1 28 265 0.0740482 1005.1373 3.9823188 0.1384254 1179.5341 1.1795341 US EPA supply chain greenhouse gas emission factors v1.3 by naics-6 2024-07-10
Enterprise Enterprise USA West Coast purchased goods and services usd 2023 321181.500 supply chain professional and management development training scope 3 0.0892000 4.78e-04 1.22e-05 0.0022896 ar5 1 28 265 0.1081066 28649.3898 153.5247570 3.9184143 34721.8390 34.7218390 US EPA supply chain greenhouse gas emission factors v1.3 by naics-6 2024-07-10
Enterprise Enterprise USA West Coast purchased goods and services usd 2023 1795761.130 supply chain wireless telecommunications carriers (except satellite) scope 3 0.0837000 2.42e-04 9.60e-06 0.0033181 ar5 1 28 265 0.0963487 150305.2066 434.5741935 17.3111373 173019.3367 173.0193367 US EPA supply chain greenhouse gas emission factors v1.3 by naics-6 2024-07-10
Enterprise Enterprise USA West Coast business travel vehicle mile 2023 15000.000 mobile passenger car scope 1 0.3061310 9.00e-06 6.00e-06 0.0000000 ar5 1 28 265 0.3079762 4591.9651 0.1347935 0.0902014 4619.6427 4.6196427 EPA CCCL Emission Factors for GHG Inventories 2024-06-05
Enterprise Enterprise USA West Coast business travel vehicle mile 2023 500.000 mobile light duty truck scope 1 0.4054557 1.11e-05 9.80e-06 0.0000000 ar5 1 28 265 0.4083695 202.7278 0.0055354 0.0049129 204.1847 0.2041847 EPA CCCL Emission Factors for GHG Inventories 2024-06-05
Enterprise Enterprise USA West Coast employee commuting vehicle mile 2023 7000.000 mobile medium and heavy duty truck scope 1 1.3597866 1.19e-05 3.77e-05 0.0000000 ar5 1 28 265 1.3701234 9518.5062 0.0833611 0.2642390 9590.8636 9.5908636 EPA CCCL Emission Factors for GHG Inventories 2024-06-05
Enterprise Enterprise USA West Coast employee commuting vehicle mile 2023 8400.000 mobile passenger car scope 1 0.3061310 9.00e-06 6.00e-06 0.0000000 ar5 1 28 265 0.3079762 2571.5005 0.0754844 0.0505128 2586.9999 2.5869999 EPA CCCL Emission Factors for GHG Inventories 2024-06-05
Enterprise Enterprise USA West Coast employee commuting vehicle mile 2023 3000.000 mobile light duty truck scope 1 0.4054557 1.11e-05 9.80e-06 0.0000000 ar5 1 28 265 0.4083695 1216.3670 0.0332123 0.0294775 1225.1085 1.2251085 EPA CCCL Emission Factors for GHG Inventories 2024-06-05
V0001 Vehicle Light-Duty Truck 1988 GMC Van West Coast Operations 1988 motor gasoline gallon 2023 500.000 mobile scope 1 8.7800000 3.80e-04 8.00e-05 0.0000000 ar5 1 28 265 8.8118400 4390.0000 0.1900000 0.0400000 4405.9200 4.4059200 EPA CCCL Emission Factors for GHG Inventories 2024-06-05
V0002 Vehicle Passenger Car 2018 Hyundai Tucson West Coast Operations 2018 motor gasoline gallon 2023 600.000 mobile scope 1 8.7800000 3.80e-04 8.00e-05 0.0000000 ar5 1 28 265 8.8118400 5268.0000 0.2280000 0.0480000 5287.1040 5.2871040 EPA CCCL Emission Factors for GHG Inventories 2024-06-05
V0002 Vehicle Passenger Car 2018 Hyundai Tucson West Coast Operations 2018 motor gasoline gallon 2023 15000.000 mobile scope 1 8.7800000 3.80e-04 8.00e-05 0.0000000 ar5 1 28 265 8.8118400 131700.0000 5.7000000 1.2000000 132177.6000 132.1776000 EPA CCCL Emission Factors for GHG Inventories 2024-06-05
V0003 Vehicle Light-Duty Truck 2022 Dodge Ram West Coast Operations 2022 diesel fuel gallon 2023 20000.000 mobile scope 1 10.2100000 4.10e-04 8.00e-05 0.0000000 ar5 1 28 265 10.2426800 204200.0000 8.2000000 1.6000000 204853.6000 204.8536000 EPA CCCL Emission Factors for GHG Inventories 2024-06-05


ghg_inventory() has merged our AssetPortoflio, ActivityData, and EFL to generate a GHG emissions inventory report. This data can now be used for a variety of climate disclosure needs.

Visualize your GHG Inventory

Using ggplot2() we can begin to visualize the inventory created by ghgtools.




Visit ghgtools.io for updates and more information!