function generateTable() { var data = score_table; // The variable from model_scores.js var table = '
# | Model | Method | Source | Date | ALL | FQA | GPS | MWP | TQA | VQA | ALG | ARI | GEO | LOG | NUM | SCI | STA | ${key} | ` // for key = "1", "2", "3" top_ranks = ["1", "2", "3"] if (top_ranks.includes(key)) { table += `${entry.Model} | `; table += `${entry.Method} | `; table += `Link | `; table += `${entry.Date} | `; table += `${entry.ALL.toFixed(1).toString()} | `; // .toFixed(1): round to 1 decimal place } else { table += `${entry.Model} | `; table += `${entry.Method} | `; table += `Link | `; table += `${entry.Date} | `; table += `${entry.ALL.toFixed(1).toString()} | `; // .toFixed(1): round to 1 decimal place } // if entry.FQA is a number if (!isNaN(entry.FQA)) { table += `${entry.FQA.toFixed(1).toString()} | `; table += `${entry.GPS.toFixed(1).toString()} | `; table += `${entry.MWP.toFixed(1).toString()} | `; table += `${entry.TQA.toFixed(1).toString()} | `; table += `${entry.VQA.toFixed(1).toString()} | `; table += `${entry.ALG.toFixed(1).toString()} | `; table += `${entry.ARI.toFixed(1).toString()} | `; table += `${entry.GEO.toFixed(1).toString()} | `; table += `${entry.LOG.toFixed(1).toString()} | `; table += `${entry.NUM.toFixed(1).toString()} | `; table += `${entry.SCI.toFixed(1).toString()} | `; table += `${entry.STA.toFixed(1).toString()} | `; } else { table += `${entry.FQA.toString()} | `; table += `${entry.GPS.toString()} | `; table += `${entry.MWP.toString()} | `; table += `${entry.TQA.toString()} | `; table += `${entry.VQA.toString()} | `; table += `${entry.ALG.toString()} | `; table += `${entry.ARI.toString()} | `; table += `${entry.GEO.toString()} | `; table += `${entry.LOG.toString()} | `; table += `${entry.NUM.toString()} | `; table += `${entry.SCI.toString()} | `; table += `${entry.STA.toString()} | `; } table += ''; } table += '