Skip to main content

Hello, so I have some EEG readings that I use in a python script for some ML model. The results and all the interesting info from these readings are exported into a JSON file that I wanted to use in Tableau public for some cool representations of the interesting info. The JSON file follows this structure:

{

"User_data":{

"Name": "Randomname",

"Age": 19,

"Gender": "M",

"Diagnosis": "randomdiagnosis",

"Diagnosis_certainy": 0.87

},

"EEG_readings":{

"Time": [1, 2, 3, ... , 50]

"Fp1": [55000, 55083, 55072, ...],

"Fpz": [55000, 55083, 55072, ...],

"Fp2": [55000, 55083, 55072, ...]

},

.

.

.

}

So as you see these EEG signals are named Fp1 Fpz and Fp2 and there is also another list, time, that represent the moment of the reading. These lists come from Python lists, and my objective is to watch these signals into line charts that respect their positions. My problem is when I connect to the JSOn file the columns of Fp1, Fp2 and Fpz do weird things. For example Fp1 only appear in all the rows as one value, same as Fp2. Only Fpz appear with its different values but even in the table the values appear in different order! here a picture of the table when I connect to the JSON file:

Dont know how to read signal values from JSON...You can see that Fp1 appear with the number 54953 and that value repeats itself in all the samples, the same with Fp2 and with the "Time". How can I solve this problem? also how could I represent line charts with them?

 

Thank you in advance

3 respostas
  1. 6 de fev. de 2023, 19:31

    Maybe I"m getting too old, maybe my brain is too much like Tableau, but what I was meaning was (if you can) forget the JSON and create CSV (or at least a CSV that Tableau can understand).

     

    Tableau will NOT understand when you have a list that's in a cell, that's a part of another list that's also in a cell ... .that might be there or might not.

     

    JSON is unstructured data - you can invent and ignore "the rules" as you go.

    Tableau prefers structured data - so ....

     

    Columns are : Name, Age, Gender, Time, Fp

     

    Or that could be 2 tables - one being user_data and one being EEG_readings (and join them together)

     

    Basically, my tip would be "think it's is a SQL database" and don't "think like it's JSON" and you will progress smoother and faster.

    -----------------------------------------------------------

    2022 Tableau Forums Ambassador

    Based in Sydney, Australia (GMT+11)

    Please upvote my helpful replies and choose Select as Best Answer if it really is the best :)

0/9000