Reactive Web Dashboards with Shiny Transcripts
Chapter: Hello Shiny
Lecture: Running shiny code

Login or purchase this course to watch this video and the rest of the course contents.
0:00 So here I'm just gonna copy this command and go back to my editor and type shine, and just copy it in. And it'll ask me for a destination directory
0:15 and I'll just hit enter to have it go here. And what we have here is we have a nice, we have a little, we have this dashboard
0:23 brought into our environment, has some data, has a requirements file. To sort of view this application,
0:30 we're gonna need to install that requirements file. So I'll do pip install -r dashboard requirements.txt. That'll install everything,
0:41 which is mostly Seaborn and its dependencies. And up here, since we've installed the Shiny extension for VS Code, I can click run Shiny app,
0:52 and it'll run the application in the viewer pane. If I wanna sort of get a bigger picture from this, I can click that little pop-out button
1:01 and I can see the full application. So what you can see here is a kind of pretty standard, nice looking dashboard.
1:08 It's got a little collapsible sidebar. The boxes are responsive. So if I change the size of the window,
1:16 kind of gives you sensible spacing between your cards. And you can also manipulate some of these inputs to get changes in outputs.
1:25 So here, if I wanna just select some species of penguins or filter on mass, Shiny is going to let me do that. And the important thing here about Shiny
1:34 is that whenever you're making a change to one of these inputs, the only things that are changing downstream
1:40 are the things that either directly or indirectly depend upon that input. This is a really nice thing if you're used to working with another,
1:48 with a application framework where, you know, maybe everything reruns or everything is kind of independently powered
1:53 by callbacks, because you can get this sort of like relatively efficient execution of your application without needing to do a ton of work.
2:00 That's kind of like a basic look at what Shiny has to offer. Through the various different templates that give you a bunch of different options,
2:07 a bunch of different ideas. And it's nice to look through these on the website or just copy them down as a starting place for some of your tools.
2:13 So you know that Shiny can do all of these things, even if you don't yet know exactly how.


Talk Python's Mastodon Michael Kennedy's Mastodon