Download a list of companies in the S&P 500 as a csv file.
Just download the data/sp500.csv
file from this repo.
See datapackage.json
for table schema.
Or, build the csv yourself:
-
git clone [email protected]:noahg/sp500csv.git
-
cd sp500csv/scripts
pip install -r requirements.txt
-
make
To validate your build against the schema as defined in datapackage.json
run:
pip install -r requirements-for-validate.txt
python validate.py
The data is scrapped from the Wikipedia page: https://en.wikipedia.org/w/index.php?title=List_of_S%26P_500_companies
It appears as that the above is a frequently maintained, see recent changes list on the same page.
This is a simplified version of DataHub's repository s-and-p-500-companies.