
Scraping Sustainable Investment ESG Ratings
Scraping Sustainable Investment ESG Ratings ESG (Environmental, Social, Governance) ratings drive trillions in sustainable investment decisions. But these ratings are scattered across providers with different methodologies. Let's build a scraper that aggregates ESG data. ESG Data Sources Yahoo Finance — Free ESG scores for public companies MSCI ESG Ratings — Industry standard SEC EDGAR — ESG-related filings CDP — Climate disclosure data Setting Up pip install requests beautifulsoup4 pandas yfinance matplotlib Yahoo Finance ESG Scores import yfinance as yf import pandas as pd def get_esg_scores ( tickers ): results = [] for ticker in tickers : stock = yf . Ticker ( ticker ) esg = stock . sustainability if esg is not None and not esg . empty : scores = esg . to_dict () results . append ({ " ticker " : ticker , " total_esg " : scores . get ( " Value " , {}). get ( " totalEsg " , None ), " environment " : scores . get ( " Value " , {}). get ( " environmentScore " , None ), " social " : sco
Continue reading on Dev.to Tutorial
Opens in a new tab
.jpg&w=1200&q=75)



