Summary:
In this project, we explore the relationships between six different measured indicators for 47 French-speaking provinces of Switzerland to learn more about the demographic shift of that time period.
Background:
The data utilized is from around 1888, only about 40 years after civil war ended and the Federal Constitution established. In the 1870's, Switzerland's government increased the distinction between Church and State, taking many of the previously-held power of the church into that of the government's jurisdiction. While immigration and emigration were balanced in the country for some time, emigration from Switzerland reached its peak in the late 1880's. After this, immigration overtook emigration and a demographic transition occurred. Switzerland's fertility was beginning to fall from the high level typical of underdeveloped countries and move into the modern era.
---
## The Well-Being of Switzerland in 1888
# Exploring Fertility and Socioeconomic Data of Switzerland #
*Summary*:
In this project, we explore the relationships between six different measured indicators for 47 French-speaking provinces of Switzerland to learn more about the demographic shift of that time period.
*Background*:
The data utilized is from around 1888, only about 40 years after civil war ended and the Federal Constitution established. In the 1870's, Switzerland's government increased the distinction between Church and State, taking many of the previously-held power of the church into that of the government's jurisdiction. While immigration and emigration were balanced in the country for some time, emigration from Switzerland reached its peak in the late 1880's. After this, immigration overtook emigration and a demographic transition occurred. Switzerland's fertility was beginning to fall from the high level typical of underdeveloped countries and move into the modern era.
The Swiss dataframe has 47 observations (for 47 Swiss provinces) of 6 measured variables* : 1. Fertility: 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.

--- <section data-background="image.png">
## Summary of Data
The Swiss dataframe has 47 observations (for 47 Swiss provinces) of 6 measured variables* :
</br></br>
1. **Fertility**: common standardized fertility measure</br>
2. **Agriculture**: % of males involved in agriculture as occupation</br>
3. **Examination**: % draftees receiving highest mark on army examination</br>
4. **Education**: % education beyond primary school for draftees.</br>
5. **Catholic**: % ‘catholic' (as opposed to ‘protestant’).</br>
6. **Infant.Mortality**: live births who live less than 1 year.</br>
</br>
##### *All variables but ‘Fertility’ give proportions of the population and are scaled to a [0, 100] range (percentage).
</br></br>
<img src="https://travelwritingandphotography.files.wordpress.com/2010/05/zurich-pano.jpg" alt="Switzerland panorama" style="width:800px;height:200px">
##### Modern panorama of Zurich.
Goal: We aim to explore the relationships between six different measured indicators for 47 French-speaking provinces of Switzerland to learn more about the socio-economic and fertility health of the country. This should provide insight to the demographic shift of that time period.
The Shiny App: The application developed and deployed by Shiny and R allows exploration of these relationships. The available capabilities of the app are:
---
## The Application
**Goal**:
We aim to explore the relationships between six different measured indicators for 47 French-speaking provinces of Switzerland to learn more about the socio-economic and fertility health of the country. This should provide insight to the demographic shift of that time period.
</br>
**The Shiny App**:
The application developed and deployed by Shiny and R allows exploration of these relationships. The available capabilities of the app are:
- Able to plot a user-chosen x-variable and y-variable (out of Fertility, Agriculture, or Infant.Mortality)
- Colors of the plotted points can be changed to reflect the value and trend of an additional variable (Education, Examination, or Catholic)
- A simple linear regression can be fit to the plotted x and y variables. Results will be plotted; slope, intercept, and R-value are also printed below the plot (note: the fit is NOT by group)
An example of one of the possible plots that can be made with the Shiny app is shown below, with Fertility plotted against Infant Mortality, grouped by the Catholic variable. A distinction can be seen between the two groupings and more can be learned when exploring the dataset in the app.
library(ggplot2)
p = ggplot(data=swiss, aes(Fertility,Infant.Mortality, color = Catholic))
p = p + geom_point() + xlab("Infant.Mortality") + ylab("Fertility")
print(p)
---
## Plotting with the Shiny App
An example of one of the possible plots that can be made with the Shiny app is shown below, with Fertility plotted against Infant Mortality, grouped by the Catholic variable. A distinction can be seen between the two groupings and more can be learned when exploring the dataset in the app.
```{r fig.width=6, fig.height=3.8}
library(ggplot2)
p = ggplot(data=swiss, aes(Fertility,Infant.Mortality, color = Catholic))
p = p + geom_point() + xlab("Infant.Mortality") + ylab("Fertility")
print(p)
```
Examining the relationships between fertility, agriculture, infant health, etc. for these 47 French-speaking provinces of Switzerland can help us learn more about the demographic shift of that time period and how it may have been affected by immigration, emigration, and changes in government and religion. Explore these relationships yourself using the Shiny App!
References:

---
## Final Summary
Examining the relationships between fertility, agriculture, infant health, etc. for these 47 French-speaking provinces of Switzerland can help us learn more about the demographic shift of that time period and how it may have been affected by immigration, emigration, and changes in government and religion. Explore these relationships yourself using the Shiny App!
*References*:</br>
- Mosteller, F. and Tukey, J. W. (1977).
- http://history-switzerland.geschichte-schweiz.ch/
- http://www.cicred.org/
<img src="http://upload.wikimedia.org/wikipedia/commons/e/e0/Edward_Gennys_Fanshawe%2C_Piz_Bernina%2C_Scerscen%2C_Roseg..._Sella_%26_Gluschaint_and_Tschierva_%26..._Roseg_Glaciers_from_the_path_leading_to_Alp_Ota%2C_1880_%28Switzerland%29.jpg" alt="Switzerland circa 1880" style="width:384px;height:324px">
| The Well-Being of Switzerland in 1888 | 1 |
|---|---|
| Summary of Data | 2 |
| The Application | 3 |
| Plotting with the Shiny App | 4 |
| Final Summary | 5 |
| Table of Contents | t |
|---|---|
| Exposé | ESC |
| Full screen slides | e |
| Presenter View | p |
| Source Files | s |
| Slide Numbers | n |
| Toggle screen blanking | b |
| Show/hide slide context | c |
| Notes | 2 |
| Help | h |