Skip to main content

Table module

@loaders.gl/tables/csv

The CSV module handles CSV and TSV input through the same loaders.gl APIs used by binary table formats. It can materialize a table, emit batches as records arrive, or write compatible data back to text.

CSV table map example

Structured data boundaries

Keep the source shape. Choose the application shape.

JSON, delimited text, BSON, and XML describe data differently. loaders.gl keeps those input boundaries explicit while letting applications choose documents, tables, features, or trees for the next stage.

Common API boundary

documentbatchstream

load · parse · write

Application results

Documentnested objects and arrays
Tablerows, columns, or Arrow batches
Featuresgeometry plus properties
Treeformat-specific document structure

A readable interchange format can stay readable at the edge, or become a typed table when that is what the application needs.

The CSV path

Read rows incrementally when the file is large.

CSV is simple to exchange but expensive to hold as one string. The loader can parse records into table batches so applications can process, filter, or display them as they arrive.

Input

Comma-, tab-, or delimiter-separated text

Output

Rows, columnar tables, or Arrow tables

Streaming

Async batches with projection and limits

Write

Encode compatible table data as CSV text

The @loaders.gl/tables/csv module handles tabular data stored in CSV and TSV format CSV/DSV file format.

Detailed guide

CSV module details

The sections below cover installation, loaders, writers, parsing options, and table output.

Installation​

npm install @loaders.gl/core @loaders.gl/tables

Loaders and Writers​

APIDescription
CSVLoaderLoads CSV and TSV data as loaders.gl tables.
CSVWriterWrites loaders.gl tables as CSV text.

Additional APIs​

See the table category for output shapes and shared table APIs.

Attributions​

CSVLoader is based on a fork of the papaparse module, under MIT license.