Public
Edited
Feb 23, 2024
1 fork
10 stars
Insert cell
Insert cell
Insert cell
Insert cell
render = {

const sel = d3.create('div')
.style('width', width)
.attr('class', 'flex flex-wrap')

d3.range(avatars).forEach(n => {
sel.append('div')
.append('img')
.attr('src', image(n))
})

return sel.node()
}
Insert cell
Insert cell
Insert cell
image = (n) => {
return `https://api.dicebear.com/7.x/${style}/svg?seed=${n}`
}
Insert cell
// full list: https://avatars.dicebear.com/styles

typesAvatar = [
'pixel-art',
'open-peeps',
'bottts',
'avataaars',
'croodles',
'personas'
]
Insert cell
<link href="https://unpkg.com/basscss@8.0.2/css/basscss.min.css" rel="stylesheet">

<style>
img {
width: 150px
}
</style>

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