Skip to content

Give a tip how to read a vegalite json file and convert to VL spec in the document #334

@petershintech

Description

@petershintech

Recently, I got the following tip how to convert a json file to VL spec. It allows to manipulate vl spec easily using a dictionary and convert it to a plot. I think it might be useful to many VegaLite.jl users. How about adding the tip in the document?

using VegaLite: VLSpec
using JSON
using DataStructures: OrderedDict

p = VLSpec(JSON.parse(open("vegalite.json", dicttype=OrderedDict)))

(Used ```OrderedDict`` to preserve the order of items)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions