HAHS.
Back to Catalog

Dynamic Query

interaction

Also known as: slider filter, checkbox filter, range filter, interactive filter, direct manipulation query

Filter / focusEnable exploration NumericalTemporalCategorical

설명 / Description

동적 쿼리는 전통적인 텍스트 기반 데이터베이스 쿼리를 직접 조작 방식의 GUI 위젯으로 대체합니다 — 연속 범위를 위한 슬라이더, 범주 포함/제외를 위한 체크박스, 옵션 선택을 위한 드롭다운 메뉴 등입니다. 사용자가 컨트롤을 조정하면 시각화가 즉시(원 연구에 따르면 100ms 이내에) 갱신되어, 촘촘한 피드백을 제공함으로써 필터링을 일괄 작업이 아니라 유동적이고 탐색적인 경험으로 바꿉니다.

Dynamic queries replace traditional text-based database queries with direct-manipulation GUI widgets — sliders for continuous ranges, checkboxes for categorical inclusion/exclusion, dropdown menus for selecting among options. As the user adjusts a control, the visualization updates immediately (within 100ms, per the original research), providing tight feedback that turns filtering into a fluid, exploratory experience rather than a batch operation.

이 개념은 알버그, 윌리엄슨, 슈나이더만(Ahlberg, Williamson & Shneiderman, 1992)이 FilmFinder 시스템으로 처음 제시했으며, 연도와 평점에 대한 범위 슬라이더를 사용해 영화 산점도를 동적으로 필터링했습니다. 이들의 핵심 기여는 위젯 조작과 시각적 피드백 사이의 촘촘한 결합이 사용자로 하여금 데이터셋의 구조를 빠르게 학습하게 한다는 것을 보여준 것입니다 — 필터링이라는 행위 자체를 통해 상관관계, 공백, 이상치를 발견하게 됩니다. 이 "조정을 통한 쿼리(query by adjustment)" 패러다임은 비전문가 사용자에게 가장 효과적인 인터랙션 패턴 중 하나로 남아 있습니다.

The concept was pioneered by Ahlberg, Williamson, and Shneiderman (1992) with the FilmFinder system, which used range sliders for year and rating to dynamically filter a scatterplot of movies. Their key contribution was demonstrating that the tight coupling between widget manipulation and visual feedback enables users to rapidly learn the structure of a dataset — discovering correlations, gaps, and outliers through the act of filtering itself. This "query by adjustment" paradigm remains one of the most effective interaction patterns for non-technical users.

동적 쿼리는 슈나이더만의 만트라에서 "필터" 단계에 해당합니다. 시각적 공간에서 작동하는 브러시 선택과 달리, 동적 쿼리는 데이터 속성에 직접 작용합니다. "연도: 1990–2020"이라고 표시된 슬라이더는 그 의미를 명시적으로 드러내는 반면, 산점도 위의 브러시는 사용자가 어떤 데이터 차원이 필터링되고 있는지 추론해야 합니다. 이러한 명시성 덕분에 동적 쿼리는 시각화 전문가가 아닌 도메인 전문가를 위해 설계된 대중 대상 대시보드와 도구에서 특히 유용합니다.

Dynamic queries are the "filter" step in Shneiderman's mantra. Unlike brush selection (which operates in the visual space), dynamic queries operate on data attributes directly. A slider labeled "Year: 1990–2020" makes its semantics explicit, while a brush on a scatterplot requires the user to infer which data dimension is being filtered. This explicitness makes dynamic queries especially valuable in public-facing dashboards and tools designed for domain experts rather than visualization specialists.

Dynamic Query — try it yourself

언제 사용하나 / When to Use

  • 데이터셋에 사용자가 필터링하고 싶어할 명확하고 해석 가능한 차원(연도, 가격, 평점, 범주, 지역)이 있을 때.
  • When the dataset has clear, interpretable dimensions that the user will want to filter (year, price, rating, category, region).
  • 필터링을 위해 SQL이나 코드를 작성하지 않을 비전문가 대상 시각화일 때.
  • When the visualization is aimed at non-technical audiences who would not write SQL or code to filter.
  • 조정 중 실시간 피드백이 중요할 때 — 사용자가 슬라이더를 움직이는 동안 차트가 바뀌는 것을 봐야 합니다.
  • When real-time feedback during adjustment is important — the user should see the chart change as the slider moves.
  • 필터링 가능한 차원의 수가 관리 가능한 수준(2~6개)일 때. 차원이 많아지면 인터페이스가 복잡해집니다.
  • When the number of filterable dimensions is manageable (2-6). More dimensions create interface clutter.
  • 사용자가 매개변수를 조정하며 "만약에" 질문을 탐색해야 하는 대시보드에서.
  • In dashboards where users need to explore "what if" questions by adjusting parameters.

이럴 땐 피하세요 / When NOT to Use

  • 데이터셋에 수백 개의 범주 값이 있을 때 — 각각에 체크박스를 두는 것은 비현실적입니다. 대신 검색이나 타입어헤드를 사용하세요.
  • When the dataset has hundreds of categorical values — a checkbox for each is impractical. Use search or type-ahead instead.
  • 필터링 로직이 복잡(다중 조건 조인, 중첩 로직)하여 단순한 위젯으로 표현할 수 없을 때.
  • When the filtering logic is complex (multi-condition joins, nested logic) and cannot be represented by simple widgets.
  • 데이터셋 크기나 연산 비용 때문에 실시간 갱신 성능을 달성할 수 없을 때 — 지연은 인터랙션 루프를 깨뜨립니다.
  • When real-time update performance is unachievable due to dataset size or computation cost — lag breaks the interaction loop.
  • 저자가 이미 관련 하위 집합을 선택해둔 정적 내러티브 시각화일 때.
  • When the visualization is a static narrative where the author has already chosen the relevant subset.

작동 방식 / How It Works

  1. 인터페이스가 시각화와 함께 하나 이상의 필터 컨트롤을 제시합니다: 수치/시간 데이터를 위한 범위 슬라이더, 범주 데이터를 위한 체크박스나 토글 칩, 선택을 위한 드롭다운 메뉴입니다.
    The interface presents one or more filter controls alongside the visualization: range sliders for numerical/temporal data, checkboxes or toggle chips for categorical data, dropdown menus for selection.
  2. 사용자가 컨트롤을 조정합니다 — 예를 들어 범위 슬라이더를 드래그하여 연도 범위를 1990–2020에서 2005–2015로 좁힙니다.
    The user adjusts a control — for example, dragging a range slider to narrow the year range from 1990–2020 to 2005–2015.
  3. 시스템이 즉시 기저 데이터를 필터링하여, 선택된 범위를 벗어난 포인트를 제거합니다.
    The system immediately filters the underlying data, removing points that fall outside the selected range.
  4. 시각화가 다시 렌더링됩니다 — 일치하는 데이터만으로, 직접 조작이라는 느낌을 유지하기 위해 이상적으로는 100ms 이내에 이루어집니다.
    The visualization re-renders with only the matching data, ideally within 100ms to maintain the perception of direct manipulation.
  5. 선택적으로, 마크가 애니메이션으로 나타나거나 사라져 사용자가 무엇이 바뀌었는지 추적하도록 돕습니다(animated-transition 참고).
    Optionally, marks animate out/in to help the user track what changed (see animated-transition).
  6. 요약 지표(예: "1,204개 중 342개 표시 중")가 현재 쿼리가 얼마나 선택적인지에 대한 피드백을 사용자에게 제공합니다.
    A summary indicator (e.g., "Showing 342 of 1,204 items") gives the user feedback on how selective the current query is.
  7. 컨트롤을 리셋하면(슬라이더 더블클릭, "리셋" 클릭) 전체 데이터셋이 복원됩니다.
    Resetting the control (double-clicking the slider, clicking "Reset") restores the full dataset.

변형 / Variations

  • 범위 슬라이더: 두 개의 핸들이 연속 데이터의 최소-최대 범위를 정의합니다. 가장 전형적인 동적 쿼리 위젯입니다.
  • Range slider: Two handles define a min-max range for continuous data. The most classic dynamic query widget.
  • 단일 슬라이더: 하나의 핸들이 임계값을 설정합니다(이 값 위/아래의 모든 항목을 표시).
  • Single slider: One handle sets a threshold (show all items above/below this value).
  • 체크박스 뱅크: 각 체크박스가 범주의 표시 여부를 전환합니다. 범주가 약 12개까지일 때 잘 작동합니다.
  • Checkbox bank: Each checkbox toggles visibility of a category. Works well for up to ~12 categories.
  • 토글 칩: 체크박스처럼 작동하지만 수직 공간을 덜 차지하는 컴팩트한 클릭 가능 레이블입니다.
  • Toggle chips: Compact clickable labels that act like checkboxes but take less vertical space.
  • 드롭다운 / 선택: 값이 많고 한 번에 하나(또는 소수)만 활성화되어야 하는 차원에 사용합니다.
  • Dropdown / select: For dimensions with many values where only one (or a few) should be active at a time.
  • 텍스트 검색 필터: 부분 문자열 일치로 필터링하는 텍스트 입력입니다. 이름, 레이블, ID에 사용됩니다.
  • Text search filter: A text input that filters by partial string match. Used for names, labels, IDs.
  • 히스토그램 슬라이더: 슬라이더 트랙 위에 데이터 분포의 히스토그램이 겹쳐져 있어, 사용자가 무엇을 필터링하고 있는지 이해하는 데 도움을 줍니다.
  • Histogram slider: The slider track is overlaid with a histogram of the data distribution, helping the user understand what they are filtering.

코드 레퍼런스 / Code Reference

// Range slider with Observable Plot / D3
const slider = d3.select("#controls").append("input")
  .attr("type", "range")
  .attr("min", 2000).attr("max", 2025).attr("value", 2000)
  .on("input", function () {
    const yearMin = +this.value;
    svg.selectAll("circle")
      .style("display", d => d.year >= yearMin ? null : "none");
    d3.select("#year-label").text(`From ${yearMin}`);
  });