# Using AIP to predict a future time series

**URL:** <https://community.palantir.com/t/using-aip-to-predict-a-future-time-series/2105>\
**Category:** Ask the Community\
**Tags:** time-series, build-with-aip\
**Created:** [December 5, 2024, 5:18pm UTC](https://community.palantir.com/t/using-aip-to-predict-a-future-time-series/2105 "2024-12-05T17:18:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![edery](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@edery](https://community.palantir.com/u/edery)\
**Post date:** [December 5, 2024, 5:18pm UTC](https://community.palantir.com/t/using-aip-to-predict-a-future-time-series/2105/1 "2024-12-05T17:18:42Z")

</div>

We have a year of time series data which shows building occupancy by the minute.

Is there a way we can leverage AIP to predict a future occupancy time series?

---

<div class="post-metadata">

**Author:** ![jgreensmith](https://avatars.discourse-cdn.com/v4/letter/j/2bfe46/32.png) [@jgreensmith](https://community.palantir.com/u/jgreensmith)\
**Post date:** [December 5, 2024, 5:45pm UTC](https://community.palantir.com/t/using-aip-to-predict-a-future-time-series/2105/2 "2024-12-05T17:45:12Z")

</div>

Hi @edery, great question!

When using time series with AIP, consider that large language models may need some help analysing numerical data in a large time series dataset.  
The best way to do this in my opinion would be to provide a [Typescript function that aggregates over a time series property](https://www.palantir.com/docs/foundry/time-series/time-series-in-functions/) and serialises that to a string as [a tool to AIP Logic](https://www.palantir.com/docs/foundry/logic/getting-started/#call-function).

For example, let’s say I wanted my AIP Logic function to tell the user if building occupancy was increasing, decreasing, higher than average, etc. I could write a Typescript function that would a) see if occupancy was increasing/decreasing, and b) tell me if the occupancy was above/below average and pass this as a string to my logic function for each time bucket I want to look at e.g. 1 hour.

Hope this helps!  
JG.

---

<div class="post-metadata">

**Author:** ![system](https://yyz1.discourse-cdn.com/palantir/user_avatar/community.palantir.com/system/32/3_2.png) [@system](https://community.palantir.com/u/system)\
**Post date:** [February 3, 2025, 5:45pm UTC](https://community.palantir.com/t/using-aip-to-predict-a-future-time-series/2105/3 "2025-02-03T17:45:32Z")

</div>

Closed on February 3, 2025, 5:45pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
