From 9c129f4d2e1cfad1b0eb143f50f6fe161148feca Mon Sep 17 00:00:00 2001 From: Pablo Rosado Date: Fri, 6 Sep 2024 15:28:19 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=8A=20Fix=20sea=20ice=20anomalies=20(#?= =?UTF-8?q?3252)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 📊 Fix sea ice anomalies * Fix condition --- .../grapher/climate/2024-07-23/sea_ice_anomalies_by_month.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etl/steps/data/grapher/climate/2024-07-23/sea_ice_anomalies_by_month.py b/etl/steps/data/grapher/climate/2024-07-23/sea_ice_anomalies_by_month.py index 0da27ec4300..9f04bb5edfc 100644 --- a/etl/steps/data/grapher/climate/2024-07-23/sea_ice_anomalies_by_month.py +++ b/etl/steps/data/grapher/climate/2024-07-23/sea_ice_anomalies_by_month.py @@ -140,7 +140,7 @@ def run(dest_dir: str) -> None: # For each month's sea ice extent, subtract a certain baseline sea ice extent, calculated as an average value (for that month) between two reference years (defined above as REFERENCE_YEAR_MIN and REFERENCE_YEAR_MAX) tb_reference = ( - tb[(tb["year"] >= REFERENCE_YEAR_MIN) & (tb["year"] >= REFERENCE_YEAR_MAX)] + tb[(tb["year"] >= REFERENCE_YEAR_MIN) & (tb["year"] <= REFERENCE_YEAR_MAX)] .groupby(["location", "month_name"], as_index=False) .agg({"sea_ice_extent": "mean"}) .rename(columns={"sea_ice_extent": "sea_ice_extent_reference"}, errors="raise")