Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: vis_dat() allow setting an index variable #105

Open
jzadra opened this issue Nov 24, 2018 · 2 comments
Open

Suggestion: vis_dat() allow setting an index variable #105

jzadra opened this issue Nov 24, 2018 · 2 comments

Comments

@jzadra
Copy link

jzadra commented Nov 24, 2018

It would be nice if vis_dat() had an option to select an index or grouping variable. Currently the y-axis is just straight observation index (row num).

For instance with time series data, perhaps the group could be set to the column that has a "year" value. Then ticks could be placed on the y axis for each year, or perhaps horizontal lines going across the entire plot. Same if you were combining multiple tables with bind_rows() and set an id variable - seeing where they were joined by setting the id as the group/index for vis_dat() would aid in seeing where discontinuities exist.

@njtierney
Copy link
Collaborator

Good idea, I like it! I think I discuss something similar in #91, but not quite. I'd like to explore this more.

@jzadra
Copy link
Author

jzadra commented Nov 28, 2018

If what I understand from #91 is correct, then showing factor values for factor columns might be another way to go about this.

Two thoughts about this avenue though:

  1. it would require converting things to factor first (for instance year, which should be stored as numeric)
  2. it wouldn't create tick values on the y-axis

Another option - what if any column with less than x unique values gets treated like a factor (ie different colors for values), and the value of x is an argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants