Exploratory - AFG Drought Framework - Faryab

Snow Melt Date vs Agricultural Stress Index (ASI)

Overview

  • Looking at snow indicator: first date of no snow. As computed here.
  • Ran the analysis for Faryab Province in Afghanistan.
  • There seems to be some relation, but a bit noisy.
Code
box::use(
  dplyr[...],
  readr[...],
  ggplot2[...],
  janitor[...],
  lubridate[...],
  glue[...],
  gghdx[...],
  ../R/blob_connect
)
gghdx()
Code
df_asi <- 
  read_csv("https://www.fao.org/giews/earthobservation/asis/data/country/AFG/MAP_ASI/DATA/ASI_Dekad_Season1_data.csv") |>
  filter(Province == "Faryab") |> 
  clean_names()


# from GEE - can link the script or put it in repo directly
df_snow_doy <- read_csv("../data/modis_first_day_no_snow.csv")

  

df_snow_asi <- df_snow_doy |> 
  mutate(
    date = as_date("2023-01-01")+ days(as.integer(calDoy))
  ) |> 
  left_join(
    df_asi |> 
      filter(
        month =="06",
        dekad ==3
      ) |> 
      rename(
        asi_june = data
      ) |> 
      select(year, asi_june)
  )  |> 
  left_join(
     df_asi |> 
      filter(
        month =="05",
        dekad ==3
      ) |> 
      rename(
        asi_may = data
      ) |> 
      select(year, asi_may)
  ) 

Last Date Snow Vs end of June ASI

Code
df_snow_asi <- df_snow_asi |>   
  mutate(
    label= glue(
      "year: {year}
      snow melted: {format(date,'%d %b')}")
  )

df_snow_asi |> 
  ggplot(
    aes(x= date, y= asi_june)
  )+
  geom_point()+
    geom_vline(
    xintercept = c(50,85)
  ) |> 
  labs(
    x= "Approximate day of snow melt",
    y= "ASI end of June"
  )+
    geom_vline(
    xintercept = as_date(c("2023-04-01","2023-02-15"))
  )+
  geom_text(
    data=df_snow_asi|> 
        filter(asi_june>20),
    aes(
      label = label
        ),nudge_x = 3
  )

Last Date Snow Vs end of June ASI

Code
df_snow_asi |>   
  ggplot(
    aes(x= date, y= asi_may)
  )+
  geom_point()+
  labs(
    x= "Approximate day of snow melt",
    y= "ASI end of May"
  )+
  geom_vline(
    xintercept = as_date(c("2023-04-01","2023-02-15"))
  )+
      geom_vline(
    xintercept = as_date(c("2023-04-01","2023-02-15"))
  )+
  geom_text(
    data=df_snow_asi|> 
        filter(asi_june>20),
    aes(
      label = label
        ),nudge_x = 3
  )

May ASI vs June ASI

End of May ASI is a good predictor of end of June ASI

Code
df_snow_asi |>   
  ggplot(
    aes(x= asi_may, y= asi_june)
  )+
  geom_point()

The echo: false option disables the printing of code (only output is displayed).