Gentrification Risk Assessment Tool

Gentrification Risk Assessment Tool

Assess the potential risk of gentrification for a neighborhood based on key indicators.

Overall Gentrification Risk

0%

Key Contributing Factors

Assessment Summary

Please configure the data in the 'Data Configuration' tab to see the assessment summary.

Economic Indicators

Demographic Indicators

Development & Policy

Key indicators suggest pressure on the housing market, with a rent-to-income ratio of ${rentToIncomeRatio}% and median property values at $${inputs.propertyValue.toLocaleString()}.

Demographic shifts are noted, including a ${inputs.populationChange}% population change over 5 years and an increase in residents with higher education (${inputs.collegeGrads}%).

Development activity, including ${inputs.newConstruction} new housing units and ${inputs.publicInvestment} major public projects, further contributes to the risk profile.

`; } } function downloadPDF() { const { jsPDF } = window.jspdf; const pdf = new jsPDF({ orientation: 'p', unit: 'mm', format: 'a4' }); const contentToPrint = document.getElementById('dashboard-content'); if (!contentToPrint) { console.error("Dashboard content for PDF not found."); return; } // Temporarily add a title for the PDF const pdfTitle = document.createElement('div'); pdfTitle.innerHTML = `

Gentrification Risk Assessment Report

Generated on: ${new Date().toLocaleDateString()}

`; contentToPrint.prepend(pdfTitle); html2canvas(contentToPrint, { scale: 2, // Improve resolution useCORS: true, onclone: (document) => { // This is crucial for charts to render correctly in the canvas const chartCanvas = document.getElementById('factorsChart'); if (chartCanvas && factorsChart) { const dataUrl = factorsChart.toBase64Image(); const img = new Image(); img.src = dataUrl; img.style.maxWidth = '100%'; img.style.height = 'auto'; chartCanvas.parentNode.replaceChild(img, chartCanvas); } } }).then(canvas => { // Remove the title after rendering pdfTitle.remove(); const imgData = canvas.toDataURL('image/png'); const imgProps = pdf.getImageProperties(imgData); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = (imgProps.height * pdfWidth) / imgProps.width; let heightLeft = pdfHeight; let position = 0; const pageHeight = pdf.internal.pageSize.getHeight(); pdf.addImage(imgData, 'PNG', 0, position, pdfWidth, pdfHeight); heightLeft -= pageHeight; while (heightLeft >= 0) { position = heightLeft - pdfHeight; pdf.addPage(); pdf.addImage(imgData, 'PNG', 0, position, pdfWidth, pdfHeight); heightLeft -= pageHeight; } pdf.save('Gentrification-Risk-Assessment.pdf'); }).catch(err => { console.error("Error generating PDF:", err); pdfTitle.remove(); }); }
Scroll to Top