Taxes, Health, GDP: Understanding the Connection
1- Introduction
1.1- Overview and Motivations
Health has become a major concern in the past years, with lots of new resources and information available nowadays. More than ever, we are confronted everyday with choices to be made whether buying drinks or buying food for lunch. Furthermore, the variety of this type of product has exploded and has been growing for many years and this is not going to stop in a society that pushes consumption and opulence. We have a rough idea of what is “healthy” and what is “unhealthy”, but can we see patterns across countries?
As far as our personal motivations behind this research, is our shared interest in health from various aspects such as sports performance or just having a healthy lifestyle to better our lives. This merged with our current curriculum in HEC makes our team motivated to find economic links to health in various sectors.
Past papers have been written linking an individual’s health to his personal wealth, and the possible correlation these two have onto each other:
https://www.sciencedirect.com/science/article/pii/S0167629603000596 https://core.ac.uk/download/pdf/158607349.pdf
With this project we want to focus on the efforts carried by governments, the policies countries have and the impact these have on the individual. One would think that the more prosperous a country, the healthier than said country would be. This however does not seem to be the case, the United States serves as an example of this contradiction: obesity rates just like their GDP are higher than ever. We want to know what policies have an effect on the wellbeing of the individuals as well as understanding the aftermath of such political measures.
2. Research questions
1. How do taxes on sweet beverages impact the overall health of a country? Is it effective?
2. How do tobacco taxes affect the health of a country? Is taxation on tobacco prolific in correcting consumer behavior?
3. How do financial inequalities compare to health across countries? What are the social and economic consequences?
3. Data Wrangling
3.1 Where did we find our data
To have our base data, we had to go on different website to create one with all the information that we wanted. The main websites where we find what we wanted are :
- “Our World in Data” : https://ourworldindata.org
- The “World Health Organization” : https://www.who.int/data
- “The World Bank” : https://data.worldbank.org/
- The “World Health Organization: FCTC”https://untobaccocontrol.org/
3.2 Generic Data
In the pursuit of addressing various research questions, a comprehensive collection of generic data has been meticulously curated. This dataset serves as the foundational bedrock upon which the analytical framework is constructed. The data, carefully gathered, encapsulates a diverse spectrum of information, poised to unravel insights and patterns relevant to the research queries at hand. Through leveraging this rich repository of information, the exploration and subsequent analysis aim to extract meaningful narratives, uncover correlations, and ultimately contribute to a nuanced understanding of the underlying phenomena. The robustness of the collected data underscores its significance as a strategic asset in navigating the complex terrain of data science, offering a conduit to derive actionable intelligence and illuminate the intricacies inherent in the research landscape.
3.2.1 Life Expectancy
As we will be working with health data and trying to establish links between various factors and good health, life expectancy at birth (independently of infant mortality) is an essential indicator, as this article shows. However, this article also warns us about the limitations of interpreting this measure, so it will have to be coupled with other data to enable it to be an objective health indicator. We found a raw dataset, where both male and female were separated. Our analysis will be independent of the sex, so we required only one column representing the whole population. We had to use the mutate function to calculate the average life expectancy independently of the sex of the individual. Then, we removed the unnecessary columns to keep only the country, the period and the life expectancy for each observations. Finally, we wanted to check whether the quantity of data was sufficient, both in terms of the number of years available and the number of countries included. We used the function dfSummary of the package summarytools to get a good overview of our data. We therefore have data for 255 countries/regions over a 71-year period from 1950 to 2021.
| Country | Period | Life_Expectancy |
|---|---|---|
| Afghanistan | 1950 | 27.8 |
| Afghanistan | 1951 | 28.0 |
| Afghanistan | 1952 | 28.4 |
| Afghanistan | 1953 | 28.9 |
| Afghanistan | 1954 | 29.2 |
| Afghanistan | 1955 | 29.9 |
Code
# Raw Data Importation
df_Life_Expectancy_Final <- read.csv(here::here("Data/Life_Expectancy_Final.csv"))
#3. Clean the data of the Life expectancy (df_Life_Expectancy_Final)
#3.1 Keep only the necessary columns
df_Life_Expectancy_Final <- df_Life_Expectancy_Final[,c(1,3,4,5)]
#3.2 change value of life expectancy to numerical ones
df_Life_Expectancy_Final[, 3:4] <- lapply(df_Life_Expectancy_Final[, 3:4], as.numeric)
#3.3 Suppress the sex distinction
colnames(df_Life_Expectancy_Final)[3] <- "Male_LifeExpectancy"
colnames(df_Life_Expectancy_Final)[4] <- "Female_LifeExpectancy"
df_Life_Expectancy_Final <- df_Life_Expectancy_Final %>%
mutate(final_value = (df_Life_Expectancy_Final$Male_LifeExpectancy + df_Life_Expectancy_Final$Female_LifeExpectancy) / 2)
df_Life_Expectancy_Final <- df_Life_Expectancy_Final[,c(1,2,5)]
#3.4 Rename the columns
colnames(df_Life_Expectancy_Final)[1] <- "Country"
colnames(df_Life_Expectancy_Final)[2] <- "Period"
colnames(df_Life_Expectancy_Final)[3] <- "Life_Expectancy"
#3.5 Supress potential missing values in our data
df_Life_Expectancy_Final <- subset(df_Life_Expectancy_Final, !is.na(Life_Expectancy))
#3.6 Summarize our data using the package dfSummary
df_summary <- dfSummary(df_Life_Expectancy_Final)
#print(df_summary)3.2.2 Population
Corriger selon data import de Fanny
For various calculations, we will need to know the population of a country for a specific year. Additionally, we may choose to filter our data based on population to mitigate the impact of certain countries that are clear outliers due to their unique characteristics and very low population. We found a raw dataset that give us data about country name, its population and the year of the observation. We had to change the separation marks for the importation because of the characteristic of the .css files, using the parameter ” sep= “;” ” in the read() function so the file can be read correctly. To clean it, we first put all the years in the same column and all the population in another one with pivot_longer() function. The year, for some reason, had an X in front of them, so we had to remove it with the function gather(). We also had to convert the population to a numeric value. Finally we also removed the possible missing values. To check the state of our data we also used the dfSummary() function. We therefore have data for … countries/regions over a …-year period from … to ….
| Country | Period | Population |
|---|---|---|
| Afghanistan | 2013 | 31541209 |
| Africa Eastern and Southern | 2013 | 567892149 |
| Africa Western and Central | 2013 | 387204553 |
| Albania | 2013 | 2895092 |
| Algeria | 2013 | 38000626 |
| American Samoa | 2013 | 52995 |
Code
# Raw Data Importation
df_PopByYear <- read.csv(here::here("Data/Pop.csv"))
#11. Clean the data of Population by country and by year (df_PopByYear)
#11.1 Keep only the necessary columns
df_PopByYear <- df_PopByYear[, -c(2,3,4)]
#11.2 Pivotting the data to get the year as row value in a column named Period
#11.2.1 Use the gather function to pivot the data as long
df_PopByYear <- gather(df_PopByYear, key = "Period", value = "Population", -Country.Name)
#11.2.2 Removing the undesired character in the year
df_PopByYear$Period <- gsub("[^0-9]", "", df_PopByYear$Period)
df_PopByYear$Period <- substr(df_PopByYear$Period, 5, nchar(df_PopByYear$Period))
#11.2.3 Removing potential missing value
df_PopByYear <- subset(df_PopByYear, !is.na(population))
#11.2.4 Convert the population as numeric number
df_PopByYear$Population <- as.numeric(df_PopByYear$Population)
#11.2.3 Rename the name of the column Country.Name to Country
colnames(df_PopByYear)[1] <- "Country"3.2.3 GDP
::: {.justify} Corriger selon data import de Fanny
The GDP is an indispensable economic measure, being correlated both with the health of a population and with inequality within that same population. It would have been impossible not to include it in our research. Despite its imperfections, this indicator has the advantage of providing precise data for numerous countries and geographic areas, as well as across a broad temporal spectrum. In the realm of economic analysis and data science, GDP serves as a valuable metric due to its ability to offer insights into the economic well-being of a region and its population. Its widespread availability and historical data make it a robust tool for examining trends and patterns over time. While acknowledging its limitations, the inclusion of GDP in our research allows for a comprehensive understanding of the socio-economic landscape. we found a raw dataset that show a wide amount of GDP value by country and by year of observation. The cleaning step are almost the same as population raw data set in point 3.2.2
| Country | Period | GDP_by_head | |
|---|---|---|---|
| 2 | Africa Eastern and Southern | 1960 | 162 |
| 3 | Afghanistan | 1960 | 62 |
| 4 | Africa Western and Central | 1960 | 107 |
| 14 | Australia | 1960 | 1811 |
| 15 | Austria | 1960 | 935 |
| 17 | Burundi | 1960 | 71 |
Code
# Raw Data Importation
df_GDP <- read.csv(here::here("Data/GDP_Final.csv"), sep=";")
#13. Clean the data GDP by country by year(df_GDP)
#13.1 Keep only the necessary columns
df_GDP <- df_GDP[,-c(2:4)]
#13.2 Rename the column country
colnames(df_GDP)[1] <- "Country"
#13.3 Use the gather function to pivot the data as long to remove the year as column
df_GDP <- gather(df_GDP, key = "Period", value = "GDP_by_head", -Country)
#13.4 Put the value of GDB by head as numeric ones
df_GDP$GDP_by_head <- as.numeric(gsub(",", ".", df_GDP$GDP_by_head))
#13.5 Removing potential missing value
df_GDP <- df_GDP[!is.na(df_GDP$GDP_by_head), ]
#12.6 Use the gsub function to remove the X before the year in the column period
df_GDP$Period <- gsub("X", "", df_GDP$Period)3.2.4 Health expenditure
Corriger selon data import de Fanny
As one can easily imagine, the health status of a country can be strongly linked to its level of health expenditure, our assumption was confirmed by this study. We have managed to obtain data that indicates the level of health expenditure as a percentage of the Gross Domestic Product (GDP), providing objectivity to this information and facilitating comparisons between countries. Moreover, we have observations spanning an extensive duration and covering a substantial number of countries.
| Country | Period | Health_Expense | |
|---|---|---|---|
| 10642 | Africa Eastern and Southern | 2000 | 5.666276 |
| 10644 | Africa Western and Central | 2000 | 3.753682 |
| 10645 | Angola | 2000 | 1.908599 |
| 10646 | Albania | 2000 | 5.944186 |
| 10647 | Andorra | 2000 | 5.952103 |
| 10648 | Arab World | 2000 | 4.013979 |
Code
# Raw Data Importation
df_Health_Expense_By_Country <- read.csv(here::here("Data/Health_Expense_By_Country.csv"),sep=";")
#12. Clean the data from Health expense by country and by year (df_Health_Expense_By_Country)
#12.1 Keep only the necessary columns
df_Health_Expense_By_Country <- df_Health_Expense_By_Country[,-c(2:57)]
df_Health_Expense_By_Country <- df_Health_Expense_By_Country[,c(1,2,6,8)]
#12.2 Rename the column country
colnames(df_Health_Expense_By_Country)[1] <- "Country"
#12.3 Use the gather function to pivot the data as long to remove the year as column
df_Health_Expense_By_Country <- gather(df_Health_Expense_By_Country, key = "Period", value = "Health_Expense", -Country)
#12.3 Use the gsub function to remove the X before the year in the column period
df_Health_Expense_By_Country$Period <- gsub("X", "", df_Health_Expense_By_Country$Period)
#12.4 Put the value of Health expense as numeric ones
df_Health_Expense_By_Country$Health_Expense <- as.numeric(gsub(",", ".", df_Health_Expense_By_Country$Health_Expense))
#12.5 Removing potential missing value
df_Health_Expense_By_Country <- subset(df_Health_Expense_By_Country, !is.na(Health_Expense))3.2.6 Rate of the infantile mortality
The infantile mortality can be linked to the health of a country’s population, it’s what we funded in this article. This article is trying to link various health factor(for example nutrition) to the child mortality. As before, we selected the columns of interest and rename them, change our value column as a numerical one and remove potential NA values.
| Country | Period | Infantile_Mortality |
|---|---|---|
| Afghanistan | 1957 | 37.59054 |
| Afghanistan | 1958 | 36.96284 |
| Afghanistan | 1959 | 36.34375 |
| Afghanistan | 1960 | 35.73006 |
| Afghanistan | 1961 | 35.16583 |
| Afghanistan | 1962 | 34.58399 |
Code
# Raw Data Importation
df_Child_Mortality_Rate <- read.csv(here::here("Data/Child-mortality-rate.csv"))
#10. Clean the data of the Infantile Mortality Rate (df_Child_Mortality_Rate)
#10.1 Keep only the necessary columns
df_Child_Mortality_Rate <- df_Child_Mortality_Rate[,c(1,3,4)]
#10.2 Supress potential missing values in our data
df_Child_Mortality_Rate[, 3] <- lapply(df_Child_Mortality_Rate[, 3], as.numeric)
#10.3 Rename the columns
df_Child_Mortality_Rate <- subset(df_Child_Mortality_Rate, !is.na(df_Child_Mortality_Rate))
#10.4 Rename the columns
colnames(df_Child_Mortality_Rate)[c(1,2,3)] <- c("Country", "Period", "Infantile_Mortality")3.2.7 Probability of dying from a Non-Communicable disease (NCD)
The Non-Communicable Diseases (NCDs) such as respiratory or cardiovascular one, prove to be a particularly interesting health indicator, as demonstrated by this WHO article. Therefore, we chose to include them to provide yet another perspective on health in addition to data such as life expectancy, which remains relatively incomplete, as previously explained. We successfully found a comprehensive raw dataset containing information on the probability of dying from a Non-Communicable Disease per country and per year. Our data is stratified by gender, but since our analysis does not focus on this dimension, we decided to retain the average value. Subsequently, we performed our usual data cleaning operations.
| Country | Period | Prob_Dying_NCD | |
|---|---|---|---|
| 1 | Chile | 2019 | 10.04 |
| 5 | New Zealand | 2019 | 10.26 |
| 6 | United Kingdom of Great Britain and Northern Ireland | 2019 | 10.30 |
| 8 | Netherlands | 2019 | 10.35 |
| 10 | Austria | 2019 | 10.37 |
| 14 | Malta | 2019 | 10.53 |
Code
# Raw Data Importation
df_NCD_mortality_rate <- read.csv(here::here("Data/Age-standardized_NCD_mortality_rate.csv"))
#4. Clean the data of the probability of dying from a Non-Communicable disease [NCD] (df_Proba_Of_Dying_From_NCD)
#4.1 Keep only the necessary columns
df_Proba_Of_Dying_From_NCD <- df_Proba_Of_Dying_From_NCD[,c(8,10,13,24)]
#4.2 Keep only the necessary rows (both sexes,to remove the sex distinction)
df_Proba_Of_Dying_From_NCD <- df_Proba_Of_Dying_From_NCD[df_Proba_Of_Dying_From_NCD$Dim1 == "Both sexes",]
df_Proba_Of_Dying_From_NCD <- df_Proba_Of_Dying_From_NCD[,c(1,2,4)]
#4.3 change value of diabetes death rate to numerical ones
df_Proba_Of_Dying_From_NCD[, 3] <- lapply(df_Proba_Of_Dying_From_NCD[, 3], as.numeric)
#4.4 Suppress potential missing values in our data
df_Proba_Of_Dying_From_NCD <- subset(df_Proba_Of_Dying_From_NCD, !is.na(df_Proba_Of_Dying_From_NCD))
#4.5 Rename the columns
colnames(df_Proba_Of_Dying_From_NCD)[c(1,2,3)] <- c("Country", "Period", "Prob_Dying_NCD")3.3 Specific data for question 1
3.3.1 Taxes about sweetened beverages
For our first research question, we needed the data of countries which have implemented or not taxes on sweetened beverages. We found a raw dataset set which indicates whether a country has implemented taxes or not. We have data for 3 different years : 2017, 2019 and 2021. But we also added the additional year of 2013 as the first implementation of taxes on sweetened beverages started in 2014. The year 2013 adds value to our regression as no country has yet implemented any kind of tax.To do so, we used a for loop too had for each unique country in our data set the value 0 for the tax for the year 2013. Then, we had to filter our data to remove missing values, such as “No response” or “Don’t know”. We also change our value of taxes from “Yes” and “No” to boolean values such as 1 for “Yes” and 0 for other values (that is all “No”). Our work was not finished, we wanted to use the package map to display interactive maps, and match our country name to the country name of the package map. This is because our raw data didn’t use the normalized names. We found it unfortunate to have a relatively small dataset in terms of the temporal dimension. However, given that this tax is relatively new, we had to settle for what was available. In the clean dataset, we can observe 179 country and as we discuss have only 4 times observations which is 2013, 2017, 2019, 2021. The spread of our data is going to constraint our future analysis for question 1. So if we wanted to analyse data for question 1 we will absolutely need value for those years.
| Country | Period | Country Period | Tax_Sweetened_beverages |
|---|---|---|---|
| Algeria | 2021 | Algeria.2021 | 0 |
| Andorra | 2021 | Andorra.2021 | 0 |
| Angola | 2021 | Angola.2021 | 0 |
| Antigua and Barbuda | 2021 | Antigua and Barbuda.2021 | 0 |
| Armenia | 2021 | Armenia.2021 | 0 |
| Australia | 2021 | Australia.2021 | 0 |
Code
# Raw Data Importation
df_Tax_Sweetened_Beverages<- read.csv(here::here("Data/Existence_Of_tax_on_sugar-sweetened_beverages.csv"))
#1. Clean the data of the tax on sweetened beverages (df_Tax_Sweetened_Beverages)
#1.1 Keep only the necessary columns
df_Tax_Sweetened_Beverages <- df_Tax_Sweetened_Beverages[,c(8,10,30)]
#1.2 Keep only the necessary rows, Filtering the data that contain the value "Don't know" or "No response"
df_intermediate <- filter(df_Tax_Sweetened_Beverages,df_Tax_Sweetened_Beverages$Value =="Don't know"| df_Tax_Sweetened_Beverages$Value =="No response")
df_Tax_Sweetened_Beverages <- anti_join(df_Tax_Sweetened_Beverages, df_intermediate, by = "Location")
#1.3 Add the values for the year 2013
#1.3.1 Create a vector that contain each country present in the data
unique_vect <- unique(df_Tax_Sweetened_Beverages$Location)
#1.3.2 Loop to add the tax on sweetened beverage for each country
for (i in unique_vect) {
nouvelle_ligne <- data.frame(
Location = i,
Period = 2013,
Value = "No")
df_Tax_Sweetened_Beverages <- rbind(df_Tax_Sweetened_Beverages, nouvelle_ligne)
}
#1.4 Rename the columns
colnames(df_Tax_Sweetened_Beverages)[c(1,2,3)] <- c("Country", "Period", "Tax_Sweetened_beverages")
#1.5 Put boolean variables (if there's a tax -> 1 , if not -> 0)
df_Tax_Sweetened_Beverages$Tax_Sweetened_beverages <- ifelse(df_Tax_Sweetened_Beverages$Tax_Sweetened_beverages == "Yes", 1, 0)
#1.6 New variable with the country and the period (Primary Key)
df_Tax_Sweetened_Beverages[4] <- paste(df_Tax_Sweetened_Beverages$Country, df_Tax_Sweetened_Beverages$Period, sep = ".")
colnames(df_Tax_Sweetened_Beverages)[4] <- "Country.Period"
#1.7 Change the order of the columns
df_Tax_Sweetened_Beverages <- df_Tax_Sweetened_Beverages[, c("Country", "Period", "Country.Period", "Tax_Sweetened_beverages")]
#1.8 Change the country name to match the package map name's country
df_Tax_Sweetened_Beverages <- df_Tax_Sweetened_Beverages %>%
mutate(Country = ifelse(Country == "Russian Federation", "Russia", Country))
df_Tax_Sweetened_Beverages <- df_Tax_Sweetened_Beverages %>%
mutate(Country = ifelse(Country == "Bolivia (Plurinational State of)", "Bolivia", Country))
df_Tax_Sweetened_Beverages <- df_Tax_Sweetened_Beverages %>%
mutate(Country = ifelse(Country == "Venezuela (Bolivarian Republic of)", "Venezuela", Country))
df_Tax_Sweetened_Beverages <- df_Tax_Sweetened_Beverages %>%
mutate(Country = ifelse(Country == "United Republic of Tanzania", "Tanzania", Country))
df_Tax_Sweetened_Beverages <- df_Tax_Sweetened_Beverages %>%
mutate(Country = ifelse(Country == "United States of America", "USA", Country))
df_Tax_Sweetened_Beverages <- df_Tax_Sweetened_Beverages %>%
mutate(Country = ifelse(Country == "United Kingdom of Great Britain and Northern Ireland", "UK:Great Britain", Country))
df_Tax_Sweetened_Beverages <- df_Tax_Sweetened_Beverages %>%
mutate(Country = ifelse(Country == "Türkiye", "Turkey", Country))
df_Tax_Sweetened_Beverages <- df_Tax_Sweetened_Beverages %>%
mutate(Country = ifelse(Country == "Democratic People's Republic of Korea", "North Korea", Country))
df_Tax_Sweetened_Beverages <- df_Tax_Sweetened_Beverages %>%
mutate(Country = ifelse(Country == "Republic of Korea", "South Korea", Country))
df_Tax_Sweetened_Beverages <- df_Tax_Sweetened_Beverages %>%
mutate(Country = ifelse(Country == "Côte d’Ivoire", "Ivory Coast", Country))
df_Tax_Sweetened_Beverages <- df_Tax_Sweetened_Beverages %>%
mutate(Country = ifelse(Country == "Viet Nam", "Vietnam", Country))
df_Tax_Sweetened_Beverages <- df_Tax_Sweetened_Beverages %>%
mutate(Country = ifelse(Country == "Iran (Islamic Republic of)", "Iran", Country))
df_Tax_Sweetened_Beverages <- df_Tax_Sweetened_Beverages %>%
mutate(Country = ifelse(Country == "Czechia", "Czech Republic", Country))
df_Tax_Sweetened_Beverages <- df_Tax_Sweetened_Beverages %>%
mutate(Country = ifelse(Country == "Republic of Moldova", "Moldova", Country))
#1.9 Summarize our data using the package dfSummary
df_summary <- dfSummary(df_Tax_Sweetened_Beverages)
print(df_summary)3.3.2 Number of deaths by risk factor
We were interested in two main risk factors for which we found literature indicating a serious link with the consumption of sugar or, more precisely, sweetened drinks. The first factor we were interested in was related to death rates from high blood pressure. The second was obesity rates. We wanted to have these two factors over several periods and for a wide range of geographical areas. We managed to find a raw dataset that contained numerous risk factors for several years and in many countries. Our main concern was that our data was in absolute numbers of deaths. So we would need the population of each country and also by date to be able to calculate a mortality rate and not bias our results because countries have different population sizes. To clean up the data of interest, we eliminated the columns that did not provide any information for our research questions. We then renamed the columns we had selected, with the colnames function. Then, by adding two operations, we ensured that our data were numerical values (necessary for future calculations) and were rounded to the nearest unit. We also made sure that there were no missing values, to drop this potential missing, we use the is.na() function. Finally, we wanted to check whether the quantity of data was sufficient, both in terms of the number of years available and the number of countries included. We used the function dfSummary of the package summarytools to get a good overview of our data. We therefore have data for 228 countries/regions over a 29-year period from 1990 to 2019.
| Country | Period | Total_Death_HB_Pressure | Total_Death_Obesity |
|---|---|---|---|
| Afghanistan | 1990 | 25633 | 9518 |
| Afghanistan | 1991 | 25872 | 9489 |
| Afghanistan | 1992 | 26309 | 9528 |
| Afghanistan | 1993 | 26961 | 9611 |
| Afghanistan | 1994 | 27658 | 9675 |
| Afghanistan | 1995 | 28090 | 9608 |
Code
# Raw Data Importation
df_Number_of_deaths_by_risk_factor <- read.csv(here::here("Data/Number_of_deaths_by_risk_factor.csv"))
#2. Clean the data of the number of deaths by risk factor (df_Number_of_deaths_by_risk_factor)
#2.1 Keep only the necessary columns
df_Number_of_deaths_by_risk_factor <- df_Number_of_deaths_by_risk_factor[,c(1,3,4,20)]
#2.2 Rename the columns
colnames(df_Number_of_deaths_by_risk_factor)[c(1,2,3,4)] <- c("Country", "Period", "Total_Death_HB_Pressure","Total_Death_Obesity")
# 2.3 Change value of risk factor to numeric ones
df_Number_of_deaths_by_risk_factor[, 3:4] <- lapply(df_Number_of_deaths_by_risk_factor[, 3:4], as.numeric)
#2.4 Round the 2 ast column value as integer
df_Number_of_deaths_by_risk_factor <- df_Number_of_deaths_by_risk_factor %>%
mutate(across(c(Total_Death_HB_Pressure, Total_Death_Obesity), round))
#2.5 Supress potential missing values in our data
df_Number_of_deaths_by_risk_factor <- subset(df_Number_of_deaths_by_risk_factor, !is.na(Total_Death_HB_Pressure))
df_Number_of_deaths_by_risk_factor <- subset(df_Number_of_deaths_by_risk_factor, !is.na(Total_Death_Obesity))
#2.6 Summarize our data using the package dfSummary
df_summary <- dfSummary(df_Number_of_deaths_by_risk_factor)
#print(df_summary)3.3.3 Death rate from diabetes, malnutrition and liver disease
We wanted to have a rate encompassing several diseases linked with a poor diet and bad eating habits. First we get interested by diabetes, we found in this meta-analysis that consumption of sweetened beverages was closely related to the probability of contracting type 2 diabetes. We found a raw dataset that contain the death rate from diabetes in ‰. Firstly, we started by dropping column that wasn’t interesting for us, as always we wanted to keep data about Country,Year of the obesrvation and in this case, the death rate from diabetes. Finally, we used the function dfSummary of the package summarytools to get a good overview of our data. We therefore have data for 228 countries/regions over a 29-year period from 1990 to 2019
| Country | Period | Death_Diabetes |
|---|---|---|
| Afghanistan | 1990 | 30.93 |
| Afghanistan | 1991 | 30.37 |
| Afghanistan | 1992 | 29.84 |
| Afghanistan | 1993 | 29.65 |
| Afghanistan | 1994 | 29.62 |
| Afghanistan | 1995 | 29.45 |
Code
# Raw Data Importation
df_Death_rate_from_diabetes <- read.csv(here::here("Data/Death-rate-from-diabetes.csv"))
#5. Clean the data of the diabetes (df_Death_rate_from_diabetes)
#5.1 Keep only the necessary columns
df_Death_rate_from_diabetes <- df_Death_rate_from_diabetes[,c(1,3,4)]
#5.2 change value of diabetes death rate to numerical ones
df_Death_rate_from_diabetes[, 3] <- lapply(df_Death_rate_from_diabetes[, 3], as.numeric)
#5.3 Rename the columns
colnames(df_Death_rate_from_diabetes)[c(1,2,3)] <- c("Country", "Period", "Death_Diabetes")
#5.4 Supress potential missing values in our data
df_Death_rate_from_diabetes <- subset(df_Death_rate_from_diabetes, !is.na(df_Death_rate_from_diabetes))
#5.5 Summarize our data using the package dfSummary
df_summary <- dfSummary(df_Death_rate_from_diabetes)
print(df_summary)We came across “amusing” articles that showed in certain countries, mostly impoverished ones, the price of Coca-Cola or other sugary beverages could be cheaper than water. This situation might lead a population with limited means to consume sugary drinks and consequently suffer from malnutrition out of necessity. This is why data on malnutrition appeared to be of significant interest in our research. We managed to find a raw dataset that illustrates the mortality rate in ‰ due to malnutrition by country and year.
| Country | Period | Death_Malnutrition |
|---|---|---|
| Afghanistan | 1990 | 11.04 |
| Afghanistan | 1991 | 9.93 |
| Afghanistan | 1992 | 9.34 |
| Afghanistan | 1993 | 9.75 |
| Afghanistan | 1994 | 10.13 |
| Afghanistan | 1995 | 9.92 |
Code
# Raw Data Importation
df_Malnutrition_death_rate <- read.csv(here::here("Data/Malnutrition-death-rates.csv"))
#6. Clean the data of the Malnutrition death rate (df_Malnutrition_death_rate)
#6.1 Keep only the necessary columns
df_Malnutrition_death_rate <- df_Malnutrition_death_rate[,c(1,3,4)]
#6.2 change value of Malnutrition death rate to numerical ones
df_Malnutrition_death_rate[, 3] <- lapply(df_Malnutrition_death_rate[, 3], as.numeric)
#6.3 Supress potential missing values in our data
df_Malnutrition_death_rate <- subset(df_Malnutrition_death_rate, !is.na(df_Malnutrition_death_rate))
#6.4 Rename the columns
colnames(df_Malnutrition_death_rate)[c(1,2,3)] <- c("Country", "Period", "Death_Malnutrition")Third and last interest data was the liver disease, we saw in a fascinating meta-analysis that the consumption of sweetened beverages could lead to serious liver disease and more precisely on fatty liver disease. So with these evidence of the existing link we can’t let out the liver disease data. We found a raw dataset that included countries data, year and mortality rate due to liver disease in ‰. This data was pretty clean and we only had to perform the same cleaning operations as before.
| Country | Period | Death_Liver_disease |
|---|---|---|
| Afghanistan | 1990 | 2673 |
| Afghanistan | 1991 | 2728 |
| Afghanistan | 1992 | 2830 |
| Afghanistan | 1993 | 2943 |
| Afghanistan | 1994 | 3027 |
| Afghanistan | 1995 | 3076 |
Code
# Raw Data Importation
df_Liver_Disease_death_rate <- read.csv(here::here("Data/Deaths-from-liver-disease.csv"))
#7. Clean the data of the Liver disease death rate (df_Liver_Disease_death_rate)
#7.1 Keep only the necessary columns
df_Liver_Disease_death_rate <- df_Liver_Disease_death_rate[,c(1,3,4)]
#7.2 change value of Malnutrition death rate to numerical ones
df_Liver_Disease_death_rate[, 3] <- lapply(df_Liver_Disease_death_rate[, 3], as.numeric)
#7.3 Supress potential missing values in our data
df_Liver_Disease_death_rate <- subset(df_Liver_Disease_death_rate, !is.na(df_Liver_Disease_death_rate))
#7.4 Rename the columns
colnames(df_Liver_Disease_death_rate)[c(1,2,3)] <- c("Country", "Period", "Death_Liver_disease")3.4 Specific data for question 2
3.4.1 Tobacco consumption
For our second research question we needed the data concerning the consumption of tobacco by country and its evolution by year. The raw dataset was pretty clean, we only had to remove the irrelevant columns, renames our column names, change our number of tobacco consumption to numerical value (note that here the value is in % of population) and finally discard missing values.
| Country | Period | Tobacco_Consumption |
|---|---|---|
| Afghanistan | 2000 | 36.9 |
| Afghanistan | 2005 | 32.7 |
| Afghanistan | 2010 | 29.1 |
| Afghanistan | 2015 | 26.0 |
| Afghanistan | 2018 | 23.8 |
| Afghanistan | 2019 | 23.8 |
Code
# Raw Data Importation
df_Tobacco_Consumption <- read.csv(here::here("Data/prevalence-of-tobacco-use-sdgs.csv"))
#3 Cleaning the data of Tobacco consumption
# 3.1 Keep only necessary columns
df_Tobacco_Consumption <- df_Tobacco_Consumption[,-c(2)]
# 3.2 Rename the columns
colnames(df_Tobacco_Consumption)[c(1,2,3)] <- c("Country", "Period","Tobacco_Consumption")
# 3.3 Convert our data to numerical ones
df_Tobacco_Consumption[, 3] <- as.numeric(df_Tobacco_Consumption[, 3])
# 3.4 Suppress potential missing values in our data
df_Tobacco_Consumption <- subset(df_Tobacco_Consumption, !is.na(df_Tobacco_Consumption))3.4.2 Death rate due to tobacco
We also required to know tobacco’s death toll in the world. This raw dataset was also pretty clean, we computed the same operation as before, removing one column and renaming it to match our needs.
| Country | Period | Percentage_Death_From_Smoking |
|---|---|---|
| Afghanistan | 1990 | 4.018696 |
| Afghanistan | 1991 | 4.070636 |
| Afghanistan | 1992 | 4.180628 |
| Afghanistan | 1993 | 4.213862 |
| Afghanistan | 1994 | 4.160192 |
| Afghanistan | 1995 | 4.232945 |
Code
# Raw Data Importation
df_Death_From_Smoking_By_Country <- read.csv(here::here("Data/share-deaths-smoking.csv"))
#1 Cleaning the data of the death rate from smoking by country
# 1.1 Keep only necessary columns
df_Death_From_Smoking_By_Country <- df_Death_From_Smoking_By_Country[,-c(2)]
# 1.2 Rename the columns
colnames(df_Death_From_Smoking_By_Country)[c(1,2,3)] <- c("Country", "Period", "Percentage_Death_From_Smoking")
# 1.3 Convert our data to numerical ones
df_Death_From_Smoking_By_Country[, 3] <- as.numeric(df_Death_From_Smoking_By_Country[, 3])
# 1.4 Suppress potential missing values in our data
df_Death_From_Smoking_By_Country <- subset(df_Death_From_Smoking_By_Country, !is.na(df_Death_From_Smoking_By_Country))3.4.3 Taxes on tobacco
Our question relies mainly on the tax’s potential effect on our different factors. So we also needed the data regarding tax on tobacco products. In the end we have a column containing the tax force by country. A number going from 1 to 5 which indicates the importance of this tax. 1 is less than 10% tax, 2 is between 10 to 25%. 3 is from 26 to 50%,4 is from 51 to 75%,and 5 is for taxes above 75%. The raw dataset were also pretty clean, we only computed simple operations to transform them as we wanted.
| Country | Period | Percentage_Death_From_Smoking |
|---|---|---|
| Afghanistan | 1990 | 4.018696 |
| Afghanistan | 1991 | 4.070636 |
| Afghanistan | 1992 | 4.180628 |
| Afghanistan | 1993 | 4.213862 |
| Afghanistan | 1994 | 4.160192 |
| Afghanistan | 1995 | 4.232945 |
Code
# Raw Data Importation
df_Tax_On_Tobacco <- read.csv(here::here("Data/share-of-tobacco-retail-price-that-is-tax.csv"))
#2 Cleaning the data of the tax on tobacco
# 2.1 Keep only necessary columns
df_Tax_On_Tobacco <- df_Tax_On_Tobacco[,-c(2)]
# 2.2 Rename the columns
colnames(df_Tax_On_Tobacco)[c(1,2,3)] <- c("Country", "Period","Taxes_On_Tobacco")
# 2.3 Convert our data to numerical ones
df_Tax_On_Tobacco[, 3] <- as.numeric(df_Tax_On_Tobacco[, 3])
# 2.4 Suppress potential missing values in our data
df_Tax_On_Tobacco <- subset(df_Tax_On_Tobacco, !is.na(df_Tax_On_Tobacco))3.4.4 Banning advertising on tobacco
To add a control variable and another dimension to our analysis we choose to include the data about the banning of tobacco advertisements. The raw dataset was a bit more disorganised, we had to change all our column names, proceed to a pivot longer to have our year as row attributed in a new column period. Finally, we removed all the lacking values.
| Country | Period | Advertising_Banned |
|---|---|---|
| Afghanistan | 2020 | No |
| Afghanistan | 2018 | Yes |
| Afghanistan | 2016 | Yes |
| Algeria | 2020 | Yes |
| Algeria | 2018 | Yes |
| Algeria | 2016 | Yes |
Code
# Raw Data Importation
df_Banning_Advertising_On_Tobacco <- read.csv(here::here("Data/Banning_Advertising_OnTobacco.csv"))
#4 Cleaning the banning advertising on tobacco by country
#4.1 Renaming the columns
colnames(df_Banning_Advertising_On_Tobacco)[1] <- "Country"
colnames(df_Banning_Advertising_On_Tobacco)[2] <- "2020"
colnames(df_Banning_Advertising_On_Tobacco)[3] <- "2018"
colnames(df_Banning_Advertising_On_Tobacco)[4] <- "2016"
#4.2 Pivot longer to have our year by row in a new column Period
df_Banning_Advertising_On_Tobacco <- pivot_longer(df_Banning_Advertising_On_Tobacco, cols = starts_with("20"), names_to = "Period", values_to = "Advertising_Banned")
#4.3 Removing value with no interest for us
df_Banning_Advertising_On_Tobacco <- df_Banning_Advertising_On_Tobacco %>%
filter(df_Banning_Advertising_On_Tobacco$Advertising_Banned != "Answer not provided" & df_Banning_Advertising_On_Tobacco$Advertising_Banned != "Report not provided" )3.5 Specific data for question 3
3.2.10 Gini Coefficient
For our third research question, we needed an indicator representing the inequalities within a population. We choose the Gini index as it encompasses inequality through a variety of environments (income, wealth and consumption) which allows us to understand and analyse our data more thoroughly. The raw dataset was quiet messy.We first needed to remove unuseful rows. We started by deleting the first 3 rows and used the fourth as the headline for our columns. We also dropped unnecessary columns. We renamed our main columns, using the function gather to pivot our date as rows. Finally we had to remove potential missing values and transform our values for the Gini coefficient as numeric ones.
| Country | Period | Gini_Index |
|---|---|---|
| United States | 1963 | 37.6 |
| United States | 1964 | 38.1 |
| United States | 1965 | 37.5 |
| United States | 1966 | 37.8 |
| United States | 1967 | 36.9 |
| United Kingdom | 1968 | 26.8 |
Code
# Raw Data Importation
df_Gini_Index <- read.csv(here::here("Data/Gini_Index.csv"),sep=";")
#1 Cleaning the Gini Index dataframe
#1.1 Suppress unnecessary rows
df_Gini_Index <- df_Gini_Index[-c(1, 2), ]
#1.2 Use the thrid line as headline
colnames(df_Gini_Index) <- as.character(unlist(df_Gini_Index[1,]))
#1.3 Delete the row use now use as colnames
df_Gini_Index <- df_Gini_Index[-1, ]
#1.4 Keep the necessary column
df_Gini_Index <- df_Gini_Index[,-c(2:4)]
#1.5 Rename the column country
colnames(df_Gini_Index)[1] <- "Country"
#1.5 Use the gather function to pivot the data as long to remove the year as column
df_Gini_Index <- gather(df_Gini_Index, key = "Period", value = "Gini_Index", -Country)
# 1.6 Delete all the lines that have no value
df_Gini_Index <- df_Gini_Index %>% filter(df_Gini_Index$Gini_Index != "")
#1.7 Transfrom the value as numeric ones
df_Gini_Index$Gini_Index <- as.numeric(gsub(",", ".", df_Gini_Index$Gini_Index))3.6 Final dataset
Finally we selected every dataset we needed and merged them all together to have our final base dataset. Since we named every column the same way, the command merge did what we wanted. Some final changes have been made like modifying the values of the death due to obesity and high blood pressure in rates instead of absolute value. Also, we removed the NA values that were present. These values came from the fact that GDP or Health expenditure data wasn’t collected every year in some countries. We also needed to calculate 2 new variables, as all of our death rate is in ‰ we transformed the absolute value of death number for High blood Pressure and obesity to rate value ‰.
Code
#####################################
## Merging the dataframes together ##
#####################################
df_merge <- merge(x=df_Tax_Sweetened_Beverages,y=df_Number_of_deaths_by_risk_factor,by=c("Country","Period"))
df_merge <- merge(x=df_merge,y=df_Life_Expectancy_Final,by=c("Country","Period"))
df_merge <- merge(x=df_merge,y=df_Proba_Of_Dying_From_NCD,by=c("Country","Period"))
df_merge <- merge(x=df_merge,y=df_Death_rate_from_diabetes,by=c("Country","Period"))
df_merge <- merge(x=df_merge,y=df_Malnutrition_death_rate,by=c("Country","Period"))
df_merge <- merge(x=df_merge,y=df_Liver_Disease_death_rate,by=c("Country","Period"))
df_merge <- merge(x=df_merge,y=df_Share_of_population_with_cancer,by=c("Country","Period"))
df_merge <- merge(x=df_merge,y=df_Death_rate_from_digestive_diseases,by=c("Country","Period"))
df_merge <- merge(x=df_merge,y=df_Child_Mortality_Rate,by=c("Country","Period"))
df_merge <- merge(x=df_merge,y=df_PopByYear,by=c("Country","Period"))
df_merge <- merge(x=df_merge,y=df_GDP,by=c("Country","Period"))
df_merge <- merge(x=df_merge,y=df_Health_Expense_By_Country,by=c("Country","Period"))
#1. Modify columns to have a rate rather than an absolute value for high blood pressure death and obesity death
df_merge <- df_merge %>%
mutate(
Death_Obesity = (Total_Death_Obesity/as.numeric(Population)*100000),
Death_HBP = (Total_Death_HB_Pressure/as.numeric(Population)*100000)
) %>%
select(-Total_Death_Obesity, -Total_Death_HB_Pressure)4. Exploratory Data Analysis
4.1 Exploratory Data Analysis for health data
4.1.1 Countries classify by GDP
Firstly, we collected data to create four separate classes based on GDP. The data stems from the World Bank and is compared through three different years to evaluate the evolution of the different countries. We ranked the four classes by quartile such as Q1 is the 25% of countries with the lowest GDP per capita. We used GDP per capita as this is a better metric to measure wealth across countries as this measures the baskets of goods one person can buy in a country compared to another one. (1) We first downloaded the CSV dataset and uploaded it on R. (2) After checking for missing values, we cleaned up the dataset to leave the countries that had values. (3) Using the function we ordered the countries in four distinct parts: Low income, Medium low income, Medium high income, High income.
Code
# Graph of the Class distribution
# Define the color palette
palette_bleus <- colorRampPalette(c("#E0F3F8", "#99C2D5", "#66A2D5", "#2C7BB6"))(4)
# Create the bar plot with adjusted colors, thicker bars, and more space
Class_Repartition <- ggplot(df_2019, aes(x = Classe, fill = Classe)) +
geom_bar(color = "black", size = 0.5, width = 0.7) + # Adjust width for thicker bars
scale_fill_manual(
values = palette_bleus,
breaks = unique(df_2019$Classe),
labels = unique(df_2019$Classe),
name = "Class" # Set the legend title
) +
labs(
title = "Distribution of country by Class for the year 2019",
x = "Class", # Set the x-axis label
y = "Number of countries"
) +
theme_minimal()4.1.2 Our data on an interactive map
We also desired to design an interactive map to visualise different data per country. Here we can see the Countries which have implemented taxes for 2017 in green and the ones which have not in red. We can also access the data of population, GDP and category of each country by clicking on it.
Code
# Data transforming
df_Tax_Sweetened_Beverages_Map <- df_merge
df_Tax_Sweetened_Beverages_Map$Tax_Sweetened_beverages <- ifelse(df_merge$Tax_Sweetened_beverages == "1", "Taxes", "No Taxes")
Tax_on_sweetened_beverages <- filter(df_Tax_Sweetened_Beverages_Map, Period == "2017") %>% arrange()
# Get data from our package
world <- ne_countries(returnclass = "sf")
#Rename the column for the merge
colnames(world)[10] <- "Country"
# Join our data
world_data <- merge(x=world,y=Tax_on_sweetened_beverages,by="Country")
# Set a color palette
color_pal <- colorFactor(c("red", "green"), domain = c("Taxes", "No Taxes"))
# Create the interactive map
inter_graph <- leaflet(world_data) %>%
addProviderTiles(providers$OpenStreetMap.Mapnik) %>%
addPolygons(color = ~color_pal(world_data$Tax_Sweetened_beverages),
weight = 1,
popup = ~paste("Country: ", name, "<br>", "Tax: ", world_data$Tax_Sweetened_beverages, "<br>", "Population: ", world_data$Population, "<br>","GDP: ", world_data$GDP, "<br>","Classe: ", world_data$Classe, "<br>"),
highlightOptions = highlightOptions(color = "black", weight = 2, bringToFront = TRUE)) %>%
addLegend("bottomright", pal = color_pal, values = unique(world_data$Tax_Sweetened_beverages),
title = "Legend", opacity = 1, labels = unique(world_data$Tax_Sweetened_beverages)) %>%
setView(lng = -39.443407, lat = 35.649315, zoom = 2.4)4.1.3 Health ranking of countries
Next, we had to find elements to indicate health. When trying to find a good health indicator we could not find a relevant health indicator for all countries across our time periods. This is why we chose different indicators to judge the health level of a country. We choose these: Life expectancy at birth, People who contracted cancer, Death rates from malnutrition, Death rates from digestive diseases, Death rate from obesity and Child mortality.
We first evaluated the overall trends in the world regarding these different diseases and death causes.
We can clearly see the impact of COVID as health expenses exploded
What can we conclude from these graphs: Some data seems logical and is not cause of concern, for example the overall life expectancy keeps increasing even though there is a slight dip in 2020, possibly because of COVID. As people get older and the population larger the number of people with cancer keeps increasing even though at a slight decreasing tendency. Child mortality and deaths from malnutrition decreases as countries become more developed. However, two graphs are worth analysing further. First, the death of digestive diseases which has increased since 2013 at a dangerous rate. This might be due to an increase in highly processed food, fast foods and sweet beverages at the international level. Second is the obesity death rate which had a very clear drop and stabilisation as of 2005. This might be due to an increasing awareness of food consumption and increased medical attention to the issue.
4.1.4 Evolution of taxation of sweet beverages
The next graph describes the evolution of taxation of sweet beverages across countries.
The taxation started as of 2013, indicating a recent awareness of this issue. As of today, the evolution of countries that put taxes in place to regulate sweet beverages is constant with a slight increase in 2017. This allows us to legitimise this paper as to corroborate the effectiveness of such taxation in regards to health.
4.2 Exploratory Data Analysis for Tobacco data
4.2.1 Evolution of tobacco consumption
We first looked at the evolution of tobacco consumption over time. We can see a drop from 2000 to 2020 of nearly 10% with a slight plateau in 2018.
4.2.2 Evolution of deaths due to tobacco consumption
We compare the number of deaths due to tobacco consumption and the evolution of tobacco consumption over time.
4.2.3 Evolution of number of country that banned advertising
We compare the number of deaths due to tobacco consumption and the evolution of tobacco consumption over time.
4.2.4 Exploring our data with an interactive map
On this interactive map we can observe the evolution of the tax percentage on tobacco products around the world as well as compare the evolution of prices over time.
By analyzing parts of the world, we can note that Europe taxes tobacco the heaviest (>75%). America follows with on average 50%-75% taxes. Asia has on average low taxes on tobacco (25%-50%). The continent which taxes tobacco products the least is Africa.
4.3 Exploratory Data Analysis about inequalities
What are the social and economic consequences? When talking about income inequalities, we often refer to the Gini or Theil index as a measure of wealth distribution across the country.
4.3.1 Gini index over the time
We find interesting to show how wide our data is in terms of time width.. develop
4.3.2 Interactive map
We also find interesting to display our data on an interactive map so we can explore our data intuitively and also seeing how much country we can find in our data.. develop
4.3.3 Gini index by class
We also wanted to approch our data with our past class design, so we ploted our different class with the gini coefficient to see if we were having something to go deeper with
4.3.4 Gini index regarding life expectancy
We also mixed the gini coefficient regarding the life expectancy to know if we were having something to dig here.
5. Analysis
In order to simplify our analysis, we had the idea to combine all our health data to create one robust indicator of health by country based on our informations. To get started, we needed to normalize our data, we started by sorting our interest columns in our main data frame and then computing the normalization. Then, we had to add weight on this indicator,as we can imagine the life expectancy of a country is probably more describing the health of the population than the Death rate form high blood pressure issue. We based our weight on some study ….. than allow us to estimate how our data was representative of the good health of a Country’s population.
A voir si possible,sinon ça dégage
5.1 Anylsis of taxes on sweetened beverages
5.1.1 Influence of a country’s GDP on life expectancy
For us it was interesting to see how can potentially impact the GDP on life expectancy Develop..
As we can see, there is clearly a difference ….
5.1.2 Link between GDP and Health expense
For us it was interesting to see how can potentially impact the GDP on the average of health expense Develop..
As we can see, there is clearly a difference, the more country has an high revenue the more the have large health expense….
5.1.3 Influence of a country’s GDP from dying of a NCD
We chose to look at NCDs (non-communicable diseases) as this eliminates outliers where a epidemie would have taken place. We looked at the death rates from NCDs per quartile as described in 2.1.1. We used a box plot for each country to center the observations and eliminate any outlier that could falsely alter the results.
We see a perfect correlation between GDP and deaths by NCDs. Furthermore, we can observe that the two low income groups have a higher spread in the box plot. This indicates that low income countries are more affected by different metrics as just financial means. We will explore some possible reasons later on in this paper.
5.1.4 Taxation per income level
Next we looked at the evolution of taxation between 2017 and 2019 across different income levels. This will allow us to evaluate whether the income level has an influence across time.
In 2017 both low income and high income had a similar number of countries taxing sweet beverages. As of 2019 the differences flatten with similar levels except for low income which is lower. High income had the highest jump, indicating that there was a need for this tax to be put in place in countries of high income.
5.1.5 PCA Analysis
Compléter l’analyse PCA
5.1.6 Correlation Matrix
The correlation matrix permits us to find correlation between our different variables. The color scale allows us to find the intensity of correlation or negative correlation.
First, we can confirm important theories. Correlation between Life expectancy and Infantile death rate, malnutrition death rate, deaths from NCDs are - ≥ 0.8. However the correlation is much lower between Life expectancy and Diabetes death rate where correlation is -0.4 which indicates that having diabetes is not strongly linked to a lower life expectancy. We can confirm the importance of high GDP per capita for a country’s life expectancy and deaths by NCDs. The correlation between GDP per head and Probability of dying of an NCD is -0.6. The correlation between GDP per head and Life expectancy is 0.7. This results explains that GDP per capita is responsible for a high life expectancy and a lower probability of dying of an NCD. Looking at known correlation between types of deaths we can understand some mechanics of roles of different variables. The correlation between Infantile death rate and Deaths from malnutrition is 0.7. The correlation between GDP per head and infantile death rate is -0.6. With these results we can observe that infantile death is positively correlated to the death rate of malnutrition which is negatively correlated to GDP per capita. This allows us to say that a country with a higher GDP per capita will have fewer deaths by malnutrition and thus implicating a lower infancy death rate. Finally we observe the link between obesity and deaths due to high blood pressure which is one consequence from obesity. The correlation between death rate of obesity and death rate from high blood pressure is 0.9 which confirms known consequences of obesity.
5.1.7 Predictive modeling
We built a predictive model to estimate whether a country taxes sweet beverages by regressing linearly on different health variables. We split our dataset in two, the first slice tests the predictability of the model and the second tests its robustness.
Développer….
| Coefficient | Std.Error | Significance | |
|---|---|---|---|
| (Intercept) | -5.0623588 | 5.1749065 | |
| Life_Expectancy | 0.0797672 | 0.0673430 | |
| Prob_Dying_NCD | -0.0742814 | 0.0463390 | |
| GDP_by_head | -0.0000304 | 0.0000211 | |
| Death_Diabetes | -0.0054339 | 0.0102023 | |
| Death_Malnutrition | 0.0158927 | 0.0477237 | |
| Percentage_Cancer | -0.0775167 | 0.0808610 | |
| Death_Digestive_Diseases | 0.0298611 | 0.0149127 | * |
| Health_Expense | -0.0340186 | 0.0898137 | |
| Death_Obesity | 0.0359686 | 0.0127132 | * |
| Death_HBP | -0.0216721 | 0.0071348 | * |
| ClasseMedium-low Income | -0.3297392 | 0.6736323 | |
| ClasseMedium Income | -0.6719511 | 0.7624925 | |
| ClasseHigh Income | -0.7365234 | 1.1206009 |
| Réalité | Positif | Négatif |
|---|---|---|
| Positif | 5 | 28 |
| Négatif | 4 | 84 |
5.2 Anylsis of taxes effect on Tobacco consumption
5.2.1 Tobacco consumption compared to GDP per capita
We will now take a look at the consumption of tobacco compared to GDP per capita over three time years which are 2015, 2018 and 2020.
The two variables Tobacco consumption and GDP per capita are slightly positively correlated. However, in the data we find two outliers that might be flashing these results. Monaco and Luxembourg are two very small countries that seem to be outliers. As their population is small compared to the global population we will omit their results in order to find a clearer correlation in the world population.
When we omit Luxembourg and Monaco we find the following results:
The results do not change significantly. The correlation between the two still correlates only slightly positively. This indicates that the habit of tobacco consumption is not a function of purchasing power. We can suggest that tobacco consumption is caused by cultural and social differences between countries and not from income differences.
5.2.2 Taxation of tobacco as a function of GDP
We now look at the correlation between taxation of tobacco and GDP per head.
There is a positive correlation between these two variables in 2014 and 2018. There are no major changes between these two dates. This allows us to state that the higher the GDP per capita in a country, the higher the taxes on tobacco products.
5.2.3 Deaths from tobacco consumption to GDP Across 2014, 2018 and 2020
There is a positive correlation between Deaths from tobacco and GDP by head.
5.2.4 Correlation matrix between our variable about tobacco and health data
We decided to analyse the correlation between our variables
5.2.5 Compare mortality based on the advertising banning
We found interesting to see if there is difference on country/contient on mortality compared to the banishment of advertising
5.2.6 Compare mortality based on the taxation level
add text
then we wanted to see if there were difference in time..developp
what we can conclude ….
5.3 Anylsis of Gini coefficient
5.3.2 Correlation matrix - with Gini coefficient
6. Discussion
6.1 Conclusion
6.2 Limitations
6.2.1 Availability and quality of Data
Securing access to comprehensive and relevant datasets proved to be a significant hurdle. Despite meticulous planning and defined project scopes, locating datasets that encompassed all necessary variables was a formidable challenge. The intricacies stemmed from data silos, disparate sources, and proprietary constraints, limiting the accessibility to a consolidated and holistic dataset.
In a landscape where the data ecosystem is often fragmented, the endeavor to aggregate, clean, and align datasets from diverse origins demanded extensive effort. Navigating through data repositories, APIs, and collaboration with data providers became imperative to bridge gaps in the availability of essential information.
Even when datasets were procured, ensuring their quality emerged as an intricate task. The inherent variability in data formats, missing values, outliers, and inconsistencies posed formidable obstacles. Robust data cleaning processes became indispensable to enhance the reliability and accuracy of subsequent analyses.
Quality assessment tools, anomaly detection algorithms, and domain-specific knowledge were leveraged to identify and rectify discrepancies within the datasets. This phase involved iterative cycles of validation, cleaning, and refinement to align the data with the requisite standards for robust analytical modeling.
6.2.2 No data on sweetened beverages consumption
The quest for information on sugary beverage consumption posed intricate hurdles, primarily stemming from the unavailability of dedicated datasets or repositories addressing this specific domain. The scarcity of centralized databases capturing detailed and up-to-date information on the consumption patterns of sugary drinks presented a substantial impediment to the research endeavor.
6.2.3 Challenges in Establishing Causality Amidst Multifactorial Dynamics
The complexities arose from the daunting task of discerning the most pertinent variables from a multitude of potential influencers, a task exacerbated by the intricate nature of the subject matter. This narrative elucidates the difficulties faced in making informed choices among a plethora of factors, a conundrum that significantly hindered the establishment of robust causal relationships.
The enormity of our analytical landscape demanded meticulous consideration of numerous factors, each purportedly wielding an influence on the phenomena under investigation. From the outset, the challenge lay in the judicious selection of variables that held substantive relevance to the research question. Despite an exhaustive review of diverse studies and an extensive exploration of the existing literature, the conundrum persisted, rendering the task of isolating salient factors a formidable endeavor.
The intricacy of the multifactorial landscape was further compounded by the dynamic nature of the data, requiring a nuanced understanding of temporal trends and contextual fluctuations. The plethora of potential confounders, moderators, and mediators introduced layers of complexity that made it arduous to disentangle the true drivers of the observed phenomena.
While literature reviews and empirical studies provided invaluable insights into the relationships among various factors, the inherent limitations of observational studies and the challenges of establishing causality in complex systems became apparent. The interplay of numerous covariates and the potential for confounding variables presented hurdles in establishing a causal link between our variables of interest.
Navigating this intricate terrain required a delicate balance between theoretical understanding, statistical rigor, and domain expertise. Despite employing sophisticated statistical techniques and leveraging advanced modeling approaches, the elusive quest for clear causal pathways persisted. Sensitivity analyses and robustness checks were conducted diligently, yet the underlying complexity of the system thwarted endeavors to isolate causal effects definitively.
- Impossible de generalisé l’analyse
- Conclusion abusives
6.3 Proposition for future work
- Possibilité d’utilisé des données sur la santé dentaire pour voir si une reduction de la conso des boissons sucrée a une incidence
Reference List (“GDP per capita (current US\() | Data”) Work Cited “GDP per capita (current US\)) | Data.” World Bank Data, https://data.worldbank.org/indicator/NY.GDP.PCAP.CD. Accessed 15 November 2023.
https://www.aeaweb.org/articles?id=10.1257/jep.33.3.202
```{r child = c(‘intro.qmd’, ‘data.qmd’, ‘eda.qmd’, ‘analysis.qmd’, ‘concl.qmd’)}