Let’s make something interactive! Shiny is an R/python package that makes it easy to build interactive web applications (apps) straight from R/Python. This lesson will get you started building Shiny apps right away. You will learn how to:
You will be creating a shiny app, so there is no need for a notebook this week.
Start off by installing the shiny package:
pip install shiny
Then create a package from the terminal.
shiny create
shiny run --reload --launch-browser app_dir/app.py
function | widget |
---|---|
actionButton | Action Button |
checkboxGroupInput | A group of check boxes |
checkboxInput | A single check box |
dateInput | A calendar to aid date selection |
dateRangeInput | A pair of calendars for selecting a date range |
fileInput | A file upload control wizard |
helpText | Help text that can be added to an input form |
numericInput | A field to enter numbers |
radioButtons | A set of radio buttons |
selectInput | A box with choices to select from |
sliderInput | A slider bar |
submitButton | A submit button |
textInput | A field to enter text |
Output function | Creates |
---|---|
dataTableOutput | DataTable |
htmlOutput | raw HTML |
imageOutput | image |
plotOutput | plot |
ableOutput | table |
textOutput | text |
uiOutput | raw HTML |
verbatimTextOutput | text |
render function | Creates |
---|---|
renderDataTable | DataTable |
renderImage | images (saved as a link to a source file) |
renderPlot | plots |
renderPrint | any printed output |
renderTable | data frame, matrix, other table like structures |
renderText | character strings |
renderUI | a Shiny tag object or HTML |
https://shiny.posit.co/py/docs/overview.html
Back to the homepage