Aggregate / Disaggregate
interactionAlso known as: roll-up, expand, group and ungroup, summarize and detail
설명 / Description
집계/세분화는 동일한 데이터에 대해 요약된(집계) 뷰와 상세한(세분화) 뷰 사이를 전환할 수 있게 하는 인터랙션입니다. 집계 상태에서는 데이터 포인트가 범주형 또는 시간적 차원에 따라 그룹화되어 평균, 합계, 개수, 중앙값과 같은 요약 통계로 표현되며, 막대, 선, 영역 마크로 표시됩니다. 세분화 상태에서는 개별 데이터 포인트 하나하나가 표시되며, 흔히 지터링된 스트립 플롯, 비스웜, 또는 산점도 형태로 요약 마크 위에 겹쳐지거나 이를 대체합니다.
Aggregate / disaggregate is an interaction that lets users switch between a summarized (aggregated) view and a detailed (disaggregated) view of the same data. In the aggregated state, data points are grouped by some categorical or temporal dimension and represented as summary statistics — means, sums, counts, medians — displayed as bars, lines, or area marks. In the disaggregated state, every individual data point is shown, often as a jittered strip plot, beeswarm, or scatterplot overlaid on or replacing the summary marks.
이 인터랙션은 시각화 디자인의 근본적인 긴장 관계를 다룹니다: 요약은 대규모 데이터셋에서 패턴을 파악하는 데 필수적이지만, 그룹 내의 중요한 변동, 이상치, 분포 형태를 가릴 수 있습니다. 사용자가 두 수준을 전환할 수 있게 함으로써, 시각화는 "숲" 관점(전체적인 패턴은 무엇인가?)과 "나무" 관점(기저 데이터는 실제로 어떤 모습인가?)을 모두 지원합니다. 바이스거버 등(Weissgerber et al., 2015)의 연구는 평균의 막대 차트가 극적으로 다른 분포를 어떻게 감출 수 있는지 보여주었으며, 이는 과학적 시각화에서 이제는 흔해진 "데이터를 직접 보여달라(show me the data)" 운동의 동기가 되었습니다.
This interaction addresses a fundamental tension in visualization design: summaries are necessary to see patterns in large datasets, but they can hide important variation, outliers, and distributional shapes within groups. By letting the user toggle between the two levels, the visualization supports both the "forest" view (what is the overall pattern?) and the "trees" view (what does the underlying data actually look like?). Research by Weissgerber et al. (2015) demonstrated how bar charts of means conceal dramatically different distributions, motivating the now-common "show me the data" movement in scientific visualization.
집계 상태와 세분화 상태 사이의 전환은 애니메이션 전환(Heer and Robertson, 2007)을 적용하기에 이상적인 대상입니다. 막대가 구성 점들로 분해되거나 평균선이 개별 궤적으로 나뉠 때, 애니메이션은 개별 점들이 요약되었던 것과 동일한 데이터라는 것을 사용자가 이해하도록 돕습니다. 애니메이션이 없다면, 뷰 사이의 전환은 완전히 다른 데이터셋으로 바뀌는 것처럼 느껴질 수 있습니다.
The transition between aggregate and disaggregate states is a prime candidate for animated transitions (Heer and Robertson, 2007). When a bar decomposes into its constituent points, or a mean line splits into individual traces, the animation helps the user understand that the individual points are the same data that was summarized. Without animation, the jump between views can feel like switching to an entirely different dataset.
언제 사용하나 / When to Use
- 청중이 전체적인 패턴(그룹 평균, 총합)과 기저 분포(개별 값, 이상치)를 모두 볼 필요가 있을 때.
- When the audience needs to see both overall patterns (group means, totals) and underlying distributions (individual values, outliers).
- 요약 통계만으로는 오해를 부를 수 있을 때 — 고전적인 "앤스컴의 4분면(Anscombe's quartet)"과 "다이너소어 더즌(datasaurus dozen)" 시나리오가 그 예입니다.
- When summary statistics alone could be misleading — the classic "Anscombe's quartet" and "datasaurus dozen" scenarios.
- 사용자가 출판용 요약과 진단용 상세 뷰를 전환하는 과학적 또는 분석적 대시보드에서.
- In scientific or analytical dashboards where users toggle between publication-ready summaries and diagnostic detail views.
- 데이터셋의 크기가 적당할 때(수십 개에서 수천 개 미만) — 집계가 필요할 만큼 크면서도 개별적으로 렌더링할 수 있을 만큼 작은 경우.
- When the dataset has moderate size (dozens to low thousands of items) — large enough to need aggregation, small enough to render individually.
- 사용자의 작업에 이상치 식별이나 그룹 내 변동성 이해가 포함될 때.
- When the user's task includes identifying outliers or understanding within-group variability.
이럴 땐 피하세요 / When NOT to Use
- 데이터셋이 너무 커서(수백만 개 항목) 세분화 뷰가 읽을 수 없거나 성능상 렌더링할 수 없을 때.
- When the dataset is so large (millions of items) that the disaggregated view is unreadable or cannot be rendered performantly.
- 집계된 요약만이 유의미한 표현 방식일 때(예: 인구 피라미드는 항상 연령대별로 집계됩니다).
- When the aggregated summary is the only meaningful representation (e.g., a population pyramid is always aggregated by age group).
- 개별 항목에 유의미한 정체성이 없을 때 — 익명의 개수를 세분화하는 것은 무의미합니다.
- When the individual items have no meaningful identity — disaggregating anonymous counts is pointless.
- 두 표현 방식이 시각적 연속성을 전혀 공유하지 않아 뷰 사이의 전환이 혼란스러울 때.
- When the transition between views would be confusing because the two representations share no visual continuity.
작동 방식 / How It Works
- 시각화는 한 가지 모드로 시작합니다 — 보통 집계 모드로, 그룹별 막대, 선, 또는 요약 마크를 보여줍니다.
- The visualization starts in one mode — typically aggregated, showing bars, lines, or summary marks by group.
- 사용자가 전환을 실행합니다 — 버튼, 체크박스, 키보드 단축키를 통하거나 집계 마크를 클릭해서입니다.
- The user triggers the toggle — via a button, checkbox, keyboard shortcut, or by clicking on an aggregate mark.
- 애니메이션 전환이 뷰를 변형시킵니다: 막대가 개별 점으로 분해되거나(또는 그 반대로) 되며, 공간적 대응 관계를 유지하여 사용자가 관계를 추적할 수 있게 합니다.
- An animated transition morphs the view: bars dissolve into individual points (or vice versa), maintaining spatial correspondence so the user tracks the relationship.
- 세분화 모드에서는 개별 마크가 겹치지 않도록 배치되며(지터링, 비스웜 레이아웃), 추가적인 인코딩(하위 범주별 색상, 다른 변수에 따른 크기)을 보여줄 수 있습니다.
- In disaggregated mode, individual marks are positioned to avoid overlap (jittering, beeswarm layout) and may show additional encodings (color by sub-category, size by another variable).
- 요약 통계는 세분화 뷰에서도 기준선(평균선, 중앙값 마커)으로 남아 개별 점들에 맥락을 제공할 수 있습니다.
- Summary statistics may persist as reference lines (mean line, median marker) in the disaggregated view, giving context to the individual points.
- 사용자는 언제든지 역방향 애니메이션과 함께 집계 뷰로 다시 전환할 수 있습니다.
- The user can toggle back to the aggregated view at any time, with the reverse animation playing.
변형 / Variations
- 막대-투-스트립: 막대가 모든 데이터 포인트를 보여주는 지터링된 스트립 플롯이나 비스웜 플롯으로 분해됩니다.
- Bar-to-strip: Bars decompose into jittered strip plots or beeswarm plots showing every data point.
- 선-투-스파게티: 평균 추세선이 개별 궤적("스파게티 플롯")으로 나뉘어 추세 주변의 분산을 드러냅니다.
- Line-to-spaghetti: A mean trend line splits into individual traces ("spaghetti plot"), revealing the variance around the trend.
- 점진적 세분화: 전체 → 그룹 → 하위 그룹 → 개별의 여러 단계를 차례로 거칩니다.
- Progressive disaggregation: Multiple levels — total → group → subgroup → individual — traversed step by step.
- 하이브리드 뷰: 집계된 마크와 개별 점이 동시에 표시됩니다(예: 지터링된 점이 겹쳐진 박스 플롯).
- Hybrid view: Aggregated marks and individual points are shown simultaneously (e.g., a box plot with overlaid jittered points).
- 집계 함수 전환: 개별 점을 표시/숨기는 대신, 사용자가 집계 함수(합계 → 평균 → 중앙값 → 개수)를 전환합니다.
- Aggregation function switch: Instead of showing/hiding individual points, the user switches the aggregation function (sum → mean → median → count).
- 클릭 세분화: 특정 막대나 그룹을 클릭하면 그 그룹만 개별 항목으로 펼쳐지고, 다른 그룹은 집계된 상태로 남습니다.
- Click-to-disaggregate: Clicking a specific bar or group explodes just that group into its individual items, leaving other groups aggregated.
코드 레퍼런스 / Code Reference
// Toggle between bar chart (aggregated) and strip plot (disaggregated)
let isAggregated = true;
d3.select("#toggle-btn").on("click", () => {
isAggregated = !isAggregated;
if (isAggregated) {
// Transition individual points into bar positions
svg.selectAll(".point")
.transition().duration(600)
.attr("cy", d => y(groupMean(d.group)))
.attr("cx", d => x(d.group) + x.bandwidth() / 2)
.style("opacity", 0);
svg.selectAll(".bar")
.transition().duration(600)
.style("opacity", 1);
} else {
// Transition bars away, show individual points
svg.selectAll(".bar")
.transition().duration(600)
.style("opacity", 0.15);
svg.selectAll(".point")
.transition().duration(600)
.attr("cx", d => x(d.group) + jitter(x.bandwidth()))
.attr("cy", d => y(d.value))
.style("opacity", 0.7);
}
});