diff --git a/etl/steps/data/garden/climate/2025-02-12/sst_annual.meta.yml b/etl/steps/data/garden/climate/2025-02-12/sst_annual.meta.yml index c1e9e437cb2..a2cba7ff645 100644 --- a/etl/steps/data/garden/climate/2025-02-12/sst_annual.meta.yml +++ b/etl/steps/data/garden/climate/2025-02-12/sst_annual.meta.yml @@ -17,11 +17,4 @@ tables: unit: "" description_processing: |- Annual anomalies of the Oceanic Niño Index (ONI) are calculated by taking the average of the monthly ONI values for a given year. - annual_nino_classification: - title: Annual El Niño or La Niña classification - unit: "" - description_processing: |- - The annual classification of the El Niño-Southern Oscillation (ENSO) state based on the Oceanic Niño Index (ONI) is determined by the majority of the monthly ONI values for a given year. - - diff --git a/etl/steps/data/garden/climate/2025-02-12/sst_annual.py b/etl/steps/data/garden/climate/2025-02-12/sst_annual.py index 2912522f861..91200bc19ad 100644 --- a/etl/steps/data/garden/climate/2025-02-12/sst_annual.py +++ b/etl/steps/data/garden/climate/2025-02-12/sst_annual.py @@ -21,24 +21,7 @@ def run(dest_dir: str) -> None: # # Calculate the annual average for the dataset tb_annual = tb.groupby(["country", "year"]).mean().reset_index() - - # Classify the year based on nino_classification - def classify_year(group): - if (group["nino_classification"] == 1).sum() > 6: - return 1 - elif (group["nino_classification"] == 2).sum() > 6: - return 2 - else: - return 0 - - tb_annual["annual_nino_classification"] = ( - tb.groupby(["country", "year"]).apply(classify_year).reset_index(drop=True) - ) tb_annual = tb_annual.rename(columns={"oni_anomaly": "annual_oni_anomaly"}) - tb_annual["annual_nino_classification"] = tb_annual["annual_nino_classification"].copy_metadata( - tb["nino_classification"] - ) - tb_annual = tb_annual.drop(columns={"month", "nino_classification"}) tb_annual = tb_annual.format(["country", "year"]) diff --git a/etl/steps/data/grapher/climate/2025-02-12/sst_by_month.meta.yml b/etl/steps/data/grapher/climate/2025-02-12/sst_by_month.meta.yml index 1f355a849d7..0b72f614d8f 100644 --- a/etl/steps/data/grapher/climate/2025-02-12/sst_by_month.meta.yml +++ b/etl/steps/data/grapher/climate/2025-02-12/sst_by_month.meta.yml @@ -4,9 +4,6 @@ definitions: presentation: topic_tags: - Climate Change - display: - yearIsDay: true - zeroDay: "1949-01-01" processing_level: minor # Learn more about the available fields: diff --git a/etl/steps/data/grapher/climate/2025-02-12/sst_by_month.py b/etl/steps/data/grapher/climate/2025-02-12/sst_by_month.py index 86cf1251cbd..b7440dda3f2 100644 --- a/etl/steps/data/grapher/climate/2025-02-12/sst_by_month.py +++ b/etl/steps/data/grapher/climate/2025-02-12/sst_by_month.py @@ -21,7 +21,6 @@ def run(dest_dir: str) -> None: # Combine month and year into a single column tb["date"] = pd.to_datetime(tb["year"].astype(str) + "-" + tb["month"].astype(str) + "-01") tb["date"] = tb["date"] + pd.offsets.Day(14) - tb["days_since_1941"] = (tb["date"] - pd.to_datetime("1949-01-01")).dt.days # Create colour_date column based on decades def year_to_decade(year): @@ -43,13 +42,9 @@ def year_to_decade(year): # Create date_as_country column (keep uncommented but might use in the future) # tb["date_as_country"] = tb["date"].dt.strftime("%B %Y") - # Drop the original year and month columns - tb = tb.drop(columns=["year", "month", "date"]) + tb = tb.drop(columns=["year", "month"]) - # Rename the date column to year for grapher purposes - tb = tb.rename(columns={"days_since_1941": "year"}) - - tb = tb.format(["year", "country"]) + tb = tb.format(["date", "country"]) # # Save outputs. #