Navigation
Search
|
How to run an R data visualization chatbot you can talk to
Thursday October 16, 2025. 11:00 AM , from InfoWorld
Typing questions into a chatbot is nice, but speaking often feels more natural. In fact, some experts encourage people to talk to generative AI instead of typing, in part to get out of the habit of using them as glorified search engines. “If you haven’t tried voice chatting with an AI model to see the appeal, you should,” advises University of Pennsylvania professor Ethan Mollick, who studies innovation and artificial intelligence. “Anthropomorphism is the future, in ways good and bad.”
Now, chatbots you can talk to—and that speak back—have come to R and the tidyverse. One such bot surfaced at last month’s posit::conf(2025) data science conference: ggbot2, which you can talk to in order to create ggplot2 data visualizations. Speech is a “very fast and fluid interaction,” Posit Chief Scientist Hadley Wickham said in his conference keynote, which included a brief ggbot2 demo. “My goal has always been for the code to get out of the way, and for you to express your ideas so you can interact with the data as quickly as possible.” Tell ggbot2 what you want in a spoken conversation, and it will generate plots and ggplot2 R code from your data. A week or so after the conference, Posit released the ggbot2 R package, which you can try on your own computer. ggbot2 relies on the shinyrealtime package, which integrates OpenAI’s Realtime API with Shiny apps written in either R or Python. shinyrealtime apps can also generate data visualization code in either language. All ggbot2 and shinyrealtime applications use OpenAI’s Realtime API for conversational voice chats, which Posit CTO Joe Cheng told me he found particularly well suited for this type of work. OpenAI says its Realtime API was designed for low latency, elegant handling of user interruptions, and tool calling. So, you will need an OpenAI API key to use either ggbot2 or shinyrealtime. ggbot2 setup You can install ggbot2 from GitHub (Posit recommends pak::pak('tidyverse/ggbot2') ) and load it with library(ggbot2). Then, you can launch the ggbot2 Shiny app to use with your own data frame with ggbot(my_dataframe). Note that the app needs to be in a full browser like Chrome or Firefox and not your IDE’s viewer pane in order to access your computer’s microphone. For a simple test, I downloaded one of my sample data sets, US state population changes grouped by Census Divisions in 2000, 2010, and 2020: dist_pops %’.” “You couldn’t just give this to anyone,” Wickham said during his demo. “I’m using my knowledge of good visualization practices. I know what ggplot2 can do.” He said the tool would sometimes “kind of go off the deep end and start using weird ggplot2 features, and I would just tell it, ‘Hey, I want to use this geom.’ It absolutely benefits from my expertise as a data scientist and software engineer, but I’m no longer quite so limited by what my memory of ggplot2 code is.” Wickham created ggplot2. If he needs help remembering all of the package’s functionality, it’s fair to say that most of the rest of us probably do, too. To make a map, I imported data with state_pops
https://www.infoworld.com/article/4072500/how-to-run-an-r-data-visualization-chatbot-you-can-talk-to...
Related News |
25 sources
Current Date
Oct, Thu 16 - 23:23 CEST
|