Key Drivers Analysis (KDA) is used in marketing analytics to determine what factors are strongly related to key performance indicators (KPI) such as brand trust.
function init(){ document.getElementById('fileInput').addEventListener('change', handleFileSelect, false); document.getElementById('fileContent').style.display = "none"; } function handleFileSelect(event){ const reader = new FileReader(); reader.onload = handleFileLoad; reader.readAsText(event.target.files[0]); } function handleFileLoad(event){ document.getElementById('fileContent').textContent = event.target.result; populateDropdown(event.target.result); } function populateDropdown(csv) { var select = document.getElementById("selectTarget"); let lines = csv.split(/(?:\r\n|\n)+/).filter(function(el) {return el.length !== 0}); let headers = lines.splice(0, 1)[0].split(","); for (var i = 0; i < headers.length; i++) { var record = headers[i]; var el = document.createElement("option"); el.text = record; el.value = record; select.add(el); } } function kdaApiCall() { // curl -X POST -H 'Content-Type: text/csv' -d @file.csv http://localhost:5000/upload }