Echarty Real-Time Data
Loading WebR magic...
×

Real-time data with echarty

Live R-code execution inside a single web page. No Rmd. No server. No installation. Thanks to WebR 🏆

This page does data polling for crypto price every 10 seconds using jsonlite::fromJSON.
Response is a timestamp and a value in $US. Additional data processing could be achieved in R - moving averages(MA), prediction, etc.
The chart displays Bollinger Bands - two standard deviations on simple moving average of a rolling window.

Select rolling window width here: points (ex: 12 pts * ~10 secs = ~2 minutes window)
Select crypto here:

Maximum number of points is limited to 500 (FIFO stack).
Chrome browser timer throttling is bypassed through a background web worker. So data is collected even when the browser tab is not in focus.
See also the coder demo for interactive R-code chart editing.

💖 If you like this solution, please consider granting a Github star ⭐