Published
Edited
Jul 31, 2018
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
dt.mutate("yearquarter", "blah", timeparse_quarter_end).data
Insert cell
Insert cell
Insert cell
function TimeSeries(raw_data, index_column) {

let me = this

if ((typeof (raw_data) == "object") && (raw_data.length > 0)) {
this.data = raw_data
} else {
throw ("Data must be an array of objects with length > 0")
}
let index = get_column(index_column)
function get_column(colname) {
return _.map(me.data, d => d[colname])
}

return {
data: this.data,
columns: this.columns,
get_column: get_column,
index: index
}

}
Insert cell
new TimeSeries(raw_data, "yearquarter")
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