Public
Edited
Jan 28, 2024
Insert cell
Insert cell
data = fetch("https://www.nerdnumbers.com/api/v0/nba/2024/player_stats").then((response) => response.json())
Insert cell
data = {
const response = await fetch("https://www.nerdnumbers.com/api/v0/nba/2024/player_stats");
if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
const text = await response.text();
let jsonData;
try {
jsonData = JSON.parse(text);
} catch (error) {
console.error('Invalid JSON:', error);
throw error; // Re-throw the error to prevent further processing
}
return jsonData;
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