Extension talk:Graph/Interactive Graph Tutorial

Great tutorial. One issue, that is comments in Vega. On the page you included c style "// ..." comments. The Vega editor doesn't accept comments in the JSON specification. However, extension graph does accepts comments. Wiki style comments are accepted by mediawiki, including within graphs. However those wiki style comments are not accepted in the Vega editor. Somehow c style "// ..." comments are accepted within graphs by extension:graph in mediawiki, they are treated as comment, that is white space, that is ignored. Please note that outside graphs "// ..." is normally displayed and not treated as comment. Vega and JSON doesn't like comments, except for adding fields ("description": "vega acceptable comment style"). What I expect in a tutorial on graphs is source material that works both in the Wikimedia farm as in the Vega editor. Ideally your tutorial examples are added upstream. However that is sending users to another site for sandboxing. They could also experiment with examples in a sandbox space on this wiki. Ad Huikeshoven (talk) 10:17, 31 December 2015 (UTC)

Awesome geo examples
The world map is an awesome geo example. The boundaries are specified in a json source. How to create such a geojson or topojson file? For example, on commons is an SVG map of Dutch municipalities. Shown are only the boundaries. The sources contains the names (and numbers) of the individual municipalities. Where can I find a tool to convert such a SVG specification of the boundaries to a json specification that can be rendered with extension:graph? Ad Huikeshoven (talk) 13:50, 31 December 2015 (UTC)
 * Hi Yurik. On the site http://opendata.rug.nl/datasets/0667f758c7df48e1b2053593a67d1c30_0 I found the geojson specification of Dutch Municipality boundaries: http://opendata.rug.nl/datasets/0667f758c7df48e1b2053593a67d1c30_0.geojson. I have found node.js and npm and with the explanation on https://github.com/mbostock/topojson/wiki/Command-Line-Reference I could do topojson -o output.json -p -- input.json to get Sjabloon:Graph:Gemeentegrenzen/topojson as the map data for a template graph wikipedia:nl:Sjabloon:Graph:Gemeentegrenzen, which somehow fails to show something. I used http://www.mapshaper.org/ to check if the topojson can show something, and in fact it does. So something is wrong with the graph specification and/or topojson data, which I haven't figured out yet. Ad Huikeshoven (talk) 14:41, 2 January 2016 (UTC)
 * Ad Huikeshoven, there are online tools like this (better) or this, that convert geojson to topojson.  The top element in topojson needs to be specified, e.g.         - that feature element might be different, probably depending on the converter. --Yurik (talk) 15:15, 2 January 2016 (UTC)