Auxiliary timeseries functions

pyam_analysis.cumulative(x, first_year, last_year)[source]

Returns the cumulative sum of a timeseries (indexed over years), implements linear interpolation between years, ignores nan’s in the range. The function includes the last-year value of the series, and raises a warning if start_year or last_year is outside of the timeseries range and returns nan

Parameters:

x: pandas.Series

a timeseries to be summed over time

first_year: int

first year of the sum

last_year: int

last year of the sum (inclusive)

pyam_analysis.fill_series(x, year)[source]

Returns the value of a timeseries (indexed over years) for a year by linear interpolation.

Parameters:

x: pandas.Series

a timeseries to be interpolated

year: int

year of interpolation