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

add support for linear interpolation for generateIIASASubmission #416

Merged
merged 6 commits into from
Dec 18, 2024

Conversation

fbenke-pik
Copy link
Collaborator

@fbenke-pik fbenke-pik commented Dec 17, 2024

Purpose of this PR

This adds support for linear interpolation when generation an IIASA submission.

  • mappings can now have an optional column interpolation, which can have the entry linear
  • the entry refers to the variable, not piam_variable, as interpolation is performed after applying the mapping
  • linear interpolation is performed using quitte::interpolate_missing_periods for the years between minimum and maximum year (usually 2005 and 2100)

Checklist:

  • I did not use Excel to open csv files or checked that no side-effects occur (changed values, many new quotation marks, …)
  • I added any renamed piam_variable to renamed_piam_variables.csv to guarantee backwards compatibility.

It is recommended to have a look at the tutorial before submission.

@fbenke-pik fbenke-pik changed the title Interpolate add support for linear interpolation for generateIIASASubmission Dec 17, 2024
@fbenke-pik fbenke-pik requested a review from laurinks December 17, 2024 16:54
@fbenke-pik
Copy link
Collaborator Author

@orichters Let us know if our chosen approach makes sense to you, or if there is a better way to do it.

@fbenke-pik fbenke-pik marked this pull request as ready for review December 17, 2024 17:15
@fbenke-pik fbenke-pik merged commit 0c523f6 into pik-piam:master Dec 18, 2024
2 checks passed
@fbenke-pik fbenke-pik deleted the interpolate branch December 18, 2024 18:21
@orichters
Copy link
Contributor

Looks good, just unsure if putting it into getMapping is ideal. Because if you follow this route to edit a template in R, you now have an empty interpolation column:

mappingdata <- getMapping("AR6")
...
write.table(mappingdata, "inst/mappings/test_mapping.csv", na = "",  dec = ".", sep = ";", row.names = FALSE, quote = FALSE)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants