Skip to content

jsubroto/sp500-sectors-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

S&P 500 Sectors Data

Update S&P 500 data

Automatically updated dataset of S&P 500 sector weights scraped from us500.com.
The data refreshes on weekdays via a scheduled GitHub Actions workflow.

📦 Data

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, "..."]
}

⚙️ Automation

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.

🧰 Local Development

Requires Node.js 18+.

npm install
npm run fetch

This will regenerate the JSON files under data/.

📄 License

MIT

About

Automatically updated S&P 500 sector data scraped from us500.com, refreshed on weekdays via GitHub Actions.

Topics

Resources

License

Stars

Watchers

Forks

Contributors