Supported data formats (CosmographInputData)
Your data must be prepared in a format optimized for Cosmographās engine. The following formats are supported for 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.
Ways to prepare data:
-
Cosmograph Data Kit automatically prepares your data with minimal setup in seconds. Recommended for most datasets. Returns pre-indexed data that can be used for instant loading.
-
Pre-indexed data best for large-scale datasets that canāt be handled by Cosmograph Data Kit or if you want instant dataset loading without preprocessing. Requires manually indexed data.