This project visualizes the relationship between some of the S&P 500's fundamental valuation metrics like P/E ratio, equity risk premium, etc. and subsequent 10-year real returns, based on Shiller data dating from 1871 to 2023, using a D3-based interactive scatter plot.
-
Ensure you have Python installed on your system.
-
Start a simple HTTP server to serve the files locally. Open a terminal in the project directory and run the following command:
python -m http.server
-
Open your web browser and navigate to:
http://localhost:8000 -
The visualization will load, using the data provided in
data.csv.
- Ensure the
data.csvfile is present in the same directory as the HTML file. - Modify the
data.csvfile to update the visualization with your own data.
- Python 3.x
- Web browser supporting D3.js (e.g., Chrome, Firefox, Edge)
- If the visualization does not load, ensure the HTTP server is running and the browser URL matches
http://localhost:8000. - Check the browser console for any errors.
