live_analytics

512m Analytics

A comprehensive analytics platform for DeFi data visualization and Prime Rate analysis, featuring automated data fetching and interactive web-based charts.

Overview

This project fetches data from DeFiLlama and other sources to:

Project Structure

Core Data Fetching

Interactive Visualization Scripts

Data Files

GitHub Actions

Setup

Prerequisites

Installation

  1. Clone the repository
  2. Install dependencies:
    pip install -r requirements.txt
    
  3. Create a .env file with your API key:
    POLYGON_API_KEY=your_polygon_api_key_here
    

Dependencies

Usage

1. Fetch DeFi Prime Rate Data

python scripts/spr_fetcher_v1.py

This will:

2. Interactive Web Visualizations

The project provides interactive web-based charts that can be viewed at:

3. Automated Chart Generation

Charts are automatically generated via GitHub Actions:

Key Features

Data Sources

Visualization Types

Automation Features

Data Sources

Configuration

Customizing Analysis Parameters

Edit scripts/config.py to modify:

GitHub Actions

Automated Workflow Chain

The project uses a two-step automated workflow:

1. Data Fetching Workflow (.github/workflows/fetch-data.yml)

2. Chart Generation Workflow (.github/workflows/generate-charts.yml)

Generated Chart Images

All charts are automatically saved as PNG files in the charts/ directory:

Data Format

JSON Structure

Database

Contributing

When adding new features:

  1. Use the existing scripts/config.py for constants
  2. Add reusable functions to scripts/utils.py
  3. Follow the established JavaScript patterns for visualizations
  4. Include comprehensive error handling
  5. Test chart generation before committing

Notes

License

This project is for research and educational purposes.