Expand ESM_JSON column and add esm example data.

communication
junos 1 year ago
parent 5cb527986b
commit a941b94d6c
  1. 65
      data/example_esm.csv
  2. 8
      features/esm.py

@ -0,0 +1,65 @@
id,_id,timestamp,device_id,esm_status,esm_user_answer,esm_notification_timeout,esm_json,double_esm_user_answer_timestamp,esm_trigger,esm_session,esm_notification_id,esm_expiration_threshold,participant_id,username
93680,244,1615455348079,12324354-e195-4e93-a2d5-268556e3ea5d,0,,0,"{'time': 'morning', 'esm_type': 7, 'esm_color': -8138892, 'esm_title': 'Se nanaša na sinoči:', 'time_type': 1, 'esm_radios': [''], 'esm_trigger': 'morning', 'question_id': 1, 'default_time': '8.0', 'esm_instructions': 'Koliko ur ste ponoči dejansko spali? (Število prespanih ur se lahko razlikuje od števila ur, ki ste jih preživeli v postelji.)', 'questionnaire_id': 1, 'questionnaire_type': 'wakeup'}",0,morning,20,38,0,21,nokia_0000003
93679,243,1614328386537,12324354-e195-4e93-a2d5-268556e3ea5d,3,Removed at restart because it was too old,0,"{'time': 'morning', 'esm_type': 7, 'esm_color': -8138892, 'esm_title': 'Se nanaša na sinoči:', 'time_type': 1, 'esm_radios': [''], 'esm_trigger': 'morning', 'question_id': 1, 'default_time': '8.0', 'esm_instructions': 'Koliko ur ste ponoči dejansko spali? (Število prespanih ur se lahko razlikuje od števila ur, ki ste jih preživeli v postelji.)', 'questionnaire_id': 1, 'questionnaire_type': 'wakeup'}",1615455284073,morning,19,36,0,21,nokia_0000003
93678,242,1614243717328,12324354-e195-4e93-a2d5-268556e3ea5d,3,Removed at 4AM,0,"{'time': 'morning', 'esm_type': 7, 'esm_color': -8138892, 'esm_title': 'Se nanaša na sinoči:', 'time_type': 1, 'esm_radios': [''], 'esm_trigger': 'morning', 'question_id': 1, 'default_time': '8.0', 'esm_instructions': 'Koliko ur ste ponoči dejansko spali? (Število prespanih ur se lahko razlikuje od števila ur, ki ste jih preživeli v postelji.)', 'questionnaire_id': 1, 'questionnaire_type': 'wakeup'}",1614320045955,morning,18,34,0,21,nokia_0000003
72921,241,1614184330123,12324354-e195-4e93-a2d5-268556e3ea5d,3,Removed at 4AM,0,"{'time': 'evening', 'esm_type': 5, 'esm_color': -3053207, 'esm_title': '', 'esm_trigger': 'evening_first', 'question_id': 115, 'esm_instructions': 'Ste za danes že zaključili z delom?', 'questionnaire_id': 96, 'esm_quick_answers': ['Da', 'Ne'], 'questionnaire_type': 'home'}",1614222115961,evening_first,17,31,0,21,nokia_0000003
72462,240,1614169227286,12324354-e195-4e93-a2d5-268556e3ea5d,2,DayFinished3421,0,"{'time': 'daytime', 'esm_type': 2, 'esm_color': -9187073, 'esm_title': 'V kolikšni meri se v tem trenutku počutite:', 'esm_radios': ['0 - Zelo malo ali sploh ne', '1 - Malo', '2 - Srednje', '3 - Precej', '4 - Izjemno'], 'esm_trigger': 'during_work_first', 'question_id': 5, 'esm_instructions': 'Prijetno vznemirjeni', 'questionnaire_id': 8, 'questionnaire_type': 'outcome'}",1614169252624,during_work_first,16,28,0,21,nokia_0000003
72351,239,1614156218374,12324354-e195-4e93-a2d5-268556e3ea5d,2,2,0,"{'esm_type': 17, 'numberOfQ': 2, 'lastESMtime': 1614075648165, 'question_id': 9999, 'text_feedback': 'Včeraj ste na naše vprašalnike odgovorili dvakrat.\nZavedamo se, da v naši raziskavi prosimo za veliko sodelovanja. Prosimo, nadaljujte, vaše sodelovanje je za nas veliko vredno.'}",1614162029474,,15,27,0,21,nokia_0000003
72350,238,1614156218367,12324354-e195-4e93-a2d5-268556e3ea5d,2,0 - Sploh ne,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -9187073, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_radios': ['0 - Sploh ne', '1 - Malo', '2 - Srednje', '3 - Precej', '4 - Izjemno'], 'esm_trigger': 'myFlow', 'question_id': 114, 'esm_instructions': 'V kolikšni meri ste celo to obdobje dojemali kot stresno?', 'questionnaire_id': 93, 'questionnaire_type': 'next'}",1614162028105,myFlow,15,27,0,21,nokia_0000003
72349,237,1614156218366,12324354-e195-4e93-a2d5-268556e3ea5d,2,0 - Sploh ne,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -9187073, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_radios': ['0 - Sploh ne', '1 - Malo', '2 - Srednje', '3 - Precej', '4 - Izjemno'], 'esm_trigger': 'myFlow-morning', 'question_id': 113, 'esm_instructions': 'Je to celo obdobje v vas ustvarilo napetost?', 'questionnaire_id': 93, 'questionnaire_type': 'next'}",1614162027076,myFlow-morning,15,27,0,21,nokia_0000003
72348,236,1614156218366,12324354-e195-4e93-a2d5-268556e3ea5d,2,0 - Ne,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -9187073, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_radios': ['0 - Ne', '1 - Da, nekoliko', '2 - Da, srednje', '3 - Da, precej', '4 - Da, izjemno'], 'esm_trigger': 'morning', 'question_id': 101, 'esm_instructions': 'Je prišlo do kakega dogodka, ki je v vas ustvaril napetost?', 'questionnaire_id': 87, 'questionnaire_type': 'outcome'}",1614162025806,morning,15,27,0,21,nokia_0000003
72347,235,1614156218365,12324354-e195-4e93-a2d5-268556e3ea5d,2,0 - Sploh se ne strinjam,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -8138892, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_radios': ['0 - Sploh se ne strinjam', '1 - Ne strinjam se', '2 - Strinjam se', '3 - Popolnoma se strinjam'], 'esm_trigger': 'morning', 'question_id': 86, 'esm_instructions': 'Veliko besede sem imela pri odločanju, kaj se dogaja pri mojem delu', 'questionnaire_id': 11, 'questionnaire_type': 'exposure'}",1614162024126,morning,15,27,0,21,nokia_0000003
72346,234,1614156218364,12324354-e195-4e93-a2d5-268556e3ea5d,2,0 - Sploh se ne strinjam,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -8138892, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_radios': ['0 - Sploh se ne strinjam', '1 - Ne strinjam se', '2 - Strinjam se', '3 - Popolnoma se strinjam'], 'esm_trigger': 'morning', 'question_id': 82, 'esm_instructions': 'Pri svojem delu sem lahko opravljala vrsto različnih stvari', 'questionnaire_id': 11, 'questionnaire_type': 'exposure'}",1614162023014,morning,15,27,0,21,nokia_0000003
72345,233,1614156218363,12324354-e195-4e93-a2d5-268556e3ea5d,2,0 - Sploh se ne strinjam,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -8138892, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_radios': ['0 - Sploh se ne strinjam', '1 - Ne strinjam se', '2 - Strinjam se', '3 - Popolnoma se strinjam'], 'esm_trigger': 'morning', 'question_id': 74, 'esm_instructions': 'Moja služba je zahtevala zelo trdo delo', 'questionnaire_id': 10, 'questionnaire_type': 'exposure'}",1614162021897,morning,15,27,0,21,nokia_0000003
72344,232,1614156218362,12324354-e195-4e93-a2d5-268556e3ea5d,2,0 - Sploh se ne strinjam,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -8138892, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_radios': ['0 - Sploh se ne strinjam', '1 - Ne strinjam se', '2 - Strinjam se', '3 - Popolnoma se strinjam'], 'esm_trigger': 'morning', 'question_id': 73, 'esm_instructions': 'Moja služba je zahtevala, da sem delala zelo hitro', 'questionnaire_id': 10, 'questionnaire_type': 'exposure'}",1614162020929,morning,15,27,0,21,nokia_0000003
72343,231,1614156218361,12324354-e195-4e93-a2d5-268556e3ea5d,2,0,0,"{'time': 'morning', 'esm_type': 9, 'esm_color': -21133, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_trigger': 'morning', 'question_id': 58, 'esm_instructions': 'Koliko odmorov, daljših od 10 minut, ste si vzeli?', 'questionnaire_id': 98, 'questionnaire_type': 'persistent'}",1614162019696,morning,15,27,0,21,nokia_0000003
72342,230,1614156218360,12324354-e195-4e93-a2d5-268556e3ea5d,2,0,0,"{'time': 'morning', 'esm_type': 9, 'esm_color': -21133, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_trigger': 'morning', 'question_id': 57, 'esm_instructions': 'Koliko odmorov ste si vzeli za kajenje?', 'questionnaire_id': 98, 'questionnaire_type': 'persistent'}",1614162018358,morning,15,27,0,21,nokia_0000003
72341,229,1614156218359,12324354-e195-4e93-a2d5-268556e3ea5d,2,0,0,"{'time': 'morning', 'esm_type': 9, 'esm_color': -21133, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_trigger': 'morning', 'question_id': 56, 'esm_instructions': 'Koliko skodelic kave, čaja ali drugih kofeinskih pijač ste popili?', 'questionnaire_id': 98, 'questionnaire_type': 'persistent'}",1614162017023,morning,15,27,0,21,nokia_0000003
72340,228,1614156218358,12324354-e195-4e93-a2d5-268556e3ea5d,2,0 - Ne,0,"{'time': 'daytime', 'esm_type': 2, 'esm_color': -4623361, 'esm_title': '', 'esm_radios': ['0 - Ne', '1 - Da'], 'esm_trigger': 'myFlow-myFlow-morning', 'question_id': 49, 'esm_instructions': 'Ste za to uporabljali računalnik ali telefon?', 'questionnaire_id': 97, 'questionnaire_type': 'next'}",1614162014711,myFlow-myFlow-morning,15,27,0,21,nokia_0000003
72339,227,1614156218358,12324354-e195-4e93-a2d5-268556e3ea5d,2,0 - Branje,0,"{'time': 'daytime', 'esm_type': 2, 'esm_color': -4623361, 'esm_title': '', 'esm_radios': ['0 - Branje', '1 - Pisanje', '2 - E-poštna sporočila', '3 - Analiza podatkov ali programiranje', '4 - Sodelovanju v medmrežni aktivnosti (npr. webinarju, delavnici, tečaju)', '5 - Načrtovanje (npr. razmišljanje o tekočih nalogah ali sestava urnika)', '6 - Drugo'], 'esm_trigger': 'myFlow-morning', 'question_id': 45, 'esm_instructions': 'Kakšno vrsto samostojnega dela ste opravljali?', 'questionnaire_id': 97, 'questionnaire_type': 'next'}",1614162013810,myFlow-morning,15,27,0,21,nokia_0000003
72338,226,1614156218358,12324354-e195-4e93-a2d5-268556e3ea5d,2,0 - Samostojno delo,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -4623361, 'esm_title': '', 'esm_radios': ['0 - Samostojno delo', '1 - Delo z drugimi ali v skupini', '2 - Odmor ali zasebne zadeve', '3 - Prevoz'], 'esm_trigger': 'morning', 'question_id': 52, 'esm_instructions': 'Kaj ste v glavnem počeli v zadnjih 10 minutah?', 'questionnaire_id': 97, 'questionnaire_type': 'persistent'}",1614162012891,morning,15,27,0,21,nokia_0000003
72337,225,1614156218357,12324354-e195-4e93-a2d5-268556e3ea5d,2,0 - Zelo malo ali sploh ne,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -9187073, 'esm_title': 'V kolikšni meri se v tem trenutku počutite:', 'esm_radios': ['0 - Zelo malo ali sploh ne', '1 - Malo', '2 - Srednje', '3 - Precej', '4 - Izjemno'], 'esm_trigger': 'morning', 'question_id': 42, 'esm_instructions': 'Živčni', 'questionnaire_id': 9, 'questionnaire_type': 'outcome'}",1614162011990,morning,15,27,0,21,nokia_0000003
72336,224,1614156218356,12324354-e195-4e93-a2d5-268556e3ea5d,2,0 - Zelo malo ali sploh ne,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -9187073, 'esm_title': 'V kolikšni meri se v tem trenutku počutite:', 'esm_radios': ['0 - Zelo malo ali sploh ne', '1 - Malo', '2 - Srednje', '3 - Precej', '4 - Izjemno'], 'esm_trigger': 'morning', 'question_id': 36, 'esm_instructions': 'Z občutkom krivde', 'questionnaire_id': 9, 'questionnaire_type': 'outcome'}",1614162010968,morning,15,27,0,21,nokia_0000003
72335,223,1614156218355,12324354-e195-4e93-a2d5-268556e3ea5d,2,0 - Zelo malo ali sploh ne,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -9187073, 'esm_title': 'V kolikšni meri se v tem trenutku počutite:', 'esm_radios': ['0 - Zelo malo ali sploh ne', '1 - Malo', '2 - Srednje', '3 - Precej', '4 - Izjemno'], 'esm_trigger': 'morning', 'question_id': 28, 'esm_instructions': 'Ponosni', 'questionnaire_id': 8, 'questionnaire_type': 'outcome'}",1614162009872,morning,15,27,0,21,nokia_0000003
72334,222,1614156218354,12324354-e195-4e93-a2d5-268556e3ea5d,2,0 - Zelo malo ali sploh ne,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -9187073, 'esm_title': 'V kolikšni meri se v tem trenutku počutite:', 'esm_radios': ['0 - Zelo malo ali sploh ne', '1 - Malo', '2 - Srednje', '3 - Precej', '4 - Izjemno'], 'esm_trigger': 'morning', 'question_id': 26, 'esm_instructions': 'Z občutkom moči', 'questionnaire_id': 8, 'questionnaire_type': 'outcome'}",1614162008934,morning,15,27,0,21,nokia_0000003
72333,221,1614156218353,12324354-e195-4e93-a2d5-268556e3ea5d,2,Da,0,"{'time': 'morning', 'esm_type': 5, 'esm_color': -3053207, 'esm_title': '', 'esm_trigger': 'morning_first', 'question_id': 3, 'esm_instructions': 'Ste že pričeli z delom?', 'questionnaire_id': 99, 'esm_quick_answers': ['Da', 'Ne'], 'questionnaire_type': 'start'}",1614162007959,morning_first,15,27,0,21,nokia_0000003
61999,2,1613059550240,12324354-e195-4e93-a2d5-268556e3ea5d,2,1 - Precej slaba,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -8138892, 'esm_title': 'Se nanaša na sinoči:', 'esm_radios': ['0 - Zelo slaba', '1 - Precej slaba', '2 - Precej dobra', '3 - Zelo dobra'], 'esm_trigger': 'morning', 'question_id': 2, 'esm_instructions': 'Kako bi ocenili kvaliteto vašega spanca?', 'questionnaire_id': 1, 'questionnaire_type': 'wakeup'}",1613059581249,morning,1,1,0,21,nokia_0000003
61998,1,1613059550188,12324354-e195-4e93-a2d5-268556e3ea5d,2,2021-02-11 08:00:00 +0100,0,"{'time': 'morning', 'esm_type': 7, 'esm_color': -8138892, 'esm_title': 'Se nanaša na sinoči:', 'time_type': 1, 'esm_radios': [''], 'esm_trigger': 'morning', 'question_id': 1, 'default_time': '8.0', 'esm_instructions': 'Koliko ur ste ponoči dejansko spali? (Število prespanih ur se lahko razlikuje od števila ur, ki ste jih preživeli v postelji.)', 'questionnaire_id': 1, 'questionnaire_type': 'wakeup'}",1613059557598,morning,1,1,0,21,nokia_0000003
28512,33,1602509118601,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0,0,"{'time': 'morning', 'esm_type': 9, 'esm_color': -21133, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_trigger': 'morning', 'question_id': 48, 'esm_instructions': 'Koliko odmorov ste si vzeli za kajenje?', 'questionnaire_id': 98, 'questionnaire_type': 'persistent'}",1602513587718,morning,5,9,0,21,nokia_0000003
28511,32,1602509118600,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0,0,"{'time': 'morning', 'esm_type': 9, 'esm_color': -21133, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_trigger': 'morning', 'question_id': 47, 'esm_instructions': 'Koliko skodelic kave, čaja ali drugih kofeinskih pijač ste popili?', 'questionnaire_id': 98, 'questionnaire_type': 'persistent'}",1602513586248,morning,5,9,0,21,nokia_0000003
28510,31,1602509118599,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0 - Zelo malo ali sploh ne,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -9187073, 'esm_title': 'V kolikšni meri se v tem trenutku počutite:', 'esm_radios': ['0 - Zelo malo ali sploh ne', '1 - Malo', '2 - Srednje', '3 - Precej', '4 - Izjemno'], 'esm_trigger': 'morning', 'question_id': 41, 'esm_instructions': 'Nervozni', 'questionnaire_id': 9, 'questionnaire_type': 'outcome'}",1602513584610,morning,5,9,0,21,nokia_0000003
28509,30,1602509118598,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0 - Zelo malo ali sploh ne,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -9187073, 'esm_title': 'V kolikšni meri se v tem trenutku počutite:', 'esm_radios': ['0 - Zelo malo ali sploh ne', '1 - Malo', '2 - Srednje', '3 - Precej', '4 - Izjemno'], 'esm_trigger': 'morning', 'question_id': 39, 'esm_instructions': 'Razdražljivi', 'questionnaire_id': 9, 'questionnaire_type': 'outcome'}",1602513583249,morning,5,9,0,21,nokia_0000003
28508,29,1602509118597,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0 - Zelo malo ali sploh ne,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -9187073, 'esm_title': 'V kolikšni meri se v tem trenutku počutite:', 'esm_radios': ['0 - Zelo malo ali sploh ne', '1 - Malo', '2 - Srednje', '3 - Precej', '4 - Izjemno'], 'esm_trigger': 'morning', 'question_id': 33, 'esm_instructions': 'Aktivni', 'questionnaire_id': 8, 'questionnaire_type': 'outcome'}",1602513582471,morning,5,9,0,21,nokia_0000003
28507,28,1602509118596,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0 - Zelo malo ali sploh ne,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -9187073, 'esm_title': 'V kolikšni meri se v tem trenutku počutite:', 'esm_radios': ['0 - Zelo malo ali sploh ne', '1 - Malo', '2 - Srednje', '3 - Precej', '4 - Izjemno'], 'esm_trigger': 'morning', 'question_id': 30, 'esm_instructions': 'Zainteresirani', 'questionnaire_id': 8, 'questionnaire_type': 'outcome'}",1602513581110,morning,5,9,0,21,nokia_0000003
28506,27,1602509118595,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,Da,0,"{'time': 'morning', 'esm_type': 5, 'esm_color': -3053207, 'esm_title': '', 'esm_trigger': 'morning_first', 'question_id': 3, 'esm_instructions': 'Ste že v službi?', 'questionnaire_id': 99, 'esm_quick_answers': ['Da', 'Ne'], 'questionnaire_type': 'start'}",1602513580172,morning_first,5,9,0,21,nokia_0000003
28505,26,1602509118594,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0 - Zelo slaba,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -8138892, 'esm_title': 'Se nanaša na sinoči:', 'esm_radios': ['0 - Zelo slaba', '1 - Precej slaba', '2 - Precej dobra', '3 - Zelo dobra'], 'esm_trigger': 'morning', 'question_id': 2, 'esm_instructions': 'Kako bi ocenili kvaliteto vašega spanca?', 'questionnaire_id': 1, 'questionnaire_type': 'wakeup'}",1602513578669,morning,5,9,0,21,nokia_0000003
28489,25,1602509118447,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,2020-10-12 08:00:00 +0200,0,"{'time': 'morning', 'esm_type': 7, 'esm_color': -8138892, 'esm_title': 'Se nanaša na sinoči:', 'time_type': 1, 'esm_radios': [''], 'esm_trigger': 'morning', 'question_id': 1, 'default_time': '8.0', 'esm_instructions': 'Koliko ur ste ponoči dejansko spali? (Število prespanih ur se lahko razlikuje od števila ur, ki ste jih preživeli v postelji.)', 'questionnaire_id': 1, 'questionnaire_type': 'wakeup'}",1602513577316,morning,5,9,0,21,nokia_0000003
28488,24,1601369423988,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,3,Removed at 4AM,0,"{'time': 'morning', 'esm_type': 7, 'esm_color': -8138892, 'esm_title': 'Se nanaša na sinoči:', 'time_type': 1, 'esm_radios': [''], 'esm_trigger': 'morning', 'question_id': 1, 'default_time': '8.0', 'esm_instructions': 'Koliko ur ste ponoči dejansko spali? (Število prespanih ur se lahko razlikuje od števila ur, ki ste jih preživeli v postelji.)', 'questionnaire_id': 1, 'questionnaire_type': 'wakeup'}",1601431979481,morning,4,7,0,21,nokia_0000003
28487,23,1601326752155,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,3,Removed at restart because it was too old,0,"{'time': 'evening', 'esm_type': 5, 'esm_color': -3053207, 'esm_title': '', 'esm_trigger': 'evening_first', 'question_id': 115, 'esm_instructions': 'Ste že odšli iz službe?', 'questionnaire_id': 96, 'esm_quick_answers': ['Da', 'Ne'], 'questionnaire_type': 'home'}",1601331421282,evening_first,3,4,0,21,nokia_0000003
25591,22,1601289262695,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,DayFinished3421,0,"{'time': 'daytime', 'esm_type': 2, 'esm_color': -9187073, 'esm_title': 'V kolikšni meri se v tem trenutku počutite:', 'esm_radios': ['0 - Zelo malo ali sploh ne', '1 - Malo', '2 - Srednje', '3 - Precej', '4 - Izjemno'], 'esm_trigger': 'during_work_first', 'question_id': 9, 'esm_instructions': 'V pripravljenosti', 'questionnaire_id': 8, 'questionnaire_type': 'outcome'}",1601297656726,during_work_first,2,3,0,21,nokia_0000003
25553,21,1601283832297,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,-99,0,"{'esm_type': 17, 'numberOfQ': -99, 'lastESMtime': 0, 'question_id': 9999, 'text_feedback': 'NA you answered our questionnaires three times.\nWe are aware that we ask for a lot of participation in this study. Please, keep going, your participation is very valuable to us.'}",1601283862202,,1,1,0,21,nokia_0000003
25552,20,1601283832290,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0 - Sploh ne,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -9187073, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_radios': ['0 - Sploh ne', '1 - Malo', '2 - Srednje', '3 - Precej', '4 - Izjemno'], 'esm_trigger': 'myFlow', 'question_id': 114, 'esm_instructions': 'V kolikšni meri ste celo to obdobje dojemali kot stresno?', 'questionnaire_id': 93, 'questionnaire_type': 'next'}",1601283862054,myFlow,1,1,0,21,nokia_0000003
25551,19,1601283832289,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0 - Sploh ne,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -9187073, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_radios': ['0 - Sploh ne', '1 - Malo', '2 - Srednje', '3 - Precej', '4 - Izjemno'], 'esm_trigger': 'myFlow', 'question_id': 113, 'esm_instructions': 'Je to celo obdobje v vas ustvarilo napetost?', 'questionnaire_id': 93, 'questionnaire_type': 'next'}",1601283861069,myFlow,1,1,0,21,nokia_0000003
25550,18,1601283832289,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0 - Ne,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -9187073, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_radios': ['0 - Ne', '1 - Da, nekoliko', '2 - Da, srednje', '3 - Da, precej', '4 - Da, izjemno'], 'esm_trigger': 'morning', 'question_id': 101, 'esm_instructions': 'Je prišlo do kakega dogodka, ki je v vas ustvaril napetost?', 'questionnaire_id': 87, 'questionnaire_type': 'outcome'}",1601283860118,morning,1,1,0,21,nokia_0000003
25549,17,1601283832288,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0 - Sploh se ne strinjam,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -8138892, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_radios': ['0 - Sploh se ne strinjam', '1 - Ne strinjam se', '2 - Strinjam se', '3 - Popolnoma se strinjam'], 'esm_trigger': 'morning', 'question_id': 79, 'esm_instructions': 'Moje delo je vključevalo veliko ponavljajočega se dela', 'questionnaire_id': 11, 'questionnaire_type': 'exposure'}",1601283858345,morning,1,1,0,21,nokia_0000003
25548,16,1601283832287,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0 - Sploh se ne strinjam,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -8138892, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_radios': ['0 - Sploh se ne strinjam', '1 - Ne strinjam se', '2 - Strinjam se', '3 - Popolnoma se strinjam'], 'esm_trigger': 'morning', 'question_id': 78, 'esm_instructions': 'Moje delo je zahtevalo, da se učim novih stvari', 'questionnaire_id': 11, 'questionnaire_type': 'exposure'}",1601283857426,morning,1,1,0,21,nokia_0000003
25547,15,1601283832286,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0 - Sploh se ne strinjam,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -8138892, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_radios': ['0 - Sploh se ne strinjam', '1 - Ne strinjam se', '2 - Strinjam se', '3 - Popolnoma se strinjam'], 'esm_trigger': 'morning', 'question_id': 76, 'esm_instructions': 'Imela sem dovolj časa, da končam svoje delovne naloge', 'questionnaire_id': 10, 'questionnaire_type': 'exposure'}",1601283856474,morning,1,1,0,21,nokia_0000003
25546,14,1601283832285,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0 - Sploh se ne strinjam,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -8138892, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_radios': ['0 - Sploh se ne strinjam', '1 - Ne strinjam se', '2 - Strinjam se', '3 - Popolnoma se strinjam'], 'esm_trigger': 'morning', 'question_id': 74, 'esm_instructions': 'Moja služba je zahtevala zelo trdo delo', 'questionnaire_id': 10, 'questionnaire_type': 'exposure'}",1601283854752,morning,1,1,0,21,nokia_0000003
25545,13,1601283832284,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0 - Ne,0,"{'time': 'daytime', 'esm_type': 2, 'esm_color': -4623361, 'esm_title': '', 'esm_radios': ['0 - Ne', '1 - Da'], 'esm_trigger': 'myFlow', 'question_id': 55, 'esm_instructions': 'Ste za to uporabljali računalnik ali telefon?', 'questionnaire_id': 97, 'questionnaire_type': 'next'}",1601283853732,myFlow,1,1,0,21,nokia_0000003
25544,12,1601283832284,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0 - Branje,0,"{'time': 'daytime', 'esm_type': 2, 'esm_color': -4623361, 'esm_title': '', 'esm_radios': ['0 - Branje', '1 - Pisanje', '2 - E-poštna sporočila', '3 - Analiza podatkov ali programiranje', '4 - Sodelovanju v medmrežni aktivnosti (npr. webinarju, delavnici, tečaju)', '5 - Načrtovanje (npr. razmišljanje o tekočih nalogah ali sestava urnika)', '6 - Drugo'], 'esm_trigger': 'myFlow', 'question_id': 51, 'esm_instructions': 'Kakšno vrsto samostojnega dela ste opravljali?', 'questionnaire_id': 97, 'questionnaire_type': 'next'}",1601283852634,myFlow,1,1,0,21,nokia_0000003
25543,11,1601283832284,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0 - Samostojno delo,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -4623361, 'esm_title': '', 'esm_radios': ['0 - Samostojno delo', '1 - Delo z drugimi ali v skupini', '2 - Odmor ali zasebne zadeve', '3 - Prevoz'], 'esm_trigger': 'morning', 'question_id': 58, 'esm_instructions': 'Kaj ste v glavnem počeli v zadnjih 10 minutah?', 'questionnaire_id': 97, 'questionnaire_type': 'persistent'}",1601283850948,morning,1,1,0,21,nokia_0000003
25542,10,1601283832283,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0,0,"{'time': 'morning', 'esm_type': 9, 'esm_color': -21133, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_trigger': 'morning', 'question_id': 49, 'esm_instructions': 'Koliko odmorov, daljših od 10 minut, ste si vzeli?', 'questionnaire_id': 98, 'questionnaire_type': 'persistent'}",1601283849106,morning,1,1,0,21,nokia_0000003
25541,9,1601283832282,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0,0,"{'time': 'morning', 'esm_type': 9, 'esm_color': -21133, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_trigger': 'morning', 'question_id': 48, 'esm_instructions': 'Koliko odmorov ste si vzeli za kajenje?', 'questionnaire_id': 98, 'questionnaire_type': 'persistent'}",1601283847802,morning,1,1,0,21,nokia_0000003
25540,8,1601283832281,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0,0,"{'time': 'morning', 'esm_type': 9, 'esm_color': -21133, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_trigger': 'morning', 'question_id': 47, 'esm_instructions': 'Koliko skodelic kave, čaja ali drugih kofeinskih pijač ste popili?', 'questionnaire_id': 98, 'questionnaire_type': 'persistent'}",1601283846510,morning,1,1,0,21,nokia_0000003
25539,7,1601283832280,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0 - Zelo malo ali sploh ne,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -9187073, 'esm_title': 'V kolikšni meri se v tem trenutku počutite:', 'esm_radios': ['0 - Zelo malo ali sploh ne', '1 - Malo', '2 - Srednje', '3 - Precej', '4 - Izjemno'], 'esm_trigger': 'morning', 'question_id': 41, 'esm_instructions': 'Nervozni', 'questionnaire_id': 9, 'questionnaire_type': 'outcome'}",1601283844703,morning,1,1,0,21,nokia_0000003
25538,6,1601283832279,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0 - Zelo malo ali sploh ne,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -9187073, 'esm_title': 'V kolikšni meri se v tem trenutku počutite:', 'esm_radios': ['0 - Zelo malo ali sploh ne', '1 - Malo', '2 - Srednje', '3 - Precej', '4 - Izjemno'], 'esm_trigger': 'morning', 'question_id': 35, 'esm_instructions': 'Razburjeni', 'questionnaire_id': 9, 'questionnaire_type': 'outcome'}",1601283843709,morning,1,1,0,21,nokia_0000003
25537,5,1601283832278,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0 - Zelo malo ali sploh ne,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -9187073, 'esm_title': 'V kolikšni meri se v tem trenutku počutite:', 'esm_radios': ['0 - Zelo malo ali sploh ne', '1 - Malo', '2 - Srednje', '3 - Precej', '4 - Izjemno'], 'esm_trigger': 'morning', 'question_id': 33, 'esm_instructions': 'Aktivni', 'questionnaire_id': 8, 'questionnaire_type': 'outcome'}",1601283842773,morning,1,1,0,21,nokia_0000003
25536,4,1601283832277,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0 - Zelo malo ali sploh ne,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -9187073, 'esm_title': 'V kolikšni meri se v tem trenutku počutite:', 'esm_radios': ['0 - Zelo malo ali sploh ne', '1 - Malo', '2 - Srednje', '3 - Precej', '4 - Izjemno'], 'esm_trigger': 'morning', 'question_id': 31, 'esm_instructions': 'Odločni', 'questionnaire_id': 8, 'questionnaire_type': 'outcome'}",1601283841570,morning,1,1,0,21,nokia_0000003
25535,3,1601283832276,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,Da,0,"{'time': 'morning', 'esm_type': 5, 'esm_color': -3053207, 'esm_title': '', 'esm_trigger': 'morning_first', 'question_id': 3, 'esm_instructions': 'Ste že v službi?', 'questionnaire_id': 99, 'esm_quick_answers': ['Da', 'Ne'], 'questionnaire_type': 'start'}",1601283839139,morning_first,1,1,0,21,nokia_0000003
25534,2,1601283832275,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,0 - Zelo slaba,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -8138892, 'esm_title': 'Se nanaša na sinoči:', 'esm_radios': ['0 - Zelo slaba', '1 - Precej slaba', '2 - Precej dobra', '3 - Zelo dobra'], 'esm_trigger': 'morning', 'question_id': 2, 'esm_instructions': 'Kako bi ocenili kvaliteto vašega spanca?', 'questionnaire_id': 1, 'questionnaire_type': 'wakeup'}",1601283838195,morning,1,1,0,21,nokia_0000003
25533,1,1601283832228,049df3f8-8541-4cf5-af2b-83f6b3f0cf4b,2,2020-09-28 08:00:00 +0200,0,"{'time': 'morning', 'esm_type': 7, 'esm_color': -8138892, 'esm_title': 'Se nanaša na sinoči:', 'time_type': 1, 'esm_radios': [''], 'esm_trigger': 'morning', 'question_id': 1, 'default_time': '8.0', 'esm_instructions': 'Koliko ur ste ponoči dejansko spali? (Število prespanih ur se lahko razlikuje od števila ur, ki ste jih preživeli v postelji.)', 'questionnaire_id': 1, 'questionnaire_type': 'wakeup'}",1601283835184,morning,1,1,0,21,nokia_0000003
16350,31,1586245824995,d2a71262-b2cf-484b-b422-ec2a84eebd3d,2,0,0,"{'time': 'morning', 'esm_type': 9, 'esm_color': -21133, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_trigger': 'morning', 'question_id': 49, 'esm_instructions': 'Koliko odmorov, daljših od 10 minut, ste si vzeli?', 'questionnaire_id': 98, 'questionnaire_type': 'persistent'}",1601021227070,morning,454,10,0,21,nokia_0000003
16345,30,1586166895579,d2a71262-b2cf-484b-b422-ec2a84eebd3d,2,0,0,"{'time': 'morning', 'esm_type': 9, 'esm_color': -21133, 'esm_title': 'Odkar ste danes začeli z delom:', 'esm_trigger': 'morning', 'question_id': 47, 'esm_instructions': 'Koliko skodelic kave, čaja ali drugih kofeinskih pijač ste popili?', 'questionnaire_id': 98, 'questionnaire_type': 'persistent'}",1601021224816,morning,454,10,0,21,nokia_0000003
16338,29,1585916745935,d2a71262-b2cf-484b-b422-ec2a84eebd3d,2,0 - Zelo malo ali sploh ne,0,"{'time': 'morning', 'esm_type': 2, 'esm_color': -9187073, 'esm_title': 'V kolikšni meri se v tem trenutku počutite:', 'esm_radios': ['0 - Zelo malo ali sploh ne', '1 - Malo', '2 - Srednje', '3 - Precej', '4 - Izjemno'], 'esm_trigger': 'morning', 'question_id': 43, 'esm_instructions': 'Boječi', 'questionnaire_id': 9, 'questionnaire_type': 'outcome'}",1601021222575,during_work_first,454,10,0,21,nokia_0000003
16051,2,1585553447633,d2a71262-b2cf-484b-b422-ec2a84eebd3d,3,Removed at restart because it was too old,0,"{'time': 'morning', 'esm_type': 7, 'esm_color': -8138892, 'esm_title': 'Se nanaša na sinoči:', 'time_type': 1, 'esm_radios': [''], 'esm_trigger': 'morning', 'question_id': 1, 'default_time': '8.0', 'esm_instructions': 'Koliko ur ste ponoči dejansko spali? (Število prespanih ur se lahko razlikuje od števila ur, ki ste jih preživeli v postelji.)', 'questionnaire_id': 1, 'questionnaire_type': 'wakeup'}",1600957155039,morning,451,5,0,21,nokia_0000003
24744,2829,1600847412116,d2a71262-b2cf-484b-b422-ec2a84eebd3d,0,,0,"{'time': 'morning', 'esm_type': 7, 'esm_color': -8138892, 'esm_title': 'Se nanaša na sinoči:', 'time_type': 1, 'esm_radios': [''], 'esm_trigger': 'morning', 'question_id': 1, 'default_time': '8.0', 'esm_instructions': 'Koliko ur ste ponoči dejansko spali? (Število prespanih ur se lahko razlikuje od števila ur, ki ste jih preživeli v postelji.)', 'questionnaire_id': 1, 'questionnaire_type': 'wakeup'}",0,morning,447,0,0,21,nokia_0000003
unable to load file from base commit

@ -38,9 +38,5 @@ def preprocess_esm(df_esm: pd.DataFrame) -> pd.DataFrame:
df_esm["datetime_lj"] = df_esm["double_esm_user_answer_timestamp"].apply(
lambda x: datetime.datetime.fromtimestamp(x / 1000.0, tz=TZ_LJ)
)
#TODO: Deal with ESM_JSON
#(esm_json_b = purrr::map(esm_json, jsonlite::fromJSON),
# questionnaire_id = map_int(esm_json_b, "questionnaire_id", .default=NA),
# esm_type = map_int(esm_json_b, "esm_type", .default=NA),
# esm_question = map_chr(esm_json_b, "esm_instructions", .default=NA))
return df_esm
df_esm_json = pd.json_normalize(df_esm["esm_json"]).drop(columns=["esm_trigger"]) # The esm_trigger column is already present in the main df.
return df_esm.join(df_esm_json)

Loading…
Cancel
Save