What are the differences between male and female babies at birth? Is there a size difference? I've used the data set "Live births, by birth weight and sex, Canada, provinces and territories" available through the Government of Canada Open Data website. This dataset contains data on babies born between 2000 and 2014, classified by sex and weight range.
My hypothesis on starting was that female babies weigh more than male babies at birth, but in fact my analysis has shown that male babies weigh more on average than female babies at birth!
In the next release, I would like to look at the effect of province or territory or birth on birthweights.
-
Clone the repo.
-
You will need to have docker installed and running on your computer.
-
First, pull my docker image from dockerhub:
docker pull goldlist/baby_weights_by_sex
-
Run the make file by running in the command line:
docker run --rm -v C:/Users/path/to/repo/Baby_weights_by_sex:/home/baby_weights_by_sex goldlist/baby_weights_by_sex make -C '/home/baby_weights_by_sex'
-
To clean the files, simply run
docker run --rm -v C:/Users/path/to/repo/Baby_weights_by_sex:/home/baby_weights_by_sex goldlist/baby_weights_by_sex make -C '/home/baby_weights_by_sex' clean
-
In steps 4 and 5, make sure to replace
C:/Users/path/to/repo/Baby_weights_by_sex
with the path to the cloned repo on your computer.
If you don't want to use docker, you can and run the make file from the root directory of the cloned repo by using the command
make all
This will clean the data, create images, and run the analysis. It will them compile this into a report. The Make file runs the data as in this dependency graph:
But remember to check out the list of dependencies below.
file | Description |
---|---|
README | Overview of project |
LICENSE | MIT license here |
Report | A completed report on baby weights |
Makefile | A make file to run everything |
The analysis is done with R, (3.4.3), with the following packages:
- library(tidyverse)
- library(stringr)
- library(forcats)
- library(SDMTools)
- library(scales)
- library(ezknitr)
The documents are rendered with Make.
The above graph is created with makefile2graph.
In order to run the R packages above, packrat is included. If you open the Rproj file, then packrat will be installed, and you will not have to install the correct packages
The data used is licensed under an Open Government License- Canada