Commit af7cdbf2 authored by Paul's avatar Paul

Solution Finale proposée

parent 52958515
README file for Snow GIS data
-----------------------------
This zip file contains a number of GIS layers relating to John Snow's 1854 investigation of a
Cholera outbreak in London - considered by many to be the first use of geographical analysis
in an epidemiological study. More details on the history are available at
http://en.wikipedia.org/wiki/1854_Broad_Street_cholera_outbreak
This file contains a number of GIS layers created from Snow's original map which allow analyses to be
conducted on the data in modern GIS systems. For example, clustering of cases can be analysed and the
effect of spatial aggregation in modern anonymised health data releases. Of course, it's also just
interesting to look at the area, and how little it has changed since 1854.
Files included:
(Many of the items in the list consist of many actual files (for example .shp, .dbf etc)
* OSMap Raster Modern OS map of the area of the outbreak (from OS Open Data - contains Ordnance Survey data © Crown copyright and database right 2013)
* OSMap_Greyscale Raster Same as above, but in greyscale for easier visualisation (altered by conversion to greyscale, from OS Open Data - contains Ordnance Survey data © Crown copyright and database right 2013)
* SnowMap Raster Snow's original map, georeferenced and warped so that it accurately overlays the OS map
* CholeraDeaths Vector Points for each location of one or more deaths. Attribute value gives number of deaths at that location
* Pumps Vector Points for each location of a pump
Created and compiled by Robin Wilson (robin@rtwilson.com, www.rtwilson.com/academic) - Jan 2011.
\ No newline at end of file
--- ---
title: "Evaluation par les pairs" title: "Evaluation par les pairs"
author: "Paul Faye" author: "Auteur: ea4f5ba1b97cd5a14653d4641234245a"
date: "05 Juin 2021" date: "05 Juin 2021"
output: pdf_document output: pdf_document
--- ---
......
---
title: "Evaluation par les pairs"
author: "Auteur: ea4f5ba1b97cd5a14653d4641234245a"
date: "05 Juin 2021"
output: pdf_document
---
# Le pouvoir d'achat des ouvriers anglais du XVIe au XIXe siècle
### Importation des bibliothèques nécessaires
```r
library(ggplot2)
library(stringr)
library(tseries)
```
```
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
```
### Importation des données nécessaires
```r
# Importation des données
data = read.csv("Wheat.csv", header=T)
# Supprimer la colonne d'indexation
data$X =NULL
# Un peu de statistiques descriptives
summary(data)
```
```
## Year Wheat Wages
## Min. :1565 Min. :26.00 Min. : 5.000
## 1st Qu.:1630 1st Qu.:33.00 1st Qu.: 6.145
## Median :1695 Median :41.00 Median : 7.800
## Mean :1695 Mean :43.26 Mean :11.582
## 3rd Qu.:1760 3rd Qu.:47.00 3rd Qu.:14.875
## Max. :1821 Max. :99.00 Max. :30.000
## NA's :3
```
1. Reproduction du graphique de Playfair
```r
ggplot(data = data) +
geom_bar(aes(x = Year, y = Wheat), stat="identity", width=5, fill = "white", color="steelblue") +
xlab("Year")+
ylab("shillings") +
geom_area(aes(x =Year, y = Wages), color="red",fill="lightblue")+
theme(
axis.title.y = element_text(color = "blue"),
axis.title.y.right = element_text(color = "blue"))
```
![](exercice_fr_files/figure-latex/unnamed-chunk-3-1.pdf)<!-- -->
2. Amélioration du graphique avec une ordonnée pour chaque variable quantitative
```r
ggplot(data= data) +
geom_bar(aes(x = Year, y = Wheat), stat="identity", width=5, fill = "white", color="steelblue") +
xlab("Year")+
ylab("shillings par quart de boisseau de blé") +
geom_area(aes(x =Year, y = Wages), color="red",fill="lightblue")+
ggtitle("Evolution du prix du blé et du salaire moyen de 1965 à 1821") +
scale_y_continuous(sec.axis = sec_axis(~., name = "shillings par semaine"))+
theme(
axis.title.y = element_text(color = "blue"),
axis.title.y.right = element_text(color = "red"))
```
![](exercice_fr_files/figure-latex/unnamed-chunk-4-1.pdf)<!-- -->
```r
#scale_y_continuous(sec.axis = sec_axis(~.*, name = ""))+
```
3. Représentation de l'évolution du pouvoir d'achat
```r
# Le pouvoir d'achat est défini comme la quantité de blé qu'un ouvrier peut acheter avec son salaire hebdomadaire.
data$PA= data$Wages / data$Wheat
# Evolution du pouvoir d'achat
ggplot(data= data) +
xlab("Year")+
ylab("Pouvoir d'achat (PA)") +
geom_area(aes(x =Year, y = PA), color="purple",fill=NA)+
ggtitle("Evolution du pouvoir d'achat de 1965 à 1821") +
theme(
axis.title.y = element_text(color = "purple"))
```
![](exercice_fr_files/figure-latex/unnamed-chunk-5-1.pdf)<!-- -->
3. b) Graphique du prix du blé et du salaire : On montre l'augmentation dans le temps du pouvoir d'achat
```r
# On enlève les 3 dernières observations pour lesquelles nous n'avons pas le salaire et par conséquent le pouvoir d'achat
plot.ts(data[1:50,2:4], main= "Evolution au cours du temps")
```
![](exercice_fr_files/figure-latex/unnamed-chunk-6-1.pdf)<!-- -->
Le pouvoir d'achat a une tendance haussière au cours du temps. Il faut cependant noter quelques périodes d'instabilité, ou elle s'inverse (baisse).
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment