Longley data model fit

This provides a simple UI for people to predict Unemployment based on population size, on the well known Longley data model.

  • No knowledge of R, html, or statistics is necessary
  • Users can feel the experience of predicting using data science.
  • The app makes easy work of using a predictions and color graphics on screen.

We hope you enjoy using this application and find it useful in your research!

About the Application

The application can be accessed in: https://nikolasperdikis.shinyapps.io/shiny_project/

Brief description of functionality:

  • Help tab gets users up-to-speed immediately
  • Read “longley” dataset
  • Linear Model, outcome: Unemployed - Predictor: Population
  • Slider input to enter new data for Population value
  • Plot the result

User Interface

  • The user interfaces with the app via the mouse, exclusively.
    No knowledge of R programming, model fit or ggplot is required.
    When the app launches, a default prediction is provided,
    for a population size of 115000.

  • The user can then use the slider to the left to alter the population predictor.

  • “Show/hide Linear Model” can be checked/unchecked to view the model and prediction in the graphic

  • User has to click on “Submit” for changes to take effect

Server - Side Operations 1/2

Once user input is received, the server will generate a prediction,
based on the value the user entered. This is a very simple linear model,
with predictor being the population size, and outcome being the amount of Unemployment. The model fit would look like:

model1 <- lm(Unemployed~Population, data=longley)

and the prediction, given a user entered value of 115, (population in thousands), would be:

predict(model1,newdata=data.frame(Population=115)

Server - Side Operations 2/2

Example plot from the app, with the model (red) and predicted value in (orange)
plot of chunk unnamed-chunk-3