Supported data formats (CosmographInputData
)
Before visualization, your data needs to be prepared in a format optimized for Cosmographās engine. Letās start with the supported input formats.
Cosmograph accepts the following formats for the points
and links
input data:
Type | Description |
---|---|
File | A file object representing data in formats: - CSV (.csv, .tsv) - JSON (.json) (max 100MB) - Apache Parquet (.parquet, .pq) - Apache Arrow (.arrow) |
string | Either: - URL pointing to data in formats above - Table name in the external DuckDB-Wasm instance connected to Cosmograph (not supported in Cosmograph Data Kit) |
Table | An instance of Apache Arrow table |
Uint8Array , ArrayBuffer | Binary data in Apache Arrow format |
Record<string, unknown>[] | Array of objects, where each object represents a point (or link) with its properties |
Input data formats are identical for both Cosmograph and Data Kit, with one difference: while both accept URL strings pointing to data files, Cosmograph also supports DuckDB table names when using an external DuckDB-Wasm connection.
Now when you understand what data formats are vaild for Cosmograph, letās look at two ways to prepare your data:
Cosmograph Data Kit is perfect for most datasets. Automatically prepares your data with minimal setup, taking just a few seconds to process.
Pre-indexed data would be ideal for large-scale datasets or when you need instant loading. Follow this guide to prepare your data for optimal performance.