Temporal Properties#

class raphtory.TemporalProp#

Bases: object

A view of a temporal property

Methods:

at(t)

Get the value of the property at time t

average()

Compute the average of all property values.

count()

Count the number of properties.

history()

Get the timestamps at which the property was updated

history_date_time()

Get the timestamps at which the property was updated

items()

List update timestamps and corresponding property values

items_date_time()

List update timestamps and corresponding property values

max()

Find the maximum property value and its associated time.

mean()

Compute the mean of all property values.

median()

Compute the median of all property values.

min()

Find the minimum property value and its associated time.

ordered_dedupe(latest_time)

sum()

Compute the sum of all property values.

unique()

value()

Get the latest value of the property

values()

Get the property values for each update

at(t)#

Get the value of the property at time t

average()#

Compute the average of all property values. Alias for mean().

Returns:

The average of each property values, or None if count is zero.

Return type:

Prop

count()#

Count the number of properties.

Returns:

The number of properties.

Return type:

int

history()#

Get the timestamps at which the property was updated

history_date_time()#

Get the timestamps at which the property was updated

items()#

List update timestamps and corresponding property values

items_date_time()#

List update timestamps and corresponding property values

max()#

Find the maximum property value and its associated time.

Returns:

A tuple containing the time and the maximum property value.

Return type:

(i64, Prop)

mean()#

Compute the mean of all property values. Alias for mean().

Returns:

The mean of each property values, or None if count is zero.

Return type:

Prop

median()#

Compute the median of all property values.

Returns:

A tuple containing the time and the median property value, or None if empty

Return type:

(i64, Prop)

min()#

Find the minimum property value and its associated time.

Returns:

A tuple containing the time and the minimum property value.

Return type:

(i64, Prop)

ordered_dedupe(latest_time)#
sum()#

Compute the sum of all property values.

Returns:

The sum of all property values.

Return type:

Prop

unique()#
value()#

Get the latest value of the property

values()#

Get the property values for each update

class raphtory.TemporalProperties#

Bases: object

A view of the temporal properties of an entity

Methods:

get(key)

Get property value for key if it exists

histories()

Get the histories of all properties

histories_date_time()

Get the histories of all properties

items()

List the property keys together with the corresponding values

keys()

List the available property keys

latest()

Get the latest value of all properties

values()

List the values of the properties

get(key)#

Get property value for key if it exists

Returns:

the property view if it exists, otherwise None

histories()#

Get the histories of all properties

Returns:

the mapping of property keys to histories

Return type:

dict[str, list[(int, Any)]]

histories_date_time()#

Get the histories of all properties

Returns:

the mapping of property keys to histories

Return type:

dict[str, list[(datetime, Any)]]

items()#

List the property keys together with the corresponding values

keys()#

List the available property keys

latest()#

Get the latest value of all properties

Returns:

the mapping of property keys to latest values

Return type:

dict[str, Any]

values()#

List the values of the properties

Returns:

the list of property views

Return type:

list[TemporalProp]