openest.generate.functions module¶
-
class
openest.generate.functions.AuxillaryResult(subcalc_main, subcalc_aux, auxname)[source]¶ Bases:
openest.generate.calculation.CalculationProduce an additional output, but then pass the main result on.
-
class
openest.generate.functions.AuxillaryResultApplication(region, subapp_main, subapp_aux)[source]¶ Bases:
openest.generate.calculation.ApplicationPerform both main and auxillary calculation, and order as main[0], aux, main[1:]
-
class
openest.generate.functions.InstaZScore(subcalc, lastyear, units='z-score')[source]¶ Bases:
openest.generate.calculation.CustomFunctionalCalculationCollects up to baseyear of values and then uses them to represent all values as a z-score.
-
class
openest.generate.functions.Instabase(subcalc, baseyear, func=<function <lambda>>, units='portion', skip_on_missing=True)[source]¶ Bases:
openest.generate.calculation.CustomFunctionalCalculationRe-base the results of make_generator(…) to the values in baseyear baseyear is the year to use as the ‘denominator’; None for the first year Default func constructs a porportional change; x - y makes simple difference. skip_on_missing: If we never encounter the year and this is false,
still print out the existing results.Tacks on the value to the front of the results
-
class
openest.generate.functions.Positive(subcalc)[source]¶ Bases:
openest.generate.calculation.CalculationReturn 0 if subcalc is less than 0
-
class
openest.generate.functions.Scale(subcalc, scale_dict, from_units, to_units, func=<function <lambda>>, latexpair=('\bar{I}', 'Region-specific scaling'))[source]¶
-
class
openest.generate.functions.SpanInstabase(subcalc, year1, year2, func=<function <lambda>>, units='portion', skip_on_missing=True)[source]¶ Bases:
openest.generate.functions.InstabaseRe-base the results of a calculation to the average of values between two years. Default func constructs a porportional change; x - y makes simple difference. skip_on_missing: If we never encounter the year and this is false,
still print out the existing results.
-
class
openest.generate.functions.Sum(subcalcs)[source]¶