Skip to content

CLI reference

tsdive profile

Report the data physics and statistics of one window.

The usage walkthrough has a section on it.

Usage

usage: tsdive profile [-h] [--window WINDOW]
                      [--basis {TIME_WEIGHTED,EVENT_WEIGHTED}] [--stepped]
                      [--tz TZ_NAMES] [--flatline] [--json] [--no-color]
                      parquet

Options

Argument Value Default Description
parquet required path to a single-tag parquet archive with tsdive.meta
--window WINDOW ISO 8601 START/END in UTC, for example 2024-03-01T00:00:00Z/2024-03-01T01:00:00Z; omitted, the whole archive extent is profiled
--basis {TIME_WEIGHTED,EVENT_WEIGHTED} TIME_WEIGHTED calculation basis declared on the read
--stepped stepped interpolation between samples
--tz TZ_NAMES [] IANA tz to audit for DST transitions inside the window (repeatable)
--flatline run flatline signals using prior equal-size windows as references
--json print one JSON object and nothing else
--no-color plain text, no ANSI colour (NO_COLOR does the same)

Example

$ tsdive profile data/demo/fic101_demo.parquet \
    --window "2024-03-30T20:00:00Z/2024-03-31T06:00:00Z" \
    --tz Europe/London --flatline
demo:FIC101.PV  FIC-101 flow
coverage 0.933   GOOD 561/562   censored yes   gaps 1   flatline NOT ASSESSED

window    2024-03-30 20:00:00Z -> 2024-03-31 06:00:00Z  (10 h)
contract  TIME_WEIGHTED  RECORDED  NONE  stepped no  digest d59d433d9c62
units     m3/h -> cubic meters per hour

Coverage
  coverage 0.933   valid 0.998   gaps 1   data-loss gaps 1   longest 40 min
  2024-03-30 23:00:00Z -> 23:40:00Z   40 min   unknown (no rule matched)

Quality
  GOOD 561   UNCERTAIN 1   BAD 0
  unmapped codes, treated UNCERTAIN: SENSOR DRIFT

Range
  clipped 0.0516   censored yes

Timestamps
  audited 562   duplicates 0   non-monotonic 0
  DST (Europe/London) 2024-03-31 01:00:00Z  +0h -> +1h

Values  GOOD n=561
  min 60.86   p05 61.20   median 62.32   p95 100.0   max 100.0
  mean 63.95 (time-weighted)   std 8.399   mad 0.4017
  distinct 533   stall 0 s   changes/h 53.20
  constant run 2024-03-31 02:01:00Z -> 02:29:00Z   28 min   n=29
  interval 60 s (p05 60 s, p95 60 s)   declared 60 s

Flatline
[1 more lines not shown]