Unlisted
Edited
Dec 22, 2022
Paused
Insert cell
Insert cell
Insert cell
aaplMissing = T.tidy(
aapl,
T.filter(d => d.Date < new Date(2014, 0, 10) & d.Date > new Date(2013, 11, 29)),
T.select(['Date', "Close"])
)
Insert cell
Insert cell
Insert cell
T.tidy(
aaplMissing,
T.select(["Date", "Close"]),
T.complete({Date: T.fullSeqDate('Date', 'day', 1)}, {Close: 0})
)
Insert cell
Insert cell
Insert cell
{
let td = T.tidy(
aaplMissing,
T.select(["Date", "Close"]),
T.complete({Date: T.fullSeqDate('Date', 'day', 1)}, {Close: 0})
)

return td.map( (d) => {
let where = _.findIndex(aaplMissing, {Date: d.Date} )
return {Date:d.Date, Close: (where == -1)?0:aaplMissing[where].Close}
})
}
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