Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FE] Pie Chart widget #130

Open
01painadam opened this issue Jan 31, 2025 · 0 comments
Open

[FE] Pie Chart widget #130

01painadam opened this issue Jan 31, 2025 · 0 comments
Assignees

Comments

@01painadam
Copy link
Collaborator

01painadam commented Jan 31, 2025

Goal

Implement a pie chart widget and summary text to visualise categorical data retrieved from RAG. The widget should support various categorical datasets, such as:

  • Drivers of tree cover loss
  • Tree cover extent – Percentage of forested vs. non-forested area
  • Tree cover dynamics – Total gain, loss, and extent
  • Carbon flux – Gross emissions, removals, and stocks
  • Grassland breakdown – Natural, non-natural, and non-grassland areas over time
  • Land cover for a given year – Breakdown of natural land categories
  • Other categorical distributions – Country, region, species, habitat types, etc.

Designs

Example:

Pie Chart Example

Chart

The pie chart provides an intuitive visualisation of categorical data distributions across the portfolio of KBAs.

Chart Features

  • Coloured segments representing category proportions
  • Legend for category labels
  • Percentage labels on each segment
  • Tooltips displaying category names and values

Title and Summary Text

Each chart is accompanied by dynamically generated summary text, tailored to the user persona via LLM processing.

Summary Content Requirements

  • Quantitative data retrieved from RAG
  • Qualitative descriptive data from KBA factsheets (also in RAG)
  • Data sources, citations, or disclaimers for transparency (e.g. limitations, cautions)
  • Title automatically defined by LLM

Edit/Save Interface

The widget allows users to refine the summary text using:

  • Quick-select buttons:

    • Concise – Shortens the summary
    • Simplify – Adjusts language for accessibility
    • Explain – Adds detail and context
  • Chat-based interaction: Users can edit text manually, request alternative phrasing, or modify data visualisation aspects before saving.

  • "Add to Dashboard" button: Saves the final edited version to the dashboard.

Scope

In Scope

  • Pie chart visualisation for categorical data
  • Persona-based summary text generation using relevant RAG data for chart and text
  • Chat-based interactions for summary editing
  • Context-aware buttons for modifying summaries
  • Save the final output to the dashboard (and in local storage)

Out of Scope

  • Editing does not persist previous versions of summaries or charts
  • No full customisation of chart styling beyond standard controls
  • Share/export e.g. data download, share url

Job Stories & Acceptance Criteria

Chart Display

When I am viewing the dashboard,
I want to see a pie chart visualising categorical KBA data,
So that I can quickly understand the proportional distribution of key environmental indicators.

Acceptance Criteria:

  • The pie chart correctly displays the selected dataset
  • The chart includes a legend, percentage labels, and tooltips
  • Data updates dynamically based on the selected dataset

Summary Text Generation

When I am reviewing a data visualisation,
I want to see a natural-language summary alongside the chart,
So that I can easily interpret the key takeaways without deep analysis.

Acceptance Criteria:

  • The LLM generates summary text based on the selected dataset and user persona
  • The summary includes quantitative data, qualitative insights, and citations where relevant

Summary Editing & Refinement

When I want to adjust the generated summary,
I want to modify the text using quick actions or chat,
So that I can tailor the insights to my communication needs.

Acceptance Criteria:

  • Quick-select buttons adjust summary length and complexity
  • Users can manually edit the summary or request changes via chat
  • The final edited version is saved when added to the dashboard

Saving to Dashboard

When I finalise a chart and its summary,
I want to save it to my dashboard,
So that I can reference it later or share it with others.

Acceptance Criteria:

  • Clicking "Add to Dashboard" saves the final edited version
  • The saved version retains all edits and selections

Risks & Questions

Data Integrity

  • How do we handle missing or incomplete categorical data in the RAG source?
  • Should we offer fallback descriptions when certain data points are unavailable?

LLM Processing

  • Should summary generation be fully automated, or should users confirm the text before saving?
  • How do we ensure the LLM maintains factual accuracy and does not over-interpret distributions?

Solution Hints

  • Use a structured layout with tooltips and labels for clarity
  • Ensure summary text is concise but informative, adapting to user personas
  • Allow simple, non-destructive edits with preview before saving

Future Work

...

@01painadam 01painadam added this to the Monitoring workflow milestone Jan 31, 2025
@01painadam 01painadam changed the title [FE] Pie Chart [FE] Pie Chart widget Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants