This project demonstrates the use of RC Timing of analog sensors with a Raspberry Pi, how to log and stream those values via websockets and, finally, how to plot the data in a real time HTML/JS interface.
This is the companion repository to this blog post to which you should refer for more details:
https://perrygeo.com/raspberry-pi-real-time-sensor-plots-with-websocketd.html