Skip to contents

Add data in the form of a url

Usage

vl_add_data_url(spec, url, ...)

Arguments

spec

An input vega-lite spec

url

Data frame with data to add to chart

...

Additional arguments to pass to vl_add_data(), such as name or format

Value

A modified Vega-Lite Spec

See also

Examples


vl_chart() %>%
  vl_add_data_url("https://vega.github.io/vega-editor/app/data/movies.json") %>%
  vl_encode_x(field = "IMDB_Rating", type = "quantitative") %>%
  vl_encode_y(type = "quantitative", aggregate = "count") %>%
  vl_bin_x(maxbins = 10) %>%
  vl_mark_bar()