openest.generate.calculation module

class openest.generate.calculation.Application(region)[source]

Bases: object

done()[source]
push(ds)[source]

Returns an interator of (yyyy, value, …).

class openest.generate.calculation.ApplicationByChunks(region)[source]

Bases: openest.generate.calculation.Application

push(ds)[source]

Returns an interator of (yyyy, value, …).

push_saved(ds)[source]

Returns an interator of (yyyy, value, …). Removes used daily values from saved.

class openest.generate.calculation.ApplicationByIrregular(region, func, *args, **kwargs)[source]

Bases: openest.generate.calculation.Application

push(ds)[source]

Returns an interator of (yyyy, value, …).

class openest.generate.calculation.ApplicationByYear(region, func, *args, **kwargs)[source]

Bases: openest.generate.calculation.ApplicationByChunks

push_saved(ds)[source]

Returns an interator of (yyyy, value, …). Removes used daily values from saved.

class openest.generate.calculation.ApplicationEach(region, func, finishfunc=<function <lambda>>, *args, **kwargs)[source]

Bases: openest.generate.calculation.Application

Pass every set of values to the calculation for a value.

done()[source]
push(ds)[source]

Returns an interator of (yyyy, value, …).

class openest.generate.calculation.ApplicationPassCall(region, subapp, handler, *handler_args, **handler_kw)[source]

Bases: openest.generate.calculation.Application

Apply a non-enumerator to all elements of a function. if unshift, tack on the result to the front of a sequence of results. Calls func with each year and value; returns the newly computed value

push(ds)[source]

Returns an interator of (yyyy, value, …).

class openest.generate.calculation.Calculation(unitses)[source]

Bases: object

apply(region, *args, **kwargs)[source]
cleanup()[source]
column_info()[source]

Returns an array of dictionaries, with ‘name’, ‘title’, and ‘description’.

static describe()[source]

Returns dictionary containing: - input_timerate: expected time rate of data, day, month, year, or any - output_timerate: expected time rate of data, day, month, year, or same - arguments: a list of subclasses of arguments.ArgumentType, describing each constructor argument - description: text description

enable_deltamethod()[source]

When applied, yield will contain arrays of coefficient multiplicands as a vector the length of the CSVV coefficients.

format(lang, *args, **kwargs)[source]

Returns a dictionary of FormatElements. Only keys in the tree of dependencies will be output.

test()[source]
class openest.generate.calculation.CustomFunctionalCalculation(subcalc, from_units, to_units, unshift, *handler_args, **handler_kw)[source]

Bases: openest.generate.calculation.FunctionalCalculation, openest.generate.calculation.Application

Calculation that creates a copy of itself for an application.

apply(region, *args, **kwargs)[source]
done()[source]
donehandler(*allargs, **allkwargs)[source]
init_apply()[source]
push(ds)[source]

Returns an interator of (yyyy, value, …).

pushhandler(ds, *allargs, **allkwargs)[source]
class openest.generate.calculation.FunctionalCalculation(subcalc, from_units, to_units, unshift, *handler_args, **handler_kw)[source]

Bases: openest.generate.calculation.Calculation

Calculation that calls a handler when it’s applied.

apply(region, *args, **kwargs)[source]
cleanup()[source]
enable_deltamethod()[source]

When applied, yield will contain arrays of coefficient multiplicands as a vector the length of the CSVV coefficients.

format(lang, *args, **kwargs)[source]

Returns a dictionary of FormatElements. Only keys in the tree of dependencies will be output.

format_handler(substr, lang, *handler_args, **handler_kw)[source]
handler(year, result, *handler_args, **handler_kw)[source]