load data from google drive

location_levels=c("Jordan", "Global", "Low SDI", "Low-middle SDI", "Middle SDI", "High-middle SDI", "High SDI")
hepatitis <- c("Acute hepatitis A", "Acute hepatitis B", "Acute hepatitis C", "Acute hepatitis E", "Chronic hepatitis B including cirrhosis", "Chronic hepatitis C including cirrhosis", "Liver cancer due to hepatitis B"  , "Liver cancer due to hepatitis C"  )

ds<- read.csv("IHME-GBD_2021_DATA-fc56ed34-1.csv") %>% 
  mutate(location=factor(location, levels=location_levels)) %>% 
  filter(cause %nin% c("Liver cancer due to hepatitis B"  , "Liver cancer due to hepatitis C", "Liver cancer"))

show types of columns

sapply(ds, class)
##     measure    location         sex         age       cause      metric 
## "character"    "factor" "character" "character" "character" "character" 
##        year         val       upper       lower 
##   "integer"   "numeric"   "numeric"   "numeric"

show all unique column values of the dataframem excluding the last 3 columns

lapply(ds[, -c(8, 9, 10)], unique)
## $measure
## [1] "Deaths"                                
## [2] "DALYs (Disability-Adjusted Life Years)"
## [3] "YLDs (Years Lived with Disability)"    
## [4] "YLLs (Years of Life Lost)"             
## [5] "Prevalence"                            
## [6] "Incidence"                             
## 
## $location
## [1] Global          High-middle SDI High SDI        Low-middle SDI 
## [5] Low SDI         Middle SDI      Jordan         
## 7 Levels: Jordan Global Low SDI Low-middle SDI Middle SDI ... High SDI
## 
## $sex
## [1] "Male"   "Female" "Both"  
## 
## $age
## [1] "All ages"         "15-49 years"      "50-69 years"      "70+ years"       
## [5] "Age-standardized" "0-14 years"      
## 
## $cause
##  [1] "Chronic hepatitis B including cirrhosis"   
##  [2] "Chronic hepatitis C including cirrhosis"   
##  [3] "Cirrhosis and other chronic liver diseases"
##  [4] "Acute hepatitis"                           
##  [5] "Acute hepatitis A"                         
##  [6] "Acute hepatitis B"                         
##  [7] "Acute hepatitis C"                         
##  [8] "Acute hepatitis E"                         
##  [9] "Total burden related to hepatitis B"       
## [10] "Total burden related to hepatitis C"       
## 
## $metric
## [1] "Number" "Rate"  
## 
## $year
## [1] 1980 1990 2000 2010 2021 2020

Jordan

Incidence in numbers over years

ds %>%  
  filter(measure=="Incidence", sex=="Both", age=="All ages", cause %in% hepatitis, metric == "Number", location=="Jordan") %>%
  mutate(val=paste(round(val, 2), "(UI:", round(lower, 2), "-", round(upper, 2), ")")) %>% 
  select(year, cause, val) %>% 
  spread(year, val) %>% 
  gt()
cause 1990 2000 2010 2020 2021
Acute hepatitis A 134192.03 (UI: 124114.94 - 143547.12 ) 157090.65 (UI: 146985.23 - 167387.86 ) 218153.73 (UI: 205047.09 - 232481.54 ) 289270.6 (UI: 273334.31 - 304922.38 ) 292506.72 (UI: 277253.62 - 308697.01 )
Acute hepatitis B 40009.25 (UI: 31210.39 - 51535.58 ) 42211.37 (UI: 31271.76 - 55145.79 ) 48807.66 (UI: 35619.69 - 65423.97 ) 59483.29 (UI: 42092.74 - 79174.97 ) 56523.57 (UI: 41176.27 - 74961.88 )
Acute hepatitis C 3568.48 (UI: 3034.88 - 4144.85 ) 4298.21 (UI: 3721.26 - 4958.44 ) 5194.11 (UI: 4508.6 - 5906.1 ) 10151.56 (UI: 8658.45 - 11760.89 ) 10633.15 (UI: 9063.45 - 12317.2 )
Acute hepatitis E 5420.8 (UI: 4408.33 - 6724.17 ) 6664.95 (UI: 5359.5 - 8230.7 ) 10090.34 (UI: 8199.51 - 12326.16 ) 14533 (UI: 11917.53 - 17586.14 ) 14990.63 (UI: 12352.25 - 18133.09 )
Chronic hepatitis B including cirrhosis 5364.09 (UI: 4102.41 - 6781.3 ) 3636.65 (UI: 2791 - 4693.31 ) 3307.05 (UI: 2603.76 - 4109.66 ) 4324.01 (UI: 3466.11 - 5325.09 ) 4044.07 (UI: 3287.35 - 4786.43 )
Chronic hepatitis C including cirrhosis 2357.45 (UI: 1903.84 - 2846.94 ) 2839.53 (UI: 2339.27 - 3414.89 ) 3430.96 (UI: 2849.03 - 4041.79 ) 6706.04 (UI: 5523.99 - 8047.41 ) 7024.78 (UI: 5695.18 - 8376.44 )

Prevalence in numbers over years

ds %>%  
  filter(measure=="Prevalence", sex=="Both", age=="All ages", cause %in% hepatitis, metric == "Number", location=="Jordan") %>%
  mutate(val=paste(round(val, 2), "(UI:", round(lower, 2), "-", round(upper, 2), ")")) %>% 
  select(year, cause, val) %>% 
  spread(year, val) %>% 
  gt()
cause 1990 2000 2010 2020 2021
Acute hepatitis A 10225.62 (UI: 9478.57 - 10921.54 ) 12035.1 (UI: 11271.55 - 12812.43 ) 16769.84 (UI: 15764.45 - 17870.3 ) 22245.19 (UI: 21021.66 - 23448.54 ) 22494.18 (UI: 21322.41 - 23738.59 )
Acute hepatitis B 4560.43 (UI: 3535.37 - 5893.07 ) 4864.29 (UI: 3600.16 - 6357.39 ) 5626.24 (UI: 4104.55 - 7544.46 ) 6841.79 (UI: 4830.1 - 9111.88 ) 6506.43 (UI: 4732.96 - 8634.06 )
Acute hepatitis C 411.75 (UI: 350.18 - 478.25 ) 495.95 (UI: 429.38 - 572.13 ) 599.32 (UI: 520.22 - 681.47 ) 1171.33 (UI: 999.05 - 1357.03 ) 1226.9 (UI: 1045.78 - 1421.22 )
Acute hepatitis E 415.39 (UI: 337.72 - 515.22 ) 510.91 (UI: 410.96 - 631.12 ) 773.83 (UI: 629.27 - 945.47 ) 1115.46 (UI: 913.78 - 1349.77 ) 1150.68 (UI: 947.78 - 1392.1 )
Chronic hepatitis B including cirrhosis 183822.6 (UI: 156351.73 - 212020.88 ) 190961.86 (UI: 166778.79 - 219051.69 ) 200835.45 (UI: 176427.98 - 228019.12 ) 241598.22 (UI: 213926.34 - 272319.18 ) 239580.4 (UI: 215767.58 - 266969.71 )
Chronic hepatitis C including cirrhosis 52095.71 (UI: 41275.84 - 63378.07 ) 65727.61 (UI: 52718.97 - 80046.23 ) 80861.5 (UI: 66089.58 - 96325.2 ) 183258.87 (UI: 148184.66 - 220257.44 ) 195093.32 (UI: 156976.99 - 236667.89 )

Prevalence in numbers according to sex in 2021

ds %>%  
  filter(measure=="Prevalence",  age=="All ages", cause %in% hepatitis, metric == "Number", location=="Jordan", year==2021) %>%
  mutate(val=paste(round(val, 2), "(UI:", round(lower, 2), "-", round(upper, 2), ")")) %>% 
  select(sex, cause, val) %>% 
  spread(sex, val) %>% 
  gt()
cause Both Female Male
Acute hepatitis A 22494.18 (UI: 21322.41 - 23738.59 ) 10715.41 (UI: 10127.77 - 11323.34 ) 11778.78 (UI: 11087.08 - 12499.56 )
Acute hepatitis B 6506.43 (UI: 4732.96 - 8634.06 ) 2789.1 (UI: 1901.67 - 4021.62 ) 3717.33 (UI: 2513.84 - 5338.24 )
Acute hepatitis C 1226.9 (UI: 1045.78 - 1421.22 ) 723.92 (UI: 616.15 - 848.71 ) 502.98 (UI: 425.74 - 583.48 )
Acute hepatitis E 1150.68 (UI: 947.78 - 1392.1 ) 525.69 (UI: 423.96 - 643.47 ) 625 (UI: 510.94 - 757.58 )
Chronic hepatitis B including cirrhosis 239580.4 (UI: 215767.58 - 266969.71 ) 102275.88 (UI: 90390.18 - 114074.68 ) 137304.52 (UI: 118763.39 - 158360.89 )
Chronic hepatitis C including cirrhosis 195093.32 (UI: 156976.99 - 236667.89 ) 120705.18 (UI: 96221.75 - 147436.27 ) 74388.14 (UI: 60438.97 - 90602.19 )

Prevalence in numbers according to age in 2021

ds %>%  
  filter(measure=="Prevalence",  sex=="Both", cause %in% hepatitis, metric == "Number", location=="Jordan", year==2021) %>%
  mutate(val=paste(round(val, 2), "(UI:", round(lower, 2), "-", round(upper, 2), ")")) %>% 
  select(age, cause, val) %>% 
  spread(age, val) %>% 
  gt()
cause 0-14 years 15-49 years 50-69 years 70+ years All ages
Acute hepatitis A 16797.43 (UI: 15538.11 - 17998.38 ) 5572.3 (UI: 4690.56 - 6219.94 ) 123.95 (UI: 69.39 - 187.65 ) 0.5 (UI: 0.1 - 1.38 ) 22494.18 (UI: 21322.41 - 23738.59 )
Acute hepatitis B 419.65 (UI: 297.37 - 557.81 ) 4538.84 (UI: 3131.39 - 6366.02 ) 1340.16 (UI: 827.92 - 1952.73 ) 207.79 (UI: 110.79 - 329.23 ) 6506.43 (UI: 4732.96 - 8634.06 )
Acute hepatitis C 370.21 (UI: 295.36 - 463.55 ) 545.89 (UI: 401.93 - 723.2 ) 230.42 (UI: 152.23 - 320.8 ) 80.38 (UI: 56.92 - 113.84 ) 1226.9 (UI: 1045.78 - 1421.22 )
Acute hepatitis E 539.51 (UI: 373.7 - 711.48 ) 508.6 (UI: 346.44 - 700.1 ) 77.94 (UI: 48.1 - 117.04 ) 24.62 (UI: 15.4 - 36.82 ) 1150.68 (UI: 947.78 - 1392.1 )
Chronic hepatitis B including cirrhosis 17993.11 (UI: 14462.56 - 21577.23 ) 151881.41 (UI: 135083.81 - 171178.23 ) 58888.99 (UI: 52538.05 - 65643.7 ) 10816.89 (UI: 9322.67 - 12537.61 ) 239580.4 (UI: 215767.58 - 266969.71 )
Chronic hepatitis C including cirrhosis 25772.14 (UI: 19441.89 - 33598.82 ) 102194.35 (UI: 80179.1 - 126837.77 ) 50976.62 (UI: 39856.61 - 62865.97 ) 16150.2 (UI: 12734.32 - 19677.33 ) 195093.32 (UI: 156976.99 - 236667.89 )

DALYs in numbers according to age in 2021 (Jordan vs Global)

ds %>%  
  filter(measure=="DALYs (Disability-Adjusted Life Years)",  sex=="Both", cause %in% hepatitis, metric == "Number", location %in% c("Jordan", "Global"), year==2021, age!="All ages") %>%
  select(age, cause, val, location) %>% 
  ggplot(aes(x=age, y=val, fill=cause))+
  geom_col(position="fill")+
  theme_classic()+
  scale_y_continuous(labels = scales::percent_format(scale = 100)) +
  labs(y="")+
  theme(axis.text.x.bottom = element_text(angle=45, hjust=1, vjust=1))+
  facet_wrap(.~location)+
  theme(strip.background = element_blank())

Table 1: Incidence and Prevalence of Acute Hepatitis (A, B, C, D) in Jordan vs. Global Data

Comparison of Age-Standardized Incidence Rates of Hepatitis by Type in 2021: Jordan vs. Global and Other SDI Regions

ds %>%  
  filter(measure=="Incidence", sex=="Both", age=="Age-standardized",  cause %in% hepatitis, metric == "Rate", year==2021) %>%
  mutate(val=paste(round(val, 2), "(UI:", round(lower, 2), "-", round(upper, 2), ")")) %>% 
  select(location, cause, val) %>% 
  spread(cause, val) %>% 
  gt()
location Acute hepatitis A Acute hepatitis B Acute hepatitis C Acute hepatitis E Chronic hepatitis B including cirrhosis Chronic hepatitis C including cirrhosis
Jordan 2362.97 (UI: 2230.62 - 2510.15 ) 484.65 (UI: 352.01 - 635.32 ) 99.03 (UI: 85.21 - 112.02 ) 120.7 (UI: 101.19 - 144.91 ) 34.83 (UI: 28.23 - 41.28 ) 65.43 (UI: 53.96 - 77.55 )
Global 2273.72 (UI: 2150.13 - 2403.76 ) 784.73 (UI: 627.37 - 968.45 ) 92.64 (UI: 82.13 - 104.65 ) 260.41 (UI: 215.39 - 312.21 ) 61.51 (UI: 52.44 - 69.81 ) 59.37 (UI: 48.9 - 70.74 )
Low SDI 2667.7 (UI: 2447.86 - 2897.46 ) 1393.98 (UI: 1116.02 - 1717.64 ) 142.6 (UI: 125.82 - 160.48 ) 282.79 (UI: 233.55 - 338.04 ) 116.33 (UI: 97.56 - 134.49 ) 93.28 (UI: 77.38 - 110.68 )
Low-middle SDI 2485.43 (UI: 2305.27 - 2681.18 ) 774.8 (UI: 626.58 - 939.41 ) 116.9 (UI: 104.31 - 130.47 ) 297.18 (UI: 246.75 - 356.25 ) 58.62 (UI: 50.63 - 66.17 ) 71.77 (UI: 58.78 - 86.29 )
Middle SDI 2131.51 (UI: 2009.05 - 2253.01 ) 797.98 (UI: 624.29 - 1005.99 ) 79.45 (UI: 69.97 - 90.42 ) 266.05 (UI: 220.4 - 320.71 ) 56.69 (UI: 48.04 - 65.21 ) 52.01 (UI: 42.69 - 61.99 )
High-middle SDI 1938.13 (UI: 1800 - 2067.84 ) 605.8 (UI: 448.08 - 796.69 ) 66.64 (UI: 58.54 - 75.34 ) 237.66 (UI: 197.76 - 286.64 ) 38.76 (UI: 30.83 - 47.33 ) 43.4 (UI: 35.61 - 51.7 )
High SDI 1277.66 (UI: 1173.77 - 1375.22 ) 287.32 (UI: 237.52 - 348.01 ) 56.84 (UI: 49.84 - 63.9 ) 128.48 (UI: 109.06 - 150.84 ) 19.55 (UI: 16.99 - 21.99 ) 35.83 (UI: 29.29 - 42.94 )

Comparison of Age-Standardized Prevalence Rates of Hepatitis by Type in 2021: Jordan vs. Global and Other SDI Regions

ds %>%  
  filter(measure=="Prevalence", sex=="Both", age=="Age-standardized",  cause %in% hepatitis, metric == "Rate", year==2021) %>%
  mutate(val=paste(round(val, 2), "(UI:", round(lower, 2), "-", round(upper, 2), ")")) %>% 
  select(location, cause, val) %>% 
  spread(cause, val) %>% 
  gt()
location Acute hepatitis A Acute hepatitis B Acute hepatitis C Acute hepatitis E Chronic hepatitis B including cirrhosis Chronic hepatitis C including cirrhosis
Jordan 181.7 (UI: 171.5 - 193.03 ) 55.77 (UI: 40.47 - 73.17 ) 11.43 (UI: 9.83 - 12.93 ) 9.26 (UI: 7.77 - 11.12 ) 2122.48 (UI: 1918.29 - 2360.22 ) 1818.29 (UI: 1476.06 - 2206.82 )
Global 169.78 (UI: 161.32 - 178.68 ) 90.12 (UI: 71.93 - 111.29 ) 10.69 (UI: 9.48 - 12.08 ) 19.99 (UI: 16.53 - 23.97 ) 3490.14 (UI: 3197.57 - 3789.02 ) 1704.79 (UI: 1373.46 - 2061.7 )
Low SDI 188.46 (UI: 177.43 - 200.61 ) 159.85 (UI: 127.72 - 197.22 ) 16.45 (UI: 14.52 - 18.52 ) 21.71 (UI: 17.92 - 25.96 ) 6589.66 (UI: 6037.89 - 7162.34 ) 2683.12 (UI: 2168.26 - 3222.34 )
Low-middle SDI 176.56 (UI: 165.84 - 187.62 ) 89.07 (UI: 71.91 - 108.06 ) 13.49 (UI: 12.04 - 15.05 ) 22.82 (UI: 18.94 - 27.36 ) 3236.52 (UI: 2970.95 - 3512.34 ) 2049.35 (UI: 1640.24 - 2497.14 )
Middle SDI 162.83 (UI: 153.54 - 172.01 ) 91.9 (UI: 71.85 - 115.9 ) 9.17 (UI: 8.07 - 10.43 ) 20.42 (UI: 16.92 - 24.63 ) 3476.98 (UI: 3167.27 - 3792.47 ) 1642.8 (UI: 1328.41 - 1986.5 )
High-middle SDI 148.94 (UI: 138.29 - 158.9 ) 69.84 (UI: 51.64 - 91.86 ) 7.69 (UI: 6.75 - 8.69 ) 18.24 (UI: 15.18 - 22.01 ) 2902.15 (UI: 2615.53 - 3194.68 ) 1423.33 (UI: 1151.43 - 1729.23 )
High SDI 98.28 (UI: 90.28 - 105.78 ) 33.14 (UI: 27.39 - 40.14 ) 6.56 (UI: 5.75 - 7.37 ) 9.86 (UI: 8.36 - 11.58 ) 1013.73 (UI: 938.31 - 1093.2 ) 949.64 (UI: 768.19 - 1152.89 )

Table 2: Burden of Hepatitis-Related Cancer and Cirrhosis in Jordan vs. Low/Middle/High SDI Regions

chronic_hepatitis_cirrhosis<- c("Chronic hepatitis B including cirrhosis", "Chronic hepatitis C including cirrhosis", "Liver cancer due to hepatitis B", "Liver cancer due to hepatitis C")

ds %>%  
  filter(measure=="DALYs (Disability-Adjusted Life Years)", sex=="Both", age=="Age-standardized",  cause %in% chronic_hepatitis_cirrhosis, metric == "Rate", year==2021) %>%
  mutate(val=paste(round(val, 2), "(UI:", round(lower, 2), "-", round(upper, 2), ")")) %>% 
  select(location, cause, val) %>% 
  spread(cause, val) %>% 
  gt()
location Chronic hepatitis B including cirrhosis Chronic hepatitis C including cirrhosis
Jordan 51.87 (UI: 35.38 - 72.87 ) 72.94 (UI: 52.9 - 96.49 )
Global 161.92 (UI: 137.25 - 186.25 ) 137.99 (UI: 117.99 - 159.91 )
Low SDI 322.71 (UI: 264.21 - 386.61 ) 249.3 (UI: 203.4 - 302.86 )
Low-middle SDI 253.06 (UI: 200.9 - 302.18 ) 242.65 (UI: 200.78 - 285.44 )
Middle SDI 172.14 (UI: 147.37 - 198.01 ) 121.26 (UI: 106.04 - 141.19 )
High-middle SDI 108.23 (UI: 89.42 - 127.14 ) 67.79 (UI: 55.41 - 83.95 )
High SDI 42.7 (UI: 35.19 - 50.33 ) 92.46 (UI: 80.7 - 107.79 )

Table 3: DALYs and Mortality Rates for Hepatitis in Jordan and Comparative Regions

Figure 4: Mortality Rates for Hepatitis in Jordan Compared to Global Figures

# Filter the data
filtered_data <- ds %>%
  filter(measure == "Deaths", 
         sex == "Both", 
         age == "Age-standardized",  
         cause %in% c("Acute hepatitis A", "Acute hepatitis B", "Acute hepatitis C", "Acute hepatitis E", "Chronic hepatitis B including cirrhosis", "Chronic hepatitis C including cirrhosis"), 
         metric == "Rate", 
         year == 2021) %>%
  select(location, cause, val) %>% 
  mutate(cause=factor(cause, levels=c("Acute hepatitis A", "Acute hepatitis B", "Acute hepatitis C", "Acute hepatitis E", "Chronic hepatitis B including cirrhosis", "Chronic hepatitis C including cirrhosis"), labels = c("Acute hepatitis A", "Acute hepatitis B", "Acute hepatitis C", "Acute hepatitis E", "Chronic hepatitis B", "Chronic hepatitis C")))


# Create a column plot using ggplot2
# Create a column plot using ggplot2
ggplot(filtered_data, aes(x = cause, y = val, fill = location)) +
  geom_col(position = "dodge") +
  labs(x = "Cause",
       y = "Age-standardized Death Rate per 100,000",
       fill = "Location") +
  theme_classic() +
  theme(axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1))