Resources
Oct 29, 2025 |
46 min
|
12.5k views
|

AI-Powered Data Science in Positron

We're so excited to introduce Positron, a free, next-generation data science IDE that makes it easy to work in both R and Python. Positron builds on our years of experience developing RStudio and is a fork of VS Code, designed specifically for data work. This means you get a modern coding interface with features tailored for data science, like a built-in data explorer, AI assistance, interpreter management, and more.

This is our 2nd event in our Positron series and focused on AI-Powered Data Science.

Here at Posit, we strive to create products where AI works with you, not against you. In efforts to continue this mission, we are excited to introduce agentic AI capabilities in Positron, our new, free code editor for R and Python, that are designed from the ground up to follow these principles. Positron’s AI capabilities automate the tedious parts of the data science workflow, but always keep you, the expert, in control.

00:00 Introduction
00:32 What is Positron? (The Next-Gen Data Science IDE)
03:43 Introducing Positron Assistant
05:10 Bring your own LLM
05:47 Your environment as context
07:19 Inline code suggestions
07:58 Introducing Databot
08:22 The WEAR loop
10:15 Demo time
10:56 Opening Positron Pro in Posit Team
14:29 Opening a new folder in Positron
15:22 Cloning a repo from GitHub
17:24 Positron icons
19:15 Positron search bar and command palette
20:18 Changing interpreters and opening a Quarto document
21:30 Running code and populating the Variables Pane
22:41 Using the Data Explorer
25:28 Creating a plot and debugging with Positron Assistant
30:46 Editing code using inline code suggestions
34:42 Sharing a Quarto document
36:12 Opening Databot
37:02 Exploring data with Databot
43:37 Creating a report using Databot findings
45:12 Wrap up

Additional resources:
✨ GitHub Repo for this Example: https://github.com/posit-dev/positron-ai-workshop
✨ Getting Started with Positron: Quick Tour: https://posit.co/resources/videos/get-started-with-positron-a-quick-tour-and-community-qa/
✨ Introducing Databot (Blog Post): https://posit.co/blog/introducing-databot/
✨ Posit AI Newsletter: https://posit.co/blog/2025-09-26-ai-newsletter/
✨ Positron Assistant: https://positron.posit.co/assistant.html

image: thumbnail.jpg

Transcript#

This transcript was generated automatically and may contain errors.

Hi everybody, my name is Ryan Johnson and I'm a Data Science Advisor here at Posit and I'm really excited to be back for another Positeam workflow demo where I'll be discussing Positron, Posit's newest IDE.

Now in a second we're going to jump into a few slides and talk about Positron but then we're going to spend the remainder of today inside of Positron doing some data science that's powered by AI. So without further ado let's go ahead and jump into it and get started.

What is Positron?

All right so let's first talk about what is Positron. For this demo we're going to define Positron as an AI-ready multilingual IDE for data scientists but of course it can do a whole lot more.

Now if you've never heard of Positron before maybe you've heard of RStudio. RStudio is an IDE that we developed at Posit probably 15 years ago at this point. It's extremely stable, it's beloved by our users and it really is optimized for data science because as you're working with data you're creating variables which you can actually interact with in the variables pane and maybe you're creating plots or tables which you can also interact with and see directly inside of the IDE itself.

Now there's also another popular IDE it's called VS Code and while you can't do data science in VS Code this tends to be an IDE that's extremely popular amongst software developers because it is multilingual so you can use R, Python, Julia, HTML, JavaScript. It's extremely customizable and in newer versions of VS Code it actually comes AI-equipped with things like GitHub Copilot.

So when designing Positron we really wanted to take the best of both worlds. So we wanted to take the features that make RStudio optimize for data science and bring that into Positron and then also bring in some of the cool features of VS Code to create this perfect data science focused IDE.

Positron's interface overview

Now again if you've never seen Positron before this is what it looks like in all of its glory. And you'll first notice that there's a lot of windows and buttons to click but we can actually just break down Positron into four components.

Over here on the left hand side we're going to call this like your manage area where you can manage things like what files are in your project. You can manage things like version control, your extensions which we'll talk about in a little bit. That's all done over here on the left hand side.

Now as you begin writing code whether it be an R script, a Python script, a Shiny application, a Quarto document, that's all going to be done right here in the top middle of your screen. And typically when you open up Positron for the first time you'll see this welcome page with some helpful links and buttons.

Now as you go to run code whether it be R or Python code because Positron supports both, that's done down here at the very bottom where you get an interactive console. And again you can switch over to a Python console very easily. Now as you begin working with data again you're probably going to be creating things like variables or subsets of your data and they're going to be stored in memory. So any variables that you're creating you can actually see them over here in the top right hand corner and then any plots or tables you're creating it will show up down here. There's also a viewer tab up here so if you're running things like a Shiny application or you render an HTML document, a Quarto document, that's all going to be done over here on the right hand side which really helps you understand your data.

Positron Assistant

So that's kind of the Positron 101, but for today's demo we're going to be focusing on some of the AI features that we've either built into Positron or as built as an extension of Positron. And the first one that we're going to get practice leveraging today is something called Positron Assistant.

So Positron Assistant again is an AI client that is directly built into Positron. In fact on the left hand side of Positron you'll probably see this little robot face, that is how you can access Positron Assistant.

And Positron Assistant can do a lot of great things and you can also interact with it in a lot of different ways. So when you click this little robot face it'll open this sidebar and you'll get a text box down there is another way where you can interact with Positron Assistant known as inline edits and we'll talk about that here in a second.

But something that's really important about Positron Assistant as well as a lot of the other AI tools that we're building for Positron is that this tool is model agnostic and it follows our bring your own LLM or bring your own model philosophy.

Now currently with Positron Assistant as of today it's still in preview support. We do only support Anthropic but we are actively testing out other models with the hopes that whatever model your company or group is approved to use that you can bring that model to the table.

And so what does that look like? So here's a window that you can open up in Positron where you can select your various model. Again, currently we only support Anthropic, but here you can see some other models that we're testing out including AWS Bedrock, Gemini, GitHub Copilot is supported currently for code completion, but we will hopefully support it as a full-fledged LLM in the near future and others as well. And setting up these models is super simple. Like, for example, with Anthropic, you can just apply an API key. It tends to work pretty seamlessly.

Now the other important thing to note about Positron Assistant is that it is designed for data science. And when I say that, I mean that it's designed to have context awareness. So when you start interacting with it, it knows about your data science environment. So what do I mean by that?

So here I have another picture of Positron and here's Positron Assistant over here on the left-hand side and I purposely gave it these really creepy eyeballs because as you interact with Positron Assistant and you ask it questions down here, it can actually see your environment. Things like what scripts do you have open? What variables do you have stored in memory? What plots or tables have you created? What code have you run and what output from that code was run? It can see that.

That way, when you ask it questions, typically the suggestions that Positron Assistant just tend to work immediately. Another way to think about this is if maybe you're using like ChatGPT or Gemini to help with some code assistance, you're using like the web interface. If you have a code question, typically you have to copy and paste all of your code, copy and paste the error message, potentially copy and paste a subset of your data in order to give that model enough context to provide hopefully a useful suggestion. But with Positron Assistant, you don't have to do that.

You can give it a simple request and it will understand your context and provide suggestions that, again, just tend to work.

You can give it a simple request and it will understand your context and provide suggestions that, again, just tend to work.

Now, that text box down here in the sidebar is one way to leverage Positron Assistant. But there's another one known as inline code suggestions, which we'll do in today's demo as well. But the idea here is that maybe you have a script open. It could be a Quarto document like in this screenshot. It could be an R script, a Python script, a Shiny app. And you can place your cursor somewhere in this document and hit Control-I if you're in a Windows machine or Command-I if you're on a Mac machine. And it opens up this little text box. And this is Positron Assistant. You can ask it questions and it will provide suggestions inline with the rest of your code.

DataBot

Now, Positron Assistant is one tool that we're going to focus in on today. But the other one is something called DataBot. Now, DataBot is actually available as an extension. So, it's not built into Positron like Positron Assistant. It's available as an extension. And in a second, we'll kind of show you where that lives and how you can install extensions inside of Positron.

But to talk a little bit about DataBot, I first want to help clarify, like, when to use DataBot and when to use Positron Assistant. DataBot is specifically designed to do exploratory data analysis and to do it really fast. And actually, it's surprisingly a lot of fun.

So, imagine you get some brand new data thrown at you and you want to analyze it. That is a really good use case for DataBot. Now, for Positron Assistant, this can certainly do a lot of things that DataBot can do. But it tends to be more task-focused. So, maybe you have an error that you need to debug or you have a plot you want to approve or you want to create, like, an individual table. Those are really great tasks for Positron Assistant.

Now, the way that DataBot works to do this exploratory data analysis is it implements what we're calling this where loop. So, you have some data and you want to learn more about that data. So, you ask DataBot to start analyzing it. And what it's going to do is first write some R or Python code. It will execute that code immediately, analyze the results, regroup with suggestions, and then just wait for your next instructions. And this will just go around and around and around in circles until you're happy with the results and you've gleaned all the information you need from that data.

Now, it's also important to note that this where loop and also the way that Positron Assistant works is that it's all code-based. All the suggestions you're getting from DataBot are just code suggestions. And we think that code is the most auditable way to explore data with AI. Because you're not just asking it a question and then sending it off into some black box and getting a magical response. You are actually getting code. You can see that code. You can approve that code before it actually gets run.

And we think that code is the most auditable way to explore data with AI.

Demo: getting started in Positron

All right. So, with that, we're going to jump into Positron. And we're going to demo all these really cool features we just talked about.

So, the first thing we'll do is we're going to give you all just a little Positron 101, get you comfortable with the user interface. We're then going to step into doing some AI-powered data science. And we're going to begin with Positron Assistant. And we're going to use Positron Assistant to help us debug an error. We're then going to improve a GG plot. And then we'll even create a GT table from scratch. And then we're going to wrap up today by doing some fast exploratory data analysis with DataBot.

All right. So, I'm going to go ahead and switch over to my demo environment for today. And I'm going to be using an instance of Positeam. And just for awareness, Positeam is our bundled offering of our three professional data science tools. We have Posit Workbench for doing your development. We have Posit Connect for sharing all the insights that you're creating with others. And then we have Posit Package Manager for organizing, centralizing, and delivering all those amazing open-source R and Python packages.

Now, for today's session, we're pretty much going to be staying within Posit Workbench. So, I'll go ahead and click on this tile. And here is the new Posit Workbench homepage. So, if anyone here has used Posit Workbench in the past, you may notice that the landing page for Posit Workbench looks a little bit different. So, in our most recent release back in September of 2025, we've modernized and just, I think, makes it a lot better looking, this landing page for Posit Workbench.

And you can see all these various rows on this landing page. And these are all various projects that I've been working within and various directories. But for today's session, we're going to go ahead and kick on a brand new session. So, I'm going to click New Session at the top of my screen. And we get this pop-up window.

And at the very top of this pop-up window, here are currently the five IDEs that we support within Posit Workbench. So, we have Jupyter Notebooks and JupyterLab, which tend to be more popular with our Python users, but you can certainly use R in it as well. We have RStudio, which has always been a member of Posit Workbench, great for R development. We have VS Code, a great all-purpose editor. And then importantly, you'll see right here in the middle, the newest member of the IDE family, Positron. And that's what we're going to be using today.

So, we can go ahead and change the name of the session if we want to, but I'll just leave it as Positron Pro Session 2. I do want to talk a little bit about session credentials here, because I think it's a really cool feature that's unique to Posit Workbench. If your data or assets live in something like AWS in this example, or potentially it lives in Databricks or Snowflake, you'll know that when you go to access that data, you typically have to create like an access token and then apply it to your various IDE environments. And it can be a bit of a hassle.

Here with session credentials, you can click on any of the tiles, sign in, and then your credentials will be applied to your various sessions automatically. So, it can really help save some time and some headaches in making sure that you can connect to your data and assets in Posit Workbench. Here we've created a custom Docker image to deploy these various sessions within.

And then lastly, you'll see cluster options. So, this demo environment is actually running in a compute cluster. And the advantage here is that I can actually set my resource profile. So, if I want to have just the default settings with one CPU, about four gigs of memory, that's probably fine for today. But maybe I want to do a medium setup with a little bit more CPU, a little bit more memory. And these settings are actually pretty easy to set up. So, I'll go ahead and select medium, and we'll go ahead and launch the session.

All right, you'll see at the very top, the Positron Pro session is now launching. We'll give it a few seconds. Now it's dropping us right inside of Positron.

All right, so, here we go. This is Positron Pro. So, here we go. This is Positron. I'll just go ahead. I'm going to set up the stacked workflow. So, if you see in the top right corner, these various icons, I like to use this stacked layout, because it kind of emulates what you'll see inside of RStudio.

Okay, so, when you open up Positron for the very first time, this is typically what you'll see. You'll have your welcome page here. You have the sidebar off to the left-hand side. And the first thing that I want you to notice is that Positron really, really, really wants you to open up a folder.

All right, you can see in the welcome screen, has open folder, new folder, new from Git. You can open a folder here, clone a repository, or you can click the dropdown, open a folder here. And that's typically how you should operate with your various data science projects, is that they should be inside of a folder.

So, we're actually going to pull in a project from a Git repository. So, I'm actually going to select this new from Git icon from within this welcome page. And we'll get this window where we need to supply a URL for our Git repository.

So, here's a project on GitHub, a repository that we've created for some workshops. And I'm going to go ahead and just grab this URL, come on back to Positron and paste it in. And then we'll click OK.

Now, anytime you create a new project inside of Positron, it always opens up a new Positron session. So, we'll give it a few seconds here to boot up.

All right, here we go. And we'll know we're in the right place because we see now over here on the left-hand side, this icon in the very top left, this like page icon. This is your file explorer where you can see what files or datasets are inside of your current project. So, these are all the files that I just pulled into my Git repository.

And if we just quickly run through them, you'll see there's some CSV files and they correspond to various years from 2015 to 2019. We're going to be exploring this data here in a second. You'll also notice that there's some QMD files, which again stands for Quarto. And we'll be talking through some of these as well, including the Python one and this R one. There's also a README file down here and an RNVLOC file, which is associated with the RM package that we created here at Posit.

Now, we'll also know we're in the right place if you look in the top right corner, you'll see the Positron AI Workshop one. That's the directory that I'm currently working within.

All right, so to get started here, let me just navigate you from the left-hand side, this ribbon over here. I mentioned in the slides, Positron Assistant. That's the little robot face down here. We're in a very short amount of time. We're going to actually open up Positron Assistant and play around with it. But I want to get you kind of familiar with the rest of Positron.

So kind of moving through some of these icons, you know, we would highly encourage you to play around with them, see what these various icons do. But I just want to point out a few of them. The first one here is source control, version control. Now, I've been an RStudio user for like over a decade and the get features inside of RStudio are good. But I would say that the get features inside of Positron just take it to a whole new level. All right, you can see here this repository, all the various commits that we've added. We have the ability to access a lot more get commands directly within Positron. And if needed to, you always have access to the terminal if you need to access get more natively.

And then the other icon I want to point out for right now is going to be these squares. These are known as your extensions. Now, for anyone here who has never used VS Code before, this may be a bit of a foreign concept, but extensions are a way for you to install these extensions that help kind of modify and fine tune your developer experience. Now, by clicking on this extensions icon, it actually shows you all the ones that are currently installed, including this, you know, our language support formatter called air, which is really cool. But importantly, the second one down here is data bot. So data bot, that extension I talked about to do fast exploratory data analysis. And we're actually going to talk about this one here in a little bit.

And you'll see it as a few other ones as well that we pre-installed into this demo environment. But if you wanted to install another one, you can search the marketplace up here and search for, you know, whatever extension you want. And what's really cool about Positron is that it's built on the same open source framework as VS Code. So for the most part, any extension you use in VS Code will also work in Positron.

Now, the only other thing I'll mention for right now to get you familiar with Positron is this search bar at the very top. Again, if you're a VS Code user, this should look familiar. But if you're an RStudio user, this may be a new feature. And it's a really important one in Positron because it can do a variety of things. But what I want to point out for right now is something known as your command palette. And there's a few ways you can access the command palette. You could click this search bar and select show and run commands. It essentially just puts a little greater than symbol there. That's one way. Or it is a keyboard shortcut. So I'm on a Mac machine, it's command shift P. I think it'd be control shift P if you're on a Windows machine. And then here's all the various commands. And you can see some of them are associated with extensions like air. There's so many to choose from. It could certainly be a little bit overwhelming. But just know that this actually has really nice like fuzzy searching. So for example, if I wanted to open up a file, if I didn't know the actual command, I could just say like file open, something like that. And there you go, open file.

Opening a Quarto document and interpreter switching

All right. So in order to get kind of familiar with the rest of Positron, we're actually going to first open up a Quarto document. Now, before I do that, I want you to take your attention up here to the top right. You'll see currently in this Positron session, I'm running R version 4.4.0. Now I mentioned before that Positron right out of the box is designed to work equally well with both R and Python. So I could easily click this button, select a new interpreter, and open up a Python session. And that would work perfectly fine.

But what I could also do is you'll see there's a Quarto document called python.qmd. So let me go ahead and click on this file. Again, it's going to open up here in the top middle. And you can always click and drag the dividers of Positron to give you some more space. Now, if you're not familiar with Quarto, in a lot of ways, they're similar to like R Markdown and also Jupyter Notebooks. It's a way for you to combine both code. You can see these like gray code cells with some text here, which will ultimately get rendered to HTML.

All right. Now, by opening up this Python Quarto document, you'll notice something kind of cool. That Positron automatically detected that this Quarto document includes Python code. So without me doing anything else, Positron automatically opened up a Python kernel for me. So now you can see I currently have Python version 3.12.3 running. And I could even switch back to my R version. This is an insanely powerful feature of Positron where you can have both R and Python running at the same time. You can even have multiple R versions and multiple Python versions all running at the exact same time. And they all have their unique environment.

This is an insanely powerful feature of Positron where you can have both R and Python running at the same time. You can even have multiple R versions and multiple Python versions all running at the exact same time. And they all have their unique environment.

Exploring the interactive data viewer

Now, if I was to run a cell here within Python, so I can click run cell here above line eight, and it's going to do some things like import some packages, but it's also going to create a variable called happiness. And what this line of Python here on line 16 does is it reads in a CSV file that's in my project. It's this file over here, 2019. And so by doing so, you'll notice over here again in our sessions pane, we now have some variables created. And this is a powerful feature of Positron. You can see the variables you've created and you can actually interact with them.

So here I've created this happiness data. And if I click on this grid icon, it's going to open up our interactive data viewer inside of Positron. So let me click on this. All right, you'll see that it opens up here in the middle, but I'm actually going to hide some of my windows here to give us some more space. And I think this is an important thing as you get more comfortable using Positron to be aware of windows, sidebars, and you can always hide them and pop them back in. A lot of that you can do up here in the top right hand corner.

So right now I don't need my files pane over here on the left hand side. So I'll hide that. I'm going to go ahead and hide this sidebar off to the right, which I can click this right one here. And I'll go ahead and hide my console, which is the middle button. And now we can see this really cool data viewer in all of its glory.

So this is looking at, again, at this happiness variable data set that we created. And if you see here, we get a nice scrollable view. This is in a lot of ways similar to the data viewer inside of RStudio, but it's a little bit more powerful. And we can also see over here on the left hand side, all the various columns and information about those various columns, like if they're numeric or a character, and you can click on them and get some more statistics about each individual column.

Now this data set, and I'll just point you to two columns here, you'll see it's looking at various countries, and then they're being assigned like a happiness score, like how happy are these various countries. It also includes some other information like GDP, social support, and it gives various scores there as well.

So with this data viewer, what you can actually do is you can interact with a column by clicking these three dots. You can sort them. You can also add a filter. So for example, if I wanted to filter all the various rows here where the score is, let's say greater than seven. I've now done that. And then maybe I also want to filter my countries. Or maybe I'll filter the rank actually. I'll say add a filter and I want to extract just the top 10. So I can say is between one and 10. And I'll apply that filter. There we go. There's our top 10 happiest countries in 2019.

Now, a really cool feature that's currently available in Python and coming very soon to R is if you look up here at the very top, you'll see convert to code. So as you do like sorting and filtering and other transformations to your data set here in the data viewer, if you want to make that repeatable and reproducible, you can simply click this button and it will actually spit out, in this case, some pandas code so you can replicate what you've done to that data. And I think that's a really cool feature that you only find in Positron.

Using Positron Assistant to debug errors

All right. So let me go ahead back in here. And what we're going to do next is I'm going to open up another Quarto document. So we've been dealing with Python so far. I'm going to close out of this one. We're going to open up this R.qmd file, which in a lot of ways is similar to that same document. All right. If I run that first code cell again, it will create another happiness data variable here. It automatically switches me back over to R, which I think is super cool.

And we're going to scroll down a little bit more and we're going to create a plot. So here in this Quarto document, starting on line 25, we're creating a ggplot, looking at this happiness data, and we're going to go ahead and run it. Uh-oh, we got an error message. So if you look down here in the console, it looks like we got an error message saying happiness data not found.

Okay. So this is like, you know, somewhat intuitive error message. But for those that are developers, you'll know that sometimes error messages aren't typically helpful. So in order to debug this issue, we're actually going to use the help of Positron Assistant. So again, Positron Assistant is this robot face over here. So let me go ahead and click on it. And I'll expand out the window, give a little bit more space. And here you can see Positron Assistant. It's actually already been configured with AWS Bedrock. But if you needed to set it up for the first time or change your models, you can select this dropdown and select add model provider.

So here in this demo environment, you can see again, we have some models that we're testing out. Anthropic being the main one. Here internally, we also use AWS Bedrock. But this is hopefully again, in the future, we will support additional models for you to test out here.

Okay. So we have this error message and we don't really know how to fix it just yet. And so what we're going to do is we're going to give a message down here to Positron Assistant. And what I don't have to do is I don't have to copy in the code. I don't need to copy the error message. I can just come down here and say, help me fix the error. Something like that. And I know it's a little hard to see, but you can also see down here that we've added some context to this. And a lot of times it just picks it up already. So you can see it's already knows I'm using R. And it's already is using this R.QMD file. It's currently active by active editor here. And if you wanted to add additional context, maybe some other files or data sets in your directory, you can do that as well.

But again, Positron Assistant out of the box will have more context. Like it'll be able to see my console and actually interpret the error message. So with that, let's go ahead and run it and see what we get.

All right. You can see as it's finishing here, it's used one reference. That's my Quarto QMD file. And let's read the error message. So it says the error occurs because the code references happiness data. So that's right. On line 25, you can see happiness data, but the data frame is named happiness. Okay. So that's where I made a mistake. You can see my variable is actually called happiness, but my code is referencing happiness data. And then it actually gives us a little code suggestion, which is great. Now, if we want to try running this code and see if it works, you can click the little play button right above it. So I'll do that.

Uh-oh. It looks like we got another error message. Object gray 70 not found. Yeah. It looks like we're trying to make a color gray 70, but like, why is that not working? Gray 70 is a valid color. Let's go ahead and ask Positron Assistant. And I'll just say, what's wrong now? Question mark. Again, I don't need to provide much other context.

All right. The color gray 70 needs quotes since it's a string. So there we go. I forgot my quotes. And now it provides another code of suggestion. I can try running it. And there we go. We actually can see our plot directly here within Positron. Again, another really cool feature of Positron. And it looks like we have GDP on the X axis and happiness on the Y axis. And all these individual circles represent countries in 2019.

All right. So this seems to be working, which is great. So now it's time to actually bring that code into our active editor. We want to replace this erroneous code with the new code. So by hovering my mouse over this code chunk, I can select the second button called apply an editor. And I'll select the active R.QMD file. And what it's going to do is Positron Assistant finds inside of this Quarto document where this code needs to be put in. And will actually give us a diff.

And here you can see it. So a diff essentially gives you control as a data scientist. So you always remain in control. The opportunity to either reject or accept a change suggested by Positron assistant.

Anything in red is being deleted. Anything in green will be new lines of code. So I know this is what I want. So we could select this individual one or we can just keep all the suggestions. And I'll select that.

And there we go. And if I rerun the code cell, you can see it just generated the same plot again. But a really cool feature of Positron is you see all the various plots you've been creating. You kind of get this really nice timeline you can go back to.

All right. That's really cool. So we have this cool plot. I would say it's cool. But it could probably look a little bit better. All right. It's kind of bland with like these gray dots. We don't know what these various dots are.

So we're going to use Positron assistant specifically the inline editor. Or inline suggester to make some improvements to this up.

Using the inline editor

So I'm going to go ahead and place my cursor just somewhere inside of this plot here. And I'm going to hit command I. That brings up this Positron assistant prompt. And I'm going to suggest something. Again, you can kind of do whatever you'd like here. But maybe I want to label all of the outliers and I plot.

And let's see what happens. I'll hit enter. It's going to think for a little bit and it should provide code suggestions. All right. And you can see here, it's now actively applying those edits directly to my code.

All right. Now, before we, you know, either keep or undo these suggestions, we can rerun the code cell here at the in the background. And see what we get.

All right. Well, it's OK. It looks like we got one outlier. So it's a little bit hard to see. Let me pop out the plot here into a different view. And let's see what we get. All right. So we've got one outlier. Pop out the plot here into a separate pane. There's Botswana all the way down there. That appears to be the main outlier here.

So a pretty small change here. But again, we didn't have to write any code and it automatically labeled this outlier for us, which again is, I think, pretty cool. So we can keep that.

But maybe I'll just go ahead and try to make it a little bit more fun. I'll open up the editor again and I'll say label where the USA is on my plot. And I'll say make it red just to give it a different color.

You also see I made a typo there. Or maybe I didn't. But if you have typos, it's totally fine.

All right. So there we go. It's giving us some more suggestions. Let's see if I can run it here. Hey, it's again, not super great here. But you can see United States appears to be up here at the very top. So it's certainly an improvement. And we can just keep iterating on this over and over until you get that plot that you just love.

And again, you stay in control. And that way the Positron Assistant is designed to work is that it's mostly going to be a lot of back and forth between you and your Positron Assistant.

And again, you stay in control. And that way the Positron Assistant is designed to work is that it's mostly going to be a lot of back and forth between you and your Positron Assistant.

Creating a GT table with Positron Assistant

Now to give you one more example of Positron Assistant is that I'm actually going to come down here to my Quarto document. And I'm going to insert another code cell by clicking this button here at the top. All right. So now we get this blank code cell. And I'm going to ask it to create something from scratch. So I'll do Command-I. And I'm going to tell it to create a colorful GT table.

And if you're not familiar with GT, it's this really awesome package we developed internally here at Posit for creating publication quality tables. So I'll say create a colorful GT table of the top 10 happiest countries. Let's see what it does.

All right. It's starting to generate. It goes pretty quick. All right. We have a suggestion. I'm just going to go ahead and keep it. Let's see what we get.

All right. So that's not too bad. And it's also worth noting that GT usually by default would create like essentially HTML tables, which is why it actually switched over to our viewer because we're now viewing essentially like an HTML widget. And here we can see the top 10 happiest countries and their associated happiness score, which is really great.

So now we have a Quarto document that does some data transformation. It creates this plot. And then we have a really nice table. Maybe we want to send this report to somebody else. So what we can do is we can click the preview button, which will actually render it to an HTML document. So let's go ahead and do that.

You'll see Positron switches over to our terminal, run some Quarto commands in the background. We should be able to view our Quarto document over here. There it is. This is our finish. I mean, we can certainly try to improve it a little bit, but this looks pretty good right out of the box. We have a nice table here. Here's some text. Here's that plot that we created, which we could probably use some improvements. But then we also get a really nice table down here at the very bottom.

Now, if we wanted to, we could take this document and we could publish it to PositConnect. And then when it's hosted on Connect, we could share it just like you would share any other website. You can do that by clicking this little Posit publisher icon. That's one way to do that. You'll see there's also an icon over here.

Now, for today's demo, we're not actually going to show that, but that's how you can actually use this really cool extension that we built to publish things to PositConnect with the click of a button. But if we wanted to, we could also, again, here you can see all the changes that we've been making are tracked here in version control. We could commit them and push them up to our GitHub repository and share it with another colleague if we wanted to.

Introducing DataBot

Okay, so that is Positron Assistant. So now we're going to switch gears over to DataBot. Now, in order to open DataBot, we actually need to leverage the command palette. To do that, again, you can click up here at the top and do show and run commands, but I like to kind of enforce the keyboard shortcut of Command-Shift-P. And to open DataBot, we're going to select Open DataBot. That's the command.

All right, here is DataBot. And it's going to give us a little welcome screen here. And again, just to emphasize, DataBot is available as an extension. So I click on the extensions here and I delete Python. You'll see DataBot here at the very top.

All right, so let me go ahead and clear or kind of hide some of my windows so we can have DataBot showing up. And just DataBot. All right, so here is DataBot and it is now ready to start exploring our data.

Now, let me actually pop open our file explorer one more time, because up to now, we've essentially just focused in on this 2019 CSV file. But you'll notice there's actually happiness data for various years, from 2015 to 2019. And I really haven't explored any of this data, nor do I know how to combine them all into one single data set. And that's where DataBot can really shine.

So I'm going to go ahead and come down here to the very bottom. And I'm going to ask DataBot a question. I'm going to say, I have CSV files in my project for various years that correspond to happiness of countries. Again, you don't have to worry about typos. Can you combine them and explore the data?

Again, this whole idea behind DataBot is that it's designed for exploratory data analysis. So let me go ahead and run this. I'll submit this to DataBot. It's also worth noting I am using R here, but if you wanted to switch over to Python, you could do that. DataBot works perfectly well with R and Python. So let me go ahead and hit enter.

DataBot's going to do some thinking here. All right, it's first asking, you know, what CSV files are available in my project. You can see it found them from 2015 to 2019. And then we get this yellow message. And I think this is a really cool feature of DataBot.

The way that it works is it tends to be a little bit autonomous where it will just write R and Python code on your behalf and execute that code. And we fully realized that that for some data science teams, that may not be OK. So if you ever need to decline certain code from being running or you just want to back out of DataBot, you can decline here. If you want to essentially audit every single piece of code suggestion provided by DataBot, you can allow just once. Or you can allow always if you trust DataBot. And for today's demo, that's what we're going to do. So let's go ahead and I'll say allow always. And we'll let DataBot work its magic.

All right, you can see it's running some R code. It interprets it. And then it gives you some prompts here. And it'll move pretty quick here. So I'll try to keep up. All right, so now it's combining the CSV files.

And what's cool, if you look down here in the console, we got an error message. And it's saying there's some inconsistencies in the data format across years. That can be a very challenging task for a data scientist if you're trying to merge data, but the data set's not consistent across the various column names, for example.

All right, so it's trying to run some more code. It potentially got another error. DataBot's very nice. It apologizes. And it's going to keep trying to find some additional ways around. It's still going. Again, it's a lot of trial and error, but DataBot's really good at this stuff. So we'll just give it a little bit more time.

All right, it looks like it now combined the data, which is great. And it looks like it's going to create some visualizations for us to explore trends and patterns.

All right, let's take a look at this first one, see if it's helpful. All right, so it's trying to find some additional ways around. And it's going to keep trying to find some that are helpful. All right, so it looks like it pulled out a few countries, maybe like it was like the top 10 happiest countries and their trends from 2018, 2019.

And then we can scroll down a little bit more. And this looks like happiness on the Y-axis and GDP on the X-axis. Looking at this at the past two years here, potentially more of the NA.

All right, now it's created a bunch of visualizations. It ran some code. And now it's giving us a little summary of what it's found. All right, so based on the analysis, here's some key findings. Top 10 countries in 2019. So go Finland. GDP and happiness relationships. It does appear to be a strong correlation between GDP and happiness. Maybe some exceptions, trends over time, contributing factors. So yeah, it gives you a lot of insights into your data.

But then another cool thing is that DataBot will typically provide suggestions of what maybe you want to do next. Or you can come in here the text box and ask it anything you want.

Exploring GDP and happiness with DataBot

So what I want to do here, looking at some of these suggestions. Well, let's actually look at this plot. So if I open up my plot pane down here, you'll see there's all these various countries. Something I think is kind of interesting is that it does appear there's some countries that have a really high GDP, but not necessarily the highest happiness score. So what's going on maybe with these countries down here? We can ask it that question.

So I'll say, what's going on with the countries that have high GDP, but less than expected happiness score? All right, let's see what it finds.

All right, still thinking. Again, it ran some more R code. And here we go. I picked out some of those countries here that have, again, lower happiness score, but fairly high GDP. All right, so that's a really nice plot. I like that one a lot.

Now it's going to analyze those outliers. And now it's providing a summary here. All right, so most are wealthy Asian or Middle Eastern nations.

Yeah, so it's interesting here that it's talking about, like it starts getting to like personal freedom, social support systems, low corruption levels. I think that's really cool because nowhere in this data does it talk about like, you know, certain aspects because the model that we're using in this case is Anthropic. It is trained on the internet. So it can help kind of pull out information that's maybe not in your data that can be really insightful for exploring your data.

I think that's really cool because nowhere in this data does it talk about like, you know, certain aspects because the model that we're using in this case is Anthropic. It is trained on the internet. So it can help kind of pull out information that's maybe not in your data that can be really insightful for exploring your data.

So I'm looking at some of these other suggestions, but maybe for the sake of time, we'll just kind of wrap up our exploratory data analysis here. And I just want to talk through one more thing.

You can go through, you know, hours and hours of playing around with DataBot. But ultimately, you know, the idea here is that you get satisfied with the findings. You now know everything you need to know about this data, and you probably want to summarize what you found. Now, scrolling through this entire chat can be a little bit noisy. So something we added to DataBot is these slash commands.

Generating a report with DataBot

So if we do a forward slash, and in this case, I'll do report, which will generate a Quarto document. We could do notebook if we wanted to, which will generate a Jupyter notebook, but I'll select report. And that's all you need to do. I can give it more context, like how big of a report you want it to make. But I'll just say forward slash report and hit enter.

All right. So now it's actually giving us an outline for our summary. It has like an introduction, happiness patterns, GDP conclusions. And then it asked me, would you like to proceed by creating the report? And I'll just say proceed with creating the report as outlined.

Now, I think this part's really cool. All right. So it's going to create this Quarto document. It opened it up for us, and you can see it is now being created live right in front of us. All right. So this will take a little bit of time, but this document will summarize all the findings that we just did with DataBot. And then once it's done, we could preview it. We could publish it, deposit, connect, share with others, and a really awesome feature.

All right. But just for the sake of time, let me come back to the slides here and just kind of wrap up here.

So hopefully you all can see the power of not just Positron, but all these great AI tools inside of it. Now, Positron, again, being optimized for data science, and a lot of these AI tools are also optimized for data science, which can be an extremely helpful feature and really just superpower your workflows.

Positron, again, is multilingual. You can use R, Python. And the idea here is that as additional languages come to the forefront of data science that we will be able to easily integrate them with Positron as well.

We do want to emphasize that the way you interact with these AI tools in Positron is a bring-your-own-model philosophy. So we're not going to force you to use, you know, Anthropic or Gemini or something like that. You know, as we continue to provide support for additional models, the idea is that you can use whatever models approved within your company and bring it to the table.

bring-your-own-model philosophy. So we're not going to force you to use, you know, Anthropic or Gemini or something like that. the idea is that you can use whatever models approved within your company and bring it to the table.

And with all these great AI features, it just makes working with projects easier because you can use Positron Assistant to help create files, modify them. And then hopefully you saw with DataBot how fast you can do EDA. Something that maybe would take hours, potentially days to do as a data scientist. We just did it in a couple of minutes.

All right. So with that, that'll wrap up today's demo. And we will see you in the live Q&A. Thanks, everybody.