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 an "annualized growth rate" feature #604

Merged
merged 13 commits into from
Jan 23, 2022

Conversation

danielhuppmann
Copy link
Member

@danielhuppmann danielhuppmann commented Jan 17, 2022

Please confirm that this PR has done the following:

  • Tests Added
  • Documentation Added
  • Name of contributors Added to AUTHORS.rst
  • Description in RELEASE_NOTES.md Added

Description of PR

This PR adds a growth_rate() method to the timeseries and compute modules so it can be called as

df.compute.growth_rate({"Primary Energy|Wind": "Growth rate of Wind"})

where df is an IamDataFrame, or

pyam.timeseries.growth_rate(x)

where x is a pd.Series indexed over an (integer) time domain.

@codecov
Copy link

codecov bot commented Jan 17, 2022

Codecov Report

Merging #604 (b91feff) into main (8dc1d27) will increase coverage by 0.0%.
The diff coverage is 100.0%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #604   +/-   ##
=====================================
  Coverage   94.2%   94.3%           
=====================================
  Files         52      53    +1     
  Lines       5415    5471   +56     
=====================================
+ Hits        5106    5162   +56     
  Misses       309     309           
Impacted Files Coverage Δ
pyam/core.py 94.4% <ø> (ø)
pyam/compute.py 100.0% <100.0%> (ø)
pyam/timeseries.py 96.9% <100.0%> (+0.6%) ⬆️
tests/test_feature_growth_rate.py 100.0% <100.0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8dc1d27...b91feff. Read the comment docs.

@danielhuppmann danielhuppmann marked this pull request as ready for review January 18, 2022 05:52
@danielhuppmann danielhuppmann merged commit 28089d3 into IAMconsortium:main Jan 23, 2022
@danielhuppmann danielhuppmann deleted the compute/growth-rate branch January 23, 2022 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant