Closed avaidyam closed 3 years ago
@sarithapillai8 if you have any questions, please ask @avaidyam and myself! This has become a priority on our end. Thank you!!
@sarithapillai8 I'm still seeing some visual issues with the graphs in the staging build where the charts aren't populated correctly. Can you take another look at whether the data is being plugged in correctly in the right format to the Vega charts?
@avaidyam Could you please specify the case where data is missing. I tested some cases and it was fine.
None of these graphs look correct to me (perhaps @elenamrv can elaborate if needed):
@avaidyam I am not getting this NaN values, but I understood that the graph is not showing actual required data. I can recheck and update ASAP.
Which values to be used for plotting Actions and self-care graph? For the temporal_slices, the data is saved like :
0: {item: "Effective behavior 1", value: 1, type: "0", level: "target_effective", duration: 0}
1: {item: "In Effective behavior", value: 2, type: "0", level: "target_ineffective", duration: 0}
2: {item: "Emotions", value: 3, type: null, level: "emotion", duration: 0}
3: {item: "Mente Sabia", value: "Habilidades de conciencia plena", type: null, level: "skill", duration: 0}
4: {item: "efectividad en las relaciones (GIVE)", value: "Interpersonal", type: null, level: "skill", duration: 0}
5: {item: "Resolución de problemas", value: "Habilidades de regulación emocional", type: null, level: "skill", duration: 0}
6: {item: "Paired Muscle Relaxation", value: "Habilidades de aceptación radical", type: null, level: "skill", duration: 0}
@sarithapillai8 Using the level
parameter, "Emotions" = emotion
, "Urges (effective)" = target_effective
, "Urges (ineffective)" = target_ineffective
, "Actions" = skill
. The "Self-care" should come from the "Did you use these skills today? (Yes/No)" question.
@avaidyam This is the format expected in actions and selfcare graph : so what value expected for count here?
"data": {
"values": [
{"action": "Self-care", "count": 9},
{"action": "Punching self", "count": 3},
{"action": "Binging", "count": 20},
{"action": "Violence towards others", "count": 1},
{"action": "Substance abuse", "count": 5},
{"action": "Mastery", "count": 25},
{"action": "Self-harm / cutting", "count": 2},
{"action": "Verbal assualts to others", "count": 1},
{"action": "Compare self to others", "count": 10}
]
},
It can be done like - count param value as 1, if the skill is selected. Is that ok?
The count
parameter is the number of times that action appeared in the activity events, i.e. if the DBT Diary Card was taken 4 times and each time the "Self-care" item was marked, then the count should be 4. (@elenamrv can correct me if I'm wrong about this implementation detail!)
@sarithapillai8 Very sorry - it appears I misunderstood! @elenamrv clarified to me:
event.temporal_slice.*.type
)event.temporal_slice.*.type
)@sarithapillai8 - if you have any questions about what values go where, please let me know! I am happy to explain on a call, too!
@avaidyam @elenamrv I am not clear with the below things, especially what this mean - rating scale units (mapped to event.temporal_slice.*.type) :
[Multiple Bar Chart] Actions (RENAME to "Actions (Summary)") X axis: target behavior name Y axis: rating scale units (mapped to event.temporal_slice.*.type) Label: target behavior name
[Multiple Bar Chart] Self-care (RENAME to "Actions (Timeline)") X axis: day (rolling, 7 days) Y axis: rating scale units (mapped to event.temporal_slice.*.type) Label: target behavior name
temporal_slices - data is like below :
0 : {item: "Effective behavior 1", value: 4, type: "12", level: "target_effective", duration: 0}
1: {item: "In Effective behavior", value: 5, type: "1", level: "target_ineffective", duration: 0}
2: {item: "Emotions", value: 2, type: null, level: "emotion", duration: 0}
3: {item: "Observe: Just notice (Urge Surfing)", value: "Mindfulness", type: null, level: "skill", duration: 0}
4: {item: "Effectiveness: Focus on what works", value: "Mindfulness", type: null, level: "skill", duration: 0}
5: {item: "One-Mindfully: In-the-moment", value: "Mindfulness", type: null, level: "skill", duration: 0}
6: {item: "Validating Others", value: "Interpersonal", type: null, level: "skill", duration: 0}
7: {item: "Self-Validation", value: "Interpersonal", type: null, level: "skill", duration: 0}
8: {item: "Self-respect effectiveness: FAST", value: "Interpersonal", type: null, level: "skill", duration: 0}
9: {item: "Opposite Action to change emotions", value: "Emotion Regulation", type: null, level: "skill", duration: 0}
10: {item: "Accumulate positive emotions", value: "Emotion Regulation", type: null, level: "skill", duration: 0}
11: {item: "Cope Ahead", value: "Emotion Regulation", type: null, level: "skill", duration: 0}
12: {item: "Pros and Cons of acting on urges", value: "Distress Tolerance", type: null, level: "skill", duration: 0}
13: {item: "Effective Rethinking/Paired Relax", value: "Distress Tolerance", type: null, level: "skill", duration: 0}
@sarithapillai8
rating scale units (mapped to
event.temporal_slice.*.type
)
This means to use the type
field from each object of the temporal_slices
array of each activity event, since the value
field is the rating scale input, and the type
field is the units input that corresponds to that target behavior.
@avaidyam The type field will have a value for effective and ineffective behaviors only. So only those to be considered for Actions(timeline) and Actions (summary)?
@sarithapillai8 Yes - only the effective and ineffective target behaviors should be considered.
@avaidyam Ok Got it. One more confusion in "Actions (Timeline)" - X axis: day (rolling, 7 days) Y axis: rating scale units (mapped to event.temporal_slice.*.type) Label: target behavior name The graph in the sample showing like a total for both effective and ineffective for each day. Don't we need to differentiate the behavior?
@sarithapillai8 They should both be on the same graph despite these being different types of target behaviors. 👍
Updated in staging with the changes.
@sarithapillai8 - I'm splitting this issue out from the broader
DBT Diary Card Updates
one to ensure that we tackle it appropriately and prioritize it correctly. To recap:LAMP-dbt-diary-card
repository.activity.spec == lamp.dbt_diary_card
, then show this custom graphs page instead of the default data viewer (just like we currently are doing for Journals).react-vega
package, you will need to set thedata
parameter of the component to an array of type{"value": 1, "date": "Sep 20", "symbol": "Self-care"}
. (See the JSON files from that repository for more info.)