Public
Edited
Dec 21, 2022
Paused
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
fetchMethodExpanded = {
let url = "https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2022/2022-01-11/colony.csv"
let res = fetch(url)
return d3.csvParse(await (await res).text())
}
Insert cell
Insert cell
Insert cell
forumVersionWorks = {
const url = "https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2022/2022-01-11/colony.csv"
return fetch(url)
.then(res => res.text())
.then(text => d3.csvParse(text, d3.autoType))
}
Insert cell
Insert cell
Insert cell
data = fetch("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2022/2022-01-11/colony.csv").then((response) => response.json()) // of course doesn't work since not JSON, but how to make for CSV?
Insert cell
Insert cell
data1 = fetch("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2022/2022-01-11/colony.csv").then((response) => {
return d3.csvParse(await (await response).text())
}
) // not sure how to use .then syntax
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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