vegalite() %>%
add_data("https://vega.github.io/vega-editor/app/data/movies.json") %>%
encode_x("IMDB_Rating", "quantitative") %>%
encode_y("Rotten_Tomatoes_Rating", "quantitative") %>%
encode_size("*", "quantitative", aggregate="count") %>%
bin_x(maxbins=10) %>%
bin_y(maxbins=10) %>%
mark_point()
Run the code above in your browser using DataLab