Why do I get less data when I download data from Python API?
Hi,
I'm trying to get ESG indicator data for S&P 500 for 2019. I have tried to get the data from Python. It gives me around 350 values and the rest, 155, are missing values. When I download the same data from Screener app I get much more data, almost 505 observations are covered. I was wondering what could be the reason and whether I can get help to solve this problem.
I used the following code to obtain the data for 2019 in Python:
First I obtain the list of S&P 500 firms at the beginning of 2019:
sp2019, err = ek.get_data('0#.SPX(20190101)', 'TR.IndexConstituentRIC',)
Then I get the PermID for these firms:
sp2019.columns = ['inst','ric']
ric19= ek.get_symbology(sp2019.inst.tolist())
Then I construct a list including the PermIDs for these firms:
list19= list(ric19.OAPermID)
And using this list I obtain ESG indicator data for 2019 (I download all the 186 indicators and ESG category scores, here I pasted the first few indicators to be brief):
data2019, err=ek.get_data(list19,['TR.CommonName','TR.RIC','TR.GICSIndustry',
'TR.TRESGScore(Period=FY2019,Frq=FY).date',
'TR.AnalyticEqualShareholderRightsScore(Period=FY2019,Frq=FY)',
'TR.AgrochemicalProductsScore(Period=FY2019,Frq=FY)',
'TR.AnalyticAntiTakeoverDevicesScore(Period=FY2019,Frq=FY)',
'TR.AnalyticAuditCommIndScore(Period=FY2019,Frq=FY)',
'TR.AnalyticAuditCommMgtIndScore(Period=FY2019,Frq=FY)',
'TR.AnalyticBoardAffiliationsScore(Period=FY2019,Frq=FY)',
'TR.AnalyticBoardAttendanceScore(Period=FY2019,Frq=FY)']
Thank you in advance for the help.
Mahdieh
Best Answer
-
Hi @mahdiehvg
Following your code, the result on data2019 does container only 369 non-null rows.
I selected one of the RIC(null value) and tried to retrieve the data on a different period.
And it seems that the data does not available in 2019 period but available in 2017/2018 period.
So if you would like to clarify the data availability,
For an authoritative answer to any content questions, the best resource is the Refinitiv Content Helpdesk.
The Refinitiv Content Helpdesk can be reached using Contact Us capability in your Eikon application.
Or by calling the Helpdesk number in your country.
Or at https://my.refinitiv.com/0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 162 App Studio
- 4 Block Chain
- 5 Bot Platform
- 17 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 370 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛