Relationship between the different variables in SWISS dataset

Joana
03/05/2018

Overview

Data description

Standardized fertility measure and socio-economic indicators for each of 47 French-speaking provinces of Switzerland at about 1888. We have chosen SWISS dataset in R to visualize a potential relationship between its variables.

  1. Fertility Ig, 'common standardized fertility measure'
  2. Agriculture % of males involved in agriculture as occupation
  3. Examination % draftees receiving highest mark on army examination
  4. Education % education beyond primary school for draftees.
  5. Catholic % 'catholic' (as opposed to 'protestant').
  6. Infant.Mortality live births who live less than 1 year.

Here, all variables are scaled to [0, 100], where in the original, all but “Catholic” were scaled to [0, 1]

Aim

Goal

Scatterplot of all the variables to check a possible relationship between its variables.

How does it work:

  1. The user can select what variables he shall wish to look for a relationship.

  2. Simultaneously the app will plot the linear regression analysis of such association.

Summary of the data used

head(swiss)
             Fertility Agriculture Examination Education Catholic
Courtelary        80.2        17.0          15        12     9.96
Delemont          83.1        45.1           6         9    84.84
Franches-Mnt      92.5        39.7           5         5    93.40
Moutier           85.8        36.5          12         7    33.77
Neuveville        76.9        43.5          17        15     5.16
Porrentruy        76.1        35.3           9         7    90.57
             Infant.Mortality
Courtelary               22.2
Delemont                 22.2
Franches-Mnt             20.2
Moutier                  20.3
Neuveville               20.6
Porrentruy               26.6

App Visualization

Visualize the app

To visualize the app, please redirect yourself to:

https://joanap08.shinyapps.io/swiss/

Thank you