{"action":"created","issue":{"url":"https://api.github.com/repos/hrbrmstr/vegalite/issues/29","repository_url":"https://api.github.com/repos/hrbrmstr/vegalite","labels_url":"https://api.github.com/repos/hrbrmstr/vegalite/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/hrbrmstr/vegalite/issues/29/comments","events_url":"https://api.github.com/repos/hrbrmstr/vegalite/issues/29/events","html_url":"https://github.com/hrbrmstr/vegalite/pull/29","id":278013962,"number":29,"title":"Update to vega-lite 2.0","user":{"login":"AliciaSchep","id":6809790,"avatar_url":"https://avatars1.githubusercontent.com/u/6809790?v=4","gravatar_id":"","url":"https://api.github.com/users/AliciaSchep","html_url":"https://github.com/AliciaSchep","followers_url":"https://api.github.com/users/AliciaSchep/followers","following_url":"https://api.github.com/users/AliciaSchep/following{/other_user}","gists_url":"https://api.github.com/users/AliciaSchep/gists{/gist_id}","starred_url":"https://api.github.com/users/AliciaSchep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AliciaSchep/subscriptions","organizations_url":"https://api.github.com/users/AliciaSchep/orgs","repos_url":"https://api.github.com/users/AliciaSchep/repos","events_url":"https://api.github.com/users/AliciaSchep/events{/privacy}","received_events_url":"https://api.github.com/users/AliciaSchep/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-11-30T06:40:55Z","updated_at":"2018-04-11T03:52:24Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/hrbrmstr/vegalite/pulls/29","html_url":"https://github.com/hrbrmstr/vegalite/pull/29","diff_url":"https://github.com/hrbrmstr/vegalite/pull/29.diff","patch_url":"https://github.com/hrbrmstr/vegalite/pull/29.patch"},"body":"Initial PR for update to Vega-Lite 2.0, per #28 . Probably not quite ready yet, but figured I'd get the PR in to start review & discussion\r\n\r\nChanges are enumerated in NEWs and include:\r\n\r\n* Update of JS libraries\r\n* Updates spec.js and vegalite.js to match new api for vega-embed and vega-tooltip.\r\n* Add z-schema javascript library and a function validate_vl that checks whether schema is valid vega-lite2. Updates tests to use validate_vl.\r\n* Update of viewport sizing handling.  Vegalite no longer has viewport_width arguments so this now goes to htmlwidgets.  Some CSS was also added in order to best replicate the old behavior, where scrolling was enabled when viewport too small to fit full plot.\r\n* Updates to to_spec and embed_spec to give valid spec for vega-lite2\r\n* Deprecate axis_facet_row and axis_facet_col because behaviour currently un-supported by vega-lite 2.\r\n* Update to axis_vl function so that arguments match those supported by vega-lite 2 axis config.\r\n* band_size argument now named range_step, to match vega-lite 2 naming\r\n* cell_size and cell_config deprecated in favor of view_size and view_config to better match new naming of field in vega-lite 2\r\n* grid_facet deprecated because there is no longer a facet field in config in vega-lite 2\r\n* Bug fixes to capture_widget [not really related to V2, but caught when trying to make sure it still worked]\r\n\r\nI tested:\r\n* Passed R CMD check on my computer (Ubuntu 16.04, R 3.4.2)\r\n* Vignette gives reasonable output.  Main difference with old version is a few unsupported features by vega-lite 2, and seemingly different color defaults\r\n* Vignette, examples, & test give valid vega-lite 2 specs\r\n\r\nI have not tested:\r\n* All arguments to all functions will result in valid vegalite 2 spec\r\n* Passes tests on other OS, r versions, etc\r\n\r\nI know that there are some issues with the config_* functions and arguments.  Given that the config schema seems to have been overhauled a fair bit in vega-lite 2, I think some new functions and possibly re-grouping of existing functionality there might be warranted.  I started some work along these lines in another branch, but also got kind of carried away with some helper functions so I think it may make sense for that to be a separate PR.  One issue I noticed is that there is inconsistency in the package with argument naming -- some functions use snake_case instead of vega-lite's preferred camelCase, while others use the camelCase. I think it would be nice for that to be standardized for all arguments that are tied directly to vega-lite  properties.\r\n\r\nWith regards to validating the JSON, I tried jsonvalidate as suggested by #26.  I could not get it to work on test examples with this schema.  I thus brought in the z-schema js library, which I noticed the vega-lite repository using.  That library works well.  If bringing in another js library is unacceptable, I can look into other options\r\n"},"comment":{"url":"https://api.github.com/repos/hrbrmstr/vegalite/issues/comments/380318825","html_url":"https://github.com/hrbrmstr/vegalite/pull/29#issuecomment-380318825","issue_url":"https://api.github.com/repos/hrbrmstr/vegalite/issues/29","id":380318825,"user":{"login":"AliciaSchep","id":6809790,"avatar_url":"https://avatars1.githubusercontent.com/u/6809790?v=4","gravatar_id":"","url":"https://api.github.com/users/AliciaSchep","html_url":"https://github.com/AliciaSchep","followers_url":"https://api.github.com/users/AliciaSchep/followers","following_url":"https://api.github.com/users/AliciaSchep/following{/other_user}","gists_url":"https://api.github.com/users/AliciaSchep/gists{/gist_id}","starred_url":"https://api.github.com/users/AliciaSchep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AliciaSchep/subscriptions","organizations_url":"https://api.github.com/users/AliciaSchep/orgs","repos_url":"https://api.github.com/users/AliciaSchep/repos","events_url":"https://api.github.com/users/AliciaSchep/events{/privacy}","received_events_url":"https://api.github.com/users/AliciaSchep/received_events","type":"User","site_admin":false},"created_at":"2018-04-11T03:52:24Z","updated_at":"2018-04-11T03:52:24Z","author_association":"NONE","body":"hi @jonloyens it might be worth checking out https://github.com/ijlyttle/altair \r\n\r\nThat is a new (still in development but already working fairly well, with more functionality than this fork) package that wraps python's altair interface to vegalite.  While porting a python port of a javascript package may seem a bit round-a-bout, it has some major advantages in that porting a python package is much easier than designing & maintaining an R api for a json specification.  The altair python developers have already put in a lot of time & effort into making a good api for vegalite, and the altair r package seeks to take advantage of all that work. The current api for that package is not as congruous with the 'tidyverse' style, but eventually there may be a pipable api (see https://github.com/ijlyttle/altair/issues/15).  \r\n\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"AliciaSchep"}}