Public Transportation Accessibility Score Finder

Public Transportation Accessibility Score Finder

Generate a transit accessibility score for any location.

Your accessibility score will appear here. Please fill out the 'Data Configuration' tab first.

Proximity to Transit

Service Frequency

Connectivity

${summaryText}

Score Breakdown

`; downloadBtn.classList.remove('hidden'); const scoreCircle = document.getElementById('scoreCircle'); if (scoreCircle) { scoreCircle.style.background = `conic-gradient(var(--primary-color) ${results.finalScore * 3.6}deg, #e5e7eb 0deg)`; } const ctx = document.getElementById('scoreChart')?.getContext('2d'); if(ctx) { if (scoreChart) scoreChart.destroy(); scoreChart = new Chart(ctx, { type: 'radar', data: { labels: ['Proximity', 'Frequency', 'Connectivity'], datasets: [{ label: 'Category Score', data: [results.scores.proximity, results.scores.frequency, results.scores.connectivity], backgroundColor: 'rgba(79, 70, 229, 0.2)', borderColor: 'rgba(79, 70, 229, 1)', borderWidth: 2, pointBackgroundColor: 'rgba(79, 70, 229, 1)', }] }, options: { responsive: true, maintainAspectRatio: false, scales: { r: { beginAtZero: true, max: 100, ticks: { stepSize: 20 } } }, plugins: { legend: { display: false } } } }); } } function downloadPDF() { const { jsPDF } = window.jspdf; const pdf = new jsPDF({ orientation: 'p', unit: 'mm', format: 'a4' }); const contentToPrint = document.getElementById('dashboard-content'); if (!contentToPrint) return; html2canvas(contentToPrint, { scale: 2, useCORS: true, onclone: (doc) => { const chartCanvas = doc.getElementById('scoreChart'); if (chartCanvas && scoreChart) { const img = new Image(); img.src = scoreChart.toBase64Image(); img.style.maxWidth = '100%'; img.style.height = 'auto'; chartCanvas.parentNode.replaceChild(img, chartCanvas); } } }).then(canvas => { const imgData = canvas.toDataURL('image/png'); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = (canvas.height * pdfWidth) / canvas.width; pdf.addImage(imgData, 'PNG', 10, 10, pdfWidth - 20, pdfHeight > 277 ? 277 : pdfHeight - 20); pdf.save('Transit-Accessibility-Score.pdf'); }); }
Scroll to Top