Posts Tagged: Innovation
'Nearly Wild' and 'In the Pink'
Talk about flower power. When you walk through the UC Davis Bee Haven, a half-acre...
A pink floribunda rose cultivar, "Nearly Wild," draws honey bees and native bees in the UC Davis Bee Haven. (Photo by Kathy Keatley Garvey)
A native bee seeks to join two honey bees in gathering nectar and pollen from a floribunda rose cultivar, "Nearly Wild," in the UC Davis Bee Haven. (Photo by Kathy Keatley Garvey)
Side view of a honey bee foraging on a "Nearly Wild" rose cultivar in the UC Davis Bee Haven. (Photo by Kathy Keatley Garvey)
A honey bee foraging on "Nearly Wild" looks at the photographer. (Photo by Kathy Keatley Garvey)
Thinking of Noted Cotton Entomologist Thomas Frances Leigh
This time of year we're thinking of noted cotton entomologist Thomas Frances Leigh (1923-1993)...
A display of harvested cotton balls. (Photo by Kathy Keatley Garvey)
Takeaways from Posit::Conf 2024
R and Python together at last, the AI takeover, and Quarto ups its game.
Posit::Conf, Posit's annual conference, was held last week in Seattle, WA. While the name might be unfamiliar, many of you might recognize Posit's previous iteration, RStudio. Posit has produced many products R users know and love, including RStudio, Shiny and the Tidyverse. After a whirlwind three days, here are some takeaways from the conference!
A New All-in-One IDE
Togetherness was a key theme, with Posit rolling out the beta version of Positron, an IDE that combines elements of RStudio, VS Code, and introduces its own unique features. While switching IDEs is generally not at the top of any coder's to-do list, Positron is multilingual, enabling users to code in R, Python, and Julia within a single project. It also introduces new ways to interact with your data, such as readily available summary statistics, the ability to filter or sort data by multiple fields while retaining the active query in the window at all times, and the option to resize graphs and figures in the plots pane through a simple user interface. Positron also leverages many new and existing VS Code extensions, offering a wealth of customization and additional capabilities. Rstudio is by no means leaving the picture– Positron is still in beta, and Rstudio will continue to be supported for a good, long time. However, if you (like me) crave a unified interface for your R and Python coding, Positron may be worth trying out.
Helping R Users Learn Python
For Py-curious R coders, a session on “Python Rgonomics” suggested some packages to make the transition easier for those of us spoiled by the tidyverse.
-
Polars for exceptionally fast data wrangling and dplyr-like syntax
-
Plotnine and seaborn for ggplot-like syntax when making graphs and figures
-
Great tables for producing functional, readable tables (also available in R as the gt package).
-
Pyenv for environment management.
-
Pins (for R and Python!) publishes objects to “boards” that allows users (or multiple users) to access them across projects. Boards can include shared/networked folders, like DropBox or Google Drive.
AI for All
Melissa Van Bussel provided practical tips for using generative AI. She highlighted some new capabilities of ChatGPT 4o, including the ability to transcribe handwritten notes and tables, preserving colors and formatting. GPT can even convert these into HTML or Quarto formats.
She shared insights on prompt engineering (i.e., how you ask questions to AI engines), noting, “Writing effective prompts goes hand in hand with your existing expertise.” Achieving correct and effective output requires providing specific prompts and making corrections when errors occur. She recommended structuring prompts in a way that mirrors coding practices. For example, to generate a graph, start by specifying the data, then define how to map each axis and assign colors. Next, specify the graph or chart type and indicate any grouping by other variables. Finish with aesthetic (eg palette, theme, title, legend) preferences.
While presenters were enthusiastic about the possibilities of generative AI, a recurring theme was the necessity for users to provide clear direction and verify the results. One presenter compared AI to hiring a new human assistant—AI can assist with tasks effectively when given proper guidance but will make mistakes and requires careful supervision. Generative AI performs best when used to quickly accomplish tasks that users already have the knowledge and skills to handle themselves.
One of the most prevalent use cases for generative AI was in combination with Shiny. Joe Cheng's presentation demonstrated integrating AI into Shiny apps, specifically into Shiny dashboards. Users could request modifications to the data displayed on the dashboard using plain language, which the AI translated into SQL queries to adjust the output based on the request. This is particularly noteworthy as the AI accessed only the schema, not the actual data, to apply the filters.
Winston Chang developed an AI assistant to help people build Shiny apps and did a live demonstration. Although still experimental, Shiny for R is widely used, and the assistant showed promising outputs.
Quarto Expands its Horizons
Quarto is a relatively new version of R Markdown (a publishing tool) that allows users to knit together code into documents, dashboards, web pages, PDFs, and even eBooks. An added advantage of Quarto is its multilingual capability– it, like Positron, supports both R and Python. Some new capabilities were highlighted at the conference:
-
Dashboards: Easily build dashboards using the Quarto extension in RStudio or Positron. Each visualization (graphs, maps, tables, and even just text boxes) can be arranged like tiles or cards. Dashboards can also include sidebars and toolbars, and can support interactivity, including cards that use jupyter widgets, leaflet, and shiny.
-
PDFs: Quarto now uses typst instead of LaTeX, enabling users to create customized PDF outputs with a more intuitive language.
-
HTML (Websites): Quarto (like R Markdown) can produce HTML outputs. However, now it also supports more flexible HTML code chunks, and allows for HTML/CSS/JavaScript integration.
-
Quarto live: A quarto extension that allows users to embed code blocks and exercises for R and Python into Quarto documents. This has lots of teaching applications, and can be used to generate exercises similar to those you find in DataCamp and other online coding courses.
-
Closeread: A scrollytelling extension for quarto that enables interactive storytelling similar to that seen in fancy New York Times articles or Esri Storymaps. The gallery has some example outputs, while the guide can walk you through the process of creating your own scrollytelling page.
Finally, one of my favorite quality-of-life take homes was simply that it is possible to include emoji in your R or Python code, either using unicode or simply pasting them in. While the demonstrated use case was to make specific messages stand out in your log or printed statements, sometimes a picture can convey what 1000 characters cannot and help you enjoy coding just a little bit more.
If you love (or begrudgingly engage in) data science, I encourage you to check it out next year– virtual registration for educators and academics in 2024 was free, and hopefully will be next year too!
/h3>/h3>/h3>/h3>
Buds, Butterflies and Books...
It's delightful to see a child browsing through an insect book. And it's double...
A children's book on the California state insect, the dogface butterfly, draws the interest of twins Ford and Wyatt Devine, 2, of Vacaville.The book was displayed at the Vacaville Museum Guild's Children's Party. (Photo by Kathy Keatley Garvey)
Congrats to Our UC Davis Nematology Doctoral Students
Nematodes are where it's at! Two UC Davis nematology doctoral students were invited to...
Doctoral candidate Alison Blundell delivering her award-winning presentation in the 12-minute student competition at the international Society of Nematologists. She won second place. (Photo by Veronica Casey)
Doctoral student Veronica Casey of the Siddique lab delivering an invited presentation on “Pathogenic Hitchhikers: Investigating the Synergy of Bacteria and Nematodes on Plant Health.”