Published
Edited
May 17, 2021
1 fork
Insert cell
md `# Auto Loan`
Insert cell
myLoan = FileAttachment("autoloan.csv").csv({typed: true})
Insert cell
//d3 = require("d3")
Insert cell
maxLoan = myLoan
.sort((a, b) => b.Loan_Amount - a.Loan_Amount)
//.filter(d => d.Vehicle_Make == "BMW" ) // filter by car make
.splice(0,10) // first 10 records only


Insert cell
results = maxLoan.map(function(d) {
return {
name: d.Vehicle_Make,
//name: d.Vehicle_Model,
value: d.Loan_Amount/1000
}
})
Insert cell
import {chart as barchart} with { results as data } from '@d3/bar-chart'
Insert cell
barchart

Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more