Use scipy.interpolate in message_ix.tools.add_year
- Dominant language
- Jupyter Notebook
- Stars
- 150
- Forks
- 178
- Avg merge
- 17h 32m
- Merged PRs (30d)
- 2
Description
About 500 of the ~1000 lines in `tools.add_year` are devoted to two functions, `interpolate_1d()` and `interpolate_2d()`, and one utility function, `intpol()` to do interpolation.
These can likely be slimmed down, and maybe made more performant, by fully using lower-level methods in pandas and scipy, e.g. [`scipy.interpolate.griddata()`](https://docs.scipy.org/doc/scipy/reference/tutorial/interpolate.html#multivariate-data-interpolation-griddata).
Contributor guide
Research direction
Start in message_ix.tools.add_year and read interpolate_1d(), interpolate_2d(), and intpol() to understand their current interpolation behavior. Compare the existing logic with the referenced pandas and scipy.interpolate.griddata() APIs. Done means the interpolation implementation is slimmer or more performant while preserving the existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100