Skip to content

Mohamed-Ashraf11/Dr.-Semmelweis-and-the-Importance-of-Handwashing-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Dr.-Semmelweis-and-the-Importance-of-Handwashing-project

Loading Packages

library(dplyr)
library(ggplot2)

Hungarian physician Dr. Ignaz Semmelweis worked at the Vienna General Hospital with childbed fever patients. Childbed fever is a deadly disease affecting women who have just given birth, and in the early 1840s, as many as 10% of the women giving birth died from it at the Vienna General Hospital.

Dr.Semmelweis discovered that it was the contaminated hands of the doctors delivering the babies, and on June 1st, 1847, he decreed that everyone should wash their hands, an unorthodox and controversial request; nobody in Vienna knew about bacteria.

in this Markdown we will reanalyze the data that made Semmelweis discover the importance of handwashing and its impact on the hospital.

Datasets

Inspecting Yearly Dataset

Yearly dataset contains the number of women giving birth at the two clinics at the Vienna General Hospital between the years 1841 and 1846.

yearly = read.csv("yearly_deaths_by_clinic.csv", sep = ",", header =  TRUE)
head(yearly)

Inspecting Monthly Dataset

Monthly dataset contains data from 'Clinic 1' of the hospital where most deaths occurred.

monthly = read.csv("monthly_deaths.csv", sep = ",", header = TRUE)
head(monthly)

Calculating Proportion Deaths

Yearly Proportion Deaths

yearly  = yearly %>%
  mutate(proportion_deaths = deaths/births)
head(yearly)

Monthly Proportion Deaths

monthly = monthly %>%
  mutate(proportion_deaths = deaths / births)
head(monthly)

Visualizing Yearly proportion deaths

ggplot(yearly, aes(x= year , y= proportion_deaths, color = clinic )) + geom_line() + 
  labs(x= "Year", y= "Proportion Deaths")

Visualiing Monthly proportion deaths

ggplot(monthly, aes(x= as.Date(date) , y= proportion_deaths, group = 1)) + geom_line() + 
  labs( x= "Date", y = "Proportion Deaths") + 
  scale_x_date(date_labels = "%Y-%m", date_breaks = "12 month")

when the handwashing has started

handwashing_start = as.Date("1847-06-01")
monthly = monthly %>%
  mutate(handwashing_started = date >= handwashing_start)
head(monthly)

ggplot(monthly, aes(x= as.Date(date) , y= proportion_deaths, group = 1, color = handwashing_started)) + geom_line() + 
  labs( x= "Date", y = "Proportion Deaths") + 
  scale_x_date(date_labels = "%Y-%m", date_breaks = "12 month")

Calculating the mean proportion of deaths before and after handwashing

monthly_summary = monthly %>%
  group_by(handwashing_started) %>%
  summarise(mean_proportion_deaths = mean(proportion_deaths))
monthly_summary  

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages