Skip to content

Instantly share code, notes, and snippets.

@hillkim7
hillkim7 / resample2.js
Last active July 10, 2023 01:35
It shows how to resample time series data within javascript.
// This code show how to resample dataframe within javascript.
// It is based on the following link:
// https://gist.github.com/edouardswiac/0782cfb1fc66aba6b0ffca06c01c03b2
var moment = require('moment')
// our time precision
let timeUnit = 'minute'
let startTime = moment().startOf(timeUnit)