Implemented Analytics Dashboard#228
Open
Gupta-02 wants to merge 1 commit intosaurabh-dev-vns:mainfrom
Open
Conversation
|
Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✅ Backend Enhancements (analytics.js)
4 New API Endpoints:
/api/analytics/accuracy-distribution - Shows participant accuracy ranges with WPM correlations
/api/analytics/engagement-metrics - Displays completion rates and activity scores
/api/analytics/performance-heatmap - Activity patterns by day/hour with performance data
/api/analytics/export - CSV export functionality for all analytics data
✅ Frontend Enhancements (analytics.html)
New Chart Sections:
Accuracy Distribution Chart (bar chart with dual y-axes)
Performance Heatmap (bubble chart showing activity patterns)
Engagement Metrics (radar chart showing key engagement indicators)
Export Controls: Buttons to download CSV reports for each data type
Responsive Design: All charts adapt to different screen sizes
✅ JavaScript Updates (analytics-script.js)
New Chart Functions:
createAccuracyChart() - Visualizes accuracy distribution
createHeatmapChart() - Shows performance heatmap
createEngagementChart() - Displays engagement radar chart
Export Functionality: exportData() function with proper authentication
Enhanced Data Loading: Parallel API calls for all analytics data
🚀 Key Features Added:
Accuracy Distribution: Shows how many participants fall into different accuracy ranges (0-50%, 50-60%, etc.) with average WPM for each range
Performance Heatmap: Visualizes when competitions are most active (by day of week and hour) with performance correlations
Engagement Metrics: Radar chart showing competitions, participants, rounds, results, and completion rates
CSV Export: Download detailed reports for overview, competitions, participants, and trends data
Real-time Updates: All charts update when changing time periods (7 days, 30 days, 90 days)
🧪 To Test the Dashboard:
Start the application: npm start
Navigate to /analytics.html as an organizer
The dashboard will load all charts automatically
Try different time periods using the dropdown
Test the export buttons to download CSV files
The analytics dashboard now provides organizers with comprehensive insights to improve future competitions, including detailed performance metrics, participant engagement data, and exportable reports for further analysis.