options(repos = c(CRAN = "https://cran.rstudio.com/"))
install.packages("tidyverse")
## Installing package into 'C:/Users/lenovo/AppData/Local/R/win-library/4.4'
## (as 'lib' is unspecified)
## package 'tidyverse' successfully unpacked and MD5 sums checked
## 
## The downloaded binary packages are in
##  C:\Users\lenovo\AppData\Local\Temp\Rtmpw3f6UE\downloaded_packages
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.4     ✔ readr     2.1.5
## ✔ forcats   1.0.0     ✔ stringr   1.5.1
## ✔ ggplot2   3.5.1     ✔ tibble    3.2.1
## ✔ lubridate 1.9.3     ✔ tidyr     1.3.1
## ✔ purrr     1.0.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors

Load and check the WHO health statistics data

Dataset link - https://www.who.int/data/gho/publications/world-health-statistics

data <- read.csv("D:/me/R-Language/Practice/Dataset/health_stat_WHO_May2024.csv")

head(data)
##                                                                                                       IND_NAME
## 1                                                                       Adolescent birth rate (per 1000 women)
## 2                                                                       Adolescent birth rate (per 1000 women)
## 3 Age-standardized mortality rate attributed to household and ambient air pollution  (per 100 000 population) 
## 4                                Age-standardized prevalence of hypertension among adults aged 30?79 years (%)
## 5                                          Age-standardized prevalence of obesity among adults (18+ years) (%)
## 6                             Age-standardized prevalence of tobacco use among persons 15 years and older (%) 
##   DIM_GEO_NAME             IND_CODE DIM_GEO_CODE DIM_TIME_YEAR
## 1  Afghanistan       MDG_0000000003          AFG          2021
## 2  Afghanistan       MDG_0000000003          AFG          2021
## 3  Afghanistan           SDGAIRBODA          AFG          2019
## 4  Afghanistan NCD_HYP_PREVALENCE_A          AFG          2019
## 5  Afghanistan          NCD_BMI_30A          AFG          2022
## 6  Afghanistan   M_Est_tob_curr_std          AFG          2022
##            DIM_1_CODE VALUE_NUMERIC VALUE_STRING
## 1 AGEGROUP_YEARS15-19      62.00000         62.0
## 2 AGEGROUP_YEARS10-14      18.00000         18.0
## 3            SEX_BTSX     265.66452        265.7
## 4            SEX_BTSX      40.20000         40.2
## 5            SEX_BTSX      19.22259         19.2
## 6            SEX_BTSX      22.70000         22.7
##                                                        VALUE_COMMENTS
## 1             Afghanistan 2022-2023 Multiple Indicator Cluster Survey
## 2             Afghanistan 2022-2023 Multiple Indicator Cluster Survey
## 3                                                                    
## 4                                                                    
## 5                                                                    
## 6 The most recent survey was conducted in 2019. This is a projection.
str(data)
## 'data.frame':    10503 obs. of  9 variables:
##  $ IND_NAME      : chr  "Adolescent birth rate (per 1000 women)" "Adolescent birth rate (per 1000 women)" "Age-standardized mortality rate attributed to household and ambient air pollution  (per 100 000 population) " "Age-standardized prevalence of hypertension among adults aged 30?79 years (%)" ...
##  $ DIM_GEO_NAME  : chr  "Afghanistan" "Afghanistan" "Afghanistan" "Afghanistan" ...
##  $ IND_CODE      : chr  "MDG_0000000003" "MDG_0000000003" "SDGAIRBODA" "NCD_HYP_PREVALENCE_A" ...
##  $ DIM_GEO_CODE  : chr  "AFG" "AFG" "AFG" "AFG" ...
##  $ DIM_TIME_YEAR : int  2021 2021 2019 2019 2022 2022 2022 2019 2023 2019 ...
##  $ DIM_1_CODE    : chr  "AGEGROUP_YEARS15-19" "AGEGROUP_YEARS10-14" "SEX_BTSX" "SEX_BTSX" ...
##  $ VALUE_NUMERIC : num  62 18 265.7 40.2 19.2 ...
##  $ VALUE_STRING  : chr  "62.0" "18.0" "265.7" "40.2" ...
##  $ VALUE_COMMENTS: chr  "Afghanistan 2022-2023 Multiple Indicator Cluster Survey" "Afghanistan 2022-2023 Multiple Indicator Cluster Survey" "" "" ...
#10503 rows and 9 columns

WHO data for ASEAN countries

data_ASEAN <- data %>% filter(DIM_GEO_CODE %in% c("MMR", "BRN","KHM", "IDN", "LAO", "MYS",  "PHL", "SGP", "THA", "VNM"))

To understand the indicator values

unique(data_ASEAN$IND_NAME)
##  [1] "Adolescent birth rate (per 1000 women)"                                                                                                                                           
##  [2] "Age-standardized mortality rate attributed to household and ambient air pollution  (per 100 000 population) "                                                                     
##  [3] "Age-standardized prevalence of hypertension among adults aged 30?79 years (%)"                                                                                                    
##  [4] "Age-standardized prevalence of obesity among adults (18+ years) (%)"                                                                                                              
##  [5] "Age-standardized prevalence of tobacco use among persons 15 years and older (%) "                                                                                                 
##  [6] "Annual mean concentrations of fine particulate matter (PM2.5) in urban areas (\xe6g/m3)"                                                                                          
##  [7] "Average of 15 International Health Regulations core capacity scores"                                                                                                              
##  [8] "Density of dentists (per 10 000 population) "                                                                                                                                     
##  [9] "Density of medical doctors (per 10 000 population) "                                                                                                                              
## [10] "Density of nursing and midwifery personnel (per 10 000 population) "                                                                                                              
## [11] "Density of pharmacists (per 10 000 population) "                                                                                                                                  
## [12] "Diphtheria-tetanus-pertussis (DTP3) immunization coverage among 1-year-olds (%)"                                                                                                  
## [13] "Domestic general government health expenditure (GGHE-D) as percentage of general government expenditure (GGE) (%)"                                                                
## [14] "Healthy life expectancy at birth (years)"                                                                                                                                         
## [15] "Hepatitis B surface antigen (HBsAg) prevalence among children under 5 years (%)"                                                                                                  
## [16] "Human papillomavirus (HPV) immunization coverage estimates among 15 year-old girls (%)"                                                                                           
## [17] "Life expectancy at birth (years)"                                                                                                                                                 
## [18] "Maternal mortality ratio (per 100 000 live births)"                                                                                                                               
## [19] "Measles-containing-vaccine second-dose (MCV2) immunization coverage by the locally recommended age (%)"                                                                           
## [20] "Mortality rate attributed to exposure to unsafe WASH services (per 100 000 population)"                                                                                           
## [21] "Mortality rate due to homicide (per 100 000 population)"                                                                                                                          
## [22] "Mortality rate from unintentional poisoning (per 100 000 population)"                                                                                                             
## [23] "Neonatal mortality rate (per 1000 live births)"                                                                                                                                   
## [24] "Number of cases of poliomyelitis caused by wild poliovirus (WPV)"                                                                                                                 
## [25] "Percentage of bloodstream infection due to Escherichia coli resistant to 3rd-generation cephalosporin (%)"                                                                        
## [26] "Percentage of bloodstream infections due methicillin-resistant Staphylococcus aureus (%)"                                                                                         
## [27] "Percentage of total antibiotic consumption being from the AWaRe \"Access\"\x9d antibiotics category  (%)"                                                                         
## [28] "Prevalence of anaemia in women of reproductive age (15?49 years) (%)"                                                                                                             
## [29] "Prevalence of obesity among children and adolescents (5?19 years) (%)"                                                                                                            
## [30] "Prevalence of overweight in children under 5 (%)"                                                                                                                                 
## [31] "Prevalence of stunting in children under 5 (%)"                                                                                                                                   
## [32] "Probability of dying from any of CVD, cancer, diabetes, CRD between age 30 and exact age 70 (%)"                                                                                  
## [33] "Proportion of births attended by skilled health personnel (%)"                                                                                                                    
## [34] "Proportion of population with primary reliance on clean fuels and technology (%)"                                                                                                 
## [35] "Reported number of people requiring interventions against NTDs"                                                                                                                   
## [36] "Road traffic mortality rate (per 100 000 population)"                                                                                                                             
## [37] "Suicide mortality rate (per 100 000 population)"                                                                                                                                  
## [38] "Total alcohol per capita (\xf2\xff15 years of age) consumption (litres of pure alcohol)"                                                                                          
## [39] "Tuberculosis incidence (per 100 000 population)"                                                                                                                                  
## [40] "UHC: Service coverage index"                                                                                                                                                      
## [41] "Under-five mortality rate (per 1000 live births)"                                                                                                                                 
## [42] "Amount of water- and sanitation-related official development assistance that is part of a government-coordinated spending plan (constant 2020 US$ millions)"                      
## [43] "Malaria incidence (per 1000 population at risk)"                                                                                                                                  
## [44] "New HIV infections (per 1000 uninfected population)"                                                                                                                              
## [45] "Pneumococcal conjugate 3rd dose (PCV3) immunization coverage  among 1-year olds (%)"                                                                                              
## [46] "Population with household expenditures on health > 10% of total household expenditure or income (%)"                                                                              
## [47] "Population with household expenditures on health > 25% of total household expenditure or income (%)"                                                                              
## [48] "Prevalence of wasting in children under 5 (%)"                                                                                                                                    
## [49] "Proportion of ever-partnered women and girls aged 15?49 years subjected to physical and/or sexual violence by a current or former intimate partner in the previous 12 months (%) "
## [50] "Proportion of ever-partnered women and girls aged 15?49 years subjected to physical and/or sexual violence by a current or former intimate partner in their lifetime (%) "        
## [51] "Proportion of population using a hand-washing facility with soap and water (%)"                                                                                                   
## [52] "Proportion of population using safely-managed drinking-water services (%)"                                                                                                        
## [53] "Proportion of population using safely-managed sanitation services (%)"                                                                                                            
## [54] "Proportion of safely treated domestic wastewater flows (%)"                                                                                                                       
## [55] "Proportion of women of reproductive age who have their need for family planning satisfied with modern methods (%)"                                                                
## [56] "Total net official development assistance to medical research and basic health sectors per capita (US$), by recipient country "
unique(data_ASEAN$IND_CODE)
##  [1] "MDG_0000000003"                        
##  [2] "SDGAIRBODA"                            
##  [3] "NCD_HYP_PREVALENCE_A"                  
##  [4] "NCD_BMI_30A"                           
##  [5] "M_Est_tob_curr_std"                    
##  [6] "SDGPM25"                               
##  [7] "SDGIHR2021"                            
##  [8] "HWF_0010"                              
##  [9] "HWF_0001"                              
## [10] "HWF_0006"                              
## [11] "HWF_0014"                              
## [12] "WHS4_100"                              
## [13] "GHED_GGHE-DGGE_SHA2011"                
## [14] "WHOSIS_0002"                           
## [15] "SDGHEPHBSAGPRV"                        
## [16] "SDGHPVRECEIVED"                        
## [17] "WHOSIS_0001"                           
## [18] "MDG_0000000026"                        
## [19] "MCV2"                                  
## [20] "SDGWSHBOD"                             
## [21] "VIOLENCE_HOMICIDERATE"                 
## [22] "SDGPOISON"                             
## [23] "WHOSIS_000003"                         
## [24] "VACCINEPREVENTABLE_WILDPOLIO"          
## [25] "AMR_INFECT_ECOLI"                      
## [26] "AMR_INFECT_MRSA"                       
## [27] "GLASSAMC_AWARE"                        
## [28] "NUTRITION_ANAEMIA_REPRODUCTIVEAGE_PREV"
## [29] "NCD_BMI_PLUS2C"                        
## [30] "NUTOVERWEIGHTPREV"                     
## [31] "NUTSTUNTINGPREV"                       
## [32] "NCDMORT3070"                           
## [33] "MDG_0000000025"                        
## [34] "PHE_HHAIR_PROP_POP_CLEAN_FUELS"        
## [35] "SDGNTDTREATMENT"                       
## [36] "RS_198"                                
## [37] "SDGSUICIDE"                            
## [38] "SA_0000001688"                         
## [39] "MDG_0000000020"                        
## [40] "UHC_INDEX_REPORTED"                    
## [41] "MDG_0000000007"                        
## [42] "SDGODAWS"                              
## [43] "MALARIA_EST_INCIDENCE"                 
## [44] "SDGHIV"                                
## [45] "PCV3"                                  
## [46] "FINPROTECTION_CATA_TOT_10_POP"         
## [47] "FINPROTECTION_CATA_TOT_25_POP"         
## [48] "NUTRITION_WH_2"                        
## [49] "SDGIPV12M"                             
## [50] "SDGIPVLT"                              
## [51] "WSH_HYGIENE_BASIC"                     
## [52] "WSH_WATER_SAFELY_MANAGED"              
## [53] "WSH_SANITATION_SAFELY_MANAGED"         
## [54] "WSH_DOMESTIC_WASTE_SAFELY_TREATED"     
## [55] "SDGFPALL"                              
## [56] "SDGODA01"

There are 56 indicators in this dataset for ASEAN.

  1. Age-standardized prevalence of obesity among adults (18+ years) (%)
data_ASEAN_NCD_BMI_30A <- data_ASEAN %>% 
  group_by(DIM_GEO_CODE, DIM_TIME_YEAR) %>% 
  filter(IND_CODE == "NCD_BMI_30A") %>% 
  select(DIM_GEO_CODE, DIM_TIME_YEAR,DIM_1_CODE, IND_CODE, VALUE_NUMERIC) %>%
  arrange(desc(VALUE_NUMERIC))

data_ASEAN_NCD_BMI_30A
## # A tibble: 10 × 5
## # Groups:   DIM_GEO_CODE, DIM_TIME_YEAR [10]
##    DIM_GEO_CODE DIM_TIME_YEAR DIM_1_CODE IND_CODE    VALUE_NUMERIC
##    <chr>                <int> <chr>      <chr>               <dbl>
##  1 BRN                   2022 SEX_BTSX   NCD_BMI_30A         31.7 
##  2 MYS                   2022 SEX_BTSX   NCD_BMI_30A         22.1 
##  3 THA                   2022 SEX_BTSX   NCD_BMI_30A         15.4 
##  4 SGP                   2022 SEX_BTSX   NCD_BMI_30A         13.9 
##  5 IDN                   2022 SEX_BTSX   NCD_BMI_30A         11.2 
##  6 PHL                   2022 SEX_BTSX   NCD_BMI_30A          8.74
##  7 LAO                   2022 SEX_BTSX   NCD_BMI_30A          8.01
##  8 MMR                   2022 SEX_BTSX   NCD_BMI_30A          7.43
##  9 KHM                   2022 SEX_BTSX   NCD_BMI_30A          4.36
## 10 VNM                   2022 SEX_BTSX   NCD_BMI_30A          2.02
data_ASEAN_NCD_BMI_30A %>% 
  ggplot(aes(x = VALUE_NUMERIC, y = reorder(DIM_GEO_CODE, VALUE_NUMERIC), color = VALUE_NUMERIC)) +
  geom_point(size = 4) +
  geom_segment(aes(xend = 0, yend = reorder(DIM_GEO_CODE, VALUE_NUMERIC)), linewidth = 2) +
  geom_text(aes(label = round(VALUE_NUMERIC, 2)), color = "white", size = 1.5) +
  geom_vline(xintercept = mean(data_ASEAN_NCD_BMI_30A$VALUE_NUMERIC), color = "black", linetype = "dashed") +  # Add vertical line at the average VALUE_NUMERIC
  scale_x_continuous(
    "", 
    expand = c(0, 0), 
    limits = c(0, 50), 
    breaks = seq(0, 50, by = 5),  # Set breaks by 5
    position = "top"
  ) +
  scale_y_discrete("", expand = expansion(mult = c(0.05, 0.1))) +  # Add space on y-axis and "", = removes the y-axis title
  scale_color_gradientn(colors = c("lightblue", "darkblue"), name = NULL) + # name = NULL - Remove legend title
  labs(
    title = "NCD_BMI_30A % in ASEAN Countries - 2022 ",
    caption = "Data Source: WHO_Health_Statistics_2024"
  ) +
  theme(
    panel.grid.major = element_blank(),
    panel.grid.minor = element_blank(),
    plot.caption = element_text(hjust = 0, size = 8),  # Align "Source" to the left
    plot.caption.position = "panel"  # Adjust position of caption inside the panel
  ) +
  annotate("text",x = Inf,y = -Inf,label = "\u00A9 Thura",hjust = 1.1, vjust = -1,size = 3)

Brunei has the highest percentage of population that are over 30 BMI and Vietnam has the lowest.


Creating Functions for table and plot

table <- function(data, ind_code) {
  data <- data %>% 
    group_by(DIM_GEO_CODE, DIM_TIME_YEAR) %>% 
    filter(IND_CODE == ind_code) %>% 
    select(DIM_GEO_CODE, DIM_TIME_YEAR, IND_CODE,DIM_1_CODE, VALUE_NUMERIC) %>%
    arrange(desc(VALUE_NUMERIC)) }

  plot <- function(data, ind_code, title_suffix, unit, x,y) {  
  data %>% 
    ggplot(aes(x = VALUE_NUMERIC, y = reorder(DIM_GEO_CODE, VALUE_NUMERIC), color = VALUE_NUMERIC)) +
    geom_point(size = 4) +
    geom_segment(aes(xend = 0, yend = reorder(DIM_GEO_CODE, VALUE_NUMERIC)), linewidth = 2) +
    geom_text(aes(label = round(VALUE_NUMERIC, 2)), color = "white", size = 1.5) +
    geom_vline(xintercept = mean(data$VALUE_NUMERIC), color = "black", linetype = "dashed") +
    scale_x_continuous(
      "", 
      expand = c(0,0), 
      limits = c(0, x), 
      breaks = seq(0, x, by = y),  
      position = "top"
    ) +
    scale_y_discrete("", expand = expansion(mult = c(0.05, 0.1))) +  
    scale_color_gradientn(colors = c("lightblue", "darkblue"), name = NULL) +
    labs(
      title = paste(ind_code,unit, " in ASEAN Countries -", title_suffix),
      caption = "Data Source: WHO_Health_Statistics_2024"
    ) +
    theme(
      panel.grid.major = element_blank(),
      panel.grid.minor = element_blank(),
      plot.caption = element_text(hjust = 0, size = 8),  # Align "Source" to the left
    plot.caption.position = "panel"  # Adjust position of caption inside the panel
    ) +
  annotate("text",x = Inf,y = -Inf,label = "\u00A9 Thura",hjust = 1.1, vjust = -1,size = 3)
}

  1. Age-standardized prevalence of tobacco use among persons 15 years and older (%)
t_M_Est_tob_curr_std <- table(data_ASEAN,"M_Est_tob_curr_std")
t_M_Est_tob_curr_std
## # A tibble: 10 × 5
## # Groups:   DIM_GEO_CODE, DIM_TIME_YEAR [10]
##    DIM_GEO_CODE DIM_TIME_YEAR IND_CODE           DIM_1_CODE VALUE_NUMERIC
##    <chr>                <int> <chr>              <chr>              <dbl>
##  1 MMR                   2022 M_Est_tob_curr_std SEX_BTSX            44.4
##  2 IDN                   2022 M_Est_tob_curr_std SEX_BTSX            38.2
##  3 LAO                   2022 M_Est_tob_curr_std SEX_BTSX            27.2
##  4 VNM                   2022 M_Est_tob_curr_std SEX_BTSX            22.5
##  5 MYS                   2022 M_Est_tob_curr_std SEX_BTSX            22  
##  6 PHL                   2022 M_Est_tob_curr_std SEX_BTSX            20.4
##  7 THA                   2022 M_Est_tob_curr_std SEX_BTSX            19.2
##  8 KHM                   2022 M_Est_tob_curr_std SEX_BTSX            17.2
##  9 BRN                   2022 M_Est_tob_curr_std SEX_BTSX            16.4
## 10 SGP                   2022 M_Est_tob_curr_std SEX_BTSX            16.4
#Plotting
plot(t_M_Est_tob_curr_std, "M_Est_tob_curr_std", "2022", "%", 50, 5)

Myanmar has the highest percentage of population in tobacco use (45%) and Brunei and Singapore have the lowest (16.4%).


3. Annual mean concentrations of fine particulate matter (PM2.5) in urban areas (**6g/m3)**

#Table
t_SDGPM25 <- table(data_ASEAN,"SDGPM25")
t_SDGPM25
## # A tibble: 10 × 5
## # Groups:   DIM_GEO_CODE, DIM_TIME_YEAR [10]
##    DIM_GEO_CODE DIM_TIME_YEAR IND_CODE DIM_1_CODE VALUE_NUMERIC
##    <chr>                <int> <chr>    <chr>              <dbl>
##  1 MMR                   2019 SDGPM25  <NA>               27.8 
##  2 THA                   2019 SDGPM25  <NA>               25.5 
##  3 PHL                   2019 SDGPM25  <NA>               24.2 
##  4 LAO                   2019 SDGPM25  <NA>               24.2 
##  5 MYS                   2019 SDGPM25  <NA>               23.7 
##  6 VNM                   2019 SDGPM25  <NA>               22.1 
##  7 IDN                   2019 SDGPM25  <NA>               19.9 
##  8 KHM                   2019 SDGPM25  <NA>               18.3 
##  9 SGP                   2019 SDGPM25  <NA>               13.3 
## 10 BRN                   2019 SDGPM25  <NA>                6.76
#Plotting
plot(t_SDGPM25, "SDGPM25", "2019", "%", 50,5)

Myanmar has the highest mean concentration of PM2.5 in urban areas (27.75%) and Brunei has the lowest (6.76%).


  1. Diphtheria-tetanus-pertussis (DTP3) immunization coverage among 1-year-olds (%)
#Table
t_WHS4_100 <- table(data_ASEAN,"WHS4_100")
t_WHS4_100
## # A tibble: 10 × 5
## # Groups:   DIM_GEO_CODE, DIM_TIME_YEAR [10]
##    DIM_GEO_CODE DIM_TIME_YEAR IND_CODE DIM_1_CODE VALUE_NUMERIC
##    <chr>                <int> <chr>    <chr>              <dbl>
##  1 BRN                   2022 WHS4_100 <NA>                  99
##  2 MYS                   2022 WHS4_100 <NA>                  97
##  3 SGP                   2022 WHS4_100 <NA>                  97
##  4 THA                   2022 WHS4_100 <NA>                  97
##  5 VNM                   2022 WHS4_100 <NA>                  91
##  6 KHM                   2022 WHS4_100 <NA>                  85
##  7 IDN                   2022 WHS4_100 <NA>                  85
##  8 LAO                   2022 WHS4_100 <NA>                  80
##  9 PHL                   2022 WHS4_100 <NA>                  72
## 10 MMR                   2022 WHS4_100 <NA>                  71
#Plotting
plot(t_WHS4_100, "WHS4_100", "2022", "%", 100,10)

Brunei has the highest DTP3 immunization coverage (99%) and Myanmar has the lowest (71%).


  1. Healthy life expectancy at birth (years)
t_WHOSIS_0002 <- table(data_ASEAN,"WHOSIS_0002")
t_WHOSIS_0002
## # A tibble: 30 × 5
## # Groups:   DIM_GEO_CODE, DIM_TIME_YEAR [10]
##    DIM_GEO_CODE DIM_TIME_YEAR IND_CODE    DIM_1_CODE VALUE_NUMERIC
##    <chr>                <int> <chr>       <chr>              <dbl>
##  1 SGP                   2021 WHOSIS_0002 SEX_FMLE            75.0
##  2 SGP                   2021 WHOSIS_0002 SEX_BTSX            73.6
##  3 SGP                   2021 WHOSIS_0002 SEX_MLE             72.4
##  4 THA                   2021 WHOSIS_0002 SEX_FMLE            68.1
##  5 VNM                   2021 WHOSIS_0002 SEX_FMLE            68.0
##  6 BRN                   2021 WHOSIS_0002 SEX_FMLE            67.9
##  7 BRN                   2021 WHOSIS_0002 SEX_BTSX            67.1
##  8 BRN                   2021 WHOSIS_0002 SEX_MLE             66.3
##  9 THA                   2021 WHOSIS_0002 SEX_BTSX            65.8
## 10 VNM                   2021 WHOSIS_0002 SEX_BTSX            65.4
## # ℹ 20 more rows
#Plotting
plot(t_WHOSIS_0002, "WHOSIS_0002", "2021", "%", 100,20)+facet_wrap(~DIM_1_CODE)

Singapore has the highest healthy life expectancy at birth while Philippines and Myanmar have the lowest.


  1. Life expectancy at birth (years)
t_WHOSIS_0001 <- table(data_ASEAN,"WHOSIS_0001")
t_WHOSIS_0001
## # A tibble: 30 × 5
## # Groups:   DIM_GEO_CODE, DIM_TIME_YEAR [10]
##    DIM_GEO_CODE DIM_TIME_YEAR IND_CODE    DIM_1_CODE VALUE_NUMERIC
##    <chr>                <int> <chr>       <chr>              <dbl>
##  1 SGP                   2021 WHOSIS_0001 SEX_FMLE            86.3
##  2 SGP                   2021 WHOSIS_0001 SEX_BTSX            83.9
##  3 SGP                   2021 WHOSIS_0001 SEX_MLE             81.6
##  4 THA                   2021 WHOSIS_0001 SEX_FMLE            79.0
##  5 BRN                   2021 WHOSIS_0001 SEX_FMLE            78.6
##  6 VNM                   2021 WHOSIS_0001 SEX_FMLE            78.0
##  7 BRN                   2021 WHOSIS_0001 SEX_BTSX            76.9
##  8 BRN                   2021 WHOSIS_0001 SEX_MLE             75.3
##  9 MYS                   2021 WHOSIS_0001 SEX_FMLE            75.3
## 10 THA                   2021 WHOSIS_0001 SEX_BTSX            75.3
## # ℹ 20 more rows
#Plotting
plot(t_WHOSIS_0001, "WHOSIS_0001", "2021", "%", 100,20)+facet_wrap(~DIM_1_CODE)

Singapore has the highest healthy life expectancy at birth while Philippines and Myanmar have the lowest.


  1. Domestic general government health expenditure (GGHE-D) as percentage of general government expenditure (GGE) (%)
t_GHED_GGHE_DGGE_SHA2011 <- table(data_ASEAN,"GHED_GGHE-DGGE_SHA2011")
t_GHED_GGHE_DGGE_SHA2011
## # A tibble: 10 × 5
## # Groups:   DIM_GEO_CODE, DIM_TIME_YEAR [10]
##    DIM_GEO_CODE DIM_TIME_YEAR IND_CODE               DIM_1_CODE VALUE_NUMERIC
##    <chr>                <int> <chr>                  <chr>              <dbl>
##  1 SGP                   2021 GHED_GGHE-DGGE_SHA2011 <NA>               20.8 
##  2 THA                   2021 GHED_GGHE-DGGE_SHA2011 <NA>               13.5 
##  3 IDN                   2021 GHED_GGHE-DGGE_SHA2011 <NA>               12.1 
##  4 MYS                   2021 GHED_GGHE-DGGE_SHA2011 <NA>               10.1 
##  5 VNM                   2021 GHED_GGHE-DGGE_SHA2011 <NA>                8.97
##  6 PHL                   2021 GHED_GGHE-DGGE_SHA2011 <NA>                8.46
##  7 BRN                   2021 GHED_GGHE-DGGE_SHA2011 <NA>                7.06
##  8 KHM                   2021 GHED_GGHE-DGGE_SHA2011 <NA>                6.99
##  9 LAO                   2021 GHED_GGHE-DGGE_SHA2011 <NA>                4.41
## 10 MMR                   2021 GHED_GGHE-DGGE_SHA2011 <NA>                4.39
#Plotting
plot(t_GHED_GGHE_DGGE_SHA2011, "GHED_GGHE-DGGE_SHA2011", "2021", "%", 25,5)

Singapore has the highest government health expenditure (20.81%) while Myanmar has the lowest (4.39%).


  1. Probability of dying from any of CVD, cancer, diabetes, CRD between age 30 and exact age 70 (%)
t_NCDMORT3070 <- table(data_ASEAN,"NCDMORT3070")
t_NCDMORT3070
## # A tibble: 10 × 5
## # Groups:   DIM_GEO_CODE, DIM_TIME_YEAR [10]
##    DIM_GEO_CODE DIM_TIME_YEAR IND_CODE    DIM_1_CODE VALUE_NUMERIC
##    <chr>                <int> <chr>       <chr>              <dbl>
##  1 LAO                   2019 NCDMORT3070 <NA>               27.1 
##  2 MMR                   2019 NCDMORT3070 <NA>               25.6 
##  3 PHL                   2019 NCDMORT3070 <NA>               25.5 
##  4 IDN                   2019 NCDMORT3070 <NA>               24.2 
##  5 KHM                   2019 NCDMORT3070 <NA>               23.4 
##  6 VNM                   2019 NCDMORT3070 <NA>               20.9 
##  7 MYS                   2019 NCDMORT3070 <NA>               19.7 
##  8 BRN                   2019 NCDMORT3070 <NA>               15.2 
##  9 THA                   2019 NCDMORT3070 <NA>               14.3 
## 10 SGP                   2019 NCDMORT3070 <NA>                8.74
#Plotting
plot(t_NCDMORT3070, "NCDMORT3070", "2019", "%", 30,5)

Laos has the highest probability (27.07%) of people between 30 and 70 dying from any of CVD, cancer, diabetes, CRD while Singapore has the lowest (8.74%).


  1. Suicide mortality rate (per 100 000 population)
t_SDGSUICIDE <- table(data_ASEAN,"SDGSUICIDE")
t_SDGSUICIDE
## # A tibble: 10 × 5
## # Groups:   DIM_GEO_CODE, DIM_TIME_YEAR [10]
##    DIM_GEO_CODE DIM_TIME_YEAR IND_CODE   DIM_1_CODE VALUE_NUMERIC
##    <chr>                <int> <chr>      <chr>              <dbl>
##  1 THA                   2021 SDGSUICIDE <NA>               16.4 
##  2 SGP                   2021 SDGSUICIDE <NA>                8.44
##  3 VNM                   2021 SDGSUICIDE <NA>                7.56
##  4 MYS                   2021 SDGSUICIDE <NA>                5.64
##  5 KHM                   2021 SDGSUICIDE <NA>                4.67
##  6 LAO                   2021 SDGSUICIDE <NA>                4.61
##  7 PHL                   2021 SDGSUICIDE <NA>                3.55
##  8 MMR                   2021 SDGSUICIDE <NA>                2.89
##  9 BRN                   2021 SDGSUICIDE <NA>                2.74
## 10 IDN                   2021 SDGSUICIDE <NA>                1.21
#Plotting
plot(t_SDGSUICIDE, "SDGSUICIDE", "2021", "per 100,000", 20,5)

Thailand has the highest suicide mortality rate (16.39) per 100000 while Indonesia has the lowest (1.21).


  1. Road traffic mortality rate (per 100 000 population)
t_SA_0000001688 <- table(data_ASEAN,"SA_0000001688")
t_SA_0000001688
## # A tibble: 10 × 5
## # Groups:   DIM_GEO_CODE, DIM_TIME_YEAR [10]
##    DIM_GEO_CODE DIM_TIME_YEAR IND_CODE      DIM_1_CODE VALUE_NUMERIC
##    <chr>                <int> <chr>         <chr>              <dbl>
##  1 LAO                   2019 SA_0000001688 SEX_BTSX          11.5  
##  2 VNM                   2019 SA_0000001688 SEX_BTSX           9.34 
##  3 KHM                   2019 SA_0000001688 SEX_BTSX           8.48 
##  4 THA                   2019 SA_0000001688 SEX_BTSX           7.85 
##  5 PHL                   2019 SA_0000001688 SEX_BTSX           6.18 
##  6 MMR                   2019 SA_0000001688 SEX_BTSX           2.12 
##  7 SGP                   2019 SA_0000001688 SEX_BTSX           1.87 
##  8 MYS                   2019 SA_0000001688 SEX_BTSX           0.759
##  9 BRN                   2019 SA_0000001688 SEX_BTSX           0.412
## 10 IDN                   2019 SA_0000001688 SEX_BTSX           0.110
#Plotting
plot(t_SA_0000001688, "SA_0000001688", "2019", "per 100,000", 15,5)

Laos has the highest Road Traffic mortality rate (11.52) per 100000 while Indonesia has the lowest (0.11).


  1. Tuberculosis incidence (per 100 000 population)
t_MDG_0000000020 <- table(data_ASEAN,"MDG_0000000020")
t_MDG_0000000020
## # A tibble: 10 × 5
## # Groups:   DIM_GEO_CODE, DIM_TIME_YEAR [10]
##    DIM_GEO_CODE DIM_TIME_YEAR IND_CODE       DIM_1_CODE VALUE_NUMERIC
##    <chr>                <int> <chr>          <chr>              <dbl>
##  1 PHL                   2022 MDG_0000000020 <NA>                 638
##  2 MMR                   2022 MDG_0000000020 <NA>                 475
##  3 IDN                   2022 MDG_0000000020 <NA>                 385
##  4 KHM                   2022 MDG_0000000020 <NA>                 320
##  5 VNM                   2022 MDG_0000000020 <NA>                 176
##  6 THA                   2022 MDG_0000000020 <NA>                 155
##  7 LAO                   2022 MDG_0000000020 <NA>                 138
##  8 MYS                   2022 MDG_0000000020 <NA>                 113
##  9 BRN                   2022 MDG_0000000020 <NA>                  57
## 10 SGP                   2022 MDG_0000000020 <NA>                  51
#Plotting
plot(t_MDG_0000000020, "MDG_0000000020", "2022", "per 100,000", 700,100)

Philippines has the highest tuberculosis incidence (638) per 100000 while Singapore has the lowest (51).


  1. Malaria incidence (per 1000 population at risk)
t_MDG_MALARIA_EST_INCIDENCE <- table(data_ASEAN,"MALARIA_EST_INCIDENCE")
t_MDG_MALARIA_EST_INCIDENCE
## # A tibble: 8 × 5
## # Groups:   DIM_GEO_CODE, DIM_TIME_YEAR [8]
##   DIM_GEO_CODE DIM_TIME_YEAR IND_CODE              DIM_1_CODE VALUE_NUMERIC
##   <chr>                <int> <chr>                 <chr>              <dbl>
## 1 MMR                   2022 MALARIA_EST_INCIDENCE <NA>            12.4    
## 2 IDN                   2022 MALARIA_EST_INCIDENCE <NA>             4.19   
## 3 KHM                   2022 MALARIA_EST_INCIDENCE <NA>             1.48   
## 4 LAO                   2022 MALARIA_EST_INCIDENCE <NA>             0.948  
## 5 THA                   2022 MALARIA_EST_INCIDENCE <NA>             0.460  
## 6 PHL                   2022 MALARIA_EST_INCIDENCE <NA>             0.122  
## 7 VNM                   2022 MALARIA_EST_INCIDENCE <NA>             0.00569
## 8 MYS                   2022 MALARIA_EST_INCIDENCE <NA>             0
#Plotting
plot(t_MDG_MALARIA_EST_INCIDENCE, "MDG_MALARIA_EST_INCIDENCE", "2022", "per 100,000", 20,2)

Myanmar has the highest malaria estimate incidence per 100,000 at risk while Malaysia has the lowest.


  1. Proportion of population using safely-managed drinking-water services (%)
t_WSH_WATER_SAFELY_MANAGED <- table(data_ASEAN,"WSH_WATER_SAFELY_MANAGED")
t_WSH_WATER_SAFELY_MANAGED
## # A tibble: 8 × 5
## # Groups:   DIM_GEO_CODE, DIM_TIME_YEAR [8]
##   DIM_GEO_CODE DIM_TIME_YEAR IND_CODE                 DIM_1_CODE VALUE_NUMERIC
##   <chr>                <int> <chr>                    <chr>              <dbl>
## 1 SGP                   2022 WSH_WATER_SAFELY_MANAGED <NA>               100  
## 2 MYS                   2022 WSH_WATER_SAFELY_MANAGED <NA>                93.9
## 3 VNM                   2022 WSH_WATER_SAFELY_MANAGED <NA>                57.8
## 4 MMR                   2022 WSH_WATER_SAFELY_MANAGED <NA>                57.4
## 5 PHL                   2022 WSH_WATER_SAFELY_MANAGED <NA>                47.9
## 6 IDN                   2022 WSH_WATER_SAFELY_MANAGED <NA>                30.3
## 7 KHM                   2022 WSH_WATER_SAFELY_MANAGED <NA>                29.1
## 8 LAO                   2022 WSH_WATER_SAFELY_MANAGED <NA>                17.9
#Plotting
plot(t_WSH_WATER_SAFELY_MANAGED, "WSH_WATER_SAFELY_MANAGED", "2022", "%", 100,20)

Singapore has the all its population using safely-managed drinking-water services while Laos has the lowest percentage, only 17%.


  1. Measles-containing-vaccine second-dose (MCV2) immunization coverage by the locally recommended age (%)
t_MCV2 <- table(data_ASEAN,"MCV2")
t_MCV2
## # A tibble: 10 × 5
## # Groups:   DIM_GEO_CODE, DIM_TIME_YEAR [10]
##    DIM_GEO_CODE DIM_TIME_YEAR IND_CODE DIM_1_CODE VALUE_NUMERIC
##    <chr>                <int> <chr>    <chr>              <dbl>
##  1 BRN                   2022 MCV2     <NA>                  99
##  2 MYS                   2022 MCV2     <NA>                  96
##  3 SGP                   2022 MCV2     <NA>                  92
##  4 THA                   2022 MCV2     <NA>                  87
##  5 VNM                   2022 MCV2     <NA>                  81
##  6 KHM                   2022 MCV2     <NA>                  69
##  7 IDN                   2022 MCV2     <NA>                  67
##  8 MMR                   2022 MCV2     <NA>                  64
##  9 PHL                   2022 MCV2     <NA>                  64
## 10 LAO                   2022 MCV2     <NA>                  55
#Plotting
plot(t_MCV2, "MCV2", "2022", "%", 100,20)

Brunei has highest vaccine coverage for MCV2 (99%) while Laos has the lowest, 55%.


Estimate of current tobacco use prevalence (%) (age-standardized rate) - MMR - SDG 3.a

data2 <- read.csv("D:/me/R-Language/Practice/Dataset/M_Est_tob_curr_std_2024.csv")

head(data2)
##        IndicatorCode
## 1 M_Est_tob_curr_std
## 2 M_Est_tob_curr_std
## 3 M_Est_tob_curr_std
## 4 M_Est_tob_curr_std
## 5 M_Est_tob_curr_std
## 6 M_Est_tob_curr_std
##                                                                Indicator
## 1 Estimate of current tobacco use prevalence (%) (age-standardized rate)
## 2 Estimate of current tobacco use prevalence (%) (age-standardized rate)
## 3 Estimate of current tobacco use prevalence (%) (age-standardized rate)
## 4 Estimate of current tobacco use prevalence (%) (age-standardized rate)
## 5 Estimate of current tobacco use prevalence (%) (age-standardized rate)
## 6 Estimate of current tobacco use prevalence (%) (age-standardized rate)
##   ValueType ParentLocationCode        ParentLocation Location.type
## 1   numeric               SEAR       South-East Asia       Country
## 2   numeric                EUR                Europe       Country
## 3   numeric                AFR                Africa       Country
## 4   numeric                EMR Eastern Mediterranean       Country
## 5   numeric                AFR                Africa       Country
## 6   numeric                AFR                Africa       Country
##   SpatialDimValueCode                              Location Period.type Period
## 1                 PRK Democratic People's Republic of Korea        Year   2030
## 2                 AZE                            Azerbaijan        Year   2030
## 3                 GHA                                 Ghana        Year   2030
## 4                 EGY                                 Egypt        Year   2030
## 5                 NGA                               Nigeria        Year   2030
## 6                 GMB                                Gambia        Year   2030
##   IsLatestYear Dim1.type   Dim1 Dim1ValueCode Dim2.type Dim2 Dim2ValueCode
## 1         true       Sex Female      SEX_FMLE        NA   NA            NA
## 2         true       Sex Female      SEX_FMLE        NA   NA            NA
## 3         true       Sex Female      SEX_FMLE        NA   NA            NA
## 4         true       Sex Female      SEX_FMLE        NA   NA            NA
## 5         true       Sex Female      SEX_FMLE        NA   NA            NA
## 6         true       Sex Female      SEX_FMLE        NA   NA            NA
##   Dim3.type Dim3 Dim3ValueCode DataSourceDimValueCode DataSource
## 1        NA   NA            NA                     NA         NA
## 2        NA   NA            NA                     NA         NA
## 3        NA   NA            NA                     NA         NA
## 4        NA   NA            NA                     NA         NA
## 5        NA   NA            NA                     NA         NA
## 6        NA   NA            NA                     NA         NA
##   FactValueNumericPrefix FactValueNumeric FactValueUoM
## 1                     NA              0.0           NA
## 2                     NA              0.1           NA
## 3                     NA              0.2           NA
## 4                     NA              0.3           NA
## 5                     NA              0.3           NA
## 6                     NA              0.4           NA
##   FactValueNumericLowPrefix FactValueNumericLow FactValueNumericHighPrefix
## 1                        NA                 0.0                         NA
## 2                        NA                 0.0                         NA
## 3                        NA                 0.1                         NA
## 4                        NA                 0.1                         NA
## 5                        NA                 0.1                         NA
## 6                        NA                 0.1                         NA
##   FactValueNumericHigh         Value FactValueTranslationID
## 1                  0.0       0 [0-0]                     NA
## 2                  0.2   0.1 [0-0.2]                     NA
## 3                  0.3 0.2 [0.1-0.3]                     NA
## 4                  0.4 0.3 [0.1-0.4]                     NA
## 5                  0.5 0.3 [0.1-0.5]                     NA
## 6                  0.6 0.4 [0.1-0.6]                     NA
##                                                                                                                                                                                   FactComments
## 1    Tobacco use estimates are not available. Tobacco smoking estimates are substituted for missing tobacco use estimates. The most recent survey was conducted in 2017. This is a projection.
## 2                                                                                                                          The most recent survey was conducted in 2020. This is a projection.
## 3                                                                                                                       The most recent survey was conducted in 2017-18. This is a projection.
## 4 Tobacco use estimates are not available. Tobacco smoking estimates are substituted for missing tobacco use estimates. The most recent survey was conducted in 2016-17. This is a projection.
## 5                                                                                                                          The most recent survey was conducted in 2018. This is a projection.
## 6                                                                                                                          The most recent survey was conducted in 2018. This is a projection.
##   Language             DateModified
## 1       EN 2024-01-15T17:00:00.000Z
## 2       EN 2024-01-15T17:00:00.000Z
## 3       EN 2024-01-15T17:00:00.000Z
## 4       EN 2024-01-15T17:00:00.000Z
## 5       EN 2024-01-15T17:00:00.000Z
## 6       EN 2024-01-15T17:00:00.000Z
str(data2)
## 'data.frame':    14850 obs. of  34 variables:
##  $ IndicatorCode             : chr  "M_Est_tob_curr_std" "M_Est_tob_curr_std" "M_Est_tob_curr_std" "M_Est_tob_curr_std" ...
##  $ Indicator                 : chr  "Estimate of current tobacco use prevalence (%) (age-standardized rate)" "Estimate of current tobacco use prevalence (%) (age-standardized rate)" "Estimate of current tobacco use prevalence (%) (age-standardized rate)" "Estimate of current tobacco use prevalence (%) (age-standardized rate)" ...
##  $ ValueType                 : chr  "numeric" "numeric" "numeric" "numeric" ...
##  $ ParentLocationCode        : chr  "SEAR" "EUR" "AFR" "EMR" ...
##  $ ParentLocation            : chr  "South-East Asia" "Europe" "Africa" "Eastern Mediterranean" ...
##  $ Location.type             : chr  "Country" "Country" "Country" "Country" ...
##  $ SpatialDimValueCode       : chr  "PRK" "AZE" "GHA" "EGY" ...
##  $ Location                  : chr  "Democratic People's Republic of Korea" "Azerbaijan" "Ghana" "Egypt" ...
##  $ Period.type               : chr  "Year" "Year" "Year" "Year" ...
##  $ Period                    : int  2030 2030 2030 2030 2030 2030 2030 2030 2030 2030 ...
##  $ IsLatestYear              : chr  "true" "true" "true" "true" ...
##  $ Dim1.type                 : chr  "Sex" "Sex" "Sex" "Sex" ...
##  $ Dim1                      : chr  "Female" "Female" "Female" "Female" ...
##  $ Dim1ValueCode             : chr  "SEX_FMLE" "SEX_FMLE" "SEX_FMLE" "SEX_FMLE" ...
##  $ Dim2.type                 : logi  NA NA NA NA NA NA ...
##  $ Dim2                      : logi  NA NA NA NA NA NA ...
##  $ Dim2ValueCode             : logi  NA NA NA NA NA NA ...
##  $ Dim3.type                 : logi  NA NA NA NA NA NA ...
##  $ Dim3                      : logi  NA NA NA NA NA NA ...
##  $ Dim3ValueCode             : logi  NA NA NA NA NA NA ...
##  $ DataSourceDimValueCode    : logi  NA NA NA NA NA NA ...
##  $ DataSource                : logi  NA NA NA NA NA NA ...
##  $ FactValueNumericPrefix    : logi  NA NA NA NA NA NA ...
##  $ FactValueNumeric          : num  0 0.1 0.2 0.3 0.3 0.4 0.4 0.4 0.4 0.4 ...
##  $ FactValueUoM              : logi  NA NA NA NA NA NA ...
##  $ FactValueNumericLowPrefix : logi  NA NA NA NA NA NA ...
##  $ FactValueNumericLow       : num  0 0 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 ...
##  $ FactValueNumericHighPrefix: logi  NA NA NA NA NA NA ...
##  $ FactValueNumericHigh      : num  0 0.2 0.3 0.4 0.5 0.6 0.6 0.6 0.6 0.6 ...
##  $ Value                     : chr  "0 [0-0]" "0.1 [0-0.2]" "0.2 [0.1-0.3]" "0.3 [0.1-0.4]" ...
##  $ FactValueTranslationID    : logi  NA NA NA NA NA NA ...
##  $ FactComments              : chr  "Tobacco use estimates are not available. Tobacco smoking estimates are substituted for missing tobacco use esti"| __truncated__ "The most recent survey was conducted in 2020. This is a projection." "The most recent survey was conducted in 2017-18. This is a projection." "Tobacco use estimates are not available. Tobacco smoking estimates are substituted for missing tobacco use esti"| __truncated__ ...
##  $ Language                  : chr  "EN" "EN" "EN" "EN" ...
##  $ DateModified              : chr  "2024-01-15T17:00:00.000Z" "2024-01-15T17:00:00.000Z" "2024-01-15T17:00:00.000Z" "2024-01-15T17:00:00.000Z" ...
data2_MMR <- data2 %>% filter(SpatialDimValueCode =="MMR", IndicatorCode == "M_Est_tob_curr_std") %>% select(IndicatorCode,Period, Dim1ValueCode, FactValueNumeric)

str(data2_MMR)
## 'data.frame':    30 obs. of  4 variables:
##  $ IndicatorCode   : chr  "M_Est_tob_curr_std" "M_Est_tob_curr_std" "M_Est_tob_curr_std" "M_Est_tob_curr_std" ...
##  $ Period          : int  2030 2030 2030 2025 2025 2025 2022 2022 2022 2021 ...
##  $ Dim1ValueCode   : chr  "SEX_FMLE" "SEX_BTSX" "SEX_MLE" "SEX_FMLE" ...
##  $ FactValueNumeric: num  13.1 39.3 65.4 16.6 42.3 68 19.3 44.4 69.5 20.2 ...
ggplot(data2_MMR, aes(x = Period, y = FactValueNumeric)) +
  geom_line() +
  labs(title = "Trend of Estimate of current tobacco use % over Time",
       caption = "Data Source: WHO_Health_Statistics_2024") + 
  facet_wrap(~Dim1ValueCode) +
  annotate("text", x = Inf, y = -Inf, label = "\u00A9 Thura", hjust = 1.1, vjust = -1, size = 3) +
  theme(axis.title.x = element_blank(),
        axis.title.y = element_blank())


DTP3 immunization - MMR from 2000 to 2022

WHO_Data_link - https://data.who.int/countries/104 or https://www.who.int/data/gho

data3 <- read.csv("D:/me/R-Language/Practice/Dataset/RELAY_WHS_DTP3_2024.csv")

head(data3)
##            IND_ID IND_CODE IND_UUID IND_PER_CODE DIM_TIME DIM_TIME_TYPE
## 1 F8E084CWHS4_100 WHS4_100  F8E084C     WHS4_100     2003          YEAR
## 2 F8E084CWHS4_100 WHS4_100  F8E084C     WHS4_100     2019          YEAR
## 3 F8E084CWHS4_100 WHS4_100  F8E084C     WHS4_100     2021          YEAR
## 4 F8E084CWHS4_100 WHS4_100  F8E084C     WHS4_100     2000          YEAR
## 5 F8E084CWHS4_100 WHS4_100  F8E084C     WHS4_100     2013          YEAR
## 6 F8E084CWHS4_100 WHS4_100  F8E084C     WHS4_100     2019          YEAR
##   DIM_GEO_CODE_M49 DIM_GEO_CODE_TYPE DIM_PUBLISH_STATE_CODE
## 1              583           COUNTRY              PUBLISHED
## 2              583           COUNTRY              PUBLISHED
## 3              586           COUNTRY              PUBLISHED
## 4               28           COUNTRY              PUBLISHED
## 5               28           COUNTRY              PUBLISHED
## 6               52           COUNTRY              PUBLISHED
##                             IND_NAME                   GEO_NAME_SHORT
## 1 DTP3 immunization coverage (age 1) Micronesia (Federated States of)
## 2 DTP3 immunization coverage (age 1) Micronesia (Federated States of)
## 3 DTP3 immunization coverage (age 1)                         Pakistan
## 4 DTP3 immunization coverage (age 1)              Antigua and Barbuda
## 5 DTP3 immunization coverage (age 1)              Antigua and Barbuda
## 6 DTP3 immunization coverage (age 1)                         Barbados
##   RATE_PER_100_N
## 1             92
## 2             78
## 3             83
## 4             95
## 5             99
## 6             90
str(data3)
## 'data.frame':    4719 obs. of  12 variables:
##  $ IND_ID                : chr  "F8E084CWHS4_100" "F8E084CWHS4_100" "F8E084CWHS4_100" "F8E084CWHS4_100" ...
##  $ IND_CODE              : chr  "WHS4_100" "WHS4_100" "WHS4_100" "WHS4_100" ...
##  $ IND_UUID              : chr  "F8E084C" "F8E084C" "F8E084C" "F8E084C" ...
##  $ IND_PER_CODE          : chr  "WHS4_100" "WHS4_100" "WHS4_100" "WHS4_100" ...
##  $ DIM_TIME              : int  2003 2019 2021 2000 2013 2019 2020 2015 2010 2009 ...
##  $ DIM_TIME_TYPE         : chr  "YEAR" "YEAR" "YEAR" "YEAR" ...
##  $ DIM_GEO_CODE_M49      : int  583 583 586 28 28 52 84 100 120 148 ...
##  $ DIM_GEO_CODE_TYPE     : chr  "COUNTRY" "COUNTRY" "COUNTRY" "COUNTRY" ...
##  $ DIM_PUBLISH_STATE_CODE: chr  "PUBLISHED" "PUBLISHED" "PUBLISHED" "PUBLISHED" ...
##  $ IND_NAME              : chr  "DTP3 immunization coverage (age 1)" "DTP3 immunization coverage (age 1)" "DTP3 immunization coverage (age 1)" "DTP3 immunization coverage (age 1)" ...
##  $ GEO_NAME_SHORT        : chr  "Micronesia (Federated States of)" "Micronesia (Federated States of)" "Pakistan" "Antigua and Barbuda" ...
##  $ RATE_PER_100_N        : num  92 78 83 95 99 90 79 91 84 25 ...
data3_MMR <- data3 %>% filter(GEO_NAME_SHORT =="Myanmar") %>% select(DIM_TIME,RATE_PER_100_N)
pDTP3<- ggplot(data3_MMR, aes(x = DIM_TIME, y = RATE_PER_100_N)) +
  geom_line(color="blue") +
  geom_hline(yintercept = mean(data3_MMR$RATE_PER_100_N), color = "darkgray", linetype = "dashed") +
  coord_fixed(0.1) +
  labs(title = "Trend of DTP3 immunization - MMR from 2000 to 2022",
       caption = "Data Source: WHO_Health_Statistics_2024") +
  annotate("text", x = Inf, y = -Inf, label = "\u00A9 Thura", hjust = 1.1, vjust = -1, size = 3) +
  scale_x_continuous(breaks = seq(min(data3_MMR$DIM_TIME), max(data3_MMR$DIM_TIME), by = 2)) + 
  theme(axis.title.x = element_blank(),
        axis.title.y = element_blank())

pDTP3

library(plotly)
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
plotDTP3 <- ggplotly(pDTP3) %>%
  layout(
    hoverlabel = list(bgcolor = "gray")
  ) %>%
  add_annotations(
    x = 1, 
    y = 0, 
    text = "\u00A9 Thura", 
    showarrow = FALSE, 
    xref = "paper", 
    yref = "paper", 
    xanchor = "right", 
    yanchor = "bottom", 
    font = list(size = 12)
  )

plotDTP3

MCV2 immunization - MMR from 2008 to 2022

data4 <- read.csv("D:/me/R-Language/Practice/Dataset/RELAY_WHS_MCV2_2024.csv")

head(data4)
##        IND_ID IND_CODE IND_UUID IND_PER_CODE DIM_TIME DIM_TIME_TYPE
## 1 BB4567BMCV2     MCV2  BB4567B         MCV2     2014          YEAR
## 2 BB4567BMCV2     MCV2  BB4567B         MCV2     2008          YEAR
## 3 BB4567BMCV2     MCV2  BB4567B         MCV2     2019          YEAR
## 4 BB4567BMCV2     MCV2  BB4567B         MCV2     2020          YEAR
## 5 BB4567BMCV2     MCV2  BB4567B         MCV2     2018          YEAR
## 6 BB4567BMCV2     MCV2  BB4567B         MCV2     2022          YEAR
##   DIM_GEO_CODE_M49 DIM_GEO_CODE_TYPE DIM_PUBLISH_STATE_CODE
## 1              191           COUNTRY              PUBLISHED
## 2              208           COUNTRY              PUBLISHED
## 3              250           COUNTRY              PUBLISHED
## 4              262           COUNTRY              PUBLISHED
## 5              834           COUNTRY              PUBLISHED
## 6              496           COUNTRY              PUBLISHED
##                               IND_NAME              GEO_NAME_SHORT
## 1 Measles (MCV2) immunization coverage                     Croatia
## 2 Measles (MCV2) immunization coverage                     Denmark
## 3 Measles (MCV2) immunization coverage                      France
## 4 Measles (MCV2) immunization coverage                    Djibouti
## 5 Measles (MCV2) immunization coverage United Republic of Tanzania
## 6 Measles (MCV2) immunization coverage                    Mongolia
##   RATE_PER_100_N
## 1             97
## 2             87
## 3             86
## 4             60
## 5             68
## 6             93
str(data4)
## 'data.frame':    3304 obs. of  12 variables:
##  $ IND_ID                : chr  "BB4567BMCV2" "BB4567BMCV2" "BB4567BMCV2" "BB4567BMCV2" ...
##  $ IND_CODE              : chr  "MCV2" "MCV2" "MCV2" "MCV2" ...
##  $ IND_UUID              : chr  "BB4567B" "BB4567B" "BB4567B" "BB4567B" ...
##  $ IND_PER_CODE          : chr  "MCV2" "MCV2" "MCV2" "MCV2" ...
##  $ DIM_TIME              : int  2014 2008 2019 2020 2018 2022 2007 2007 2016 2017 ...
##  $ DIM_TIME_TYPE         : chr  "YEAR" "YEAR" "YEAR" "YEAR" ...
##  $ DIM_GEO_CODE_M49      : int  191 208 250 262 834 496 504 36 192 232 ...
##  $ DIM_GEO_CODE_TYPE     : chr  "COUNTRY" "COUNTRY" "COUNTRY" "COUNTRY" ...
##  $ DIM_PUBLISH_STATE_CODE: chr  "PUBLISHED" "PUBLISHED" "PUBLISHED" "PUBLISHED" ...
##  $ IND_NAME              : chr  "Measles (MCV2) immunization coverage" "Measles (MCV2) immunization coverage" "Measles (MCV2) immunization coverage" "Measles (MCV2) immunization coverage" ...
##  $ GEO_NAME_SHORT        : chr  "Croatia" "Denmark" "France" "Djibouti" ...
##  $ RATE_PER_100_N        : num  97 87 86 60 68 93 92 89 99 88 ...
data4_MMR <- data4 %>% filter(GEO_NAME_SHORT =="Myanmar") %>% select(DIM_TIME,RATE_PER_100_N)
pMCV2 <- ggplot(data4_MMR, aes(x = DIM_TIME, y = RATE_PER_100_N)) +
  geom_line(color = "brown") +  
  coord_fixed(0.08) +
  geom_hline(yintercept = mean(data4_MMR$RATE_PER_100_N), color = "darkgray", linetype = "dashed") +
  labs(title = "Trend of MCV2 immunization - MMR from 2008 to 2022",
       caption = "Data Source: WHO_Health_Statistics_2024") +
  annotate("text", x = Inf, y = -Inf, label = "\u00A9 Thura", hjust = 1.1, vjust = -1, size = 3) +
  scale_x_continuous(breaks = seq(min(data3_MMR$DIM_TIME), max(data3_MMR$DIM_TIME), by = 2)) + 
  theme(axis.title.x = element_blank(),
        axis.title.y = element_blank())

pMCV2

plotMCV2<- ggplotly(pMCV2) %>%
  layout(
    hoverlabel = list(bgcolor = "gray")
  ) %>%
  add_annotations(
    x = 1, 
    y = 0, 
    text = "\u00A9 Thura", 
    showarrow = FALSE, 
    xref = "paper", 
    yref = "paper", 
    xanchor = "right", 
    yanchor = "bottom", 
    font = list(size = 12)
  )

plotMCV2