-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
Support for brushing, crosstalk or similar #95
Comments
Crosstalk is not supported. There was some work a while ago to try to do that #19 but it never went to completion |
If you have any crosstalk or just javascript experience, it would be a very welcomed addition |
@mayeulk do you have a specific use case in mind, of a dataset that would work well with timevis and with another crosstalk widget? |
Yes. Please see attached file with screenshots, of an app that could benefit from brushing / crosstalk: The application is developed and released under Affero GPL. |
If you could provide me with some sample csv data that can be used for timevis and other widgets, that would help. I'm currently trying to implement crosstalk support, but I don't have any data to test with. |
Sure. Will do tomorrow (I m in France). I could not find a way to send a private message on github though. (Myself I can be reached at the email at the bottom of page www.irnc.org) |
Here is a csv with the events I used in the timevis: These data are licensed under an Attribution-NonCommercial-ShareAlike 4.0 International license (CC BY-NC-SA 4.0, https://creativecommons.org/licenses/by-nc-sa/4.0/). Each row contains the name of the authors, see fields ref_contributor_name_firstname and ref_proofreader_name_firstname (when NAs, assume: Simon, Marie ; Vandriessche, Thibaut; Kauffmann, Mayeul) |
I've commited the full gnad_irnc Shiny app (which uses the data above) at https://gricad-gitlab.univ-grenoble-alpes.fr/kauffmma/gnad_irnc/ |
Thanks for the file With this csv, what code would you use to create the timevis? (because I don't know which columns here are "id", "start", "end", "content", etc). And what code would you use to create the other crosstalk widget that you want to link to timevis? I'm essentially trying to get a reproducible example I can test for a crosstalk-enabled timevis. |
The code is in the folder https://gricad-gitlab.univ-grenoble-alpes.fr/kauffmma/gnad_irnc/-/tree/main/app |
I tried looking at that file but it's huge and very difficult to pull out demo code to test with. Are you able to provide a code sample? I'm looking for a clear simple example of using a dataset with timevis and another widget. Something like: basketball_games <- data.frame(id = 1:3, start = c("2023-02-01", "2023-02-02", "2023-02-03"), content = c("team 1 vs 2", "team 2 vs 3", "team 3 vs 4"), home_score = c(50, 60, 70), away_score = c(65, 55, 75))
shared_df <- crosstalk::SharedData$new(basketball_games)
crosstalk::bscols(
timevis::timevis(shared_df, width = "100%"),
d3scatter::d3scatter(shared_df, ~home_score, ~away_score, width = "100%"),
DT::datatable(shared_df)
) I cannot use the file you sent me for testing |
Sure, I'll come up with something ASAP. |
I made a much simpler version, committed at: timevis_gnad_irnc_v25_data_path_simplified_o.R.zip Fiches_GNAD_Ref_15_20_v12MK__2022_10_09_event_id_withoutEmails_simplified.ods Sharp_198_methods_table1_en_es_fr_v3_simplified.ods It is certainly not perfect; I still hope it will help. |
Thanks for all your time! I got your app to run, but I'm still not sure how to use this for a crosstalk test, because there is no crosstalk used in this app and it's not super clear how to modify the data so that different widgets use the same dataframe. I'm trying to come up with a short example of using timevis crosstalking with another widget, a code sample that can be fully contained within a small app of 20-30 lines. I'll try to come up with my own data, but I do appreciate you spending your resources on this. |
Sure, I understand and I appreciate all you say in your last comment. The reason why there is no crosstalk yet in this app is that integrating timevis was at the core of my development. For crosstalk-ing to leaflet, a draft dataset could use this:
|
Ah nice, yes that's what I'm looking for! Ideally something with this structure but that also holds some data that makes sense so that the example would be practical rather than just theoretical :) |
crosstalk is now supported |
I understand you committed crosstalk support; thanks a lot for this!
OK, it would require more work from me (reorganizing the data + searching for latitude and longitude of events) but I think this is something I can come up with. Do I understand well that a csv file I could create would go into inst/example/ ? When I have such a csv file, should I open a pull request and add a few lines of R code as an example using that csv file? |
I found a tiny dataset online of earthquakes and I was able to test with that (you can see it by installing the github version and running But I think I'm going to change that example into one that doesn't require leaflet and use a different widget instead, probably a plot instead of a map, because it's a bit simpler. |
Is there a way to have interaction among plots (including one timevis) such as brushing (with crosstalk or other mechanism)?
For instance such as the third example (earthquake map + plot) at https://rstudio.github.io/crosstalk/using.html ?
The text was updated successfully, but these errors were encountered: