diff --git a/rules/build_sector.smk b/rules/build_sector.smk index cd259d39..227f64da 100644 --- a/rules/build_sector.smk +++ b/rules/build_sector.smk @@ -437,7 +437,7 @@ rule build_salt_cavern_potentials: rule build_ammonia_production: input: - usgs="data/bundle/myb1-2017-nitro.xls", + usgs="data/bundle/myb1-2021-nitro-ert.xlsx", output: ammonia_production=resources("ammonia_production.csv"), threads: 1 diff --git a/scripts/build_ammonia_production.py b/scripts/build_ammonia_production.py index 37692f2f..83dfde20 100644 --- a/scripts/build_ammonia_production.py +++ b/scripts/build_ammonia_production.py @@ -18,7 +18,8 @@ Outputs Description ------- -This functions takes data from the `Minerals Yearbook `_ (June 2024) published by the US Geological Survey (USGS) and the National Minerals Information Center and extracts the annual ammonia production per country in ktonN/a. The data is converted to ktonNH3/a. +This functions takes data from the `Minerals Yearbook `_ + (July 2024) published by the US Geological Survey (USGS) and the National Minerals Information Center and extracts the annual ammonia production per country in ktonN/a. The data is converted to ktonNH3/a. """ import country_converter as coco @@ -48,9 +49,9 @@ if __name__ == "__main__": ammonia.index = cc.convert(ammonia.index, to="iso2") - years = [str(i) for i in range(2013, 2018)] + years = [str(i) for i in range(2017, 2022)] - ammonia = ammonia[years] + ammonia = ammonia.rename(columns=lambda x: str(x))[years] # convert from ktonN to ktonNH3 ammonia *= 17 / 14