Learn practical skills, build real-world projects, and advance your career

Maternal mortality analysis and visualisation using Python

A ZerotoPandas Course Project for Jovian

Introduction

What is maternal health and why is it an important area of focus globally?

Women have an unique role and responsibility on Earth to ensure the survival of the human race by giving birth to children and raising them. Half of the human race are women.

"Maternal health" is defined as the health of a woman during pregnancy, childbirth and within 42 days after childbirth or termination of pregnancy. "Maternal mortality" is the death of a child bearing woman during this period due to any cause except accidental causes.

It is therefore an important indicator of human and social development. Globally, governments and organisations have recognised the importance of women having easy access to healthcare to reduce maternal mortality.

Maternal mortality figured in the WHO Millennium Development Goal 5
MDG 5

It is now part of the UN Sustainable Development Goals (SDGs) 3.1 and 3.2 that member states have to work towards by 2030, UN , WHO

3.1 By 2030, reduce the global maternal mortality ratio to less than 70 per 100 000 live births.

3.2 By 2030, end preventable deaths of newborns and children under 5 years of age, with all countries aiming to reduce neonatal mortality to at least as low as 12 per 1000 live births and under-5 mortality to at least as low as 25 per 1000 live births.

How is it measured?

Maternity mortality is measured as maternal mortality rate or maternal mortality ratio which are often used interchangeably. Definitions

Maternal mortality ratio(MMR)

The maternal mortality ratio is the number the number of maternal deaths per 100,000 live births, a measure of the risk of death once a woman has become pregnant.

Maternal mortality rate(MM- Rate)

The maternal mortality ratio is the number of maternal deaths in a given period per 100,000 women of reproductive age
during the same time period.

Dataset

We will use the WHO datasets for our analysis. The raw data can be found here

Other sources which can be used are:

This coursework will use numpy, pandas, matplotlib and seaborn libraries to conduct some basic analysis of the dataset to help us arrive at some conclusions.

The course Data Analysis with Python: Zero to Pandas, has been an interesting beginning into the fascinating world of data analysis using Python after more than 17 years in programming hibernation.

I found the structured approach to learning the basics while retaining a open enquiry based approach to project coursework very valuable.

How to run the code

This is an executable Jupyter notebook hosted on Jovian.ml, a platform for sharing data science projects. You can run and experiment with the code in a couple of ways: using free online resources (recommended) or on your own computer.

Option 1: Running using free online resources (1-click, recommended)

The easiest way to start executing this notebook is to click the "Run" button at the top of this page, and select "Run on Binder". This will run the notebook on mybinder.org, a free online service for running Jupyter notebooks. You can also select "Run on Colab" or "Run on Kaggle".

Option 2: Running on your computer locally
  1. Install Conda by following these instructions. Add Conda binaries to your system PATH, so you can use the conda command on your terminal.

  2. Create a Conda environment and install the required libraries by running these commands on the terminal:

conda create -n zerotopandas -y python=3.8 
conda activate zerotopandas
pip install jovian jupyter numpy pandas matplotlib seaborn plotly world_bank_data --upgrade
  1. Press the "Clone" button above to copy the command for downloading the notebook, and run it on the terminal. This will create a new directory and download the notebook. The command will look something like this:
jovian clone notebook-owner/notebook-id
  1. Enter the newly created directory using cd directory-name and start the Jupyter notebook.
jupyter notebook

You can now access Jupyter's web interface by clicking the link that shows up on the terminal or by visiting http://localhost:8888 on your browser. Click on the notebook file (it has a .ipynb extension) to open it.

!pip install jovian jupyter numpy pandas matplotlib seaborn plotly world_bank_data --upgrade --quiet

Downloading the Dataset

We will use the urllib.request function and also use the worldbank python dataset.

The dataset is in the csv format

#import urlretreive
from urllib.request import urlretrieve