Skip to content

Getting Started with gaslamp

Welcome to gaslamp! This section will help you get up and running quickly.

What you'll learn

  • How to install gaslamp in your Google Apps Script project
  • Your first steps with BareFrame — the core DataFrame
  • How to add schema validation with FlameFrame
  • Common workflow patterns and business use cases

Learning Path

  1. Installation - Add gaslamp to your GAS project
  2. First Steps - 5-minute quickstart guide
  3. Practical Workflows - Real-world business scenarios

Prerequisites

  • Basic knowledge of JavaScript
  • Google Apps Script project (existing or new)
  • Access to Google Sheets (for examples)

Quick Overview

gaslamp is a TypeScript library that brings pandas-like DataFrame operations to Google Apps Script. It includes:

  • torch: Core data processing — BareFrame, FlameFrame, GroupedFrame, LazyFrame
  • flamewright: Runtime type validation — FlameGuards, FlameWright
  • gaslets: Google Sheets/Drive integration
  • afterglow: Structured logging and monitoring
  • gears: General utilities — ClockSmith, Counter, JunkPocket
  • jestlite: GAS-compatible testing framework
  • remnantflicker: Warning and deprecation utilities

What is BareFrame?

BareFrame is the primary entry point for all data operations. It wraps raw spreadsheet data (getValues()) in a DataFrame with column-name access, filter, select, groupBy, and more.

JavaScript
const df = gaslamp.BareFrame.fromSheet(sheet);
const adults = df.filter(row => row.get("age") >= 18);
Logger.log(adults.toString());

When you need to validate that data matches a schema, pass the BareFrame to FlameFrame.from:

JavaScript
const schema = {
  name:  gaslamp.FlameGuards.isString,
  score: gaslamp.FlameGuards.isNumber,
};

const df = gaslamp.BareFrame.fromSheet(sheet);
const { passed, failed } = gaslamp.FlameFrame.from(df, schema);

if (failed.length > 0) {
  Logger.log(failed.display()); // see which cells failed
}

Ready to start? Begin with Installation!

Note: For migration from existing solutions, see the Migration Guide.