Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update energy balances April 2023 link #1074

Merged
merged 2 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions rules/build_sector.smk
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ rule build_energy_totals:
swiss_transport="data/gr-e-11.03.02.01.01-cc.csv",
idees="data/bundle/jrc-idees-2015",
district_heat_share="data/district_heat_share.csv",
eurostat="data/eurostat/eurostat-energy_balances-april_2023_edition",
eurostat="data/eurostat/Balances-April2023",
output:
energy_name=resources("energy_totals.csv"),
co2_name=resources("co2_totals.csv"),
Expand Down Expand Up @@ -509,7 +509,7 @@ rule build_industrial_production_per_country:
input:
ammonia_production=resources("ammonia_production.csv"),
jrc="data/bundle/jrc-idees-2015",
eurostat="data/eurostat/eurostat-energy_balances-april_2023_edition",
eurostat="data/eurostat/Balances-April2023",
output:
industrial_production_per_country=resources(
"industrial_production_per_country.csv"
Expand Down Expand Up @@ -951,7 +951,7 @@ rule prepare_sector_network:
else []
),
network=resources("networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc"),
eurostat="data/eurostat/eurostat-energy_balances-april_2023_edition",
eurostat="data/eurostat/Balances-April2023",
pop_weighted_energy_totals=resources(
"pop_weighted_energy_totals_s{simpl}_{clusters}.csv"
),
Expand Down
2 changes: 1 addition & 1 deletion rules/postprocess.smk
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ rule plot_summary:
costs=RESULTS + "csvs/costs.csv",
energy=RESULTS + "csvs/energy.csv",
balances=RESULTS + "csvs/supply_energy.csv",
eurostat="data/eurostat/eurostat-energy_balances-april_2023_edition",
eurostat="data/eurostat/Balances-April2023",
co2="data/bundle/eea/UNFCCC_v23.csv",
output:
costs=RESULTS + "graphs/costs.pdf",
Expand Down
2 changes: 1 addition & 1 deletion rules/retrieve.smk
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if config["enable"]["retrieve"] and config["enable"].get("retrieve_databundle",

rule retrieve_eurostat_data:
output:
directory("data/eurostat/eurostat-energy_balances-april_2023_edition"),
directory("data/eurostat/Balances-April2023"),
log:
"logs/retrieve_eurostat_data.log",
retries: 2
Expand Down
8 changes: 4 additions & 4 deletions scripts/retrieve_eurostat_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
set_scenario_config(snakemake)

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"
tarball_fn = Path(f"{rootpath}/data/eurostat/eurostat_2023.zip")
to_fn = Path(
f"{rootpath}/data/eurostat/eurostat-energy_balances-april_2023_edition/"
url_eurostat = (
"https://ec.europa.eu/eurostat/documents/38154/4956218/Balances-April2023.zip"
)
tarball_fn = Path(f"{rootpath}/data/eurostat/eurostat_2023.zip")
to_fn = Path(f"{rootpath}/data/eurostat/Balances-April2023/")

logger.info(f"Downloading Eurostat data from '{url_eurostat}'.")
progress_retrieve(url_eurostat, tarball_fn, disable=disable_progress)
Expand Down
Loading