Proposal UI: add adaptive aggregation and drill-down to emissions scatter chart
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 323
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 12
Description
The current run emissions scatter chart renders one point per run, which becomes harder to read and bit slow when an experiment has many runs. Add adaptive aggregation based on the visible date range and chart width.
Expected behavior
- Frontend computes a maxVisiblePoints budget from chart width.
- Backend returns raw runs when count is below the budget.
- Backend returns grouped buckets when count exceeds the budget.
- Grouped points use total/average emissions as the y-axis value.
- Grouped tooltip shows bucket range, run count, total emissions, average emissions/run, max emissions, energy consumed, and duration.
- Clicking a grouped point zooms into that bucket and refetches data.
- Repeated drill-down eventually shows individual runs.
- Clicking an individual run keeps current behavior and opens the run time series.
- Add reset zoom control to return to the original selected date range.
Proposed changes in the API
GET /experiments/{experiment_id}/runs/sums
?start_date=...
&end_date=...
&max_points=300
Response should indicate whether data is raw or aggregated:
{
"mode": "aggregated",
"items": [...]
}
Notes
- Choose the smallest interval that keeps points under the visible point budget.
- Default grouped y-axis can be either sum/total emissions, or average. Maybe show a dropdown?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the current run emissions scatter chart and the experiment runs sums endpoint. Trace how the selected date range and chart width reach the frontend and backend, then define the raw and aggregated response paths. Done means adaptive buckets stay within the point budget, grouped points support tooltip details and drill-down, individual runs retain current behavior, and reset zoom restores the original range.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend-api-design, data-visualization, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100