Automatically updated dataset of S&P 500 sector weights scraped from us500.com.
The data refreshes on weekdays via a scheduled GitHub Actions workflow.
Generated JSON files are committed to the repository under the data/ directory:
| File | Description |
|---|---|
source-us500.json |
Raw sector data as fetched from the source site |
sectors.json |
Simplified data with labels (sector names) and values (percent weights) |
sectors-YYYY-MM-DD.json |
Archived daily snapshots (created automatically) |
Each file includes an asOf field indicating the UTC date of retrieval.
Example (data/sectors.json):
{
"asOf": "2025-10-19",
"labels": ["Technology", "Healthcare", "Financials", "..."],
"values": [27.5, 13.9, 12.3, "..."]
}This repository uses a GitHub Actions workflow that runs on weekdays (Tuesday–Saturday UTC):
- Fetches the latest data from us500.com
- Writes updated JSON files under data/
- Commits and pushes any changes automatically
You can also trigger it manually from the Actions tab.
Requires Node.js 18+.
npm install
npm run fetchThis will regenerate the JSON files under data/.