Global Financial Inclusion Index Tracker

Global Financial Inclusion Index Tracker

Analyze and compare financial inclusion data across the world.

Global Avg. Bank Account

0%

Top Performer

-

Avg. Digital Payment Use

0%

Financial Inclusion Index by Country

Index is a weighted average of account ownership, credit access, and digital payment usage.

${calculateIndex(country).toFixed(1)}

This score reflects a strong performance in key areas of financial accessibility.

`; } // --- EVENT HANDLING --- function handleConfigEvents() { const configBody = document.getElementById('config-table-body'); configBody.addEventListener('input', e => { const { index, field } = e.target.dataset; const value = e.target.type === 'number' ? parseFloat(e.target.value) || 0 : e.target.value; appData.countries[index][field] = value; runAllUpdates(); }); configBody.addEventListener('click', e => { if (e.target.classList.contains('remove-row-btn')) { appData.countries.splice(e.target.dataset.index, 1); runAllUpdates(); } }); document.getElementById('add-country-row').addEventListener('click', () => { appData.countries.push({ name: 'New Country', account: 0, credit: 0, digital: 0, literacy: 0 }); runAllUpdates(); }); } countrySelect.addEventListener('change', updateDeepDive); // --- PDF GENERATION --- document.getElementById('download-pdf-btn').addEventListener('click', () => { const doc = new jsPDF(); let cursorY = 20; // Header doc.setFontSize(22); doc.setFontStyle('bold'); doc.setTextColor('#0284c7'); doc.text('Global Financial Inclusion Report', 105, cursorY, { align: 'center' }); cursorY += 15; // Chart doc.setFontSize(16); doc.text('Country Comparison by Index Score', 14, cursorY); cursorY += 8; doc.addImage(countryComparisonChart.toBase64Image('image/png', 1.0), 'PNG', 14, cursorY, 180, 120); cursorY += 130; // Data Table const indexedData = appData.countries.map(c => ({ ...c, index: calculateIndex(c).toFixed(1) })).sort((a,b) => b.index - a.index); doc.autoTable({ startY: cursorY, head: [['Rank', 'Country', 'Index Score', 'Bank Account (%)', 'Digital Payments (%)']], body: indexedData.map((c, i) => [i + 1, c.name, c.index, c.account, c.digital]), theme: 'grid', headStyles: { fillColor: '#0ea5e9' } }); doc.save('Financial-Inclusion-Report.pdf'); }); // --- INITIALIZATION --- function runAllUpdates() { renderConfigTable(); updateDashboard(); populateCountrySelect(); updateDeepDive(); } handleConfigEvents(); runAllUpdates(); setActiveTab('dashboard'); });
Scroll to Top