A Grammar of Data Analysis

📅 2025-11-04
📈 Citations: 0
Influential: 0
📄 PDF

career value

160K/year
🤖 AI Summary
This paper addresses the lack of a unified, semantically clear syntactic framework for data analysis. It proposes a novel, operation-agnostic analytical syntax grounded in two primitive constructs—“measures” and “dimensions”—thereby abstracting analytical logic and decoupling semantic intent from underlying data sources. This design significantly enhances readability, reusability, and maintainability of analytical expressions. To our knowledge, this is the first systematic formulation of such a syntax model. Based on it, we design and open-source Meterstick, a Python library supporting unified analysis across heterogeneous backends—including pandas DataFrames and SQL databases. Empirical evaluation demonstrates that the framework delivers efficient execution while enabling cross-platform, declarative, and composable analytical modeling. By providing a foundational syntax layer, it advances the Analytics-as-Code paradigm.

Technology Category

Application Category

📝 Abstract
This paper outlines a grammar of data analysis, as distinct from grammars of data manipulation, in which the primitives are metrics and dimensions. We describe a Python implementation of this grammar called Meterstick, which is agnostic to the underlying data source, which may be a DataFrame or a SQL database.
Problem

Research questions and friction points this paper is trying to address.

Defining grammar for data analysis using metrics and dimensions
Implementing Meterstick in Python for flexible data sources
Distinguishing analysis grammar from data manipulation approaches
Innovation

Methods, ideas, or system contributions that make the work stand out.

Grammar of data analysis with metrics and dimensions
Python implementation called Meterstick
Agnostic to DataFrame or SQL data sources
🔎 Similar Papers
No similar papers found.
X
Xunmo Yang
Google, Inc.
T
Taylor Pospisil
Google, Inc.
Omkar Muralidharan
Omkar Muralidharan
Google, Inc.
D
Dennis L. Sun
Google, Inc. and Stanford University