If you can't wait for SEDE to update on Sunday, calculate your suggested edit ban rate with this code snippet. Enter your user id and click Calculate and the script will then pull the latest data from the Stack API for that user.
function buildUrl(userid) {
let fromDate = Math.round(Date.now()/1000) - (60 * 60 * 24 * 7)
return `https://api.stackexchange.com/2.3/users/${userid}/suggested-edits?pagesize=100&fromdate=${fromDate}&order=desc&sort=creation&site=stackoverflow&filter=!SjLmDG*NSHYpn(_QU)&key=K5XoLY*x7CzcOL0*wO4bvA((`
}
function addRow(key,value) {
const kv = document.createElement('div')
const k = document.createElement('span')
const v = document.createElement('span')
k.textContent = key
v.textContent = value
kv.appendChild(k)
kv.appendChild(v)
if (key === 'Rate' && value > 4) {
kv.classList.add('danger');
}
if (key === 'Rate' && value > 3 && value <= 4) {
kv.classList.add('warning');
}
return kv
}
function showIt(stats) {
const result = document.getElementById('result')
if (stats.msg) {
const span = document.createElement('span')
span.textContent = stats.msg
result.appendChild(span)
} else {
result.appendChild(addRow('Rate', stats.rate))
result.appendChild(addRow('Rejected', stats.reject))
result.appendChild(addRow('Approved', stats.approve))
result.appendChild(addRow('Pending', stats.pending))
}
}
function calcRate(items) {
if (!items) return {msg:'nothing to do'}
let reject = 0
let approve = 0
let pending = 0
for(const item of items) {
reject += item.rejection_date ? 1 : 0
approve += item.approval_date? 1 : 0
pending += item.rejection_date || item.approval_date ? 0 : 1
}
const rate = reject - (approve / 3)
return {
rate: rate,
reject:reject,
approve:approve,
pending:pending
}
}
function getIt(userid) {
const url = buildUrl(userid);
fetch(url)
.then( r=> r.json())
.then(json => json.items)
.then(calcRate)
.then(showIt)
}
function handleGo() {
const userId = document.getElementById('userid')
const userIdValue = parseInt(userId.value, 10)
if (userIdValue > 0) {
getIt(userIdValue)
}
}
function wireUp() {
document.getElementById('go').addEventListener('click', handleGo);
}
wireUp();
body {
font-family: Arial;
font-size: 5vh;
}
#result div span {
display:inline-block;
width:20vw;
}
#result div.danger {
color:red;
font-weight: 900;
}
#result div.warning {
color:orange;
font-weight: 500;
}
<div>
<label>UserId</label>
<input type='text' id='userid' value='13927534' />
<button id='go'>Calculate</button>
</div>
<hr>
<div>
Edit ban by a rate of 5 or more
</div>
<hr>
<div id='result'>
</div>