Commit Graph

9 Commits

Author SHA1 Message Date
Samuel Enocsson 23412a8ea3 Enhance prediction system with multi-day tournament support and auto-calculation
- Fix parseDate function to handle multi-day tournament formats (e.g., "2-Sep to 3-Sep-2023")
- Integrate PDGA update date simulation using 2nd Tuesday cutoffs for accurate predictions
- Calculate and display predictions automatically from database on page load
- Update rating calculation to use proper PDGA timing windows (12/24 months before update date)
- Improve date parsing regex to correctly extract start dates from tournament ranges
- Include updated player list in pdga-numbers.txt

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-13 09:04:44 +02:00
Samuel Enocsson ef3881a0ac Add mobile optimization and PDGA update date simulation
Mobile improvements:
- Responsive table layout with hidden columns on mobile
- Touch-friendly buttons and improved spacing
- Consolidated information display for small screens
- Mobile-specific CSS with media queries

PDGA rating simulation:
- Calculate next official PDGA update date (2nd Tuesday of each month)
- Filter tournaments to only include rounds before next update
- Simulate realistic rating predictions based on PDGA schedule
- Account for rolling 12-month window and round expiration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 17:22:12 +02:00
Samuel Enocsson 2994f221f7 Add cache management and smart delay optimization
- Add subtle "clear cache" link (gear icon) in top-right corner
- Implement cache clearing endpoint with user feedback
- Fix delay logic to skip delays for cached data
- Only apply rate limiting delays when actually scraping fresh data
- Add cache size reporting when clearing cache
- Improve performance for repeat visits with cached data
- Maintain server-friendly rate limiting for fresh scrapes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 17:04:14 +02:00
Samuel Enocsson 55188a8269 Implement official PDGA rating calculation methodology
- Update predicted rating algorithm to match PDGA rating guide
- Focus on tournaments from last 12 months only (improved accuracy)
- Add proper outlier exclusion: rounds >2.5 std dev below average
- Implement double weighting for most recent 25% of rounds (9+ rounds)
- Apply PDGA minimum data requirements (7 rounds for outlier exclusion)
- Improve error handling and rate limiting for tournament scraping
- Add user-friendly error messages for failed calculations
- Reduce tournament scraping from 15 to 8 tournaments to avoid rate limits

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 16:58:00 +02:00
Samuel Enocsson af54b30c6c Add comprehensive caching for performance optimization
- Cache predicted rating calculations (24 hour duration)
- Cache rating history data to avoid repeated scraping
- Implement separate cache keys for different data types
- Add cache hit logging for monitoring effectiveness
- Update PDGA numbers list with additional players
- Significantly improve performance for repeat visitors
- Reduce load on PDGA servers with intelligent caching

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 16:34:36 +02:00
Samuel Enocsson 2ab4869fb9 Add expandable rating history charts with interactive tooltips
- Implement clickable player rows to expand/collapse rating history
- Add rating history scraping from PDGA history pages
- Create custom SVG line charts showing rating progression over time
- Add interactive tooltips with date and rating on hover
- Include visual highlights when hovering over data points
- Implement anti-flicker tooltip system with delayed hiding
- Add large hover areas (12px radius) for better user experience
- Show grid lines, axis labels, and responsive chart scaling
- Cache rating history data to avoid repeated API calls

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 12:40:15 +02:00
Samuel Enocsson 2d55651f43 Add real-time progress bar for rating loading
- Implement Server-Sent Events for live progress updates
- Add animated progress bar with percentage display
- Show real-time status: current player being loaded
- Display player names as they complete loading
- Handle errors gracefully with progress continuation
- Replace HTTP-only approach for better reliability
- Enhanced user experience with visual feedback

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 11:51:51 +02:00
Samuel Enocsson 8e07dc6c73 Add Docker support and fix rating change extraction
- Add Dockerfile with optimized Puppeteer configuration for containers
- Add .dockerignore for efficient builds
- Fix rating change regex to match actual PDGA format (no brackets)
- Update Puppeteer launch args for Docker compatibility
- Use new headless mode to resolve deprecation warning

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 11:20:51 +02:00
Samuel Enocsson deb162dc13 Initial commit: PDGA rating scraper and predictor
- Web scraping app for PDGA player ratings
- Current rating extraction from player pages
- Tournament round rating scraping for predictions
- Statistical rating prediction algorithm
- Interactive table with on-demand calculations
- Caching for performance optimization

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 11:13:13 +02:00