js/script.js
/* Reads in data from a CSV file. */
Reads in data from a CSV file.
Reads in data from a CSV file .
async function loadFile(file) {
    let data = await d3.csv(file).then(d => {
        let mapped = d.map(g => {
            for (let key in g) {
                let numKey = +key;
                if (numKey) {
                    g[key] = +g[key];
                }
            }
            return g;
        });
        return mapped;
    });
    return data;
}
async function loadFile ( file ) { let data = await d3 . csv ( file ) . then ( d => { let mapped = d . map ( g => { for ( let key in g ) { let numKey = + key ; if ( numKey ) { g [ key ] = + g [ key ] ; } } return g ; } ) ; return mapped ; } ) ; return data ; }
Reads in data from a CSV file.
Reads in data from a CSV file .