app/static/js/lib/estimate.js
// Transform API estimate data to chart data format
Transform API estimate data to chart data format
Transform API estimate data to chart data format
function chartDataFromEstimate (estimate, selected, fn) {
    const series = `${selected} (estimated with ${fn} function)`
    const zipped = zipObj(estimate.years, estimate.data)
    return {
        columns: fromPairs([[series, zipped]]),
        data: toChartData(series, zipped),
        covariance: estimate.covariance,
        stderr: estimate.stderr,
        estimate: series,
    }
}
function chartDataFromEstimate ( estimate , selected , fn ) { const series = ` ${ selected } ${ fn } ` const zipped = zipObj ( estimate . years , estimate . data ) return { columns : fromPairs ( [ [ series , zipped ] ] ) , data : toChartData ( series , zipped ) , covariance : estimate . covariance , stderr : estimate . stderr , estimate : series , } }
Transform API estimate data to chart data format
Transform API estimate data to chart data format