| author: “Mustafe Abdi Mohamed” |
| date: “2025-05-08” |
This interactive presentation shows the distribution of total water points across Somalia’s 18 pre-war regions and total population by region. The data is based on the Population Estimation Survey (PESS) 2014 and official region boundaries.
library(readr)
library(plotly)
# Load the CSV file
data <- read_csv("somalia2014.csv")
plot_ly(data,
x = ~region,
y = ~total_water_points,
color = ~region, # different color per region
type = 'bar',
text = ~paste("Region:", region,
"<br>Water Points:", total_water_points),
hoverinfo = 'text') %>%
layout(title = "Total Water Points by Region",
xaxis = list(title = "", tickangle = -45),
yaxis = list(title = "Number of Water Points"),
showlegend = FALSE,
margin = list(b = 100, l = 60, r = 30))
plot_ly(data,
x = ~region,
y = ~total_pop,
color = ~region,
type = 'bar',
text = ~paste("Region:", region,
"<br>Population:", formatC(total_pop, big.mark = ",")),
hoverinfo = 'text') %>%
layout(title = "Total Population by Region",
xaxis = list(title = "", tickangle = -45),
yaxis = list(title = "Population"),
showlegend = FALSE,
margin = list(b = 100, l = 60, r = 30))