Skip to content

This demo application shows the workflow of the Refinitiv Data Platform (RDP) CFS Bulk API Feed for the FTSE Green Revenues data.

License

Notifications You must be signed in to change notification settings

LSEG-API-Samples/Example.RDP.Python.GreenRevenuesBulk

Repository files navigation

RDP APIs Green Revenues CFS Bulk file Workflow

Example Code Disclaimer: ALL EXAMPLE CODE IS PROVIDED ON AN “AS IS” AND “AS AVAILABLE” BASIS FOR ILLUSTRATIVE PURPOSES ONLY. REFINITIV MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, AS TO THE OPERATION OF THE EXAMPLE CODE, OR THE INFORMATION, CONTENT, OR MATERIALS USED IN CONNECTION WITH THE EXAMPLE CODE. YOU EXPRESSLY AGREE THAT YOUR USE OF THE EXAMPLE CODE IS AT YOUR SOLE RISK.

Introduction

This demo application shows the workflow of the Refinitiv Data Platform (RDP) CFS API Feed for the FTSE Green Revenues data. I am demonstrating the workflow in Python and Jupyter environment. However, the RDP APIs are the web-based API that any programming langues can connect and consume data from via the HTTP RESTful API.

Prerequisite

Before I am going further, there is some prerequisite, dependencies, and libraries that the project is needed.

Access to the RDP with the Green Revenues Bulk file permission

This project uses RDP access credentials with the Green Revenues Bulk file permission.

Please contact your LSEG representative to help you with the RTO account and services.

Internet Access

This demonstration connects to RDP on AWS via a public internet.

Python and Jupyter Notebook.

This project uses Python and Jupyter environment.

The Python Anaconda or MiniConda distribution/package manager is recommended on.

What is Refinitiv Data Platform (RDP) APIs?

The Refinitiv Data Platform (RDP) APIs provide various LSEG data and content for developers via easy-to-use Web-based API.

RDP APIs give developers seamless and holistic access to all of the Refinitiv content such as Environmental Social and Governance (ESG), News, Research, etc, and commingled with their content, enriching, integrating, and distributing the data through a single interface, delivered wherever they need it. The RDP APIs delivery mechanisms are the following:

  • Request - Response: RESTful web service (HTTP GET, POST, PUT or DELETE)
  • Alert: delivery is a mechanism to receive asynchronous updates (alerts) to a subscription.
  • Bulks: deliver substantial payloads, like the end-of-day pricing data for the whole venue.
  • Streaming: deliver real-time delivery of messages.

This example project is focusing on the Request-Response: RESTful web service delivery method only.

figure-1

For more detail regarding the Refinitiv Data Platform, please see the following APIs resources:

The RDP CFS API applications always have the same workflow for any Buckets (ESG, Symbology, Green Revenue, etc) and Package Ids. There is a generic workflow article available on the A Step-By-Step Workflow Guide for RDP Client File Store (CFS) API page.

A generic RDP CFS API Jupyter Notebook and Postman examples are available on GitHub.

About the Green Revenues Filesets.

Each week updates to the FTSE Green Revenues data are delivered to Refinitiv Data Platform (RDP) calculation engine. Refinitiv Bulk files are distributed in both Jsonl and Csv format. Refinitiv Data Platform (RDP) uses UTF-8, Unicode character set.

Refinitiv Bulk files are distributed in both Jsonl and Csv format.

One fileset is created containing all organizations and history.

Two types of data updates are available.

  • A full data fileset containing history for all organizations.
  • A delta data fileset that contains only incremental changes to the universe since last week.

An incremental update is generated for each organization and period when there is a change to any value within that organization and period.

The incremental update will contain all values for an organization and period, both the values that changed, and the values that have remained the same.

Filesets are published each Sunday by 11 pm UTC.

The Green Revenue files are zipped and delivered as .gz files. The following naming convention is used for the .gz filesets.

For more detail regarding the Green Revenues Filesets, please see the following APIs resources:

Note: Files will remain accessible for 4 weeks before being removed. The zipped files can be uncompressed using standard tools such as 7-zip.

How to run the demo application

The first step is to unzip or download the example project folder into a directory of your choice, then set up Python or Docker environments based on your preference.

Run the demo application

  1. Open Anaconda Prompt and go to the project's folder.

  2. Run the following command in the Anaconda Prompt application to create a Conda environment named CFS for the project.

    (base) $>conda create --name CFS python=3.9
  3. Once the environment is created, activate a Conda CFS environment with this command in Anaconda Prompt.

    (base) $>conda activate CFS
  4. Run the following command to the dependencies in the CFS environment

    (CFS) $>pip install -r requirements.txt
  5. Once the dependencies installation process is success, create a .env file with the following content

    RDP_USERNAME=<Your RDP Username>
    RDP_PASSWORD=<Your RDP Password>
    RDP_APP_KEY=<Your RDP App key>
  6. Then run the following command to start the Jupyter Lab application.

    (CFS) $>jupyter lab
  7. Open a Greenrevenue-BULK.ipynb or Greenrevenue-BULK-CSV.ipynb file and run each cell to learn the workflow step by step.

    figure-1

References

That brings me to the end of my Green Revenue CFS workflow project. For further details, please check out the following resources:

For any questions related to Refinitiv Data Platform APIs, please use the RDP APIs Forum on the Developers Community Q&A page.

About

This demo application shows the workflow of the Refinitiv Data Platform (RDP) CFS Bulk API Feed for the FTSE Green Revenues data.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published