move eurostat into data/eurostat subdirectory from sector-bundle

This commit is contained in:
Fabian Neumann 2024-03-05 18:42:15 +01:00
parent 41f23f9589
commit 5b513f81db
5 changed files with 7 additions and 24 deletions

View File

@ -1,7 +1,4 @@
,Unit,Values,Description ,Unit,Values,Description
energy_totals_year ,--,"{1990,1995,2000,2005,2010,2011,…} ",The year for the sector energy use. The year must be avaliable in the Eurostat report energy_totals_year ,--,"{1990,1995,2000,2005,2010,2011,…} ",The year for the sector energy use. The year must be avaliable in the Eurostat report
base_emissions_year ,--,"YYYY; e.g. 1990","The base year for the sector emissions. See `European Environment Agency (EEA) <https://www.eea.europa.eu/data-and-maps/data/national-emissions-reported-to-the-unfccc-and-to-the-eu-greenhouse-gas-monitoring-mechanism-16>`_." base_emissions_year ,--,"YYYY; e.g. 1990","The base year for the sector emissions. See `European Environment Agency (EEA) <https://www.eea.europa.eu/data-and-maps/data/national-emissions-reported-to-the-unfccc-and-to-the-eu-greenhouse-gas-monitoring-mechanism-16>`_."
eurostat_report_year ,--,"{2016,2017,2018}","The publication year of the Eurostat report. 2016 includes Bosnia and Herzegovina, 2017 does not"
emissions ,--,"{CO2, All greenhouse gases - (CO2 equivalent)}","Specify which sectoral emissions are taken into account. Data derived from EEA. Currently only CO2 is implemented." emissions ,--,"{CO2, All greenhouse gases - (CO2 equivalent)}","Specify which sectoral emissions are taken into account. Data derived from EEA. Currently only CO2 is implemented."

1 Unit Values Description
2 energy_totals_year -- {1990,1995,2000,2005,2010,2011,…} The year for the sector energy use. The year must be avaliable in the Eurostat report
3 base_emissions_year -- YYYY; e.g. 1990 The base year for the sector emissions. See `European Environment Agency (EEA) <https://www.eea.europa.eu/data-and-maps/data/national-emissions-reported-to-the-unfccc-and-to-the-eu-greenhouse-gas-monitoring-mechanism-16>`_.
eurostat_report_year -- {2016,2017,2018} The publication year of the Eurostat report. 2016 includes Bosnia and Herzegovina, 2017 does not
emissions -- {CO2, All greenhouse gases - (CO2 equivalent)} Specify which sectoral emissions are taken into account. Data derived from EEA. Currently only CO2 is implemented.
4 emissions -- {CO2, All greenhouse gases - (CO2 equivalent)} Specify which sectoral emissions are taken into account. Data derived from EEA. Currently only CO2 is implemented.

View File

@ -270,7 +270,7 @@ rule build_energy_totals:
swiss="data/switzerland-new_format-all_years.csv", swiss="data/switzerland-new_format-all_years.csv",
idees="data/bundle-sector/jrc-idees-2015", idees="data/bundle-sector/jrc-idees-2015",
district_heat_share="data/district_heat_share.csv", district_heat_share="data/district_heat_share.csv",
eurostat="data/bundle-sector/eurostat-energy_balances-april_2023_edition", eurostat="data/eurostat/eurostat-energy_balances-april_2023_edition",
output: output:
energy_name=resources("energy_totals.csv"), energy_name=resources("energy_totals.csv"),
co2_name=resources("co2_totals.csv"), co2_name=resources("co2_totals.csv"),
@ -865,7 +865,7 @@ rule prepare_sector_network:
), ),
network=resources("networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc"), network=resources("networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc"),
energy_totals_name=resources("energy_totals.csv"), energy_totals_name=resources("energy_totals.csv"),
eurostat="data/bundle-sector/eurostat-energy_balances-april_2023_edition", eurostat="data/eurostat/eurostat-energy_balances-april_2023_edition",
pop_weighted_energy_totals=resources( pop_weighted_energy_totals=resources(
"pop_weighted_energy_totals_s{simpl}_{clusters}.csv" "pop_weighted_energy_totals_s{simpl}_{clusters}.csv"
), ),

View File

@ -247,7 +247,7 @@ rule plot_summary:
costs=RESULTS + "csvs/costs.csv", costs=RESULTS + "csvs/costs.csv",
energy=RESULTS + "csvs/energy.csv", energy=RESULTS + "csvs/energy.csv",
balances=RESULTS + "csvs/supply_energy.csv", balances=RESULTS + "csvs/supply_energy.csv",
eurostat="data/bundle-sector/eurostat-energy_balances-april_2023_edition", eurostat="data/eurostat/eurostat-energy_balances-april_2023_edition",
co2="data/bundle-sector/eea/UNFCCC_v23.csv", co2="data/bundle-sector/eea/UNFCCC_v23.csv",
output: output:
costs=RESULTS + "graphs/costs.pdf", costs=RESULTS + "graphs/costs.pdf",

View File

@ -135,20 +135,10 @@ if config["enable"]["retrieve"] and config["enable"].get(
"h2_salt_caverns_GWh_per_sqkm.geojson", "h2_salt_caverns_GWh_per_sqkm.geojson",
] ]
datafolders = [
protected(
directory("data/bundle-sector/eurostat-energy_balances-june_2016_edition")
),
protected(
directory("data/bundle-sector/eurostat-energy_balances-may_2018_edition")
),
protected(directory("data/bundle-sector/jrc-idees-2015")),
]
rule retrieve_sector_databundle: rule retrieve_sector_databundle:
output: output:
protected(expand("data/bundle-sector/{files}", files=datafiles)), protected(expand("data/bundle-sector/{files}", files=datafiles)),
*datafolders, protected(directory("data/bundle-sector/jrc-idees-2015")),
log: log:
"logs/retrieve_sector_databundle.log", "logs/retrieve_sector_databundle.log",
retries: 2 retries: 2
@ -159,11 +149,7 @@ if config["enable"]["retrieve"] and config["enable"].get(
rule retrieve_eurostat_data: rule retrieve_eurostat_data:
output: output:
protected( directory("data/eurostat/eurostat-energy_balances-april_2023_edition"),
directory(
"data/bundle-sector/eurostat-energy_balances-april_2023_edition"
)
),
log: log:
"logs/retrieve_eurostat_data.log", "logs/retrieve_eurostat_data.log",
retries: 2 retries: 2

View File

@ -28,9 +28,9 @@ if __name__ == "__main__":
disable_progress = snakemake.config["run"].get("disable_progressbar", False) disable_progress = snakemake.config["run"].get("disable_progressbar", False)
url_eurostat = "https://ec.europa.eu/eurostat/documents/38154/4956218/Balances-December2022.zip/f7cf0d19-5c0f-60ad-4e48-098a5ddd6e48?t=1671184070589" url_eurostat = "https://ec.europa.eu/eurostat/documents/38154/4956218/Balances-December2022.zip/f7cf0d19-5c0f-60ad-4e48-098a5ddd6e48?t=1671184070589"
tarball_fn = Path(f"{rootpath}/data/bundle-sector/eurostat_2023.zip") tarball_fn = Path(f"{rootpath}/data/eurostat/eurostat_2023.zip")
to_fn = Path( to_fn = Path(
f"{rootpath}/data/bundle-sector/eurostat-energy_balances-april_2023_edition/" f"{rootpath}/data/eurostat/eurostat-energy_balances-april_2023_edition/"
) )
logger.info(f"Downloading Eurostat data from '{url_eurostat}'.") logger.info(f"Downloading Eurostat data from '{url_eurostat}'.")