Metropolis Documentation 4.3 > Platform Concepts > Working with Time Series Data > Intraday Data

Intraday workflows are workflows involving data that rely on time periods of less than a day. Palantir supports intraday workflows via options in the Date/Time Controls panel on the ribbon, the Date Set UI, and metrics that convert objects between daily and intraday frequencies.

Value-on Time

Value-on time is an analagous concept to value-on date used in intraday computations. The value-on time can be found by using the new now() metric. Both value-on date and value-on time are controlled in the Date/Time Controls, a new ribbon tab found in most tools.

If the Specify Time box is not checked, computations that require the value-on time will use 0:00:00/UTC.

Intraday Date Sets

Date sets which contain intraday time periods such as hours, minutes, or seconds, now treat these periods of time as ranges containing an infinite number of instantaneous time points (which we will refer to as instants).

For example, open Date Set. Start with all dates. Add a recurring filter for June 16th, the first hour of the day, and restrict to the last year. This creates a date set representing the hour from 0:00 to 1:00 on June 16th. The date set should be thought of containing all instants of time between 0:00 and 1:00. Note that 0:00 is included in the interval, but 1:00 is not.

The advantage of this implementation is that it does away with the notion of hours / minutes / seconds as distinct units, and instead simply considers them as differently-sized ranges of instants.

It is also possible to create date sets with finite numbers of instants, such as the first instant of every hour. You can create date sets like this by adjusting the Sample option in the Recurring filter.

Because infinite instants don’t really exist, the system considers a millisecond an instant. This can cause issues if you try to work at the millisecond level. In particular, do not work with time series that have ticks at consecutive milliseconds. You will run into unexpected errors.

Converting between Daily and Intraday

You can convert dates, date sets, and time series between daily / intraday versions by using the proper version of the new metrics toDaily() and toIntraday().

  • toDaily() -> Date: If given a Daily Date, returns the Date. If given an intraday time, it returns the date itself.
    For example:
    '2008-2-2T19:45:00'.toDaily() = '2008-2-2'
  • toDaily() -> DateSet The behavior changes depending on whether you set the second boolean paramter to true or false. If true, if any part of a date is in the input, the full date will be included in the output. If false, the entire day must be in the input for it to be included in the output.
  • toDaily() -> TimeSeries Converts an intraday TimeSeries to a daily one using an optional time zone and aggregator. If the input is daily, this metric will just return it. If the input is intraday, this metric will return a new series with a point for every day that contained a point in the input series. All the points within any given day (in the specified time zone) will be aggregated using the specified aggregator.
  • toIntraday() -> Date: Converts a date to an intraday date. You can optionally specify a time zone,an hour, minute, second, and millisecond. The default values are 'UTC' for time zone and 0 for all time fields.
    For example:
    '2001-1-1'.toIntraday(createTimeZone("America/Los_Angeles"), 3, 5, 1, 2) = '2001-01-01 03:05:01.002' 
  • toIntraday() -> DateSet: Converts a daily DateSet to an intraday one using an optional time zone and time. If the input is intraday, this metric just returns the input. If the input is daily, this metric will return a DateSet with a single instant on each date in the input, placed at the specified time in the specified time zone.
  • toIntraday() -> TimeSeries: Converts a daily TimeSeries to an intraday one using an optional time zone and time. If the input is intraday, this metric will just return it. If the input is daily, this metric will return a copy of the input with all the dates turned into (intraday) times placed at the specified time in the specified time zone.

Additionally, there is a withTime() metric that operates on Dates. When given a daily date, its behavior is identical to toIntraday(). When given an intraday date, it will replace the time values (time zone, hours, minutes, seconds, milliseconds) with those specified in the parameters.

Need Help? Email us at           © 2014 Palantir Technologies  ·  Terms of Use  ·  Privacy and Security Statement