Published
Edited
May 3, 2021
1 star
Insert cell
Insert cell
Insert cell
playlist(datasets)
Insert cell
Insert cell
url = 'https://static.data.gouv.fr/resources/mes-belles-playlists/20200107-113327/25c03514-67fe-421c-9406-bf57fb9afa86.txt'
Insert cell
datasets = {
let txt = await d3.text(url)
let datasets = txt.split("\n").map(x => x.split('/')[5])
return datasets
}
Insert cell
playlist = (datasets) => {
let div = document.createElement('div')
div.style.display = 'flex'
div.style.flexFlow = 'row wrap'
// let txt = await d3.text(url)
// let datasets = txt.split("\n").map(x => x.split('/')[5])

datasets.map(dataset => {
let cell = document.createElement('div')
cell.appendChild(datasetCard(dataset))
cell.style.width = "32%"
cell.style.padding = '3px'

div.appendChild(cell)
})
return div
}
Insert cell
d3 = require('d3', 'd3-fetch')
Insert cell
import { datasetCard } from '@taniki/datagouvfr-oembed'
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