From 17c498de65fff73a1aa4cafa004e6f222945f4ff Mon Sep 17 00:00:00 2001 From: Ted Wong Date: Sun, 15 Dec 2024 11:52:44 -0500 Subject: [PATCH] add output columns in tonnes CO2e --- city_metrix/metrics/ghg_emissions.py | 1 + 1 file changed, 1 insertion(+) diff --git a/city_metrix/metrics/ghg_emissions.py b/city_metrix/metrics/ghg_emissions.py index 232a469..ca236b8 100644 --- a/city_metrix/metrics/ghg_emissions.py +++ b/city_metrix/metrics/ghg_emissions.py @@ -31,6 +31,7 @@ def ghg_emissions(zones, years=[2023]): result_Tg = gpd.GeoDataFrame([i['properties']['mean'] for i in results.getInfo()['features']]) result_tonne = result_Tg * 1000000 zones_copy[f'{species}_{sector}_{year}_tonnes'] = result_tonne + zones_copy[f'{species}_{sector}_{year}_tonnes-CO2e'] = (result_tonne * GWP[species]) if sector == 'sum': year_total += (result_tonne * GWP[species]) zones_copy[f'all-species_{year}_tonnes-CO2e'] = year_total