foundryts.objects.FoundryObject

class foundryts.objects.FoundryObject(object_type_id, object_primary_key)

An object in the Ontology.

  • Parameters:
    • object_type_id (str) – ID of the object type in the Ontology.
    • object_primary_key (str) – The primary key of the object which can be found either in the dataset defining the object or in the ↗ Object Explorer.
Note

A FoundryObject should only be created using Object.id() which provides safeguards for accessing objects in the Ontology. Refer to examples below.

Examples

Copied!
1 >>> aircraft_object = Object("aircraft").id("aircraft-1l)

property(property_id, dataframe_identifier=None)

Creates a time series reference using the Time Series Property of the FoundryObject.

This reference can be used for all transformations and analysis supported by FoundryTS.

  • Parameters:
    • property_id (str) – The property ID used to reference a Time Series Property which can be extracted from the ↗ Property editor view in the Ontology Manager.
    • dataframe_identifier (str , optional) – The series identifier in the resulting dataframe when multiple time series are evaluated in a foundryts.NodeCollection. This is required for accessing complex Time Series Property types such as ↗ Templates (default is the series ID in the platform).
  • Returns: A time series reference as a FunctionNode that can be used for transformations and analysis.
  • Return type: FunctionNode
Note

Ensure you’re using the Property ID for property_id since there are three property references available on the platform: property ID, property RID, API Name.

Examples

Copied!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 >>> aircraft_1_altimeter_reading = ( ... Object("aircraft") ... .id("aircraft-1") ... .property("altimeter_series_id") ... ) >>> aircraft_1_altimeter_reading.to_pandas() timestamp value 0 2024-09-06 07:00:00.000 -1.185493 1 2024-09-06 07:01:30.983 0.830117 2 2024-09-06 07:03:01.966 0.115240 3 2024-09-06 07:04:32.949 0.059973 4 2024-09-06 07:06:03.932 -0.290032 .. ... ... 245 2024-09-06 13:11:30.835 2.346732 246 2024-09-06 13:13:01.818 0.891372 247 2024-09-06 13:14:32.801 0.318806 248 2024-09-06 13:16:03.784 -0.339124 249 2024-09-06 13:17:34.767 -0.879413