
Shiny Assistant: Prototype and build Shiny applications with the help of AI | Winston Chang | Posit
Have you ever had an idea for a great web application with Shiny but felt something holding you back from getting started? Maybe it’s that you don’t know where to start, or that you don’t know which packages use to build the app, or maybe it’s just that you can’t muster the energy to get started. Sometimes you just need a little help to get unstuck. We’re excited to announce a new addition to the Shiny ecosystem that can help: Shiny Assistant. Try it out here, free: https://gallery.shinyapps.io/assistant/ Get started with Shiny for R and Python: https://shiny.posit.co
image: thumbnail.jpg
Transcript#
This transcript was generated automatically and may contain errors.
Hey everybody, I'm Winston Chang, I work at Posit on the Shiny team, and I'm going to show you something really cool that we've made recently called Shiny Assistant. What Shiny Assistant does is it will help you build Shiny applications and help you get started. Sometimes the hardest part about building a new application is just like getting over the initial hump and just like, how do I get from turning this idea into some sort of working prototype.
I've got Shiny Assistant right here and it's a chat interface to begin with, but I can ask it to do things like I will ask it to build an application. I've been thinking about how much does it cost to buy a home? So I thought it'd be really useful to have a mortgage calculator. If I were to build that myself by hand, that would take a while, but I'm going to use Shiny Assistant to help me get started here. So let's say, build an application which calculates mortgage payments.
That's all I said, just one sentence, build an application which calculates mortgage payments. So it starts up Shiny live here, it's running in the browser, and we have a mortgage payment calculator. So hit the calculate button. So here we go, if the loan amount was $200,000 and the interest rate was 3.5%, the monthly payment would be about $900 and the total payments would be about $300,000.
Building and refining the mortgage calculator
And we can change these amounts, let's say the loan amount was $500,000, the interest rate was 6%, which is closer to reality these days, and it will give me some new numbers here. Now I can put these numbers in the application itself, so as the starting values, because these are more realistic starting values, put them there, hit this rerun app button, this play button, to rerun it, and as you can see, those are now the default starting values. Hit calculate, and there it is.
OK, so that's really useful, but let's say I want to add a few more things to this app. Let's say I want to have a plot of the remaining principal. So I'll just ask it to do that and let it do its thing.
OK, so let's hit the calculate button again, and here we go. So this is the remaining principal for time, it starts at $500,000, and after 360 payments or 30 years, that goes down to zero. That's really helpful, and let's say I want a little bit more detailed information, I can ask it to add an amortization table.
So the amortization table, if you're not familiar, just shows how much interest in principal is being paid and is remaining at each payment.
All right, hit calculate again, and I'll just show more entries here. So at the beginning, with this payment, about $3,000, most of it's going to interest, and just a little bit of it is going to principal, and then this is the remaining balance on the loan. And over time, it's going to be 360 payments total, eventually that's going to go all the way down to zero.
There you are, this is an app for calculating mortgage payments, and while you could do this by hand, you can see that building something like this with Shiny Assistant is way, way faster.
you can see that building something like this with Shiny Assistant is way, way faster.
Now, of course, if you're really going to build a real app, you want to check the math, the math in these calculations here to make sure that everything is right, because it won't always get all the details right. It's not perfect, it might have some bugs in the code, but it will help you get started on applications like this way, way faster than you might otherwise be able to do.
If you want to give Shiny Assistant a try, check out the link that's in the description. Right now, it's sort of experimental, so you'll be put on a waiting list, but we will try to get you off the waiting list as soon as possible. Yeah, and have fun with this, you know, can't wait to see what kind of cool ideas people have and see you turn those things, those ideas into reality.

