JSON / NDJSON
Studio can load JSON (Javascript Object Notation) and NDJSON (Newline delimited JSON) files. JSON files must contain tabular data, in the form of an array of row objects. NDJSON files contain one row of data per line.
Notes:
- Studio's tools can only load "tabular" JSON (containing an array of similar rows). Arbitrary (non-tabular) JSON files can not be loaded, unless they conform another supported JSON-based format, such as GeoJSON or a Studio or kepler.gl map.
- NDJSON files must have the
.ndjson
extension.
Examples
Example of a valid JSON file containing tabular data:
[
{
"id": "item-1",
"longitude": 80,
"latitude": 40
},
{
"id": "item-2",
"longitude": 70,
"latitude": 30
}
]
An NDJSON file must not be wrapped with a JSON array ([
]
), and requires each
element to be placed on a separate row, without a comma (,
) after each object.
{"id": "item-1", "longitude": 80, "latitude": 40}
{"id": "item-2", "longitude": 70, "latitude": 30}
Both of thee above files will be loaded into a table as follows
id | longitude | latitude |
---|---|---|
"item-1" | 80 | 40 |
"item-2" | 40 | 30 |
Geometry in JSON files
- Fields name
longitude
andlatitude
can be provided. - Fields with geospatial information, such as zip codes or census tracts or H3 indices is also supported.
For complex geometries, GeoJSON is the standard format for encoding geometry in JSON files.
Updated 9 months ago