Developing Data Products - Assignment week 4

Patricia Hernandez
07/08/2020

Overview

This presentation is part of the Developing Data Products course - assignment 4. In this project, women dataset was acquired from datasets package and used to build a Shiny Application. This dataset gives the average heights and weights for American women aged 30-39. It appears to have been taken from the American Society of Actuaries Build and Blood Pressure Study for some (unknown to us) earlier year.

Code

The code below refers to the very simple linear model to the data used for the Shiny Application

#Environment
library(shiny)
# Simple linear model
modelHW<-lm(weight~height,data = women)
#Prediction
    modelHWpred<-reactive({
        InputHeight<-input$sliderHeight
        predict(modelHW,newdata=data.frame(height=InputHeight))
    })

Plot Average Height vs. Weight for American Women aged 30-39

plot of chunk unnamed-chunk-2

Final Comments

The Shiny Application shows the prediction of the average weight for American women by entering the average height (via slider).

Please refer to the Shiny Application by the link below: https://patriciah.shinyapps.io/assignment_week4/

You may also refer to server.R and ui.R codes by the link below: https://github.com/patriciavh/Developing-Data-Products-course/tree/master