DaScie's picture
I need to assess PVA dataset in SAS
1e7d16c verified
Raw
History Blame Contribute Delete
1.84 kB
// Main application script
document.addEventListener('DOMContentLoaded', function() {
// Initialize tooltips
const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl);
});
// Sample data for demonstration
const sampleData = {
variables: [
{ name: 'ID', type: 'Numeric', missing: 0, unique: 12345 },
{ name: 'Age', type: 'Numeric', missing: 2, unique: 78 },
{ name: 'Gender', type: 'Character', missing: 1, unique: 2 }
]
};
// Function to update variable table
function updateVariableTable() {
const tableBody = document.querySelector('tbody');
if (tableBody) {
tableBody.innerHTML = sampleData.variables.map(variable => `
<tr>
<td class="px-6 py-4 whitespace-nowrap font-medium">${variable.name}</td>
<td class="px-6 py-4 whitespace-nowrap">${variable.type}</td>
<td class="px-6 py-4 whitespace-nowrap">${variable.missing}%</td>
<td class="px-6 py-4 whitespace-nowrap">${variable.unique}</td>
<td class="px-6 py-4 whitespace-nowrap">
<button class="text-primary-500 hover:text-primary-600 mr-3">
<i data-feather="eye"></i>
</button>
<button class="text-secondary-500 hover:text-secondary-600">
<i data-feather="bar-chart-2"></i>
</button>
</td>
</tr>
`).join('');
feather.replace();
}
}
updateVariableTable();
});