Marple Docs
  • Introduction
  • Marple Insight
    • Welcome
      • What is Marple Insight?
      • FAQ
      • Feedback
      • Release Notes
      • Roadmap
    • Setup and Configuration
      • Data connection
        • Supported Databases
          • Azure Data Explorer (ADX)
          • Microsoft Fabric
          • TimescaleDB & PostgreSQL
          • Mireo Spacetime
          • InfluxDB (Beta)
        • Connection configuration
          • Required Queries
          • Optional Queries
          • Templating
      • Deployment
        • Infrastructure
        • Identity Providers
        • Hardware
      • API
      • Python SDK
    • User Manuals
      • Data Library
      • Visualisation
        • Add Data Sets
        • Signal List
        • Functions
        • Plot types
          • Time Series
            • Signal Settings
            • Limits and Stacking
            • Zooming
            • Cursors
            • Text data
          • Scatter
          • Map
          • Frequency (FFT)
          • Aggregates
        • Mouse Actions
        • Tabs
        • Reorganise Plots
        • Compare data
        • Realtime
        • Export image
      • Motorsport Package
      • Flight Testing Package
      • Projects
      • Sharing
      • Team and accounts
        • Workspaces
        • Account Types
      • Keyboard Shortcuts
  • Marple Files
    • Welcome
      • What is Marple Files?
      • Quick Start
      • FAQ
      • Release Notes
    • User Manuals
      • Data
        • File Types
        • Time Precision
        • Data Points
        • Upload Data
        • Organise Data
        • Influx DB
      • Visualisation
        • Overview
        • Plot types
        • Mouse & Keyboard
        • Calculated Signals
        • Overlay Data Sets
        • Projects
        • Annotations
      • Analysis
        • Metric Builder
        • SQL Editor
        • Marple AI (GPT)
      • Reporting
        • Create Reports
        • View Reports
        • Share Reports
        • From data library to reports
      • Sharing and Accounts
        • Sharing
        • Team
        • Settings
      • For developers
        • API Access Tokens
        • API Guide
        • Python
Powered by GitBook
On this page
  • Converting between Number and Text signals
  • ADX
  • PostgreSQL / TimescaleDB
  1. Marple Insight
  2. User Manuals
  3. Visualisation
  4. Plot types
  5. Time Series

Text data

PreviousCursorsNextScatter

Last updated 2 months ago

You can recognize text signals by their Text datatype.

Text signals can be added to time series plots. They will not show up as an extra line on the plot but their value at the cursor is displayed along with the other cursor values.

Converting between Number and Text signals

If you want to visualize how the text signal evolves over time, you can create a function to convert the different text values to numbers and plot this function. Similar formulas can be used to create a text signal from a discrete numeric signal. Depending on you database type, this function will look different.

This are some example functions on how to convert a discrete gear signal to a text signal directionwhich indicates the driving direction:

ADX

Text to Number

iff([[direction]] == 'Reverse', -1,
iff([[direction]] == 'Neutral', 0, 1)

Number to Text

iff([[m.gear]] == 0, 'Reverse', 
iff([[m.gear]] == 1, 'Neutral', 'Forward'))

PostgreSQL / TimescaleDB

Text to Number

CASE
    WHEN [[direction]] = 'Reverse' THEN -1
    WHEN [[direction]] = 'Neutral' THEN 0
    ELSE 1
END

Number to Text

CASE
    WHEN ([[gear]]::int) = 0 THEN 'Reverse'
    WHEN ([[gear]]::int) = 1 THEN 'Neutral'
    ELSE 'Forward'
END