crosstalk
Inter-htmlwidget communication for R (with and without Shiny)
Crosstalk is an R package that enables cross-widget interactions for htmlwidgets, allowing multiple HTML widgets to communicate through linked brushing and filtering. It provides a framework for creating interactive visualizations where selections and filters in one widget automatically affect other widgets on the same page.
The package solves the problem of isolated HTML widgets by providing a standardized way to share data and user interactions between them. This enables coordinated views where filtering data in one visualization immediately updates all connected visualizations. It works with existing htmlwidgets without requiring server-side logic, making it useful for static HTML reports and dashboards.
Contributors#
Resources featuring crosstalk#
Data viz, Shiny app design, & technical career paths | Kiegan Rice | Data Science Hangout
ADD THE DATA SCIENCE HANGOUT TO YOUR CALENDAR HERE: https://pos.it/dsh - All are welcome! We’d love to see you!
We were recently joined by Keegan Rice, Senior Statistician at NORC at the University of Chicago, to chat about data visualization design, bridging the gap between technical and non-technical teams, and building large-scale, public-facing Shiny apps.
In this Hangout, we explore how to effectively communicate statistical results and design intuitive data visualizations for non-technical audiences. Keegan shares her top tips, emphasizing the importance of knowing your audience and not assuming they have the same level of data literacy as a practitioner. She suggests testing your charts on friends or colleagues outside the data space to ensure they are understandable. The conversation also covers the challenges of explaining concepts like statistical significance and the value of forcing stakeholders to articulate their core business questions rather than just asking for a specific table or chart.
Resources mentioned in the video and zoom chat: Kiegan’s posit::conf talk, “Wait, that’s shiny” → https://www.youtube.com/watch?v=SAbV6d7Pn0U Kiegan’s reproducible GitHub repo from the talk → https://github.com/kiegan/wait-thats-shiny Deepsha Menghani’s talk on crosstalk → https://youtu.be/AbuK2F57NEs The NCVS dashboard, an example of a tool built for a federal client → https://ncvs.bjs.ojp.gov/Home The Medicare Current Beneficiary Survey Chartbook → https://chartbook.mcbs.org/
If you didn’t join live, one great discussion you missed from the zoom chat was about favorite board games and sci-fi/fantasy books. Recommendations ranged from board games like Ark Nova, Dominion, and Terraforming Mars to book series like The Expanse, The Stormlight Archive, and Gideon the Ninth. Come hang out with us live to chat about this stuff!!
► Subscribe to Our Channel Here: https://bit.ly/2TzgcOu
Follow Us Here: Website: https://www.posit.co Hangout: https://pos.it/dsh LinkedIn: https://www.linkedin.com/company/posit-software Bluesky: https://bsky.app/profile/posit.co
Thanks for hanging out with us!
Timestamps: 00:00 Introduction 07:40 “What are your top tips for data visualization design?” 11:15 “What are the challenges you’ve faced when communicating statistical results to non-statisticians?” 18:30 “Do you experience any imposter syndrome because you’re not really doing stats anymore?” 22:04 “How do you see data visualization evolving and what are your book recommendations?” 26:56 “How do you get federal clients to modernize beyond using tables for everything?” 29:37 “How do you decide what aspects to drop when a data visualization is too busy?” 35:57 “Is there a middle ground for Shiny between Quarto and JavaScript?” 39:51 “Which sci-fi or fantasy books are you loving?” 42:19 “What advice do you have for someone just getting started with interactive data visualization?” 47:40 “What advice do you have for attending or giving a talk at posit::conf for the first time?” 50:35 “How important is it to show the lineage of data so people can trust your visualizations?”
Unlock the Power of DataViz Animation and Interactivity in Quarto - posit::conf(2023)
Presented by Deepsha Menghani
Plot animated and interactive visualizations with Plotly and Crosstalk in Quarto using R. In thi sintro to Plotly & Crosstalk in R: Using code examples, learn to integrate dashboard elements into Quarto with animated plots, interactive widgets (checkboxes), and linked plots via brushing.
This talk showcases how to use packages, such as Plotly and Crosstalk, to create interactive data visualizations and add dashboard-like elements to Quarto. Using a fun dataset available through the “Richmondway” package, we examine the number of times Roy Kent uses salty language throughout all seasons of ““Ted Lasso.”” We illustrate this using animated plots, interactive selection widgets such as checkboxes, and by linking two plots with brushing capabilities.
Materials:
- Slides: https://deepshamenghani.github.io/posit_plotly_crosstalk/#/title-slide
- Code repo: https://github.com/deepshamenghani/posit_plotly_crosstalk
- Richmondway data package: https://github.com/deepshamenghani/richmondway
- In-Depth Guide to Creating and Publishing an R Data Package (Richmondway) Using Devtools: https://medium.com/p/245b0fd4c359
Presented at Posit Conference, between Sept 19-20 2023, Learn more at posit.co/conference.#
Talk Track: Quarto (2). Session Code: TALK-1143
R Markdown Advanced Tips to Become a Better Data Scientist & RStudio Connect | With Tom Mock
R Markdown is an incredible tool for being a more effective data scientist. It lets you share insights in ways that delight end users.
In this presentation, Tom Mock will teach you some advanced tips that will let you get the most out of R Markdown. Additionally, RStudio Connect will be highlighted, specifically how it works wonderfully with tools like R Markdown.
Please provide feedback: https://docs.google.com/forms/d/e/1FAIpQLSdOwz3yJluPR2fEqE0hBt92NtKZzzNACR8KJhHUt9rhFj3HqA/viewform?usp=sf_link
More resources if you’re interested: https://docs.google.com/document/d/1VKGs1G9GcQcv4pCYFbK68_LDh72ODiZsIxXLN0z-zD4/edit
04:15 Literate Programming 09:00 - Rstudio Visual Editor Demo 15:44 - R and python in same document via {reticulate} 18:10 - Q&A: Options for collaborative editing (version control, shared drive etc.) 19:30 - Q&A: Multi-pane support in Rstudio 20:46 Data Product (reports, presentations, dashboards, websites etc.) 24:15 - Distill article 26:27 - Xaringan presentation (add three dashes — for new slide) 28:58 - Flexdashboard (with shiny) 30:30 - Crosstalk (talk between different html widgets instead of {shiny} server) 35:03 - Q&A: Jobs panel – parallelise render jobs in background 36:50 - Q&A: various data product packages, formats 39:35 Control Document (modularise data science tasks, control code flow) 39:58 - Knit with Parameters (YAML params: option) 41:20 - Reference named chunks from .R files (knitr::read_chunk()) 43:00 - Child Documents (reuse content, conditional inclusion, {blastula} email) 47:07 Templating (don’t repeat yourself) 47:38 - rmarkdown::render() with params, looping through different param combinations 49:30 - Loop templates within a single document 50:40 - 04-templating/ live code demo 54:37 - {whisker} vs {glue} – {{logic-less}} vs {logic templating} 55:30 - {whisker} for generating markdown files that you can continue editing 57:49 RMarkdown + Rstudio Connect 1:00:41 Follow-up Reading and resources 1:04:49 Q&A - {shiny} apps, {webshot2} for screenshots of html, reading in multiple .R files, best practice for producing MSoffice files, {blastula}