{ "cells": [ { "cell_type": "markdown", "metadata": { "collapsed": false }, "source": [ "# Project 1: Deaths by tuberculosis\n", "\n", "by Michel Wermelinger, 14 July 2015, with minor edits on 5 April 2016\n", "\n", "This is the project notebook for Week 1 of The Open University's [_Learn to code for Data Analysis_](http://futurelearn.com/courses/learn-to-code) course.\n", "\n", "In 2000, the United Nations set eight Millenium Development Goals (MDGs) to reduce poverty and diseases, improve gender equality and environmental sustainability, etc. Each goal is quantified and time-bound, to be achieved by the end of 2015. Goal 6 is to have halted and started reversing the spread of HIV, malaria and tuberculosis (TB).\n", "TB doesn't make headlines like Ebola, SARS (severe acute respiratory syndrome) and other epidemics, but is far deadlier. For more information, see the World Health Organisation (WHO) page .\n", "\n", "Given the population and number of deaths due to TB in some countries during one year, the following questions will be answered: \n", "\n", "- What is the total, maximum, minimum and average number of deaths in that year?\n", "- Which countries have the most and the least deaths?\n", "- What is the death rate (deaths per 100,000 inhabitants) for each country?\n", "- Which countries have the lowest and highest death rate?\n", "\n", "The death rate allows for a better comparison of countries with widely different population sizes." ] }, { "cell_type": "markdown", "metadata": { "collapsed": false }, "source": [ "## The data\n", "\n", "The data consists of total population and total number of deaths due to TB (excluding HIV) in 2013 in each of the BRICS (Brazil, Russia, India, China, South Africa) and Portuguese-speaking countries. \n", "\n", "The data was taken in July 2015 from (population) and (deaths). The uncertainty bounds of the number of deaths were ignored.\n", "\n", "The data was collected into an Excel file which should be in the same folder as this notebook." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
CountryPopulation (1000s)TB deaths
0Afghanistan3055213000.00
1Albania317320.00
2Algeria392085100.00
3Andorra790.26
4Angola214726900.00
5Antigua and Barbuda901.20
6Argentina41446570.00
7Armenia2977170.00
8Australia2334345.00
9Austria849529.00
10Azerbaijan9413360.00
11Bahamas3771.80
12Bahrain13329.60
13Bangladesh15659580000.00
14Barbados2852.00
15Belarus9357850.00
16Belgium1110418.00
17Belize33220.00
18Benin103231300.00
19Bhutan75488.00
20Bolivia (Plurinational State of)10671430.00
21Bosnia and Herzegovina3829190.00
22Botswana2021440.00
23Brazil2003624400.00
24Brunei Darussalam41813.00
25Bulgaria7223150.00
26Burkina Faso169351500.00
27Burundi101632300.00
28Côte d'Ivoire203164000.00
29Cabo Verde499150.00
............
164Suriname53912.00
165Swaziland12501100.00
166Sweden957113.00
167Switzerland807817.00
168Syrian Arab Republic21898450.00
169Tajikistan8208570.00
170Thailand670108100.00
171The former Yugoslav republic of Macedonia210733.00
172Timor-Leste1133990.00
173Togo6817810.00
174Tonga1052.50
175Trinidad and Tobago134129.00
176Tunisia10997230.00
177Turkey74933310.00
178Turkmenistan52401300.00
179Tuvalu102.80
180Uganda375794100.00
181Ukraine452396600.00
182United Arab Emirates934664.00
183United Kingdom of Great Britain and Northern I...63136340.00
184United Republic of Tanzania492536000.00
185United States of America320051490.00
186Uruguay340740.00
187Uzbekistan289342200.00
188Vanuatu25316.00
189Venezuela (Bolivarian Republic of)30405480.00
190Viet Nam9168017000.00
191Yemen24407990.00
192Zambia145393600.00
193Zimbabwe141505700.00
\n", "

194 rows × 3 columns

\n", "
" ] }, "execution_count": 1, "metadata": { }, "output_type": "execute_result" } ], "source": [ "import warnings\n", "warnings.simplefilter('ignore', FutureWarning)\n", "\n", "from pandas import *\n", "data = read_excel('WHO POP TB all.xls')\n", "data" ] }, { "cell_type": "markdown", "metadata": { "collapsed": false }, "source": [ "## The range of the problem\n", "\n", "The column of interest is the last one." ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "0 13000.00\n", "1 20.00\n", "2 5100.00\n", "3 0.26\n", "4 6900.00\n", "5 1.20\n", "6 570.00\n", "7 170.00\n", "8 45.00\n", "9 29.00\n", "10 360.00\n", "11 1.80\n", "12 9.60\n", "13 80000.00\n", "14 2.00\n", "15 850.00\n", "16 18.00\n", "17 20.00\n", "18 1300.00\n", "19 88.00\n", "20 430.00\n", "21 190.00\n", "22 440.00\n", "23 4400.00\n", "24 13.00\n", "25 150.00\n", "26 1500.00\n", "27 2300.00\n", "28 4000.00\n", "29 150.00\n", " ... \n", "164 12.00\n", "165 1100.00\n", "166 13.00\n", "167 17.00\n", "168 450.00\n", "169 570.00\n", "170 8100.00\n", "171 33.00\n", "172 990.00\n", "173 810.00\n", "174 2.50\n", "175 29.00\n", "176 230.00\n", "177 310.00\n", "178 1300.00\n", "179 2.80\n", "180 4100.00\n", "181 6600.00\n", "182 64.00\n", "183 340.00\n", "184 6000.00\n", "185 490.00\n", "186 40.00\n", "187 2200.00\n", "188 16.00\n", "189 480.00\n", "190 17000.00\n", "191 990.00\n", "192 3600.00\n", "193 5700.00\n", "Name: TB deaths, Length: 194, dtype: float64" ] }, "execution_count": 2, "metadata": { }, "output_type": "execute_result" } ], "source": [ "tbColumn = data['TB deaths']\n", "tbColumn" ] }, { "cell_type": "markdown", "metadata": { "collapsed": false }, "source": [ "The total number of deaths in 2013 is:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "1072677.97" ] }, "execution_count": 3, "metadata": { }, "output_type": "execute_result" } ], "source": [ "tbColumn=data['TB deaths']\n", "tbColumn.sum()" ] }, { "cell_type": "markdown", "metadata": { "collapsed": false }, "source": [ "The largest and smallest number of deaths in a single country are:" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "240000.0" ] }, "execution_count": 4, "metadata": { }, "output_type": "execute_result" } ], "source": [ "tbColumn=data['TB deaths']\n", "tbColumn.max()" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "0.0" ] }, "execution_count": 5, "metadata": { }, "output_type": "execute_result" } ], "source": [ "tbColumn=data['TB deaths']\n", "tbColumn.min()" ] }, { "cell_type": "markdown", "metadata": { "collapsed": false }, "source": [ "From less than 20 to almost a quarter of a million deaths is a huge range. The average number of deaths, over all countries in the data, can give a better idea of the seriousness of the problem in each country.\n", "The average can be computed as the mean or the median. Given the wide range of deaths, the median is probably a more sensible average measure." ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "5529.267886597938" ] }, "execution_count": 6, "metadata": { }, "output_type": "execute_result" } ], "source": [ "tbColumn=data['TB deaths']\n", "tbColumn.mean()" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "315.0" ] }, "execution_count": 7, "metadata": { }, "output_type": "execute_result" } ], "source": [ "tbColumn=data['TB deaths']\n", "tbColumn.median()" ] }, { "cell_type": "markdown", "metadata": { "collapsed": false }, "source": [ "The median is far lower than the mean. This indicates that some of the countries had a very high number of TB deaths in 2013, pushing the value of the mean up." ] }, { "cell_type": "markdown", "metadata": { "collapsed": false }, "source": [ "## The most affected\n", "\n", "To see the most affected countries, the table is sorted in ascending order by the last column, which puts those countries in the last rows." ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
CountryPopulation (1000s)TB deaths
147San Marino310.00
125Niue10.01
111Monaco380.03
3Andorra790.26
129Palau210.36
40Cook Islands210.41
118Nauru100.67
76Iceland3300.93
68Grenada1061.10
5Antigua and Barbuda901.20
113Montenegro6211.20
152Seychelles931.40
105Malta4291.50
143Saint Kitts and Nevis541.60
11Bahamas3771.80
14Barbados2852.00
144Saint Lucia1822.20
99Luxembourg5302.20
44Cyprus11412.30
174Tonga1052.50
50Dominica722.70
137Qatar21692.70
179Tuvalu102.80
145Saint Vincent and the Grenadines1093.10
126Norway50434.40
146Samoa1906.10
121New Zealand45066.30
103Maldives3457.60
12Bahrain13329.60
164Suriname53912.00
............
160South Sudan112964500.00
119Nepal277974600.00
2Algeria392085100.00
193Zimbabwe141505700.00
184United Republic of Tanzania492536000.00
181Ukraine452396600.00
46Democratic People's Republic of Korea248956700.00
4Angola214726900.00
158Somalia104967700.00
31Cameroon222547800.00
170Thailand670108100.00
88Kenya443549100.00
163Sudan379649700.00
30Cambodia1513510000.00
100Madagascar2292512000.00
0Afghanistan3055213000.00
141Russian Federation14283417000.00
190Viet Nam9168017000.00
115Mozambique2583418000.00
159South Africa5277625000.00
116Myanmar5325926000.00
134Philippines9839427000.00
58Ethiopia9410130000.00
36China139333741000.00
47Democratic Republic of the Congo6751446000.00
128Pakistan18214349000.00
78Indonesia24986664000.00
13Bangladesh15659580000.00
124Nigeria173615160000.00
77India1252140240000.00
\n", "

194 rows × 3 columns

\n", "
" ] }, "execution_count": 8, "metadata": { }, "output_type": "execute_result" } ], "source": [ "data.sort_values('TB deaths')" ] }, { "cell_type": "markdown", "metadata": { "collapsed": false }, "source": [ "The table raises the possibility that a large number of deaths may be partly due to a large population. To compare the countries on an equal footing, the death rate per 100,000 inhabitants is computed." ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
CountryPopulation (1000s)TB deathsTB deaths (per 100,000)
0Afghanistan3055213000.0042.550406
1Albania317320.000.630318
2Algeria392085100.0013.007549
3Andorra790.260.329114
4Angola214726900.0032.134873
5Antigua and Barbuda901.201.333333
6Argentina41446570.001.375284
7Armenia2977170.005.710447
8Australia2334345.000.192777
9Austria849529.000.341377
10Azerbaijan9413360.003.824498
11Bahamas3771.800.477454
12Bahrain13329.600.720721
13Bangladesh15659580000.0051.087199
14Barbados2852.000.701754
15Belarus9357850.009.084108
16Belgium1110418.000.162104
17Belize33220.006.024096
18Benin103231300.0012.593238
19Bhutan75488.0011.671088
20Bolivia (Plurinational State of)10671430.004.029613
21Bosnia and Herzegovina3829190.004.962131
22Botswana2021440.0021.771400
23Brazil2003624400.002.196025
24Brunei Darussalam41813.003.110048
25Bulgaria7223150.002.076699
26Burkina Faso169351500.008.857396
27Burundi101632300.0022.631113
28Côte d'Ivoire203164000.0019.688915
29Cabo Verde499150.0030.060120
...............
164Suriname53912.002.226345
165Swaziland12501100.0088.000000
166Sweden957113.000.135827
167Switzerland807817.000.210448
168Syrian Arab Republic21898450.002.054982
169Tajikistan8208570.006.944444
170Thailand670108100.0012.087748
171The former Yugoslav republic of Macedonia210733.001.566208
172Timor-Leste1133990.0087.378641
173Togo6817810.0011.882060
174Tonga1052.502.380952
175Trinidad and Tobago134129.002.162565
176Tunisia10997230.002.091479
177Turkey74933310.000.413703
178Turkmenistan52401300.0024.809160
179Tuvalu102.8028.000000
180Uganda375794100.0010.910349
181Ukraine452396600.0014.589182
182United Arab Emirates934664.000.684785
183United Kingdom of Great Britain and Northern I...63136340.000.538520
184United Republic of Tanzania492536000.0012.181999
185United States of America320051490.000.153101
186Uruguay340740.001.174053
187Uzbekistan289342200.007.603511
188Vanuatu25316.006.324111
189Venezuela (Bolivarian Republic of)30405480.001.578688
190Viet Nam9168017000.0018.542757
191Yemen24407990.004.056213
192Zambia145393600.0024.760988
193Zimbabwe141505700.0040.282686
\n", "

194 rows × 4 columns

\n", "
" ] }, "execution_count": 9, "metadata": { }, "output_type": "execute_result" } ], "source": [ "populationColumn = data['Population (1000s)']\n", "data['TB deaths (per 100,000)'] = tbColumn * 100 / populationColumn\n", "data" ] }, { "cell_type": "markdown", "metadata": { "collapsed": false }, "source": [ "## Conclusions\n", "\n", "The BRICS and Portuguese-speaking countries had a total of about 350 thousand deaths due to TB in 2013. The median shows that half of these coutries had fewer than 5,650 deaths. The much higher mean (over 29,000) indicates that some countries had a very high number. The least affected were Sao Tome and Principe and Equatorial Guinea, with 18 and 67 deaths respectively, and the most affected were China and India with 41 thousand and 240 thousand deaths in a single year. However, taking the population size into account, the least affected were Portugal and Brazil with less than 2.2 deaths per 100 thousand inhabitants, and the most affected were Guinea-Bissau and East Timor with over 70 deaths per 100,000 inhabitants.\n", "\n", "One should not forget that most values are estimates, and that the chosen countries are a small sample of all the world's countries. Nevertheless, they convey the message that TB is still a major cause of fatalities, and that there is a huge disparity between countries, with several ones being highly affected." ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (Ubuntu Linux)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.5.2" } }, "nbformat": 4, "nbformat_minor": 0 }