Sound of the Stock Market
This visualization tracks the cost basis of stocks by brushing a range chart to recalculate hypothetical $1 purchases over a selected time period, with multiple stock price lines overlaid on a main chart. Hovering or playing animates the lines while attached audio oscillators fluctuate with the stock data, and users can add custom tickers and adjust sound waveforms and colors. The code uses D3 v4 scales, axes, and `d3.brushX`, fetching historical price data from Yahoo Finance via a CORS proxy, and renders SVG paths with an animated playback and mouse-sensor interaction.
AI-generated descriptionThis is a tool for tracking cost basis of stocks. Brushing the range chart at the bottom recalculates the cost basis for having purchased $1 of each of the displayed stocks. It is also good for comparing the performance of different stocks over a specified period of time.
The data is pulled from Yahoo finance through a herokuapp I forked from <a href="https://github.com/Rob--W">Rob Wu</a>'s <a href="https://github.com/Rob--W/cors-anywhere">cors-anywhere</a>. I also added sound by attaching oscillators to each of the stocks when they are drawn, that fluctuate along with the stock when you mouseover the chart or click the play button.
You can manually enter a stock that isn't in the select menu, but not while viewing it through the Bl.ocks.org interface, you have to go <a href="http://bl.ocks.org/alexmacy/raw/d2f9486aa62411e7844a47544856e2a6/">here</a> or <a href="https://alexmacy.github.io/sound-of-the-market/live.html">here</a>.