Giter Club home page Giter Club logo

react-nextjs-btc-address-chart's Introduction

Time Series of Tiered Crypto Balances over Time --- A Next.js PoC using Nivo charts & Dynamic SSR

Table of Contents

Notes:

  1. I decided to try Nivo for the charting library. In the past, I've used chart.js the most, but it does not work well if SSR is a goal. I chose Nivo because it has an active developer community with over 11k stars on GitHub, is very customizable, and offers HTML + SVG charts that can be server-side rendered.
  2. I used the Coin Metrics API to scrape the time-series data into a JSON file in the ./data directory.
  3. I hit my time-box (got bored) for this PoC, so I did not get to add functionality to filter the chart by YTD, 12M, 3M and/or 1M. I would have also liked to make the components a little more generic, so you could show ETH, LTC, DOGE, ETC with little code duplication. And lastly, as a color-blind person, I would have liked to customize each line with a pattern or texture to make it easier to distinguish between them.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Node.js >= v16.20.0 (needed for Next.js v13.x.x) - Install Node.js
  • npm >= v9.7.1 - comes pre-installed with Node.js.

Running locally

  1. Install dependencies:

    npm i

Usage

  1. Start the development server:

    npm run dev
  2. Open http://localhost:3000 with your browser to see the app.

Original Goals of PoC:

  1. Create an area or line chart that displays an all-time historic view on btc address balances

  2. Draw 5 lines in different colors displaying balances

  • over $1k
  • over $10k
  • over $100k
  • over $1M
  • over $10M
  1. Display a legend that labels each line color.

Stretch Goals

  • Add buttons and filter functionality to filter the chart by YTD, 12M, 3M and 1M.
  • Improve performance by leveraging server side rendering (SSR)

Example Implementation (Design examples to imitate)

chart1.png

chart2.png

chart3.png

react-nextjs-btc-address-chart's People

Contributors

0xmillz avatar

Watchers

Hugh avatar Jade avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.