Daily Wellness & Productivity Log
Weekly Overview & Insights
Overview for Week:
Weekly Averages (1-5 Scale):
Average Productivity Level: N/A
Average Scores Visualized:
Reflections on Your Week:
Daily Logs for the Week:
No logs found for this week.
Select a week and click "Analyze Week" to view your overview.
No daily logs found for this week to generate insights.
${f.label}: ${avg.toFixed(1)}
`; factorAveragesForChart.push({label: f.label, value: avg, type: 'wellness'}); }); mpbWeeklyAveragesDisplayEl.innerHTML = avgWellnessHTML; const avgProd = productivityCount > 0 ? (totalProductivitySum / productivityCount) : 0; mpbAvgProdValueEl.textContent = avgProd.toFixed(1); factorAveragesForChart.push({label: "Productivity", value: avgProd, type: 'productivity'}); mpbRenderSimpleBarChart(factorAveragesForChart); let insightsHTML = '- ';
const avgProdNum = parseFloat(avgProd);
let wellnessFactorsAboveAverage = 0;
let wellnessFactorsBelowAverage = 0;
mpbWellnessFactorDefs.forEach(f => {
const avgFactorScore = weeklyAverages[f.id].count > 0 ? (weeklyAverages[f.id].sum / weeklyAverages[f.id].count) : null;
if (avgFactorScore !== null) {
if (avgFactorScore >= 3.5) wellnessFactorsAboveAverage++;
if (avgFactorScore < 2.5) wellnessFactorsBelowAverage++;
}
if(avgFactorScore !== null && !isNaN(avgProdNum) && logsForWeek.length >= 2) {
let highWellnessHighProdDays = 0; let lowWellnessLowProdDays = 0;
logsForWeek.forEach(log => {
if(log.wellnessScores[f.id] >= 4 && log.productivityLevel >=4) highWellnessHighProdDays++;
if(log.wellnessScores[f.id] <= 2 && log.productivityLevel <=2) lowWellnessLowProdDays++;
});
if (highWellnessHighProdDays >= 1 && highWellnessHighProdDays >= logsForWeek.length * 0.3) {
insightsHTML += `
- It appears that higher levels of '${f.label}' sometimes coincided with higher 'Productivity' this week. What elements contributed to these positive instances? `; } if (lowWellnessLowProdDays >= 1 && lowWellnessLowProdDays >= logsForWeek.length * 0.3) { insightsHTML += `
- On some days, lower '${f.label}' appeared with lower 'Productivity'. Exploring the notes for these days might offer insights into contributing factors. `; } } }); if (avgProdNum >= 3.5 && wellnessFactorsAboveAverage >= 3) { insightsHTML += `
- This week shows a trend of good overall productivity often aligning with positive wellness indicators. What helped maintain this balance? `; } else if (avgProdNum < 2.5 && wellnessFactorsBelowAverage >= 2) { insightsHTML += `
- Productivity appeared lower this week, alongside several lower-rated wellness factors. Which areas felt most challenging, and what support might be beneficial? `; } if(logsForWeek.filter(log => log.notes && (log.notes.toLowerCase().includes("stress") || log.notes.toLowerCase().includes("pressure") || log.notes.toLowerCase().includes("overwhelm"))).length >=1){ insightsHTML += `
- Your notes mentioned terms related to stress or pressure. Consider how these days correlated with your self-rated wellness and productivity scores. `; } if(insightsHTML === '
- Review your daily entries. What connections do you see between your wellness scores, productivity levels, and the day\'s events or notes? '; insightsHTML += '
- ') insightsHTML += '
