Public
Edited
Feb 22, 2024
Paused
6 forks
17 stars
Insert cell
Insert cell
Insert cell
Insert cell
// accessing the https://metmuseum.github.io/ API
jsonURL = "https://collectionapi.metmuseum.org/public/collection/v1/departments"
Insert cell
fetch(jsonURL)
.then(response => {
if (!response.ok) throw new Error(response.status);
return response.json();
})
Insert cell
Insert cell
d3.json(jsonURL)
Insert cell
Insert cell
Insert cell
csvURL = "https://raw.githubusercontent.com/max-mapper/csv-spectrum/master/csvs/comma_in_quotes.csv"
Insert cell
fetch(csvURL)
.then(response => {
if (!response.ok) throw new Error(response.status);
return response.text();
})
Insert cell
d3.csv(csvURL)
Insert cell
Insert cell
fetch("https://apichallenges.herokuapp.com/mirror/request", {
body: JSON.stringify({ping: Date.now()}),
headers: {
"content-type": "application/json",
"accept": "application/json",
},
method: "POST",
mode: "cors"
}).then(response => {
if(!response.ok) throw new Error(response.statusText);
return response.json();
})
Insert cell
Insert cell
d3.json("https://apichallenges.herokuapp.com/mirror/request", {
body: JSON.stringify({ping: Date.now()}),
headers: {
"content-type": "application/json",
"accept": "application/json",
},
method: "POST",
mode: "cors"
})
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