question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`.geojson` Data Support

See original GitHub issue

Is it possible to load a .geojson file, without first converting it to topojson, as data for vega lite? Many public datasets come in geojson formats and not topojson formats, so analyzing them would be easier if this was supported.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
jheercommented, Feb 22, 2018

The TotalAssessment field is nested within the properties object. Here is a modified spec that works for me:

{
  "$schema": "https://vega.github.io/schema/vega-lite/v2.1.json",
  "width": 500,
  "height": 300,
  "data": {
    "url": "https://maps-amherstma.opendata.arcgis.com/datasets/d887750c3b4a40c09e753642988e7aee_0.geojson",
    "format": {
      "property": "features"
    }
  },
  "mark": "geoshape",
  "encoding": {
    "color": {
      "field": "properties.TotalAssessment",
      "type": "quantitative"
    }
  }
}
1reaction
daveliepmanncommented, Mar 3, 2020

This tripped me up too. It would be great if “how to access GeoJSON properties”, explaining the nesting under property and the syntax to access it, were in the docs somewhere. Would a documentation PR be welcome?

Read more comments on GitHub >

github_iconTop Results From Across the Web

GeoJSON
GeoJSON is a format for encoding a variety of geographic data structures. ... GeoJSON supports the following geometry types: Point , LineString ,...
Read more >
Working with large GeoJSON sources in Mapbox GL JS | Help
Mapbox GL GeoJSON sources are turned into Mapbox vector tiles on-the-fly by the client (web browser or mobile device). The purpose of this...
Read more >
26 Using GeoJSON Geographic Data - Oracle Help Center
GeoJSON objects are JSON objects that represent geographic data. Examples are provided of creating GeoJSON data, indexing it, and querying it.
Read more >
GeoJSON—ArcGIS Online Help | Documentation
GeoJSON is an open standard geospatial data interchange format that represents simple geographic features and their nonspatial attributes.
Read more >
GeoJSON — GDAL documentation
GeoJSON is supported as an output format of a number of services: GeoServer, CartoWeb, etc. The OGR GeoJSON driver translates GeoJSON encoded data...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found