# Visualize a calculated time series created in the model

A calculated time series in an AIR function can be visualized in the AIR front end. Read more about how to create a time series.

To visualize a calculated time series in the front end, set the argument visualize to True.

# Example

from cognite.air import AIRClient
def handle(data, client, secrets):
    air_client = AIRClient(data, client, secrets)
    time_series = air_client.retrieve_field("my_time_series")
    air_client.time_series.retrieve(
        external_id=(
            "my_ts_"
            + time_series.external_id
            + air_client.schedule_asset_ext_id # add schedule external id to make time series unique
        ),
        name=f"My Time Series created from {time_series.name}",
        visualize=True,
        )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Last Updated: 11/2/2021, 7:56:54 AM