Skip to content

Commit

Permalink
Add edited slides.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dewi-Amaliah committed May 17, 2024
1 parent 09bc1e8 commit f1b2cbf
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
3 changes: 2 additions & 1 deletion app_demo/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ui <- navbarPage(
fluidRow(
column(width = 3,
textInput("patientName", "Patient Name:"),
numericInput("age", "Age:", value = NULL, min = 1, max = 150),
numericInput("age", "Age:", value = NULL, min = 1, max = 100),
selectInput("sex", "Sex:", choices = c("Male", "Female")),
numericInput("height", "Height (cm):", value = NULL, min = 50, max = 250, step = 0.1),
numericInput("mass", "Mass (kg):", value = NULL, min = 1, max = 300, step = 0.1),
Expand Down Expand Up @@ -101,6 +101,7 @@ server <- function(input, output, session) {
input$systolic,
input$smoker)


# Render the results
output$t1 <- renderText("Body Mass Index (BMI) Status")
output$t2 <- renderText("Blood Pressure Status")
Expand Down
5 changes: 2 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ <h2>Hands On</h2>
<p><strong>Goal</strong></p>
</div>
<div class="callout-content">
<p>Create a Shiny app to do data exploration (visualization) and classification (several classification algorithm)</p>
<p>Create a Shiny app to do health screening (BMI, hypertension, diabetes, and 10-year cardiovascular risk)</p>
</div>
</div>
</div>
Expand All @@ -728,8 +728,7 @@ <h2>Hands On</h2>
<p><strong>Data</strong></p>
</div>
<div class="callout-content">
<p>In this example, we will use data on obesity level (UCI Machine Learning Repository, 2019)</p>
<p>Download <a href="https://archive.ics.uci.edu/dataset/544/estimation+of+obesity+levels+based+on+eating+habits+and+physical+condition">here</a></p>
<p>The data is from the patient based on several screening/ lab test.</p>
</div>
</div>
</div>
Expand Down
6 changes: 2 additions & 4 deletions index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -292,15 +292,13 @@ server <- function(input, output) {
::: callout-note
## Goal

Create a Shiny app to do data exploration (visualization) and classification (several classification algorithm)
Create a Shiny app to do health screening (BMI, hypertension, diabetes, and 10-year cardiovascular risk)
:::

::: callout-note
## Data

In this example, we will use data on obesity level (UCI Machine Learning Repository, 2019)

Download [here](https://archive.ics.uci.edu/dataset/544/estimation+of+obesity+levels+based+on+eating+habits+and+physical+condition)
The data is from the patient based on several screening/ lab test.
:::

::: callout-note
Expand Down
Binary file modified tutorial.pdf
Binary file not shown.
8 changes: 6 additions & 2 deletions tutorial.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ editor: visual

1. Having R and R studio installed. If you haven't already, you can see the installation guide [here](https://posit.co/download/rstudio-desktop/).

2. Having these packages installed: `tidyverse`, `shiny`, `shinythemes`, `rmarkdown`, and `officer`. You can install these packages by running this code:
2. Download the helper function [here](https://github.com/Dewi-Amaliah/its_shiny_slide/blob/main/app_demo/helper.R). It is a function to calculate 10-year cardiovascular risk based on Framingham Risk Score.

3. Having these packages installed: `tidyverse`, `shiny`, `shinythemes`, `rmarkdown`, and `officer`. You can install these packages by running this code:

```{r, eval = FALSE, echo = TRUE}
install.packages(c("tidyverse", "shiny", "shinythemes",
Expand All @@ -26,4 +28,6 @@ Based on the lesson, think of the UI, server, and layout component of the app!

## Steps

1. Create project:
1. Create project: Open R Studio -\> File -\> New Directory -\> Shiny Application
2. Start write the code for UI and Server
3. The code for the app is provided here,

0 comments on commit f1b2cbf

Please sign in to comment.