"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > Build a real-time crypto analytics dashboard with Beavers and Perspective

Build a real-time crypto analytics dashboard with Beavers and Perspective

Published on 2024-07-31
Browse:464

Build a real-time crypto analytics dashboard with Beavers and Perspective

This post shows how you can leverage two powerful python libraries, Beavers and Perspective, to analyse data in realtime and display it in a dashboard.

Architecture Overview

We will connect to Coinbase's websocket API to receive crypto market updates in real time.

In order to share this data with other services and decouple producers from consumer, we'll publish this data over Kafka, as json.

We'll then write a Beavers that will read the data from Kafka, enrich it, and publish it in a perspective dashboard.

Initial Set Up

You'll need:

  • Git
  • Python (at least 3.10)
  • Docker to run a Kafka cluster
  • Kafka CLI tools

The code for this tutorial is available on github

Clone the repo

git clone https://github.com/0x26res/beavers-examples
cd beavers-example/coinbase_analytics/

Set up the virtual environment

python3 -m venv --clear .venv
source ./.venv/bin/activate
pip install -r requirements.txt

Set up Kafka

We use the kafka-kraft docker image to run a super simple kafka cluster.

Release Statement This article is reproduced at: https://dev.to/0x26res/build-a-real-time-crypto-analytics-dashboard-with-beavers-and-perspective-4cn7?1 If there is any infringement, please contact [email protected] delete
Latest tutorial More>

Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.

Copyright© 2022 湘ICP备2022001581号-3