Please see Query, Process and Visualize a data Stream via a Functional Pipeline approach
npm install
npm start
After starting the back end you can use the observable page as the front end or browse to http://localhost:3000 which serves the index.html which provides the dynamic visualization.
The index.js has a pair of lines which comment out either the test generator or the mongo generator.
Edit the src/generator/mongo-generator as required for your projection
The src/processor/statsprocessor has logic for computing averages for individual assets.
This timeline source was produced by modifying source originally provided by Eric Glassman at this codepen