Taxes, Health, GDP: Understanding the Connection

Author

Fanny Iff, Rodrigo Koller Castillo, Steve Marchello, Dominic Niemand

Published

December 22, 2023

1. Introduction

1.1 Overview and Motivations

In recent years, health has taken center stage, presenting us with daily choices, especially regarding processed foods that have proliferated globally. The prevalence of highly processed options has raised concerns due to their potential impact on health, contributing to issues like obesity and cardiovascular problems Elizabeth, L. & al. 2020). As we navigate this landscape of choices, it is essential to recognize patterns which lead to health impacts. Are some countries more inclined towards processed foods consumption, and how does this correlate with their health outcomes? How effective are policies aimed at reducing processed foods and beverages? In the same way, we wanted to explore the larger impact of policies around health. This led us wanting to find the potential correlation of different policies around the world that aim to reduce tobacco consumption. Are higher taxes and cigarette prices effective strategies in reducing tobacco consumption?

Regarding 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. We often learn about policies put into place to have an impact on various economic values and can evaluate their impacts. However, when looking at government policies we often do not get to see the results of such initiatives. This is why our paper explores health, policies and their link to economical values.

Past papers have been written linking an individual’s health to his personal wealth, and the possible correlation these two have onto each other Anastasiadis Simon, 2010).

Our project is focused on the efforts carried out by different governments, their policies and the impact on their respective populations. One would think that the more prosperous a country, the healthier said country would be. This however does not seem to be the case when looking at the United States as an example of this contradiction: obesity rates just like their GDP are higher than ever. We want to know what policies affect the well-being of the individuals as well as understand the aftermath of such political measures.

1.2 Literature Review

1.2.1 Effectiveness of a tax on sweetened beverages

H. Allcott & al. “Should We Tax Sugar-Sweetened Beverages?” An Overview of Theory and Evidence, Journal of Economic Perspectives — Vol. 33, Pages 202–227

This study outlines seven key principles for designing effective sugar-sweetened beverage (SSB) taxes. Emphasizing the need to counteract uninternalized harms, the principles recommend focusing on maximizing social welfare rather than health alone. They propose targeted policies based on variations in externalities and internalities among consumers. Urging taxation based on sugar content, not liquid volume, the review suggests aligning taxes on diet drinks and fruit juice with their health impacts. It challenges concerns about regressivity, highlighting benefits for low-income individuals. The review advocates statewide implementation of SSB taxes for effectiveness, estimating potential benefits that likely exceed costs. Despite the need for more empirical work, SSB taxes are positioned as a feasible and effective policy tool.

1.2.2 Sweet Beverages and its health effects

Haque M. et al. “A narrative review of the effects of sugar-sweetened beverages on human health: A key global health issue”, 2020

In this study, M. Haque et al. explore the profound impact of sugar-sweetened beverages (SSBs) on human health, establishing it as a critical global health concern. The definition of SSBs encompasses drinks with added sugar, spanning non-diet soft drinks, flavored juice drinks, sports drinks, sweetened teas, coffee beverages, energy drinks, and electrolyte replacement drinks. Drawing parallels between the effects of sugar and alcohol, the narrative underscores the potential harm of excessive sugar consumption. Despite their high sugar content, SSBs lack essential nutrients, such as fiber, vitamins, and minerals, which counteract oxidative stress-induced reactive oxygen carbon. The review delves into the detrimental effects of SSBs on the health of children and teenagers, unveiling associations with weight gain, obesity, dental caries, and insulin resistance. The study establishes a positive correlation between SSB consumption and adverse health outcomes, including obesity, type 2 diabetes, reduced bone mineral density leading to increased fractures, cardiovascular diseases, and hypertension. Furthermore, the narrative reveals a correlation between SSBs and elevated risks of total mortality, impacting both male and female fertility. Notably, the review suggests that sugar may possess addictive properties akin to cocaine, emphasizing the urgency of addressing the pervasive health implications associated with SSB consumption.

1.2.4 Variables leading to tobacco Consumption

Gupta B, Kumar N. “A cross-country comparison of knowledge, attitudes and practices about tobacco use: findings from the global adult tobacco survey”, 2014

In the cross-country exploration of knowledge, attitudes, and practices regarding tobacco use, conducted by B. Gupta and N. Kumar in the “Global Adult Tobacco Survey,” findings from 14 low and middle-income nations are scrutinized. The study unveils a widespread awareness among adults about the dangers of tobacco use, albeit with notable variations across gender and age groups. While the association with lung cancer is high, it is comparatively low for heart attacks and strokes. Intriguingly, awareness levels surpass 90% in most countries, with China being a conspicuous exception. Gender differences in awareness are minimal, except in India and China, where males exhibit a higher knowledge of the risks associated with tobacco consumption, introducing a paradox between awareness and actual consumption patterns. The study posits that personalized knowledge tailored to individual risks could be more effective in influencing behavior. Awareness of secondhand smoking fluctuates across countries, reaching its lowest point in China. The research underscores the critical need for heightened awareness regarding smokeless tobacco, especially where it is perceived as safe. In conclusion, the study emphasizes the existing gap between awareness and consumption, advocating for targeted and sustained public health campaigns to bridge this divide.

1.2.5 Inequality and Health

Pickett KE, Wilkinson RG. “Income inequality and health: a causal review”, 2015

The study by K.E. Pickett and R.G. Wilkinson on Income Inequality and Health: A Causal Review illuminates a robust causal link between income inequality and health outcomes. Notably, the research identifies a peculiar exception concerning suicides, which exhibit higher prevalence in more equal societies. The primary explanation posited is that increased income disparities amplify social distances, accentuating distinctions in social class and status. The study contends that it is not the direct inequality itself but rather the resulting disparities in social classes that engender negative health effects. The authors advocate for a focus on reducing material differences, which are indicative of cultural markers of social differentiation. This, they argue, could attenuate the influence of class and status on individual lives and society as a whole. The research underscores that a reduction in income inequality yields significant positive effects on mortality rates, potentially leading to substantial savings in healthcare expenditure. In conclusion, the study asserts that substantial income inequalities carry detrimental health and social consequences, emphasizing the imperative for policies that address income differences to effectively narrow the wealth gap and enhance societal well-being.

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 websites to create one with all the information that we wanted. The main ones are :

3.2 Generic Data

To tackle our research questions, we initiated the process by contemplating the data prerequisites. It became apparent early on that acquiring precise, high-quality data with an adequate number of observations posed a considerable challenge. Our strategy was therefore to accumulate as much data of interest as possible and then sort it. Sometimes, the data was quite relevant to our analyses, but did not include enough observations to allow proper statistical analysis. We had to explore numerous sources in search of data with the attributes we were looking for. As our analysis had a temporal dimension, we had to have data that shared the years of their observations, otherwise we wouldn’t have been able to analyze changes over time. Once we had finished collecting all our data, we had to select the ones that were going to be useful. This was a new challenge, as it is difficult to limit the use of data so as not to make the analyses too complex. Fortunately, we found enough literature to guide us in our choices. To finish, we obtained a large dataframe that would contain all the data that we could use in each of our questions, filtering the data of interest as we went along.

3.2.1 Life expectancy

As we will be working with health data and trying to establish links between various variables and good health, of which life expectancy at birth (independently of infant mortality) is an essential indicator, as this article shows. However, it also warns us about the limitations of interpreting this measure, as it must 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 gender, 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 gender. Then, we removed the unnecessary columns to keep only the ISO code of the country, the period and the life expectancy for each observation. 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 or regions over a 71-year period from 1950 to 2021.

TABLE 1.1: Dataset cleaned for the life expectancy
Code Period Life_Expectancy
AFG 1950 27.8
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 Suppress the sex distinction
df_Life_Expectancy_Final <- df_Life_Expectancy_Final %>%
  mutate(final_value = (df_Life_Expectancy_Final$Life.expectancy...Sex..male...Age..at.birth...Variant..estimates + df_Life_Expectancy_Final$Life.expectancy...Sex..female...Age..at.birth...Variant..estimates) / 2)
df_Life_Expectancy_Final <- df_Life_Expectancy_Final[,c(1,2,5)]
#3.3 Rename the columns
colnames(df_Life_Expectancy_Final)[c(1,2,3)] <- c("Country","Period", "Life_Expectancy")
#3.4 change value of life expectancy to numerical ones
df_Life_Expectancy_Final[, 3] <- as.numeric(df_Life_Expectancy_Final[, 3])    
#3.5 Suppress potential missing values in our data
df_Life_Expectancy_Final <- na.omit(df_Life_Expectancy_Final)
#3.6 Summarize our data using the package dfSummary
df_summary <- dfSummary(df_Life_Expectancy_Final)
print(df_summary)

3.2.2 Population

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 gave us the following data : Country Name, Country Code, Population and Year. 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 265 countries/regions over a 62-year period from 1960 to 2022

TABLE 1.2: Dataset cleaned of the population by country
Code Period Population
ABW 1960 54608
Code
# Raw Data Importation
df_PopByYear <- read.csv(here::here("Data/Pop.csv"))

#1. df_PopByYear
#1.1 Keep only the necessary columns
df_PopByYear <- df_PopByYear[, -c(2,3,4)]
#1.2 Pivoting the data to get the year as row value in a column named Period
#1.2.1 Use the gather function to pivot the data as long
df_PopByYear <- gather(df_PopByYear, key = "Period", value = "Population", -Country.Name)
#1.2.2 Removing the undesired character in the year
df_PopByYear$Period <- gsub("X", "", df_PopByYear$Period)
#1.2.3 Removing potential missing value
df_PopByYear <- na.omit(df_PopByYear)
#1.2.4 Convert the population & Period as numeric number
df_PopByYear$Population <- as.numeric(df_PopByYear$Population, na.rm = TRUE)
df_PopByYear$Period <- as.numeric(df_PopByYear$Period, na.rm = TRUE)
#1.2.5 Rename the name of the column Country.Name to Country
colnames(df_PopByYear)[1] <- "Country"
#1.2.6 Summarize our data using the package dfSummary
df_summary <- dfSummary(df_PopByYear)
print(df_summary)

3.2.3 GDP

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 shows a wide amount of GDP value by country and by year of observation. The cleaning steps are almost the same as for the population raw data set in section 3.2.2

TABLE 1.3: Dataset cleaned of the GDP by country
Code Period GDP_by_head
2 AFE 1960 161.64
Code
# Raw Data Importation
df_GDP <- read.csv(here::here("Data/GDP_Final.csv"), sep=";")

#2. df_GDP
#2.1 Keep only the necessary columns
df_GDP <- df_GDP[,-c(2:4)]
#2.2 Rename the column country
colnames(df_GDP)[1] <- "Country"
#2.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)
#2.4 Put the value of GDB by head as numeric ones
df_GDP$GDP_by_head <- as.numeric(gsub(",", ".", df_GDP$GDP_by_head))
#2.5 Removing potential missing value
df_GDP <- na.omit(df_GDP)
#2.6 Use the gsub function to remove the X before the year in the column period
df_GDP$Period <- gsub("X", "", df_GDP$Period)
#2.7 Use the gsub function to remove the X before the year in the column period
df_GDP$GDP_by_head <- round(df_GDP$GDP_by_head, digits = 0)
#2.8 Suppress potential missing values in our data
df_GDP$Period <- as.numeric(df_GDP$Period, na.rm = TRUE)
#2.9 Change Period as numeric
df_GDP <- na.omit(df_GDP)
#2.10 Summarize our data using the package dfSummary
df_summary <- dfSummary(df_GDP)
print(df_summary)

3.2.4 Health expenditure

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 over an extensive duration and covering a substantial number of countries.

TABLE 1.4: Dataset cleaned of the Health expense by country
Code Period Health_Expenditure
10642 AFE 2000 5.666276
Code
# Raw Data Importation
df_Health_Expense_By_Country <- read.csv(here::here("Data/Health_Expense_By_Country.csv"),sep=";")

#5. df_Health_Expense
#5.1 Keep only the necessary columns
df_Health_Expense_By_Country <- df_Health_Expense_By_Country[,-c(2:4)]
#5.2 Rename the column country
colnames(df_Health_Expense_By_Country)[1] <- "Country"
#5.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_Expenditure", -Country)
#5.4 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)
#5.5 Put the value of Health expense as numeric ones
df_Health_Expense_By_Country$Health_Expenditure <- as.numeric(gsub(",", ".", df_Health_Expense_By_Country$Health_Expenditure))
#5.6 Removing potential missing value
df_Health_Expense_By_Country <- subset(df_Health_Expense_By_Country, !is.na(Health_Expenditure))
#5.7 Change the Period as numeric
df_Health_Expense_By_Country$Period <- as.numeric(df_Health_Expense_By_Country$Period, na.rm = TRUE)
#5.8 Summarize our data using the package dfSummary
df_summary <- dfSummary(df_Health_Expense_By_Country)
print(df_summary)

3.2.5 Share of population with cancer

To address our various questions, it was essential to delve into the 21st-century scourge: cancer. To validate our hypotheses regarding the potential link between cancer and sugar consumption, we found an article presenting multiple pieces of evidence suggesting causal connections. Subsequently, we aimed to confirm the existence of causality between tobacco consumption and cancer in a population. For this purpose, we found an article that also outlines the various impacts this connection can have on public health.

So we wanted a dataset revealing cancer rates across different countries. This dataset shows us the share of population with cancer in percentage, by country and by year. It was relatively clean and did not require much effort to be redefined according to our various needs. We simply removed columns that were not of interest, renamed the remaining ones, ensured there were no missing data, and also converted our cancer rate into numeric values.

TABLE 1.5: Dataset cleaned for the share of population with cancer
Code Period Percentage_Cancer
AFG 1990 9.494158
Code
# Raw Data Importation
df_Share_of_population_with_cancer <- read.csv(here::here("Data/Share-of-population-with-cancer.csv"))

#8. Clean the data of the Share population with cancer (df_Share_of_population_with_cancer)
  #8.1 Keep only the necessary columns
    df_Share_of_population_with_cancer <- df_Share_of_population_with_cancer[,c(1,3,4)]
  #8.2 change value of Malnutrition death rate to numerical ones
    df_Share_of_population_with_cancer[, 3] <- lapply(df_Share_of_population_with_cancer[, 3], as.numeric)
  #8.3 Supress potential missing values in our data
    df_Share_of_population_with_cancer <- subset(df_Share_of_population_with_cancer, !is.na(df_Share_of_population_with_cancer))
  #8.4 Rename the columns
    colnames(df_Share_of_population_with_cancer)[c(1,2,3)] <- c("Country", "Period", "Percentage_Cancer")

3.2.6 Rate of the infantile mortality

Infantile mortality can be linked to the health of a country’s population, as mentioned 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 missing values.

TABLE 1.6: Dataset cleaned for the infantile death rate
Code Period Infantile_Mortality
AFG 1957 37.59054
Code
# Raw Data Importation
df_Child_Mortality_Rate <- read.csv(here::here("Data/Child-mortality-rate.csv"))

#4. df_Child_Mortality_Rate
#4.1 Keep only the necessary columns
df_Child_Mortality_Rate <- df_Child_Mortality_Rate[,c(1,3,4)]
#4.2 Rename the columns
colnames(df_Child_Mortality_Rate)[c(1,2,3)] <- c("Country", "Period", "Infantile_Mortality")
#4.3 change value of life expectancy to numerical ones
df_Child_Mortality_Rate[, 3] <- lapply(df_Child_Mortality_Rate[, 3], as.numeric)
#4.4 Suppress potential missing values in our data
df_Child_Mortality_Rate <- subset(df_Child_Mortality_Rate, !is.na(df_Child_Mortality_Rate))
#4.5 Summarize our data using the package dfSummary
df_summary <- dfSummary(df_Child_Mortality_Rate)
print(df_summary)

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.

TABLE 1.7: Dataset cleaned for the probability of dying from a NCD
Code Period Prob_Dying_NCD
CHL 2019 10.04
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.2.8 Our merged generic dataset

Finally we selected every dataset containing generic data and merged them all together to have our final base dataset. Since we named every column the same way, the merge() function 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 will use this dataset as a reference for our research questions, we will compute local merge to add the required data to our analysis and EDA, this strategy has been implemented to guarantee that we don’t lose information because of the different range of date and country of our specific data. To present our data dynamically we choose the function datatable() from the package DT, to allow readers to browse our generic data.

Code
#####################################
## Merging the dataframes together ##
#####################################
#8. Merging the dataframe together
list_df <- list(df_GDP, df_Life_Expectancy_Final, df_Child_Mortality_Rate, df_Health_Expense_By_Country, df_Proba_Of_Dying_From_NCD, df_Share_of_population_with_cancer)
df_merged <- Reduce(function(x, y) merge(x, y, by = c("Country", "Period"), all = TRUE), list_df)
df_merged <- merge(x=df_merged,y=df_PopByYear,by=c("Country","Period"))
#9. Adding a primary key
df_merged[10] <- paste(df_merged$Country, df_merged$Period, sep = ".")
colnames(df_merged)[10] <- "Country.Period"

#10. Remove the rows where there's NA
df_merged <- na.omit(df_merged)

#11. Creating 4 classes based on the GPD level by country
df_merged <- df_merged[order(df_merged$Period, df_merged$GDP_by_head), ]
df_merged <- df_merged %>%
  group_by(Period) %>%
  mutate(Class_GDP = ntile(GDP_by_head, 4))
df_merged <- df_merged %>%
  mutate(Class_GDP = case_when(
    Class_GDP == 1 ~ "Low Income",
    Class_GDP == 2 ~ "Medium-Low Income",
    Class_GDP == 3 ~ "Medium-High Income",
    Class_GDP == 4 ~ "High Income"
  ))

#12. Reorder df_merged
df_merged <- df_merged %>%
  select(1,2,10,9,3,11,4,5,6,7,8)

#13. Checking any issues
summary(df_merged)
df_merged$Period <- as.numeric(df_merged$Period)
summary(df_merged)

#14 Create a dynamic table to present our data
#14.1 Round all our value for aesthetic purpose of presentation
df_merge <- round_numeric_columns(df=df_merge)

#14.2 Use the function datatable to create a dynamic table of data
DynamicDataTableGenericData <- datatable(df_merge, options = list(pageLength = 5))

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 that have implemented taxes on sweetened beverages. We found a raw dataset that indicates what we were looking for. In it, we had data for three different years : 2017, 2019 and 2021. But we also added 2013 as a reference year, as no taxes were put in place as the first implementation of taxes on sweetened beverages started in 2014. Adding value to our regression as no country has yet implemented any kind of tax. To do so, we used a “for” loop to associate the value 0 to each unique country for the tax in 2013. Then, we had to filter our data to remove missing values, such as “No response” or “Don’t know”. We also change our boolean values of taxes from “Yes” and “No” to binary values such as 1 for “Yes” and 0 for “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 countries and, as we discussed, have only four periods of observations which are 2013, 2017, 2019, 2021. The spread of our data is going to restrain our future analysis for question 1. So if we wanted to analyze data for question 1 we needed the values for those years.

TABLE 1.8: Dataset cleaned for the taxes on sweetened beverages by country
Code Period Tax_Sweetened_beverages
DZA 2021 0
Code
# Raw Data Importation
df_Tax_Sweetened_Beverages<- read.csv(here::here("Data/Existence_Of_tax_on_sugar-sweetened_beverages.csv"))

#6. df_Tax_Sweetened_Beverages
#6.1 Keep only the necessary columns
df_Tax_Sweetened_Beverages <- df_Tax_Sweetened_Beverages[,c(8,10,30)]
#6.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")
#6.3 Add the values for the year 2013
#6.3.1 Create a vector that contain each country present in the data
unique_vect <- unique(df_Tax_Sweetened_Beverages$Location) 
#6.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)
}
#6.4 Rename the columns
colnames(df_Tax_Sweetened_Beverages)[c(1,2,3)] <- c("Country", "Period", "Tax_Sweetened_beverages")
#6.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)
#6.6 Change the country name to match the package map name's country
df_Tax_Sweetened_Beverages <- df_Tax_Sweetened_Beverages %>%
  mutate(
    Country = case_when(
      Country == "Russian Federation" ~ "Russia",
      Country == "Bolivia (Plurinational State of)" ~ "Bolivia",
      Country == "Venezuela (Bolivarian Republic of)" ~ "Venezuela",
      Country == "United Republic of Tanzania" ~ "Tanzania",
      Country == "United States of America" ~ "USA",
      Country == "United Kingdom of Great Britain and Northern Ireland" ~ "UK:Great Britain",
      Country == "Türkiye" ~ "Turkey",
      Country == "Democratic People's Republic of Korea" ~ "North Korea",
      Country == "Republic of Korea" ~ "South Korea",
      Country == "Côte d’Ivoire" ~ "Ivory Coast",
      Country == "Viet Nam" ~ "Vietnam",
      Country == "Iran (Islamic Republic of)" ~ "Iran",
      Country == "Czechia" ~ "Czech Republic",
      Country == "Republic of Moldova" ~ "Moldova",
      TRUE ~ Country
    )
  )
#6.7 Removing potential missing value
df_Tax_Sweetened_Beverages <- subset(df_Tax_Sweetened_Beverages, !is.na(df_Tax_Sweetened_Beverages))
#6.8 Change the Period as numeric
df_Tax_Sweetened_Beverages$Period <- as.numeric(df_Tax_Sweetened_Beverages$Period, na.rm = TRUE)
#6.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.

TABLE 1.9: Dataset cleaned for number of deaths by risk factor
Code Period Death_Due_To_High_Blood_Pressure Death_Due_To_Obesity
AFG 1990 25633.13 9517.873
Code
# Raw Data Importation
df_Number_of_deaths_by_risk_factor <- read.csv(here::here("Data/Number_of_deaths_by_risk_factor.csv"))

#1. df_Number_of_deaths_by_risk_factor
#1. Clean the data of the number of deaths by risk factor (df_Number_of_deaths_by_risk_factor)
#1.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)]
#1.2 Rename the columns
colnames(df_Number_of_deaths_by_risk_factor)[c(1,2,3,4)] <- c("Country", "Period", "Death_Due_To_High_Blood_Pressure","Death_Due_To_Obesity")
#1.3 Removing potential missing value
df_Number_of_deaths_by_risk_factor <- subset(df_Number_of_deaths_by_risk_factor, !is.na(df_Number_of_deaths_by_risk_factor))
#1.4 Change the Period as numeric
df_Number_of_deaths_by_risk_factor$Period <- as.numeric(df_Number_of_deaths_by_risk_factor$Period, na.rm = TRUE)
#1.5 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 were interested in 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 ‰. First, we started by dropping columns that weren’t interesting for us. As always we wanted to keep data about the country, the year of observation 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 or regions over a 29-year period from 1990 to 2019

TABLE 1.10: Dataset cleaned for the diabetes death rate
Code Period Death_Diabetes
AFG 1990 30.93
Code
# Raw Data Importation
df_Death_rate_from_diabetes <- read.csv(here::here("Data/Death-rate-from-diabetes.csv"))

#2. df_Death_rate_from_diabetes
#2.1 Keep only the necessary columns
df_Death_rate_from_diabetes <- df_Death_rate_from_diabetes[,c(1,3,4)]
#2.2 Rename the columns
colnames(df_Death_rate_from_diabetes)[c(1,2,3)] <- c("Country", "Period", "Death_Diabetes")
#2.3 Removing potential missing value
df_Death_rate_from_diabetes <- subset(df_Death_rate_from_diabetes, !is.na(df_Death_rate_from_diabetes))
#2.4 Change the Period as numeric
df_Death_rate_from_diabetes$Period <- as.numeric(df_Death_rate_from_diabetes$Period, na.rm = TRUE)
#2.5 Summarize our data using the package dfSummary
df_summary <- dfSummary(df_Death_rate_from_diabetes)
print(df_summary)

We came across an interesting articles that showed that 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.

TABLE 1.11: Dataset cleaned for the malnutrition death rate
Code Period Death_Malnutrition
AFG 1990 11.04
Code
# Raw Data Importation
df_Malnutrition_death_rate <- read.csv(here::here("Data/Malnutrition-death-rates.csv"))

#3. df_Malnutrition_death_rate
#3.1 Keep only the necessary columns
df_Malnutrition_death_rate <- df_Malnutrition_death_rate[,c(1,3,4)]
#3.2 Rename the columns
colnames(df_Malnutrition_death_rate)[c(1,2,3)] <- c("Country", "Period", "Death_Malnutrition")
#3.3 Removing potential missing value
df_Malnutrition_death_rate <- subset(df_Malnutrition_death_rate, !is.na(df_Malnutrition_death_rate))
#3.4 Change the Period as numeric
df_Malnutrition_death_rate$Period <- as.numeric(df_Malnutrition_death_rate$Period, na.rm = TRUE)
#3.5 Summarize our data using the package dfSummary
df_summary <- dfSummary(df_Malnutrition_death_rate)
print(df_summary)

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 : fatty liver disease. With this evidence of the existing link between the two variables we included this specific dataset. 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.

TABLE 1.12: Dataset cleaned for the liver disease death rate
Code Period Death_Liver_disease
AFG 1990 2673
Code
# Raw Data Importation
df_Liver_Disease_death_rate <- read.csv(here::here("Data/Deaths-from-liver-disease.csv"))

#4. df_Liver_Disease_death_rate
#4.1 Keep only the necessary columns
df_Liver_Disease_death_rate <- df_Liver_Disease_death_rate[,c(1,3,4)]
#4.2 Rename the columns
colnames(df_Liver_Disease_death_rate)[c(1,2,3)] <- c("Country", "Period", "Death_Liver_disease")
#4.3 Removing potential missing value
df_Liver_Disease_death_rate <- subset(df_Liver_Disease_death_rate, !is.na(df_Liver_Disease_death_rate))
#4.4 Change the Period as numeric
df_Liver_Disease_death_rate$Period <- as.numeric(df_Liver_Disease_death_rate$Period, na.rm = TRUE)
#4.5 Summarize our data using the package dfSummary
df_summary <- dfSummary(df_Liver_Disease_death_rate)
print(df_summary)

3.3.4 Dataset for question 1 merged

For question 1 EDA and analysis, we merged our generic dataframe into this new one. We also needed to calculate two 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 ‰, using the population data. Then we recreate a dynamic table to show our results.

Code
#7. merging df_merged and these new dataframe
list_dfQ1 <- list(df_Number_of_deaths_by_risk_factor, df_Death_rate_from_diabetes, df_Malnutrition_death_rate, df_Liver_Disease_death_rate, df_Death_rate_from_digestive_diseases, df_Tax_Sweetened_Beverages)
df_mergedQ1 <- Reduce(function(x, y) merge(x, y, by = c("Country", "Period"), all = TRUE), list_dfQ1)
df_mergedQ1 <- merge(x=df_merged,y=df_mergedQ1,by=c("Country","Period"))

#8. remove NA value
df_mergedQ1 <- na.omit(df_mergedQ1)

#9. modify columns to have a rate rather than an absolute value for high blood pressure death and obesity death
df_mergedQ1 <- df_mergedQ1 %>%
  mutate(
    Death_Obesity = (Death_Due_To_Obesity/as.numeric(df_mergedQ1$Population)*100000),
    Death_HBP = (Death_Due_To_High_Blood_Pressure/as.numeric(df_mergedQ1$Population)*100000)
  )  %>%
  select(-Death_Due_To_Obesity, -Death_Due_To_High_Blood_Pressure)

#10 Create a dynamic table to present our data
#10.1 Round all our value for aesthetic purpose of presentation
df_mergedQ1 <- round_numeric_columns(df=df_mergedQ1)

#10.2 Use the function datatable to create a dynamic table of data
DynamicDataTableDataQ1 <- datatable(df_mergedQ1, options = list(pageLength = 5))

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, rename our columns, change our number of tobacco consumption to numerical value (note that here the value is in % of population) and finally discard missing values.

TABLE 1.13: Dataset cleaned for the tobacco consumption
Code Period Tobacco_Consumption
AFG 2000 36.9
Code
# Raw Data Importation
df_Tobacco_Consumption <- read.csv(here::here("Data/prevalence-of-tobacco-use-sdgs.csv"))

#3. df_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 Removing potential missing value
df_Tobacco_Consumption <- subset(df_Tobacco_Consumption, !is.na(df_Tobacco_Consumption))
# 3.4 Change the Period as numeric
df_Tobacco_Consumption$Period <- as.numeric(df_Tobacco_Consumption$Period, na.rm = TRUE)
# 3.5 Summarize our data using the package dfSummary
df_summary <- dfSummary(df_Tobacco_Consumption)
print(df_summary)

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.

TABLE 1.14: Dataset cleaned for the death rate due to tobacco
Code Period Percentage_Death_From_Smoking
AFG 1990 4.018696
Code
# Raw Data Importation
df_Death_From_Smoking_By_Country <- read.csv(here::here("Data/share-deaths-smoking.csv"))

#1. df_Death_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 Removing potential missing value
df_Tax_Sweetened_Beverages <- subset(df_Tax_Sweetened_Beverages, !is.na(df_Tax_Sweetened_Beverages))
# 1.4 Change the Period as numeric
df_Death_From_Smoking_By_Country$Period <- as.numeric(df_Death_From_Smoking_By_Country$Period, na.rm = TRUE)
# 1.5 Summarize our data using the package dfSummary
df_summary <- dfSummary(df_Death_From_Smoking_By_Country)
print(df_summary)

3.4.3 Taxes on tobacco

Our question relies mainly on the tax’s potential effect on our different variables. So we needed the data regarding taxes on tobacco products. In the end we had a column containing the tax rate by country. A number going from 1 to 5 which indicated the importance of this tax. 1 being 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 was also pretty clean, we only computed simple operations to transform them as we wanted.

TABLE 1.15: Dataset cleaned for the taxes on tobacco
Code Period Percentage_Death_From_Smoking
AFG 1990 4.018696
Code
# Raw Data Importation
df_Tax_On_Tobacco <- read.csv(here::here("Data/share-of-tobacco-retail-price-that-is-tax.csv"))

#2. df_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 Removing potential missing value
df_Tax_On_Tobacco <- subset(df_Tax_On_Tobacco, !is.na(df_Tax_On_Tobacco))
# 2.4 Change the Period as numeric
df_Tax_On_Tobacco$Period <- as.numeric(df_Tax_On_Tobacco$Period, na.rm = TRUE)
# 2.5 Summarize our data using the package dfSummary
df_summary <- dfSummary(df_Tax_On_Tobacco)
print(df_summary)

3.4.4 Banning advertising on tobacco

To add a control variable and another dimension to our analysis we chose to include the data about the banning of tobacco advertisements. The raw dataset was a bit more disorganized, 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.

TABLE 1.16: Dataset cleaned for the advertising banning on tobacco
Period Advertising_Banned Code
2020 No AFG
Code
# Raw Data Importation
df_Banning_Advertising_On_Tobacco <- read.csv(here::here("Data/Banning_Advertising_OnTobacco.csv"))

#4. df_Banning_Advertising_On_Tobacco
#4.1 Renaming the columns
colnames(df_Banning_Advertising_On_Tobacco) <- c("Country", "2020", "2018", "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 changing Period as numeric
df_Banning_Advertising_On_Tobacco$Period <- as.numeric(df_Banning_Advertising_On_Tobacco$Period) 
#4.4 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" )
#4.5 Removing potential missing value
df_Banning_Advertising_On_Tobacco <- subset(df_Banning_Advertising_On_Tobacco, !is.na(df_Banning_Advertising_On_Tobacco))
#4.6 Change the Period as numeric
df_Banning_Advertising_On_Tobacco$Period <- as.numeric(df_Banning_Advertising_On_Tobacco$Period, na.rm = TRUE)
#4.7 Summarize our data using the package dfSummary
df_summary <- dfSummary(df_Banning_Advertising_On_Tobacco)
print(df_summary)

3.4.5 Dataset for question 2 merged

As for the first research question, we merged our new data to the generic ones, to use this as a database for the EDA and Analysis for question 2. We also reuse the function datatable() to show dynamic results.

Code
# Raw Data Importation
df_Banning_Advertising_On_Tobacco <- read.csv(here::here("Data/Banning_Advertising_OnTobacco.csv"))

#5. merging df_merged and these new dataframe
list_dfQ2 <- list(df_Death_From_Smoking_By_Country, df_Tax_On_Tobacco, df_Tobacco_Consumption, df_Banning_Advertising_On_Tobacco)
df_mergedQ2 <- Reduce(function(x, y) merge(x, y, by = c("Country", "Period"), all = TRUE), list_dfQ2)
df_mergedQ2 <- merge(x=df_merged,y=df_mergedQ2,by=c("Country","Period"))

#6. remove NA value
df_mergedQ2 <- na.omit(df_mergedQ2)

#7 Create a dynamic table to present our data
#7.1 Round all our value for aesthetic purpose of presentation
df_mergedQ2 <- round_numeric_columns(df=df_mergedQ2)

#7.2 Use the function datatable to create a dynamic table of data
DynamicDataTableDataQ2 <- datatable(df_mergedQ2, options = list(pageLength = 5))

3.5 Specific data for question 3

3.5.1 Gini coefficient

For our third research question, we needed an indicator representing the inequalities within a population. We chose the Gini index as it encompasses inequality through a variety of environments (income, wealth and consumption) which allows us to understand and analyze our data more thoroughly. The raw dataset was quite messy. We first needed to remove useless rows. We started by deleting the first three 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.

TABLE 1.17: Dataset cleaned for the advertising banning on tobacco
Code Period Gini_Index
USA 1963 37.6
Code
# Raw Data Importation
df_Gini_Index <- read.csv(here::here("Data/Gini_Index.csv"),sep=";")

#1. df_Gini_Index
#1.1 Suppress unnecessary rows
df_Gini_Index <- df_Gini_Index[-c(1, 2), ]
#1.2 Use the third line as headline
colnames(df_Gini_Index) <- as.character(unlist(df_Gini_Index[1,]))
#1.3  Keep only the necessary columns and rows
df_Gini_Index <- df_Gini_Index[-1,-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))
#1.8 Removing potential missing value
df_Gini_Index <- subset(df_Gini_Index, !is.na(df_Gini_Index))
#1.9 Summarize our data using the package dfSummary
df_summary <- dfSummary(df_Gini_Index)
print(df_summary)

4. Exploratory Data Analysis

4.1 Exploratory Data Analysis for Generic Data

4.1.1 Generic health data

To begin exploring our data, we wanted to observe them graphically. This should enable us to see the overall time horizon and the depth of the data available to us as an indicator of health. We chose to visualize them on the same framework so that we could compare them and observe the different trends that emerge.

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 slower rate. Child mortality and deaths from malnutrition decreases as countries become more developed. However, two graphs are worth analyzing 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 stabilization as of 2005. This might be due to an increasing awareness of food consumption or an increased medical attention to the issue as it becomes more frequent.

We also looked at how much countries spend on healthcare.

We found it interesting to note the evolution of health expenses as a percentage of GDP. The Covid pandemic can be seen to have had a major expense increase in the world, at a scale never seen for any pandemic before. The overall trend is positive even when excluding Covid 19 spike. This indicates an increase in concerns of health as people get older, more health issues appear.

4.1.2 Countries classify by GDP

We first decided to confirm some of the information from the literature. To do so, we decided to create four income classes by GDP per capita. These four classes were created by quartile, where Q1 incompasses 25% of the lowest GDP’s in our Dataset. This in order to eliminate geographical biases by comparing continents for example. The size of the groups is thus supposed to be very similar to make comfortable comparisons between groups. The four classes are named; Low income, Medium-low income, Medium-high income and High income

Code
# Graph of the Class distribution
# Define the color palette
palette_bleus <- colorRampPalette(c("#A9CCE3", "#99C2D5", "#66A2D5", "#2C7BB6"))(4)

#subsetting for year 2019 from df_merged
df_merged2019 <- subset(df_merged, Period == 2019)

# Create the bar plot with adjusted colors, thicker bars, and more space
Class_Repartition <- ggplot2::ggplot(df_merged2019, ggplot2::aes(x = Class_GDP, fill = Class_GDP)) +
  ggplot2::geom_bar(color = "black", linewidth = 0.5, width = 0.7) +
  ggplot2::scale_fill_manual(
    values = palette_bleus,
    breaks = unique(df_merged2019$Class_GDP),
    labels = unique(df_merged2019$Class_GDP),
    name = "Class"
  ) +
  ggplot2::labs(
    title = "Distribution of country by Class for 2019",
    x = "Class",
    y = "Number of countries"
  ) +
  ggplot2::theme_minimal() +
  ggplot2::theme(
    plot.title = ggplot2::element_text(hjust = 0.5)
  )

Class_Repartition

4.2 Exploratory Data Analysis for Question 1

4.2.1 Our data on an interactive map

We also desired to design an interactive map to visualize our data per country to explore it dynamically. Here we can see the countries that have implemented taxes for 2021 in green and the ones that have not in red, we also see the countries for which we don’t have data in gray. We can also access the data of population, GDP and category of each country by clicking on it. We chose the most recent date for the demonstration. Our strategy here was to use the ISO code of the country to join them to the data frame of the package world which contained the polygonal data to draw up on the map created with the leaflet package. As we can observe, our map is quite full, this means that we have a lot of countries included in our data.

Code
# Data transforming
# Creating a special data frame for the map
df_Tax_Sweetened_Beverages_Map <- df_GDP %>%
  full_join(df_PopByYear, by = c("Code", "Period")) %>%
  full_join(df_Tax_Sweetened_Beverages, by = c("Code", "Period"))

# Adding the class by GDP to this data
df_Tax_Sweetened_Beverages_Map <- df_Tax_Sweetened_Beverages_Map[order(df_Tax_Sweetened_Beverages_Map$Period, df_Tax_Sweetened_Beverages_Map$GDP_by_head), ]
df_Tax_Sweetened_Beverages_Map <- df_Tax_Sweetened_Beverages_Map %>%
  group_by(Period) %>%
  mutate(Class_GDP = ntile(GDP_by_head, 4))
df_Tax_Sweetened_Beverages_Map <- df_Tax_Sweetened_Beverages_Map %>%
  mutate(Class_GDP = case_when(
    Class_GDP == 1 ~ "Low Income",
    Class_GDP == 2 ~ "Medium-Low Income",
    Class_GDP == 3 ~ "Medium-High Income",
    Class_GDP == 4 ~ "High Income"
  ))

# Changing the name of the value from 1 and 0 to Yes and No to improve understanding
df_Tax_Sweetened_Beverages_Map$Tax_Sweetened_beverages <- ifelse(df_Tax_Sweetened_Beverages_Map$Tax_Sweetened_beverages == "1", "Taxes", "No Taxes")


#Filter the data for the year of interest
Tax_on_sweetened_beverages <- filter(df_Tax_Sweetened_Beverages_Map, Period == "2021") %>% arrange()

# Get data from our package wolrd
world <- ne_countries(returnclass = "sf")
#Rename the column for the merge
colnames(world)[11] <- "Code"

# merging our data
world_data <- merge(x=world,y=Tax_on_sweetened_beverages,by="Code")

# 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 by head: ", world_data$GDP_by_head, "<br>","Class: ", world_data$Class_GDP, "<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)

# Display the map
inter_graph

4.2.2 Evolution of the taxation on sweet beverages

The next graph describes the evolution of taxation of sweet beverages across countries. As we can observe we have only four different years of observations, which will limit our possibility to affirm potential efficiency of them.

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 legitimize the need for such a paper as to corroborate the effectiveness of such taxation in regards to health.

4.3 Exploratory Data Analysis for question 2

4.3.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. We therefore wanted to analyse whether this fall could be attributed in part to tobacco taxation and possibly to the advertising ban. We found on the WHO website that taxes could be partly useful in reducing consumption, particularly in countries with low income levels.

Code
# Calculate the yearly mean consumption
df_average_Tobacco_Consumption <- df_Tobacco_Consumption %>%
  group_by(Period) %>%
  summarise(Average_Tobacco_Consumption = mean(Tobacco_Consumption))

# Create an interactive plot using plot_ly
Average_tobacco_Cons_int <- plotly::plot_ly(
  data = df_average_Tobacco_Consumption,
  x = ~Period,
  y = ~Average_Tobacco_Consumption,
  type = "scatter",
  mode = "lines+markers",
  marker = list(size = 10)
) %>%
  layout(
    title = "Mean evolution of tobacco consumption",
    xaxis = list(title = "Year"),
    yaxis = list(
      title = "Average of tobacco consumption (% population)",
      range = c(10, 35),
      ticksuffix = "%"
    )
  )

Average_tobacco_Cons_int

4.3.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. When compared to the graph above in section 4.2.1, we can see a disproportionate amount of reduction of tobacco consumption compared to the tobacco death rate. From 2000 to 2020 tobacco consumption dropped 10% and death rates dropped by 1%. This is due to the way that tobacco kills, in a continual long-term use, the effects are often seen decades later. This will be further discussed in section 5.3

Code
# Calculate the mean death from tobacco by year
df_average_Death_From_Smoking <- df_Death_From_Smoking_By_Country%>%
  group_by(Period) %>%
  summarise(Average_Death_From_Smoking = mean(Percentage_Death_From_Smoking))


# Create an interactive plot using plot_ly
interactive_death_from_smoking <- plotly::plot_ly(
  data = df_average_Death_From_Smoking,
  x = ~Period,
  y = ~Average_Death_From_Smoking,
  type = "scatter",
  mode = "lines+markers",
  marker = list(size = 10)
) %>%
  plotly::layout(
    title = "Mean evolution of death due to tobacco",
    xaxis = list(title = "Year"),
    yaxis = list(
      title = "Death rate from tobacco",
      range = c(11, 14),
      ticksuffix = "%"
    )
  )

interactive_death_from_smoking

4.3.3 Evolution of the number of country that have banned the advertisement on tobacco

We looked at the evolution of tobacco advertising bans across the world over time. We can see that there is a trend for a majority of countries to ban tobacco advertisement, indicating a conscious effort to eliminate the leading cause in avoidable deaths. As we can see, we only have 3 years included in our data.

Code
# Convert the column on advertising banishment
df_Banning_Advertising_On_Tobacco$Advertising_Banned <- as.factor(df_Banning_Advertising_On_Tobacco$Advertising_Banned)

# Create the bar plot
bar_plot_Banning_Advertisment <- ggplot(df_Banning_Advertising_On_Tobacco, aes(x = Period, fill = Advertising_Banned)) +
  geom_bar(stat = "count", position = "stack") +
  labs(
    title = "Evolution of the number of advertising banishment",
    x = "Year",
    y = "Number of Country"
  ) +
  scale_fill_manual(values = c("Yes" = "#B4D88B", "No" = "#FF6347")) +
  theme_minimal()+
  ggplot2::theme(
    plot.title = ggplot2::element_text(hjust = 0.5)
  )+  guides(fill = guide_legend(title = "Advertising Banned",))+
  scale_x_continuous(breaks = unique(df_Banning_Advertising_On_Tobacco$Period))


bar_plot_Banning_Advertisment

4.3.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. We also see by clicking on the country if it has banned advertisements on tobacco products. We reuse the same strategy as before, using the ISO code of country to join our data to the world data package that contain the polygonal data useful to draw the country on the interactive map of the leaflet package. Here you can observe the taxation level for the year 2018.

Code
# Data transforming
df_Tobacco_Map <- df_Tax_On_Tobacco %>%
  full_join(df_Tobacco_Consumption, by = c("Code", "Period")) %>%
  full_join(df_Death_From_Smoking_By_Country, by = c("Code", "Period")) %>%
  full_join(df_GDP, by = c("Code", "Period")) %>%
  full_join(df_Banning_Advertising_On_Tobacco, by = c("Code", "Period"))

# Keep only the value for 2018
df_Tobacco_Map <- filter(df_Tobacco_Map, Period == "2018") %>% arrange()

# Get data from our package
world <- ne_countries(returnclass = "sf")
colnames(world)[11] <- "Code"

# Join our data
world_data <- merge(x = world, y = df_Tobacco_Map, by = "Code")

# Map tax levels to categories
world_data$Tax_Category <- factor(world_data$Taxes_On_Tobacco, levels = 1:5, labels = c("Low Tax (<25%)","Low Tax (<25%)", "Medium Tax (26-50%)", "Medium-High Tax (51-75%)", "High Tax (>75%)"))

# Create the interactive map
Interactive_map_Tobacco_data <- leaflet(world_data) %>%
  addProviderTiles(providers$OpenStreetMap.Mapnik) %>%
  addPolygons(
    color = ~colorFactor(palette = "YlOrRd", domain = world_data$Tax_Category)(world_data$Tax_Category),
    weight = 1,
    popup = ~paste("Country: ", name, "<br>", "Tax: ", Tax_Category, "<br>", "Percentage smoking: ", Tobacco_Consumption, "<br>", "Death From Smoking: ", Percentage_Death_From_Smoking, "<br>", "Advertising banned : ", Advertising_Banned, "<br>"),
    highlightOptions = highlightOptions(color = "black", weight = 2, bringToFront = TRUE)
  ) %>%
  addLegend(
    "bottomright",
    pal = colorFactor(palette = "YlOrRd", domain = world_data$Tax_Category),
    values = ~Tax_Category,
    title = "Tax Level",
    opacity = 1,
    labels = ~Tax_Category
  ) %>%
  setView(lng = -39.443407, lat = 35.649315, zoom = 2.4)
# Display the map
#Interactive_map_Tobacco_data

By analyzing parts of the world, we can note that Europe’s tax on tobacco is the heaviest (>75%). The American continent follows it with, on average, 50%-75% taxes. Asia has on average less than 50% tax. The continent which taxes tobacco products the least is Africa.

4.4 Exploratory Data Analysis for question 3

4.4.1 Gini index over time

What are the social and economic consequences of income inequalities ? To answer this question, we will refer to the Gini index as a measure of wealth distribution across the country. First we look at the average world Gini coefficient to understand macro trends. What is important to note, even though the overall trend is slightly positive (meaning headed to more inequality) the number of countries implemented in the group over time included a bigger scope of the whole world, where earlier before the 2000’s only few countries had data and biased the average. If we look at the trend after 2000, we can see a trend downwards, implying more equal distribution of wealth in each country.

Code
# Mean of the Gini index by country and by year
mean_gini_index <- aggregate(Gini_Index ~ Period, data = df_Gini_Index, FUN = mean)

# Convert the Period as numeric value to slice them for the graphic labels
mean_gini_index$Period <- as.numeric(as.character(mean_gini_index$Period))

# Graphic about the Gini coefficent evolution
plot_Evolution_Ginni_Index <- ggplot2::ggplot(mean_gini_index, ggplot2::aes(x = Period, y = Gini_Index)) +
  ggplot2::geom_line(color = "#4682B4", group = 1) +
  ggplot2::geom_point(color = "#4682B4") +
  ggplot2::labs(title = "Mean evolution of Gini coefficient",
       x = "Year",
       y = "Gini Coefficient") +
  ggplot2::theme_minimal() +
  ggplot2::theme(
    plot.title = ggplot2::element_text(hjust = 0.5), 
    axis.text.x = ggplot2::element_text(angle = 45, hjust = 1)  # Incline the x-axis labels
  ) +
  ggplot2::scale_x_continuous(breaks = seq(min(mean_gini_index$Period), max(mean_gini_index$Period), by = 5))

# Convert ggplot to plotly
plotly_plot <- plotly::ggplotly(plot_Evolution_Ginni_Index)

# Display the interactive plot
plotly_plot

4.4.2 Interactive map

Click on the desired country to obtain the Gini index, population, GDP and income class. We note that we do not have much data for the African continent, which will limit the interpretation of our results specifically for this continent. We see that Europe fares well with Gini indexes of around 30 and South America very well with an average of around 45, which means that their countries’ incomes are distributed less equally. There is a first sign linking the gini index and the economic prosperity of the different continents.

Code
# Data transforming
# Creating a special data frame for the map
df_Gini_Index_Map <- df_GDP %>%
  full_join(df_PopByYear, by = c("Code", "Period")) %>%
  full_join(df_Gini_Index, by = c("Code", "Period"))

# Adding the class by GDP to this data
df_Gini_Index_Map <- df_Gini_Index_Map[order(df_Gini_Index_Map$Period, df_Gini_Index_Map$GDP_by_head), ]
df_Gini_Index_Map <- df_Gini_Index_Map %>%
  group_by(Period) %>%
  mutate(Class_GDP = ntile(GDP_by_head, 4))
df_Gini_Index_Map <- df_Gini_Index_Map %>%
  mutate(Class_GDP = case_when(
    Class_GDP == 1 ~ "Low Income",
    Class_GDP == 2 ~ "Medium-Low Income",
    Class_GDP == 3 ~ "Medium-High Income",
    Class_GDP == 4 ~ "High Income"
  ))

#Filter the data for the year of interest
df_Gini_Index_Map_2018 <- filter(df_Gini_Index_Map, Period == 2018)

# Get data from our package wolrd
world <- ne_countries(returnclass = "sf")
#Rename the column for the merge
colnames(world)[11] <- "Code"

# merging our data
world_data_2 <- merge(x=world,y=df_Gini_Index_Map_2018,by="Code")

# Define a color palette
color_pal_Gini <- c("#FFEF9D", "#FFA500", "#FF6347", "#8B0000")

# Créer une fonction de couleurs pour Gini_Index
color_numeric <- colorNumeric(palette = color_pal_Gini, domain = world_data_2$Gini_Index)

# Créer la carte interactive
inter_graph_Gini_Index <- leaflet(world_data_2) %>%
  addProviderTiles(providers$OpenStreetMap.Mapnik) %>%
  addPolygons(color = ~color_numeric(world_data_2$Gini_Index),
              weight = 1,
              popup = ~paste("Country: ", name, "<br>", "Gini Index: ", world_data_2$Gini_Index, "<br>","<br>", "Population: ", world_data_2$Population, "<br>", "GDP: ", world_data_2$GDP_by_head, "<br>", "Class: ", world_data_2$Class_GDP, "<br>"),
              highlightOptions = highlightOptions(color = "black", weight = 3, bringToFront = TRUE)) %>%
  addLegend("bottomright", pal = color_numeric, values = unique(world_data_2$Gini_Index),
            title = "Legend", opacity = 1, labels = unique(world_data_2$Gini_Index)) %>%
  setView(lng = -39.443407, lat = 35.649315, zoom = 2.4)

# Display the map
inter_graph_Gini_Index

4.4.3 Gini index by class

We wanted to use a boxplot for the Gini index. We plotted as a function of four classes of GDP. The overall correlation is inversely correlated, meaning that the higher the GDP, the lower the Gini index. The exception for this is the two medium incomes that reverse their standing. Furthermore, the concentration within each category is higher, the higher the GDP. With low GDP countries having a higher spread in their Gini index within their income group.

Code
#Define a color palette for aesthetics prupose
palette_bleus <- colorRampPalette(c("#A9CCE3", "#99C2D5", "#66A2D5", "#2C7BB6"))(4)

#Data Transforming
df_mergedQ3_Graph_Gini <- df_mergedQ3
df_mergedQ3_Graph_Gini$Class_GDP <- factor(df_mergedQ3$Class_GDP, levels = c("Low Income", "Medium-Low Income", "Medium-High Income", "High Income"))
# Convert the Period as factor
df_mergedQ3_Graph_Gini$Period <- factor(df_mergedQ3$Period)
#Adding the country name
df_mergedQ3_Graph_Gini$Country <- countrycode(df_mergedQ3_Graph_Gini$Code, "iso3c", "country.name")

# Create an interactiv graph
plot_Gini_Index_Class <- plot_ly(
  data = df_mergedQ3_Graph_Gini,
  x = ~Class_GDP,
  y = ~Gini_Index,
  type = 'box',
  boxpoints = 'all',  # Afficher tous les points
  jitter = 0.3,  # Ajouter un jitter pour éviter l'overlap des points
  color = ~Class_GDP,  # Colorer les points en fonction de la période
  colors = palette_bleus,  # Utiliser la palette définie précédemment
  marker = list(size = 5),  # Ajuster la taille des points
  text = ~paste("Country: ", Country, "<br>", "Period: ", Period, "<br>", "Gini: ", Gini_Index)
) %>%
  layout(
    title = "Gini coefficient by class of revenue",
    xaxis = list(title = "Class"),
    yaxis = list(title = "Gini Coefficient"),
    showlegend = TRUE
  )
# Display the graph
plot_Gini_Index_Class

4.4.4 Gini index regarding life expectancy

As per our literature review, we decided to look at the relationship between the Gini coefficient and life expectancy. What we find is that both are correlated negatively, indicating a trend that more equal societies have a higher life expectancy on average.

Code
# Create an interactive graph with a single regression line
plot_Gini_Index_LF_2<- plot_ly(
  data = df_mergedQ3_Graph_Gini,
  x = ~Life_Expectancy,
  y = ~Gini_Index,
  type = 'scatter',
  mode = 'markers',
  marker = list(size = 5, color = "#4682B4"),  # Set the color for scatter points
  text = ~paste("Country: ", Country, "<br>", "Period: ", Period, "<br>", "Gini: ", Gini_Index)
) %>%
  add_trace(
    type = 'scatter',  # Use scatter type for regression line
    mode = 'lines',  # Show a line
    x = ~Life_Expectancy,
    y = ~fitted(lm(Gini_Index ~ Life_Expectancy)),  # Add the regression line
    line = list(color = "#4682B4", width = 5),  # Set the color and width for the line
    hoverinfo = 'none',
    showlegend = FALSE  # Remove legend for this trace
  ) %>%
  layout(
    title = "Gini coefficient by life expectancy",
    xaxis = list(title = "Life Expectancy"),
    yaxis = list(title = "Gini Coefficient")
  )

# Display the graph
#plot_Gini_Index_LF_2

5. Analysis

5.1 Creation of a nomralized Health Score

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 information. To justify our weightings, we searched the scientific literature. We quickly realized that creating a health indicator was much more complicated than we had imagined. After going through several research papers and investigating different drafts of a ‘robust’ health indicator, we had to resign ourselves to abandoning our attempt. Being unable to come up with a satisfactory result, which would have taken too long to develop. We decided to to share our train of thought to open up on future research:

1. Normalization of our Data

We began by normalizing our data with a score per variable ranging from 1 to 100. The first challenge we encountered was life expectancy. This variable behaves inversely to the others, i.e. the higher it is the better, unlike all the other indicators where the opposite is true.

2. Weighting the health input

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 from high blood pressure issues.

3. Calculate a nomralised health score

We then calculated a standardized health score (ranging from 1 to 100) for each country. We selected the 10 best and worst health scores and displayed them in a graph. Here is the result :

As we can easily see, it’s not really likely that the ten first countries are not the usual ones we found in the health ranking like Japan, Switzerland and the Nordic countries.

So we decided to reconsider the weighting steps, but after many attempts, we were not able to propose satisfying results.

5.2 Analysis of taxes on sweetened beverages

5.2.1 Influence of a country’s GDP on life expectancy

With this graph we wanted to verify our initial hypothesis, namely that income has a strong influence on life expectancy.

As we might expect, a higher life expectancy is on average associated with a higher level of income. We can see that belonging to a country with a high level of income can add an average of 15 years to our life expectancy. We also note that the smallest gap is between the 2 intermediate income categories (Medium-low Income and Medium-high Income). This result seems logical, but the 15-year difference seemed extremely high. It should be noted, however, that the difference in income between countries cannot be interpreted as being solely responsible for the difference in life expectancy. It is a complex multifactorial phenomenon that requires more detailed analysis to isolate the effect of GDP alone on life expectancy.

5.2.3 Influence of a country’s GDP from dying of a NCD

We decided to look at NCD’s (non-communicable diseases) as this would eliminate any outliers such as epidemics which would be looked at as an exception with little links to economical values. We compare the deaths rates from NCD’s through four GDP quartiles as was described in 4.1.1. We use a boxplot for each quartile to center observations to compare means spread across different GDP levels. This allows us to exclude values which would be seen as outliers if they are too far removed from the mean.

We see a strong 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.2.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 flattened with similar levels except for the low income class which still lacks behind. High income class had the highest jump, indicating a need for this tax to be put in place in countries of high income.

5.2.5 PCA Analysis

We decided to do a principal component analysis (PCA) to visualize our data with a spatial dimension. Some trends already discussed such as GDP and Life expectancy can be seen to be positively correlated.

We find new data of interest such as the inverse correlation between Tax_Sweetened_Beverages and three different health outcomes : Death_Digestive_Diseases, Death_Obesity & Detah_HBP. The intensity of the correlation towards the death rates is very low, sitting at less than 2,5%. However, these three variables are positively correlated with each other indicating that there is a cause leading to these types of deaths. We would have thought that the tax would be correlated with the health expenditure but these two variables are not correlated, indicating that the tax is not dependent on the overall budget allocated to health.

5.2.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.2.7 Predictive modeling

We wanted to deepen our analysis by trying to build a predictive model using logistic regression. The aim of the model was to see if, on the basis of our variables (see table below), we were able to predict whether or not a country had introduced a tax on sweetened beverages.

Model results for taxes on sweetened beverages
Characteristic OR1 95% CI1 p-value
Life_Expectancy 1.04 0.96, 1.14 0.3
Prob_Dying_NCD 0.94 0.87, 1.00 0.075
Death_Diabetes 1.00 0.98, 1.01 0.7
Death_Malnutrition 1.00 0.93, 1.07 >0.9
Percentage_Cancer 1.03 0.92, 1.15 0.5
Death_Digestive_Diseases 1.02 1.00, 1.05 0.094
Health_Expenditure 0.93 0.81, 1.06 0.3
Death_Obesity 1.03 1.01, 1.05 0.005
Death_HBP 0.98 0.97, 0.99 <0.001
GDP_by_head 1.00 1.00, 1.00 0.010
70% of the total data
1 OR = Odds Ratio, CI = Confidence Interval

As we can see from the results of the coefficients of our regression, we only have two variables (Death from diabetes and death from obesity) that have a large impact on the probability that the country concerned has introduced a tax on sugary drinks and one variable (GDP) with a moderate impact. To draw these conclusions, we used the p-values obtained when we created our model. We expected these results because we had already researched the links between sugar consumption and diabetes and obesity. What was even more surprising was to see that GDP had a moderate predictive effect. As we had seen, this indicator is correlated with a huge number of factors, so it’s not surprising to find it here.

In order to measure the predictive performance of our model, we performed a confusion matrix. We can see that if we rely solely on the accuracy values, our model seems to perform relatively well. However, when we look in detail at the values in the matrix, we see that our model almost always predicts that the country has not introduced taxes. This is most likely due to the limited amount of data we have. It is very difficult to build a robust model on such a small sample. As few countries have already introduced taxes on sugar-sweetened drinks, our model is correct in predicting only values indicating that the country has not introduced this tax, which gives us metrics that might seem satisfactory.

To finalize our analysis, we wanted to provide a more visual analysis of our model. We can see that our Roc curve lies between 0.65 and 0.75, which is better than if we chose randomly but is not sufficient to validate our model as being reliable for predicting the implementation of a tax for a given country.

5.3 Anylsis of taxes effect on Tobacco consumption

5.3.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 falsing the 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.3.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 higher 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.3.3 Deaths from tobacco consumption to GDP Across 2005, 2010, 2015 and 2019

As we can see, there is a positive correlation between Deaths from tobacco and GDP by head. Furthermore, the higher GDPs have higher death rates from tobacco. The interesting conclusion we can take from this graph is the death rate that has gone down gradually from 2005 to 2019. However it is important to note the

5.3.4 Evolution of mortality and taxes

First when looking at the mortality rate from tobacco, we see that the higher the taxation rate, the higher the death rate even though there seems to be a downwards trend for the two highest taxation levels. Showing us an actual inverse correlation between the tax rate and the death rate. We hypothesize that the taxation level was put in place after smoking habits were put in place and are proportional to the consumption rate. A country with a high consumption rate would be taxed more heavily to discourage the socially accepted consumption of tobacco.

5.3.5 Evolution of Consumption and taxes

This leads us to look at the consumption rate as this would be faster impacted by taxation rates. We can see a decrease in consumption, especially after 2015. This indicates that the tax did have an impact on consumption rates. However the correlation is still the same as the death rate, the highest tax bracket being the one with the highest consumers of tobacco. This shows us that the tax is effective in decreasing consumption rate whereas the death rate will take a longer time horizon to determine the correlation effect with the tax.

5.3.6 Compare mortality based on the advertising banning

We found it interesting to see the difference in advertisement banning depending on their GDP group.

When comparing the data related to the correlation of banning of advertisement and GDP we can not infer any correlation. This is because the graph shows a similar distribution of banning of tobacco advertisement across all different income levels.

Next, we compare mortality rates based on their advertisement status. In accordance with our previous findings, the mortality rate is higher in countries with a ban on advertisement. This further reinforces our hypothesis that the retrospective action to battle tobacco is not as effective as a prevention protocol

5.3.7 Correlation matrix between our variable about tobacco and health data

To finish our analysis of question 2, we look at a final correlation matrix which includes all our variables of interest to analyze tobacco taxes, consumption and death rates.

First, Taxes_on_tobacco is strongly correlated to Life_expectancy by a factor of 0,8. Showing us that taxes do help prevent early death, potentially by reducing consumption as discussed in section 5.3.6. Next, we review our correlation between the taxes and Tobacco_consumption, death from smoking & percentage_cancer. This again, is positively correlated, indicating that the tax is higher when people are higher consumers of tobacco and have higher death rates. The additional information retained from this matrix is the positive correlation to cancer which confirms that tobacco is a larger contributor to cancer rates. Lastly, we do find conflicting evidence such as the positive correlation between tobacco consumption and life expectancy. However the values are low and do not hold significant value.

5.4 Anylsis of Gini coefficient

5.4.2 Correlation matrix - with Gini coefficient

The correlation matrix serves, as for the previous questions, as exploratory analysis to indicate correlations between variables. First, the Gini index is inversely correlated to tobacco_consumption, GDP_by_head & Life_expectancy. This implicates that the more equal a country, the higher their GDP, life expectancy but also the higher their tobacco consumption. This correlation is very interesting as we find, for the first time in this paper, a strong correlation partially explaining tobacco consumption. Countries with a more equal spread of wealth have higher tendencies of consuming tobacco on average. Finally, we see a positive correlation between infant mortality and gini index. This is in accordance with our previous data and the inverse correlation with GDP per capita and life expectancy.

5.4.3 Linear regression of the gini index

We wanted to see if our variables allowed us to predict our Gini coefficient accurately. With this regression we manage to replicate our results. We find strong correlation with a p-value of < 0,0001% for Infantile_mortality, Life_expectancy, GDP_by_head, Percentage_cancer, Prob_dying_NCD and p-value <1% for Health_expenditure. Low p-values suggest that the coefficients of our explanatory variables are statistically significant. This strengthens confidence in the existence of a linear relationship between these variables and the Gini coefficient.

Coefficient Std.Error Pvalue Significance R_squared Adj_R_squared
(Intercept) 129.213 13.069 0.000 *** 0.381 0.372
Infantile_Mortality -1.164 0.311 0.000 *** 0.381 0.372
Life_Expectancy -1.022 0.158 0.000 *** 0.381 0.372
GDP_by_head 0.000 0.000 0.000 *** 0.381 0.372
Percentage_Cancer -0.544 0.108 0.000 *** 0.381 0.372
Prob_Dying_NCD -0.567 0.074 0.000 *** 0.381 0.372
Health_Expenditure 0.429 0.163 0.009 ** 0.381 0.372

Here is the result on a plot :

This graph does not provide clear evidence of the explanatory variables’ capability; however, there is likely a positive relationship between them, as indicated by the observed graph of our predicted values. To delve deeper into these relationships, additional graphs should be conducted to examine the potential errors of this model. Testing the addition or removal of other variables would be necessary to obtain the most robust model possible.

6. Discussion

6.1 Conclusion

To conclude, we can state that the implementation of taxes to regulate unhealthy behaviors has mixed results. The tax on sweetened beverages did not seem conclusive in regulating the habits of a population, where we could not see the difference across countries that had a tax and the ones where no tax was put in place. We hypothesize that these results are multifactorial. First, the implementation of the tax has only been put in place as of 2014, for the earliest adopters. This could limit our analysis as the effects of this tax would not be shown in a short time horizon. Next, is the weight of the tax which we could not find appropriate information on the macro level. This would mean that the price of the beverage would not dissuade a customer from purchasing the sweetened beverage. Tobacco consumption is highest among the higher tax rates and indicates a retrospective implementation of the tax after an existing tobacco culture. The countries with higher consumption of tobacco seem to combat this issue with higher tax rates and thus higher prices of cigarettes. The main mechanism is thus reducing the purchasing power for tobacco products. The taxation seems to work and we can see a higher reduction in consumption for the higher tax brackets. However, we must note that the highest death rates from tobacco and cancer remain within countries with the highest tax rates. Last, tobacco consumption can not be linked to any economic indicators such as GDP or any other health variables in evaluating whether or not a country is a high consumer of tobacco. The main difference between the two tax strategies is the impact on the customer. Where sweetened beverages cost slightly more than water and are priced similarly to other “healthy” beverages. Tobacco products can be taxed at rates over 75% implying that the customer has the burden of paying up to five times the price only due to taxation. The Gini index gives us a good insight on the economics of a country and its health, being heavily correlated to its GDP and Life expectancy. Furthermore, the Gini index gives us the highest correlation towards tobacco consumption, which surprised us in our research. This could be delved into more thoroughly in future research in understanding why more equal societies consume more tobacco, whether by financial means or other cultural habits. To conclude, we can see that taxes work the best when the price of the product is influenced a lot.

6.2 Limitations

6.2.1 Availability and quality of Data

Finding specific data can be very complex, especially when aiming to conduct a large-scale analysis over a wide time horizon. Collecting, cleaning, and publishing such data have become a significant business, making access to quality data a paid service. There have been instances where we came across data that could have enhanced our analysis, but it was held by private organizations that offered a paid service to grant access to this data. In the course of this work, we have witnessed the complexity that data presents today, both in terms of accessing it and verifying the methods of collection. High-quality data needs to be objective and, therefore, contextualized so that it can be used judiciously.

6.2.2 No data on sweetened beverages consumption

After a lengthy search of numerous databases, we were unable to find any satisfactory data on the consumption of sweetened drinks. Either the data was too small or the time horizon was only one year. Even if we tried to combine these parcels of information, we were unable to build up a dataset that was sufficiently consistent to allow us to carry out our analyses of the potential effectiveness of taxes. This is why we had to fall back on health indicators to try to see if these taxes had had any effect. Because of this we were unable to discuss the consumption of sweetened beverages and its relation to the tax to evaluate its efficiency.

6.2.3 Challenges in Establishing Causality Amidst Multifactorial Dynamics

Once we had embarked on the analysis, we realized how difficult it would be to find effective causality among our variables. Health is a complex subject, involving thousands of different variables and specificities linked to geography, environment and finance. It was therefore impossible to claim to have discovered effectiveness, but rather we were able to accumulate evidence and identify solid correlations between our various analysis factors. Fortunately, we were able to draw on a wealth of scientific literature that gave us food for thought on the relevant analyses to be carried out.

6.3 Proposition for future work

While lacking data restrained our research, we will share our insights on propositions for future work around this subject. First, as we did not obtain data on consumption of sweetened beverages we could have found a secondary variable correlated to high consumption. This could have been done with oral health and expenditures as they are tightly correlated. This could help understand the impact of the tax on sweetened beverages. Then, while we had values on consumption of tobacco we were limited by percentages that we did not know how it was measured. To have a more precise analysis, we would recommend calculating the difference in average number of cigarettes smoked. Even though this would limit the consumption to smoked tobacco and no other form of tobacco which could lead to some limitations. Finally, to measure impacts on health we would have wanted to analyze the sports habits across countries. As we know, practicing sports regularly is a very beneficial habit to improve health. However we could not find a dataset of scale as the other measure we proposed at the world wide level. Data was only available for Europe, which would have limited our study geographically. This is why a deeper analysis on policies to encourage sports would have been a good analysis to conduct for our study.

References

  1. Elizabeth L, Machado P, Zinöcker M, Baker P, Lawrence M. Ultra-Processed Foods and Health Outcomes: A Narrative Review. Nutrients 2020, 12, 1955. https://doi.org/10.3390/nu12071955.

  2. Anastasiadis Simon. Health and Wealth. Econstor, 2010. https://www.econstor.eu/handle/10419/205608.

  3. H. Allcott et al. Should We Tax Sugar-Sweetened Beverages? An Overview of Theory and Evidence. Journal of Economic Perspectives, Volume 33, Number 3, Summer 2019, Pages 202–227. https://www.aeaweb.org/articles?id=10.1257/jep.33.3.202.

  4. Haque M, McKimm J, Sartelli M, Samad N, Haque SZ, Bakar MA. A narrative review of the effects of sugar-sweetened beverages on human health: A key global health issue. J Popul Ther Clin Pharmacol. 2020 Mar 3;27(1):e76-e103. doi: 10.15586/jptcp.v27i1.666. PMID: 32170920.

  5. Bhargava A, Jamison DT, Lau LJ, Murray CJ. Modeling the effects of health on economic growth. J Health Econ. 2001 May;20(3):423-40. doi: 10.1016/s0167-6296(01)00073-x. PMID: 11373839.

  6. Gupta B, Kumar N. A cross-country comparison of knowledge, attitudes and practices about tobacco use: findings from the global adult tobacco survey. Asian Pac J Cancer Prev. 2014;15(12):5035-42. doi: 10.7314/apjcp.2014.15.12.5035. PMID: 24998583.

  7. Pickett KE, Wilkinson RG. Income inequality and health: a causal review. Soc Sci Med. 2015 Mar;128:316-26. doi: 10.1016/j.socscimed.2014.12.031. Epub 2014 Dec 30. PMID: 25577953.

  8. Karin Modig, Roland Rau, Anders Ahlborn. Life expectancy: what does it measure? BMJ Open, 2020. https://bmjopen.bmj.com/content/bmjopen/10/7/e035932.full.pdf.

  9. Robyn Swift. The relationship between health and GDP in OECD countries in the very long run. Health Economics, Volume 20, Issue 3, p. 306-322, 2011. https://onlinelibrary.wiley.com/doi/abs/10.1002/hec.1590.

  10. Naguib Costanza. The relationship between inequality and GDP growth: An empirical approach. LIS Working Paper Series, No. 631, Luxembourg Income Study, 2015.

  11. Tae Khuen Kim & Shannon R. Lane. Government Health Expenditure and Public Health Outcomes: A Comparative Study among 17 Countries and Implications for US Health Care Reform. American International Journal of Contemporary Research, Vol. 3 No. 9; September 2013. [https://www.researchgate.net/profile/Shannon-Lane-3/publication/271525637_Government_health_expenditure_and_public_health_outcomes/links/55b9767608ae9289a09000b7/Government-health-expenditure-and-public-health-outcomes.pdf](https://www.researchgate.net/profile/Shannon-Lane-3/publication/271525637_Government_health_expenditure_and_public_health_outcomes/links/55b9767608ae9289a090