Published
Edited
Apr 17, 2020
Insert cell
Insert cell
Insert cell
url = "https://covidtracking.com/api/v1/states/daily.json"
Insert cell
d3.json(url).then( data => {

let MAdata = data.filter(row => row.state == "MA")
for (let i = 0; i < MAdata.length; i++) {
if (MAdata[i].death >= 0) {
let tempObj = {};
tempObj['Date'] = MAdata[i]['date'];
tempObj['Num'] = MAdata[i]['death'];
resultData.push(tempObj)
} else {
break
}
}
})
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