rhammell / timeline-functions

Visualize function values broadcast with Socket.io and displayed using D3.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

timeline-functions

Visualize various periodic functions on a scrolling timeline. Values are provided through Socket.io and displayed using D3.js.

A Node Express server hosts a static webpage and a Socket.io feed. The feed continuously broadcasts output values for different periodic functions - sine, square, triange, etc. - to any listening clients. The webpage connects to this feed and subscribes to one of the function channels, then displays the incoming values on a timeline chart.

Setup

Node.js is required to run this application.

# Clone this repository
git clone https://github.com/rhammell/timeline-functions.git

# Go into the repository
cd timeline-functions

# Install required node packages
npm install

# Start node development server
node app.js

Usage

With the development server running, open a browser and browse to localhost:3000 to view the web interface. Function values are plotted versus their timestamps to create a continuous line chart.

Select options allow users to control which function is displayed, timeline length, and if datapoints are shown.

About

Visualize function values broadcast with Socket.io and displayed using D3.js


Languages

Language:JavaScript 77.2%Language:HTML 17.6%Language:CSS 5.2%