"The quick brown fox jumps over the lazy dog".split(/\s/).sort((a,b)=>d3.ascending(a.toLowerCase(),b.toLowerCase()))
before=newDate(2018,0,1)
after=newDate(2019,0,1)
before<after
d3.ascending(before,after)
d3.descending(before,after)
before.valueOf()
+before
+before<+after
classColor{
constructor(r,g,b){
this.r=r&0xff;
this.g=g&0xff;
this.b=b&0xff;
}
valueOf(){
return(this.r<<16)|(this.g<<8)|this.b;
}
}
steelblue=newColor(70,130,180)
coral=newColor(255,127,80)
steelblue<coral
d3.ascending(steelblue,coral)
date1=newDate(2018,0,1)
date2=newDate(2018,0,1)
date1===date2
d3.ascending(date1,date2)
[date1<=date2,date1>=date2]
people.slice()
.sort((a,b)=>d3.ascending(a.first,b.first))
.sort((a,b)=>d3.ascending(a.last,b.last))
"a"<3
"a">3
d3.ascending("a",3)
"10">3
d3.ascending("10",3)
[3,2,"a",4,1].sort(d3.ascending)// 🌶 Yikes!
["100","67","103","245"].sort(d3.ascending)// 🧐
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.