Sources

The following functions construct nodes with no parents.

TimeDag.block_nodeFunction
block_node(block::Block)

Construct a node whose values are read directly from the given block.

source
TimeDag.constantFunction
constant(value) -> Node
constant(T, value) -> Node{T}

Explicitly wrap value into a TimeDag constant node, regardless of its type.

If T is provided, this allows creation of a node with a value_type that is a supertype of the type of the value — otherwise the constant node will always just use the concrete type of value.

In many cases this isn't required, since many TimeDag functions which expect nodes will automatically wrap non-node arguments into a constant node.

Warning

If value is already a node, this will wrap it up in an additional node. This is very likely not what you want to do.

source
TimeDag.empty_nodeFunction
empty_node(T)

Construct a node with value type T which, if evaluated, will never tick.

source
TimeDag.iterdatesFunction
iterdates(time_of_day::Time=Time(0), tz::TimeZone=tz"UTC", occurrence=1)

Create a node which ticks exactly once a day at time_of_day in timezone tz.

This defaults to midnight in UTC. If tz is set otherwise, then each knot will appear at time_of_day in that timezone.

Note that: * All knot times in TimeDag are considered to be in UTC. * It is possible to select a time_of_day that does not exist for every day. This will lead to an exception being raised during evaluation.

In a given knot, each value will be of type DateTime, and equal the time of the knot.

source
TimeDag.pulseFunction
pulse(delta::TimePeriod[; epoch::DateTime])

Obtain a node which ticks every delta. Each value will equal the time of the knot.

Knots will be placed such that the difference between its time and epoch will always be an integer multiple of delta. By default epoch is set to the Julia DateTime epoch, which is DateTime(0, 12, 31).

source
TimeDag.tea_fileFunction
tea_file(path::AbstractString, value_field_name)

Get a node that will read data from the tea file at path.

Such a tea file must observe the following properties, which will be verified at runtime:

  • Have a primary time field which is compatible with a Julia DateTime.
  • Have exactly one column with name value_field_name.
  • Have strictly increasing times.

Upon node creation, the metadata section of the file will be parsed to infer the value type of the resulting node. However, the bulk of the data will only be read at evaluation time.

See also

source