Skip to main content
100%

S&P 500 Stocks Data

✓ Published1🌍 Public
Kkratikashetty1102@gmail.com
Last edited Feb 13, 2023
Created on Jan 24, 2023

This example loads daily S&P 500 stock data from a CSV file and displays it as raw JSON in a preformatted text block. The visualization fetches a Kaggle-derived dataset, parses it with `d3.csvParse`, and converts numeric fields such as Open, High, Low, Close, and Volume to numbers. The code uses D3 v7’s `select` and `join` to manage the display, with a state object tracking whether data is loading or available. The dataset includes date, price, adjusted close, and trading volume columns for 2022.

AI-generated description

Dataset consists of 2022 Daily S&P 500 Stocks Data with columns - Date of type Quantitative : Specifies trading date, Open of type Quantitative : Opening price, High of type Quantitative : Maximum price during the day, Low of type Quantitative : Minimum price during the day, Close of type Quantitative : Close price adjusted for splits, Adj Close of type Quantitative : Adjusted close price adjusted for both dividends and splits, Volume of type Quantitative : The number of shares that changed hands during a given day.

This data was obtained from https://www.kaggle.com/datasets/jacksoncrow/stock-market-dataset.

Even though data is around 7.8 MB after filtering for 2022, it could be further compressed by filtering for weekly data.

Ideas - By combining this with the metadata for the companies, indurstries with least return and most return could be analysed. Visualization available at https://www.reddit.com/r/dataisbeautiful/comments/xuk355/oc_the_stock_market_is_at_a_new_low_for_2022/?utm_source=share&utm_medium=web2x&context=3 could be used for inspiration.

MIT Licensed

Similar vizzes