right - so first you need to read that doc linked above - and see how each activity is broken down into cognitive and social indicators - how those indicators are calculated is covered at a high level in that doc.
Each activity in moodle defines it's own indicator classes eg here's the social breadth one for the forum activity:
https://github.com/moodle/moodle/blob/master/mod/forum/classes/analytics/indicator/social_breadth.php
Which basically uses the community of inquiry class here:
https://github.com/moodle/moodle/blob/master/analytics/classes/local/indicator/community_of_inquiry_activity.php
The values calculated by Moodle for these indicators are stored in the mdl_analytics_indicator_calc table and then collected to be sent to the machine learning mode - to understand the indicator_calc table data you should also understand Moodle's "context" concept so that you can match the records in this table to a user.
https://docs.moodle.org/en/Context
Another good thing to be aware of is that when sampleorigin = "user_enrolments", the sampleid in the analytics_indicator_calc table relates to the id field in teh user_enrolments table (that's how you match to a user.)
hopefully that gets you a few steps closer to what you're looking for...
Each activity in moodle defines it's own indicator classes eg here's the social breadth one for the forum activity:
https://github.com/moodle/moodle/blob/master/mod/forum/classes/analytics/indicator/social_breadth.php
Which basically uses the community of inquiry class here:
https://github.com/moodle/moodle/blob/master/analytics/classes/local/indicator/community_of_inquiry_activity.php
The values calculated by Moodle for these indicators are stored in the mdl_analytics_indicator_calc table and then collected to be sent to the machine learning mode - to understand the indicator_calc table data you should also understand Moodle's "context" concept so that you can match the records in this table to a user.
https://docs.moodle.org/en/Context
Another good thing to be aware of is that when sampleorigin = "user_enrolments", the sampleid in the analytics_indicator_calc table relates to the id field in teh user_enrolments table (that's how you match to a user.)
hopefully that gets you a few steps closer to what you're looking for...