update ammonia data
This commit is contained in:
parent
201889424c
commit
fb2ab4c50b
@ -437,7 +437,7 @@ rule build_salt_cavern_potentials:
|
|||||||
|
|
||||||
rule build_ammonia_production:
|
rule build_ammonia_production:
|
||||||
input:
|
input:
|
||||||
usgs="data/bundle/myb1-2017-nitro.xls",
|
usgs="data/bundle/myb1-2021-nitro-ert.xlsx",
|
||||||
output:
|
output:
|
||||||
ammonia_production=resources("ammonia_production.csv"),
|
ammonia_production=resources("ammonia_production.csv"),
|
||||||
threads: 1
|
threads: 1
|
||||||
|
@ -18,7 +18,8 @@ Outputs
|
|||||||
Description
|
Description
|
||||||
-------
|
-------
|
||||||
|
|
||||||
This functions takes data from the `Minerals Yearbook <https://www.usgs.gov/centers/national-minerals-information-center/nitrogen-statistics-and-information>`_ (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 <https://www.usgs.gov/centers/national-minerals-information-center/nitrogen-statistics-and-information>`_
|
||||||
|
(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
|
import country_converter as coco
|
||||||
@ -48,9 +49,9 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
ammonia.index = cc.convert(ammonia.index, to="iso2")
|
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
|
# convert from ktonN to ktonNH3
|
||||||
ammonia *= 17 / 14
|
ammonia *= 17 / 14
|
||||||
|
Loading…
Reference in New Issue
Block a user