Introduction

The conflict in Tigray, Ethiopia, which began in November 2020, has resulted in significant population displacement, with many internally displaced persons (IDPs) seeking refuge in camps. Understanding the impact of these IDPs on local economic activity and infrastructure usage is crucial for effective humanitarian response and policy-making.

One innovative approach to assessing such impacts is through the analysis of nighttime lights data. Nighttime lights, as captured by satellite imagery, provide a proxy for human activity and economic conditions. Changes in nighttime lights can indicate shifts in population density, economic activity, and infrastructure usage.

In this R Markdown document, we aim to estimate the impact of IDPs on nighttime lights in Tigray from November 2020 to November 2022. Our analysis involves several key steps:

  1. Loading and Preparing the Data: We start by reading in geographic and nighttime lights data for Ethiopia, focusing on the Tigray region. We clean and transform the data to facilitate analysis.
  2. Inclusion of IOM Data: We integrate data from the International Organization for Migration (IOM) to account for the presence and distribution of IDPs within Tigray.
  3. Visualizing the Data: We create visualizations to understand the distribution and changes in nighttime lights over time, both across Ethiopia and specifically within Tigray.
  4. Regression Analysis: We fit a linear regression model to quantify the relationship between the number of IDPs and nighttime lights, controlling for prior nighttime lights and temporal variations.

By the end of this document, we aim to provide a clear understanding of how the presence of IDPs has influenced nighttime light patterns in Tigray. This analysis not only sheds light on the economic and infrastructural impacts of the conflict but also demonstrates the utility of nighttime lights data in humanitarian research and policy-making.

Loading the Libraries

library(sf)
library(tidyverse)
library(raster)

Loading the Data

In this step, we read in a shapefile that contains geographic data about Ethiopia.

shape <- st_read("Main_data/Ethiopia/conflict/intersection.shp", quiet = T) 

shape <- shape |>
  dplyr::select(contains("Sigma")) |> 
  rename(PriorNL = SigmaClipp) |> 
  mutate(ID = 1:n()) |> 
  pivot_longer(!c(PriorNL, geometry, ID), names_to = "round", values_to = "NL") |> 
  mutate(round = as.numeric(str_remove(round, "SigmaCli_")) + 1) |> 
    na.omit()

Visualizing Nighttime lights in Ethiopia

To understand the distribution of nighttime lights in Ethiopia, we will visualize the PriorNL (nighttime lights data before the conflict) using a geographic plot. This visualization helps us see the intensity of nighttime lights across different regions.

ggplot(data = shape) + 
  geom_sf(aes(fill = log(PriorNL))) + 
  scale_fill_viridis_c(na.value = "lightgrey") +  # Setting NA values to light grey
   theme_minimal()

This plot provides a clear view of how nighttime lights are distributed across Ethiopia before the conflict, with regions of higher intensity indicated by lighter colors. This visualization serves as a baseline for comparing changes over time due to the presence of IDPs and the impact of the conflict.

Extracting Tigray

To focus our analysis on the Tigray region, we first extract the geographic boundaries of Tigray from a shapefile. Then, we filter our nighttime lights data to include only the data within Tigray.

Tigray <- st_read("Main_data/Ethiopia/adm1/eth_admbnda_adm1_csa_bofedb_2021.shp",
                  quiet = T) |> 
  filter(ADM1_EN == "Tigray")

Now the Extraction

Next, we transform the coordinate reference system (CRS) of our conflict data to match that of the Tigray shapefile. We then extract the nighttime lights data that falls within the boundaries of Tigray.

Conflict_data <- st_transform(shape, st_crs(Tigray))

Tigray_Conflict_data <- Conflict_data[st_within(Conflict_data, Tigray, sparse = FALSE), ]

Visualizing Nighttime Lights in Tigray

Now that we have extracted the data for the Tigray region, let’s visualize the nighttime lights data to understand its distribution across different rounds (time periods).

ggplot(data = Tigray_Conflict_data) + 
  geom_sf(aes(fill = log(NL))) + 
  facet_wrap(~round) +
  scale_fill_viridis_c(na.value = "lightgrey") +  # Setting NA values to light grey
  theme_minimal() +
  labs(title = "Nighttime Lights in Tigray Over Different Rounds", fill = "Log of NL") +
  scale_x_continuous(breaks = seq(36.5, 38.0, by = 0.5)) +  # Adjusting x-axis tick breaks
  theme(
    axis.text.x = element_text(angle = 45, hjust = 1)  # Adjusting the angle and position of x-axis labels
  )

This plot allows us to see how the intensity of nighttime lights varies across different time periods (rounds) in the Tigray region. By faceting the plot by round, we can easily compare the changes in nighttime lights over time, which is essential for understanding the impact of the conflict and the presence of IDPs.

Inclusion of IOM data

To better understand the impact of internally displaced persons (IDPs) on nighttime lights in Tigray, we incorporate data from the International Organization for Migration (IOM). This dataset provides information on IDP populations within the region.

# Load the data
IOM <- read_csv("IOM_data/emergency_assessment_eth.csv", show_col_types = FALSE)

# Filter for Tigray region and select specific columns
IOM <- IOM |>
  filter(region == "Tigray") |> 
  dplyr::select(longitude, latitude, total_pop, round, site_id) 

# Convert to sf object
IOM <- st_as_sf(IOM, coords = c("longitude", "latitude"), crs = 4326)

# Perform a spatial join
key <- st_join(IOM, Tigray_Conflict_data) 

key <- key |> 
  dplyr::select(round.x, ID, site_id) |> 
  rename(round = round.x) |> 
  st_drop_geometry() |> 
  as.data.frame() |> 
  unique()


aggregated_data <- IOM %>%
  inner_join(key, by = c("site_id", "round")) |> 
  st_drop_geometry() |> 
  as.data.frame() |> 
  group_by(ID, round) |>   
  summarise(total_pop_sum = sum(total_pop, na.rm = TRUE)) |> 
  mutate(round = as.integer(round))



Tigray_Conflict_data_IOM <- Tigray_Conflict_data %>%
  left_join( aggregated_data, by = c("ID", "round")) |> 
  rename(IDPs = total_pop_sum)

To examine the relationship between the number of internally displaced persons (IDPs) and nighttime lights in Tigray, we can create a scatter plot. This plot will help us understand how the presence of IDPs affects nighttime light intensity.

ggplot(Tigray_Conflict_data_IOM) +
    geom_point(aes(y = log(NL), x = log(IDPs))) +
    labs(title = "Number of IDPS in Tigray", 
         fill = "Log Population") +
    theme_minimal()

This scatter plot visualizes the correlation between the log-transformed number of IDPs and the log-transformed nighttime lights. By examining this relationship, we can infer how population displacement during the conflict in Tigray has impacted economic activities and living conditions, as reflected in changes in nighttime light intensity.

Checking Data Normalization

To understand if the log transformation helps in normalizing the nighttime lights data and to check for outliers, we can visualize the distribution using a histogram. We’ll use ggplot2 for this visualization.

ggplot(Tigray_Conflict_data_IOM, aes(x = log(NL))) + 
  geom_histogram(binwidth = 0.5, fill = "blue", color = "black") +
  labs(title = "Distribution of Log-transformed Nighttime Lights (NL)", 
       x = "Log of Nighttime Lights (NL)", 
       y = "Frequency") +
  theme_minimal()

This histogram helps us see how the log transformation affects the distribution of the nighttime lights data. While the log transformation can reduce the skewness and make the data more normally distributed, outliers are still be present, as expected.

Regression Analysis

To quantify the impact of IDPs on nighttime lights, we fit a linear regression model. The model includes the log-transformed number of IDPs, the prior nighttime lights, and the round (time period) as factors.

# Fit the linear model
model <- lm(log(NL) ~ log(IDPs) + as.factor(round) + log(PriorNL), data = Tigray_Conflict_data_IOM)

# Display the summary of the model
summary(model)
## 
## Call:
## lm(formula = log(NL) ~ log(IDPs) + as.factor(round) + log(PriorNL), 
##     data = Tigray_Conflict_data_IOM)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.45779 -0.08181  0.00967  0.09091  0.62934 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)    
## (Intercept)        0.343503   0.065017   5.283 2.38e-07 ***
## log(IDPs)          0.018485   0.004244   4.356 1.80e-05 ***
## as.factor(round)3 -0.325202   0.082254  -3.954 9.52e-05 ***
## as.factor(round)4 -0.169447   0.063993  -2.648  0.00851 ** 
## as.factor(round)5 -0.291736   0.059452  -4.907 1.49e-06 ***
## as.factor(round)6 -0.083653   0.057862  -1.446  0.14925    
## as.factor(round)7  0.006364   0.056871   0.112  0.91097    
## as.factor(round)8 -0.360189   0.054789  -6.574 2.04e-10 ***
## log(PriorNL)       0.639334   0.017272  37.015  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1502 on 314 degrees of freedom
##   (2953 observations deleted due to missingness)
## Multiple R-squared:  0.8826, Adjusted R-squared:  0.8796 
## F-statistic: 295.1 on 8 and 314 DF,  p-value: < 2.2e-16

Interpretation of Results:

  1. Intercept: The intercept is 0.343503, which is significant (p < 2.38e-07). This value represents the expected log-transformed nighttime lights when all predictors are zero.

  2. log(IDPs): The coefficient for log(IDPs) is 0.018485, which is significant (p < 1.80e-05). This positive relationship indicates that an increase in IDP numbers is associated with an increase in nighttime lights, suggesting that future researchers, policy makers, and relief organizations can detect the flow of IDP using VIIRs Nighttime lights data.

  3. Round Effects:

    • Several rounds show significant negative coefficients, indicating that, relative to the baseline round, these periods had lower nighttime lights. Notably, round 8 has a highly significant negative effect (p < 2.04e-10).
    • This variation across rounds highlights the temporal changes in nighttime lights, potentially reflecting varying levels of conflict intensity or other time-specific factors.
  4. log(PriorNL): The coefficient for log(PriorNL) is 0.639334, which is highly significant (p < 2e-16). This suggests that areas with higher prior nighttime lights tend to have higher current nighttime lights. As expected.

  5. Model Fit:

    • The Multiple R-squared value is 0.8826, and the Adjusted R-squared value is 0.8796, indicating that approximately 88.26% of the variability in nighttime lights can be explained by the model. This suggests a very good fit.

Conclusion:

The regression analysis reveals a significant positive relationship between the number of IDPs and nighttime lights in Tigray. This suggests that the presence of IDPs correlates with increased nighttime light intensity. The model also captures significant temporal variations, reflecting changes in nighttime lights across different periods during the conflict.

This analysis provides valuable insights into the impact of the conflict on economic activity and living conditions in Tigray, as reflected in nighttime lights. Further research could explore additional factors influencing these changes and refine the model for more detailed insights.

Daniel K Baissa

Home