Skip to main content

Apple interactive

The interactive chart below shows historical share price and quarterly revenue data for Apple (AAPL). Hover over (or tap) a data point to see its details. Drag the range sliders to zoom in to a subsection of the chart.

To embed the interactive chart in this page, I created a new GitHub repository for assets and hosted it on Netlify at assets.realthreads.io. I then embedded the chart into this page using an iFrame.

I created the chart in JupyterLab using pandas and plotly python graphing library. I exported the plotly chart to HTML.

I collected the historical share price data from Yahoo! Finance using yfinance and scraped the historical revenue data from Macrotrends using requests and beautifulsoup4.

You can find the Jupyter Notebook I used to create these charts on Gist.