from axion import Axion
client = Axion(api_key="your_api_key")
universe = ["MSFT", "AAPL", "GOOGL", "AMZN", "META", "NVDA", "TSLA"]
esg_data = {
ticker: client.esg.data(ticker)
for ticker in universe
}
screened = [
{
"ticker": ticker,
"total": data["totalEsg"],
"environment": data["environmentScore"],
"social": data["socialScore"],
"governance": data["governanceScore"],
"percentile": data["percentile"],
"performance": data["esgPerformance"],
}
for ticker, data in esg_data.items()
if data["esgPerformance"] != "UNDER_PERF"
]
ranked = sorted(screened, key=lambda x: x["total"])