Public
Edited
Dec 20, 2022
1 fork
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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, 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
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
justUseD3 = d3.csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2022/2022-01-11/colony.csv")
Insert cell
// can also apply autoType
justUseD3_auto = d3.csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2022/2022-01-11/colony.csv", d3.autoType)
Insert cell
Insert cell
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