PnB-Th12 - Teaching Data Visualization in R with Generative AI 


By Alana Unfried (California State University Monterey Bay) 


Information

Given the ability of generative AI to write code, it is more and more pressing that faculty explore how to ethically integrate the use of AI for programming into the statistics/data science classroom. In this talk, I discuss my experience teaching a Data Visualization course in which I intentionally incorporated the use of AI for writing R code. I will discuss 1) how I introduced generative AI and the ethical implications of its use, 2) how I scaffolded the use of AI throughout the semester (including clear guidance on how / when AI use was allowed), 3) activities I created to help students assess if AI-generated code was accurate, and 4) what AI tools I taught students along the way (ChatGPT projects, rtutor.ai, GitHub Copilot integrated into RStudio, and Shiny Assistant). I will also discuss the results from a pre/post survey I gave around students’ attitudes toward the use of AI, and their perceived AI competencies. This Data Visualization course was taught in Fall 2025 at a regional public university. There were around 50 students across two sections. Most students were statistics/data science minors or majors; however, the course counts towards an upper-division general education requirement, so it also drew students from outside of statistics/data science. The only prerequisite was an introductory statistics course; no prior R knowledge was assumed.


Recording

Unfried eCOTS - Data Viz in R with AI.pdf

register