HAHS.
도구와 라이브러리로 돌아가기Back to Tools & Libraries

Vega-Lite

고수준 코드High-level code

인터랙티브 차트를 위한 선언적 JSON 문법으로, 현재 6버전이며 Vega-Altair의 렌더링 엔진입니다A declarative JSON grammar for interactive charts, now at version 6 and the engine behind Vega-Altair

오픈소스Open source web JavaScriptTypeScript

현재 버전Current version: 6.5.0, 정보 확인일 2026-10-24facts checked 2026-10-24

개요Overview

Vega-Lite는 JSON 명세 하나로 인터랙티브 차트를 정의하는 고수준 시각화 문법입니다. 워싱턴 대학교 Interactive Data Lab에서 시작해 Vega 커뮤니티가 이어 가고 있으며, 명세는 더 낮은 수준의 Vega로 컴파일되어 브라우저에서 SVG나 캔버스로 그려집니다. 핵심 아이디어는 "어떻게 그릴지"가 아니라 "어떤 데이터를 어떤 시각 채널에 대응시킬지"만 적는 것입니다.

Vega-Lite is a high-level visualization grammar that defines an interactive chart in a single JSON specification. It began at the University of Washington Interactive Data Lab and is carried on by the Vega community. A specification compiles to the lower-level Vega and renders as SVG or canvas in the browser. The central idea is to state which data maps to which visual channel, not how to draw it.

명세는 마크(mark), 인코딩(encoding), 변환(transform), 파라미터(params)로 구성됩니다. 겹치기, 나란히 놓기, 패싯으로 여러 뷰를 조합할 수 있고, 선택과 바인딩으로 필터링과 연결 하이라이트 같은 상호작용을 선언만으로 만듭니다. 명세가 순수한 데이터라서 저장, 비교, 버전 관리, 자동 생성이 쉽습니다.

A specification is built from marks, encodings, transforms and params. Views can be layered, concatenated or faceted, and selections and bindings declare interactions such as filtering and linked highlighting. Because a specification is plain data, it is easy to store, diff, version and generate automatically.

2026년에는 이 문법이 AI 시대에 특히 쓸모가 있습니다. 짧고 규칙적인 JSON은 LLM이 안정적으로 생성하기 쉽고, 사람이 읽고 검증하기도 쉽습니다. Python 사용자는 Vega-Altair를 통해 같은 엔진을 쓰며, 이 사이트에도 별도 안내가 있습니다.

In 2026 this grammar is especially useful in an AI workflow. Short, regular JSON is easy for an LLM to generate reliably and easy for a person to read and check. Python users reach the same engine through Vega-Altair, which has its own guide on this site.

2026년 현재What's new in 2026

  • 최신 버전은 6.5.0(2026-10-08)입니다. 6.0.0이 2025-03-28에 나왔고 6.4.x는 2025년 9월부터 2026년 4월 사이에 나왔습니다.
  • The current version is 6.5.0 (2026-10-08). Version 6.0.0 arrived on 2025-03-28, and 6.4.x releases followed between September 2025 and April 2026.
  • 6.0.0은 주요 개정으로, Vega 6으로 올라가고 패키지가 ESM 전용이 되었으며 연속형 크기의 기본값이 바뀌었습니다. 예전 번들러 설정이나 require를 쓰는 코드는 수정이 필요할 수 있습니다.
  • Version 6.0.0 was a major release that moved to Vega 6, made the package ESM only and changed the default continuous size. Older bundler setups or code that uses require may need changes.
  • 명세의 $schema는 https://vega.github.io/schema/vega-lite/v6.json입니다. v5 주소를 쓰는 오래된 예제는 그대로 동작하더라도 에디터의 자동 완성과 검증이 옛 버전 기준이 됩니다.
  • The $schema for a specification is https://vega.github.io/schema/vega-lite/v6.json. Older examples that point to v5 may still run, but editor autocomplete and validation then follow the old version.
  • Python 쪽 Vega-Altair는 6.0.0(2025-11-12)에서 Vega-Lite 6.1을 대상으로 하고 Python 3.14를 지원하며, 6.3.0(2026-09-15)부터 Python 3.11 이상이 필요합니다.
  • On the Python side, Vega-Altair 6.0.0 (2025-11-12) targets Vega-Lite 6.1 and supports Python 3.14, and 6.3.0 (2026-09-15) requires Python 3.11 or later.
  • Vega-Lite 자체에는 AI 기능이 없습니다. 대신 LLM이 명세를 만들어 주는 방식이 흔해졌으므로, 생성된 명세는 $schema 버전, 필드 이름, 필드 타입(quantitative, nominal 등)을 데이터와 대조해서 확인해야 합니다.
  • Vega-Lite itself has no AI features. Having an LLM write the specification has become common, so check a generated specification against the data: the $schema version, field names and field types (quantitative, nominal and so on).

강점Strengths

  • 선언적입니다. 짧은 명세로 막대, 선, 산점, 히트맵 같은 일반 차트를 만듭니다.
  • It is declarative. A short specification produces common charts such as bars, lines, scatterplots and heatmaps.
  • 선택과 바인딩으로 브러시, 필터, 연결 하이라이트 같은 상호작용을 코드 없이 선언합니다.
  • Selections and bindings declare brushing, filtering and linked highlighting without custom code.
  • 겹치기, 연결, 패싯, 반복으로 다중 뷰 화면을 같은 문법 안에서 구성합니다.
  • Layering, concatenation, faceting and repetition build multi-view layouts inside the same grammar.
  • JSON이라서 재현하기 쉽고, 사람과 LLM 모두 읽고 쓰기 쉽습니다.
  • Because it is JSON, it is easy to reproduce, and easy for both people and LLMs to read and write.
  • 한 명세를 웹 페이지, Jupyter, 정적 이미지로 다양하게 출력합니다. Python에서는 Vega-Altair로 쓸 수 있습니다.
  • One specification can be shown on a web page, in Jupyter or exported as a static image, and Python users can write it through Vega-Altair.
  • 변환(집계, 필터, 계산, 윈도우)이 문법에 들어 있어 간단한 가공은 데이터 준비 없이 처리합니다.
  • Transforms (aggregate, filter, calculate, window) are part of the grammar, so light data preparation needs no separate step.
  • BSD 3-Clause 라이선스의 오픈소스입니다.
  • It is open source under the BSD 3-Clause license.

한계Limitations

  • 문법이 지원하는 범위가 정해져 있습니다. 샌키, 네트워크, 트리맵처럼 기본 마크에 없는 그림은 Vega로 내려가거나 D3 같은 저수준 도구를 써야 합니다.
  • The grammar has a fixed scope. Pictures that are not built from its marks, such as Sankey diagrams, networks and treemaps, require dropping down to Vega or using a lower-level tool such as D3.
  • 데이터가 브라우저에서 처리되므로 큰 데이터를 그대로 넣으면 느려집니다. 서버에서 먼저 집계하거나 Python 쪽 VegaFusion 같은 확장을 고려해야 합니다.
  • Data is processed in the browser, so large raw datasets get slow. Aggregate on the server first, or consider extensions such as VegaFusion on the Python side.
  • 메이저 업데이트(6.0의 ESM 전용 등)로 번들러 설정이나 옛 예제가 깨질 수 있어 버전 확인이 필요합니다.
  • Major updates (such as the ESM-only package in 6.0) can break bundler setups and old examples, so check versions.
  • 세밀한 시각 디자인(주석 배치, 독특한 레이아웃)은 선언만으로 어려운 경우가 있습니다.
  • Fine visual design, such as precise annotation placement and unusual layouts, is sometimes hard to reach through declarations alone.
  • 명세가 길고 중첩되면 오류 메시지를 읽기 어려워 디버깅에 익숙해지는 시간이 필요합니다.
  • Long, nested specifications produce hard-to-read error messages, so debugging takes some practice.

이런 용도에 최적Best For

Vega-Lite는 탐색 분석과 설명용 차트를 짧은 선언으로 빠르게 만들고 싶은 경우에 잘 맞습니다. 상호작용이 있는 다중 뷰 화면, 웹에 내장하는 차트, 재현 가능한 분석 노트북에서 장점이 큽니다. 코드를 처음 쓰는 학습자도 마크와 인코딩만 익히면 의미 있는 차트를 만들 수 있습니다.

Vega-Lite fits when you want exploratory and explanatory charts from short declarations. It is strongest for interactive multi-view screens, charts embedded in web pages and reproducible analysis notebooks. A learner who is new to code can make useful charts after learning only marks and encodings.

AI에게 차트를 맡기는 작업 흐름에도 적합합니다. 데이터의 열 이름을 알려 주고 명세를 받은 뒤, 사람이 한눈에 읽고 고칠 수 있기 때문입니다.

It also suits workflows where an AI drafts the chart: give it the column names, get a specification back, and a person can read and edit it at a glance.

시작하기Getting Started

  1. Vega 온라인 에디터를 엽니다. 설치 없이 명세를 붙여 넣고 바로 결과를 볼 수 있습니다.
  2. Open the Vega online editor. You can paste a specification and see the result with no installation.
  3. 아래 명세를 붙여 넣습니다. $schema는 v6을 가리킵니다.
  4. Paste the specification below. Its $schema points to v6.
  5. mark를 line이나 point로 바꾸고 encoding의 필드를 바꿔 결과가 어떻게 달라지는지 확인합니다.
  6. Change mark to line or point and change the fields in encoding to see how the result changes.
  7. 웹 페이지에 넣으려면 npm으로 vega-embed를 설치해 명세를 전달하고, Python에서는 Vega-Altair를 사용합니다.
  8. To put it on a web page, install vega-embed from npm and pass it the specification, or use Vega-Altair from Python.
{
  "$schema": "https://vega.github.io/schema/vega-lite/v6.json",
  "description": "Revenue by region (sample data)",
  "data": {
    "values": [
      {"region": "Seoul", "revenue": 120},
      {"region": "Busan", "revenue": 75},
      {"region": "Daegu", "revenue": 52},
      {"region": "Gwangju", "revenue": 38}
    ]
  },
  "mark": "bar",
  "encoding": {
    "x": {"field": "region", "type": "nominal", "sort": "-y", "title": "Region"},
    "y": {"field": "revenue", "type": "quantitative", "title": "Revenue (million KRW)"},
    "tooltip": [
      {"field": "region", "type": "nominal"},
      {"field": "revenue", "type": "quantitative"}
    ]
  }
}

지원 차트 유형Supported Chart Types

Vega-Lite는 막대 차트, 누적 막대 차트, 선 그래프, 영역 그래프, 산점도, 버블 차트, 히스토그램, 히트맵, 상자 그림, 오차 막대, 파이와 도넛 차트(arc 마크), 지도(geoshape 마크와 투영법)를 지원합니다. 패싯, 겹치기, 연결, 반복으로 작은 다중 차트와 다중 뷰 화면을 만들고, 선택 파라미터로 브러시 연결과 교차 필터를 구현합니다. 샌키, 네트워크, 트리맵 같은 차트는 지원 범위 밖입니다.

Vega-Lite supports bar charts, stacked bar charts, line graphs, area graphs, scatterplots, bubble charts, histograms, heatmaps, box plots, error bars, pie and donut charts (the arc mark) and maps (the geoshape mark with projections). Facets, layers, concatenation and repetition build small multiples and multi-view screens, and selection params implement linked brushing and cross-filtering. Sankey diagrams, networks and treemaps are outside its scope.