Skip to content
Closed
Show file tree
Hide file tree
Changes from 4 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
1 change: 1 addition & 0 deletions docs/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Upcoming Release

* Include unit test execution and compile_cost_assumptions_usa.py in ci.yaml (https://github.com/PyPSA/technology-data/pull/174)
* Align `snakemake` version and the related `mock_snakemake` to PyPSA-Eur (https://github.com/PyPSA/technology-data/pull/177)
* Improve filename consistency in the sources (https://github.com/PyPSA/technology-data/pull/178)

`v0.11.0 <https://github.com/PyPSA/technology-data/releases/tag/v0.11.0>`__ (24th January 2025)
=======================================================================================
Expand Down
672 changes: 336 additions & 336 deletions outputs/US/costs_2020.csv

Large diffs are not rendered by default.

672 changes: 336 additions & 336 deletions outputs/US/costs_2025.csv

Large diffs are not rendered by default.

672 changes: 336 additions & 336 deletions outputs/US/costs_2030.csv

Large diffs are not rendered by default.

672 changes: 336 additions & 336 deletions outputs/US/costs_2035.csv

Large diffs are not rendered by default.

672 changes: 336 additions & 336 deletions outputs/US/costs_2040.csv

Large diffs are not rendered by default.

672 changes: 336 additions & 336 deletions outputs/US/costs_2045.csv

Large diffs are not rendered by default.

672 changes: 336 additions & 336 deletions outputs/US/costs_2050.csv

Large diffs are not rendered by default.

694 changes: 347 additions & 347 deletions outputs/costs_2020.csv

Large diffs are not rendered by default.

694 changes: 347 additions & 347 deletions outputs/costs_2025.csv

Large diffs are not rendered by default.

694 changes: 347 additions & 347 deletions outputs/costs_2030.csv

Large diffs are not rendered by default.

694 changes: 347 additions & 347 deletions outputs/costs_2035.csv

Large diffs are not rendered by default.

694 changes: 347 additions & 347 deletions outputs/costs_2040.csv

Large diffs are not rendered by default.

694 changes: 347 additions & 347 deletions outputs/costs_2045.csv

Large diffs are not rendered by default.

694 changes: 347 additions & 347 deletions outputs/costs_2050.csv

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions scripts/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

# coding: utf-8

import os
import re
from pathlib import Path

Expand Down Expand Up @@ -59,6 +60,12 @@ def __dir__(self):
return dict_keys + obj_attrs


def get_relative_fn(fn):
if isinstance(fn, str):
fn = Path(fn).resolve()
return fn.relative_to(os.path.commonpath([fn, os.getcwd()]))


def mock_snakemake(
rulename,
root_dir=None,
Expand Down
9 changes: 5 additions & 4 deletions scripts/compile_cost_assumptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

import numpy as np
import pandas as pd
from _helpers import get_relative_fn

try:
pd.set_option("future.no_silent_downcasting", True)
Expand Down Expand Up @@ -149,7 +150,7 @@
# 'gas pipeline': '102 6 gas Main distri line',
# "DH main transmission": "103_11 DH transmission",
"biochar pyrolysis": "105 Slow pyrolysis, Straw",
#'biomethanation': '106 Biomethanation of biogas',
# 'biomethanation': '106 Biomethanation of biogas',
"electrolysis small": "86 AEC 10 MW",
}
# [DEA-sheet-names]
Expand Down Expand Up @@ -385,7 +386,7 @@ def get_dea_maritime_data(fn, data):
df.loc[df_i, "unit"] = df.loc[df_i, "unit"].str.replace("GJ", "MWh")

# add source + cost year
df["source"] = f"Danish Energy Agency, {fn}"
df["source"] = f"Danish Energy Agency, {get_relative_fn(fn)}"
# cost year is 2023 p.10
df["currency_year"] = 2023
# add sheet name
Expand Down Expand Up @@ -488,7 +489,7 @@ def get_dea_vehicle_data(fn, data):
df.loc["Upfront vehicle cost", "unit"] += "/vehicle"

# add source + cost year
df["source"] = f"Danish Energy Agency, {fn}"
df["source"] = f"Danish Energy Agency, {get_relative_fn(fn)}"
# cost year is 2022 p.12
df["currency_year"] = 2022
# add sheet name
Expand Down Expand Up @@ -890,7 +891,7 @@ def get_data_DEA(tech, data_in, expectation=None):
# if year-specific data is missing and not fixed by interpolation fill forward with same values
df_final = df_final.ffill(axis=1)

df_final["source"] = source_dict["DEA"] + ", " + excel_file.replace("inputs/", "")
df_final["source"] = f"{source_dict['DEA']}, {get_relative_fn(excel_file)}"
if (
tech in cost_year_2020
and ("for_carbon_capture_transport_storage" not in excel_file)
Expand Down