Skip to content

[Carbon Atlas] Add market-level analytics dashboard #5877

@gautamp8

Description

@gautamp8

See Parent Issue for more context - #5874

Summary

Add a market analytics page with charts and KPIs covering the voluntary carbon market — issuance trends, retirement patterns, registry breakdown, geographic distribution.

Scope

KPI cards (top of page)

  • Total projects across all registries
  • Total credits issued (tCO2e)
  • Total credits retired (tCO2e)
  • Retirement rate (retired / issued %)
  • Number of countries

Charts (Recharts, consistent with existing chart.tsx wrapper)

Chart Type Description
Credits by vintage Bar chart Issuances vs retirements, stacked
Credit transactions over time Area chart Monthly issuance/retirement volume
Projects by registry Pie/donut chart Distribution across registries
Projects by category Horizontal bar forest-and-land-use, renewable-energy, etc.
Top countries Bar chart or choropleth Leaflet map component already available
Project status breakdown Stacked bar By registry

Filters

  • Date range, registry, category — filter all charts simultaneously

Data source

  • FastAPI /stats and /charts/* endpoints from #SUB1

Files to create/modify

Modified:
  components/app-sidebar.tsx               — Add Analytics sub-item under Market

New:
  app/market/analytics/page.tsx            — Market analytics page
  components/market/market-kpi-cards.tsx   — KPI stat cards
  components/market/market-charts.tsx      — Chart components
  components/market/market-filters.tsx     — Shared filter bar
  hooks/useMarketCharts.ts                 — TanStack Query hooks for chart endpoints

Acceptance criteria

  • KPI cards show correct totals from the API
  • All 6 charts render with real data
  • Filters update all charts simultaneously
  • Charts match carbon-atlas design language (dark/light theme, Recharts)
  • Country chart or map uses existing Leaflet component if feasible
  • Responsive layout

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions