EnergySystemsModellingLab / EnergySystemsModellingLab/MUSE_OS

Change interpolation method for capacity data

Open
#656 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
29
Forks
12
PR merge metrics
No merged PRs in 30d

Description

The `interpolate_capacity` function is currently using linear interpolation. However, as pointed out [here](https://github.com/EnergySystemsModellingLab/MUSE_OS/pull/642#discussion_r1944376005), linear interpolation doesn't make much sense because capacity profiles are step-wise. Forward filling (i.e. taking the previous specified value) would make more sense.

We can simply change `interpolate_capacity` to return `data.reindex(year=year, method="ffill")`

I've given this a try, but some of the results changed and I'd like to understand why before implementing this change

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the interpolate_capacity function and inspect its callers to understand how capacity data is indexed and why forward filling changes results. Compare the current linear interpolation with data.reindex(year=year, method="ffill") across the affected capacity profiles; done means the interpolation behavior is understood and the intended result is confirmed before changing it.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-engineering
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.