This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-01
Channels
- # announcements (3)
- # babashka (17)
- # beginners (163)
- # bristol-clojurians (1)
- # calva (18)
- # chlorine-clover (17)
- # clj-kondo (13)
- # cljs-dev (50)
- # cljsjs (3)
- # cljsrn (13)
- # clojure (218)
- # clojure-dev (5)
- # clojure-europe (9)
- # clojure-italy (10)
- # clojure-nl (8)
- # clojure-uk (107)
- # clojurescript (25)
- # conjure (163)
- # cursive (63)
- # data-science (9)
- # datomic (38)
- # docker (1)
- # figwheel (34)
- # figwheel-main (3)
- # fulcro (15)
- # graalvm (1)
- # helix (12)
- # jobs (3)
- # juxt (5)
- # kaocha (3)
- # lein-figwheel (2)
- # leiningen (6)
- # luminus (2)
- # malli (1)
- # meander (12)
- # nrepl (4)
- # rdf (2)
- # re-frame (2)
- # reagent (7)
- # reitit (5)
- # remote-jobs (2)
- # rum (1)
- # shadow-cljs (65)
- # spacemacs (27)
- # tools-deps (18)
- # vim (19)
- # xtdb (2)
I am using Oz library to create vega-lite views and have created several different types of visuzlizations. However, I am finding it difficult to find GeoJSON files to work with Oz. Out of 5 GeoJSON files I have tried, only one displays a map and unfortunately is broken down into regions that are very different from my data source. Is there any advice on how to debug / troubleshoot GeoJSON files either with Oz or Vega-lite? Thank you
Sometimes the files come in somewhat different shapes so it sort of depends.
I am using the Vega-lite web based editor to check, seems the most direct approach. I am putting my results in this Gist, along with the code used in the editor https://gist.github.com/jr0cket/96e3656ecf16be4c6bacfa566a37afc8
@U05100J3V I am not tied to GeoJSON. If there are other formats for geographical maps that work with Oz / vega-lite I would be happy to switch
No, geojson is the ticket. The problem is that sometimes you'll find geojson files that are shaped differently, so you end up having to specify a few extra things in how the json is being interpetted
Like, sometimes the assumptions about the shapes being loaded in matches up perfectly, as in the examples on the vega-lite examples page.
Do you have any suggestions as to why the following draws a blue circle in Oz or in the vega-lite editor. This is the closest GeoJSON to my data set districts (its quite big so hammers the browser a bit)
{
"$schema": "",
"data": {
"url": "",
"format": {
"type": "json",
"property": "features"
}
},
"mark": "geoshape"
}
Its not the end of the world if I dont get this working...I remember having to do this in a project in the past, but am not sure where now; basically though if you compare the shape of your json file (with jq or something similar) to the geojson file used in one of the vega-lite/vega example visualizations, you may see that it has some obviously different shape. Like, the actual geojson part of the data might be nested under some parent entity in a different way. So just as with data where the attributes you want to specify are nested, you have a to modify your field specifications to match.
Thanks, that makes sense. I will calve out some time to experiment.