upswing=5,// how many frames it takes to transition up
downswing=50// how many frames it takes to transition to the ending value
}={}
){
// let upswing = 5;
// let downswing = 50;
// let startVal = 0.1;
// let increase = 0.75;
// let endVal = 0.2;
letframes=[
[0,startVal],// initial frame
[start,startVal],
[start+upswing,endVal+increase],
[start+upswing+downswing,endVal],
[240,endVal]
];
returnkeyframe(frames);
}
circles={
returnd3.range(mapWidth/50-2).map(i=>{
letstart=chance.integer({min:5,max:200});// when to start transitioning
letd={
i,
x:50+i*50,
y:mapHeight/2,
key:generateSimple(start),
start
};
returnd;
});
}
chance=newChance(newDate())
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.