Skip to main content
1-Visitor
March 6, 2018
Solved

Timeseries in dataset

  • March 6, 2018
  • 6 replies
  • 4003 views

Hi,

 

I'm experimenting with some data for analytics. My data (data.json, data.csv) are always no-timeseries. What I have todo (in json and csv file) have timeseries data?

 

Or have someone example data which is timeseries?

Best answer by cmorfin

Hi

 

I am assuming you are using ThingWorx Analytics 8.1 or over.

For a dataset to be seen as a time series one you need to have in the csv

- one column that represents the asset id (for example pump1, pump2 ...)

- one column representing the time interval.

 

in the json file you need to set

- opType: ENTITY_ID for the field that define the column representing the asset id in csv

- opType: TEMPORAL for the field representing the column for the time interval in csv. 

you also indicate the attribute timeSamplingInterval for this TEMPORAL field which indicate the time in milliseconds at which the data should come in

The Transition Guide has got some information about this  around page 28 -29

 

For example

 

Device  --  timing  --- sensor1  --- sensor 2

Pump1 --   1             ---  12               ---   84

Pump2 --- 1             ---- 7                 ---- 56

Pump1 --   2            ---- 18              ---- 110

Pump2---  2           ---- 25               ---   64

Pump1 --- 3         ----- 5                 ---- 58

Pump2 ---3         ------ 30             ---- 80

 

in the json you would have

 

{
"fieldName": "Device",
"dataType": "STRING",
"opType": "ENTITY_ID",
},
{
"fieldName": "timing",
"dataType": "DOUBLE",
"opType": "TEMPORAL",
"timeSamplingInterval": 1,
},

 

Hope this helps

Kind regards

Christophe

6 replies

22-Sapphire I
March 6, 2018

Can you describe a little better

1. How you are gathering the data

2. When you say Analysis, how do you intend to use it

3. Why does that Analysis require timeseries

drichter1-VisitorAuthor
1-Visitor
March 6, 2018

The gathering process is for my example irrelevant. I only need the look of the *.json and the *.csv, so I can create data by hand or via excel or something else.

 

At the moment a create prediction models with non-timeseries data but for a real project I will predict something like "xx days to failure" so I will test the prediction stuff with timeseries data.

cmorfin19-TanzaniteAnswer
19-Tanzanite
March 6, 2018

Hi

 

I am assuming you are using ThingWorx Analytics 8.1 or over.

For a dataset to be seen as a time series one you need to have in the csv

- one column that represents the asset id (for example pump1, pump2 ...)

- one column representing the time interval.

 

in the json file you need to set

- opType: ENTITY_ID for the field that define the column representing the asset id in csv

- opType: TEMPORAL for the field representing the column for the time interval in csv. 

you also indicate the attribute timeSamplingInterval for this TEMPORAL field which indicate the time in milliseconds at which the data should come in

The Transition Guide has got some information about this  around page 28 -29

 

For example

 

Device  --  timing  --- sensor1  --- sensor 2

Pump1 --   1             ---  12               ---   84

Pump2 --- 1             ---- 7                 ---- 56

Pump1 --   2            ---- 18              ---- 110

Pump2---  2           ---- 25               ---   64

Pump1 --- 3         ----- 5                 ---- 58

Pump2 ---3         ------ 30             ---- 80

 

in the json you would have

 

{
"fieldName": "Device",
"dataType": "STRING",
"opType": "ENTITY_ID",
},
{
"fieldName": "timing",
"dataType": "DOUBLE",
"opType": "TEMPORAL",
"timeSamplingInterval": 1,
},

 

Hope this helps

Kind regards

Christophe