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>
This commit is contained in:
+3
-3
@@ -315,7 +315,7 @@
|
||||
|
||||
const data = await response.json();
|
||||
|
||||
if (data.predictedRating) {
|
||||
if (data.predictedRating && data.predictedRating > 0) {
|
||||
predictedCell.textContent = data.predictedRating;
|
||||
|
||||
const currentRating = parseInt(document.querySelector(`#row-${pdgaNumber} .rating`).textContent);
|
||||
@@ -326,8 +326,8 @@
|
||||
diffCell.className = `difference ${diffClass}`;
|
||||
diffCell.textContent = diffText;
|
||||
} else {
|
||||
predictedCell.textContent = 'Error';
|
||||
diffCell.textContent = 'Error';
|
||||
predictedCell.textContent = 'N/A';
|
||||
diffCell.innerHTML = '<span style="color: #999; font-size: 12px;">Unable to calculate<br>(Try again later)</span>';
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user