I'm looking for an idiomatic way to pass parameters into a vega-lite spec via vegaEmbed(). For example, I'd like to pass the data url, so that instead of my spec containing:
"data": {"url": "filename.json"},
it contained something like:
"data": {"url": parameters["dataURL"]},
At a high level, I want to display visualizations from external applications via a url, something like http://localhost/showViz.html?data=today.json&sort=ascending
so it's not just about specifying the data source, I'm looking for a general mechanism to parameterize my specs.
I tried passing something via vegaEmbed's opt argument, but couldn't work-out how to access it from the vega-lite spec (either as usermeta or not). If the opt argument is the preferred way to do something like this, then my question devolves to "how do I reference opt and/or usermeta values from a vega-lite spec?".