Home > Backend Development > Python Tutorial > Build a real-time crypto analytics dashboard with Beavers and Perspective

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

WBOY
Release: 2024-07-25 19:50:03
Original
1169 people have browsed it

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/
Copy after login

Set up the virtual environment

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

Set up Kafka

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

The above is the detailed content of Build a real-time crypto analytics dashboard with Beavers and Perspective. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template