EnergySystemsModellingLab / EnergySystemsModellingLab/MUSE_OS
Change interpolation method for capacity data
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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