EVI, Temperature and Rainfall updates#

This analysis focuses on environmental indicators, specifically Enhanced Vegetation Index (EVI), Temperature, and Accumulated Rainfall across governorates in Syria. The aim is to assess changes in these key metrics over different time periods, comparing the full years of 2022 and 2023, as well as the first eight months of 2023 and 2024.

Data#

  1. Enhanced Vegetation Index (EVI): EVI data was sourced from the MODIS satellite imagery, which provides high-resolution observations of vegetation health. This data helps quantify vegetation cover and assess agricultural productivity trends.

  2. Temperature: Surface temperature data was obtained from the ERA5 climate reanalysis dataset, which provides global atmospheric conditions at high spatial and temporal resolution.

  3. Accumulated Rainfall: Rainfall data was acquired from the CHIRPS dataset, a satellite-based rainfall product that provides daily and monthly precipitation data for the global land surface.

Methodologies#

  1. Google Earth Engine (GEE) API: The Earth Engine Python API was used to access and manipulate the MODIS, ERA5, and CHIRPS datasets. Using this platform, geospatial operations and large-scale data computations were performed directly on the cloud without needing local storage.

  2. Geospatial Data Processing: Governorate-level boundaries for Syria were obtained from a Geopandas dataset and were used to extract pixel-level data for each governorate. Raster data for EVI, temperature, and rainfall were masked using the governorate boundaries to aggregate the environmental indicators for each region.

  3. Comparative Analysis: Data for the years 2022, 2023, and partial 2024 were analyzed. Percent change in each indicator (EVI, temperature, and rainfall) is cbetween the values for two time periods (e.g., 2022 vs 2023). This allows for a standardized comparison of the magnitude of change across different environmental indicators and time periods.

  4. Visualization: The folium library was employed to generate interactive maps that overlay environmental changes over the geographic regions. The analysis generated maps for EVI, temperature, and rainfall changes between the years, illustrating significant trends or deviations.

setting up earthengine Python API#

#!pip install earthengine-api
#Importing packages
import ee
import folium
import geopandas as gpd
import json
import os
import rasterio
from rasterio.mask import mask
from rasterio.plot import show
import numpy as np
import pandas as pd

# Initialize Earth Engine
ee.Authenticate()
ee.Initialize()

Loading Boundary files for Syria (Admin0) and Governorates(Admin1)#

#Defining local directory for shapefiles
base_path = 'C:\\Users\\ishaa\\OneDrive\\Desktop\\DataLab\\Syria\\syria-economic-monitor'
syr_admin0_path = os.path.join(base_path,'data\\boundaries\\Admin0\\syr_admin0.shp')
syr_admin1_path = os.path.join(base_path, 'data\\boundaries\\Admin1\\syr_admin1.shp')
# Use the correct relative path to the shapefile
syr_shp = gpd.read_file(syr_admin0_path)
syr_shp.to_file("syria_boundary.geojson", driver="GeoJSON")

with open("syria_boundary.geojson") as f:
    syr_geojson = json.load(f)

syr_geometry = ee.Geometry(syr_geojson['features'][0]['geometry'])

governorates = gpd.read_file(syr_admin1_path)

Analysis#

def calculate_percent_change(shapefile, raster_path_1, raster_path_2, nodata_value=None):
    """
    Generalized function to calculate the percent change for EVI, Temperature, or Rainfall datasets.

    Parameters:
    - shapefile: GeoDataFrame containing geometries (e.g., governorates)
    - raster_path_1: Path to the raster data for the first year
    - raster_path_2: Path to the raster data for the second year
    - nodata_value: Optional; specify the nodata value in the raster (default: None)

    Returns:
    - percent_change: List of percent change values for each region
    """
    
    # Load the raster datasets for 2023 and 2024
    with rasterio.open(raster_path_1) as src_1, rasterio.open(raster_path_2) as src_2:
        
        # Ensure the shapefile and the rasters have the same CRS
        if shapefile.crs != src_1.crs:
            shapefile = shapefile.to_crs(src_1.crs)
        
        # Initialize lists to store the mean values for 2023 and 2024
        values_2023 = []
        values_2024 = []
        
        # Iterate over each polygon (e.g., governorates) and calculate the mean values
        for _, row in shapefile.iterrows():
            geometry = [row['geometry']]
            
            # Mask and calculate the mean for 2023
            out_image_2023, _ = mask(src_1, geometry, crop=True)
            mean_value_2023 = np.nanmean(out_image_2023[out_image_2023 != nodata_value])
            values_2023.append(mean_value_2023)
            
            # Mask and calculate the mean for 2024
            out_image_2024, _ = mask(src_2, geometry, crop=True)
            mean_value_2024 = np.nanmean(out_image_2024[out_image_2024 != nodata_value])
            values_2024.append(mean_value_2024)
        
        # Calculate the percent change between 2023 and 2024 for each region
        percent_change = [(v_2024 - v_2023) / v_2023 * 100 if v_2023 != 0 else np.nan
                          for v_2023, v_2024 in zip(values_2023, values_2024)]
        
        return percent_change
#Function to create a folium map to show change in evi, temp or rainfall
def create_percent_change_map(geo_data, column_name, map_title, legend_name, color_palette, output_path):
    """
    Creates a Folium map to visualize percent change data for any metric (EVI, Temperature, Rainfall).
    
    Parameters:
    - geo_data: GeoDataFrame containing the governorate data and percent change values.
    - column_name: Name of the column that contains the percent change values.
    - map_title: Title of the map (e.g., 'EVI Percent Change', 'Temperature Percent Change').
    - legend_name: Name for the legend (e.g., 'Percent Change in EVI (2024 vs 2023)').
    - color_palette: Color palette for the choropleth (e.g., 'YlGnBu').
    - output_path: File path to save the HTML map.
    """
    
    # Initialize the map
    m = folium.Map(location=[35.0, 38.0], zoom_start=6, tiles='cartodb positron')

    # Add the choropleth map to the Folium map
    choropleth = folium.Choropleth(
        geo_data=geo_data.to_json(),  # Convert GeoDataFrame to JSON format
        name=map_title,
        data=geo_data,  # GeoDataFrame with merged percent change data
        columns=['NAM_EN_REF', column_name],  # Columns to use for mapping
        key_on='feature.properties.NAM_EN_REF',  # Key for the shapefile
        fill_color=color_palette,  # Custom color scheme
        fill_opacity=0.7,
        line_opacity=0.2,
        legend_name=legend_name
    ).add_to(m)

    # Display governorate names on the map (without hover)
    for idx, row in geo_data.iterrows():
        folium.Marker(
            location=[row.geometry.centroid.y, row.geometry.centroid.x],
            icon=folium.DivIcon(html=f"""<div style="font-size: 9px; font-weight: bold;">{row['NAM_EN_REF']}</div>""")
        ).add_to(m)

    # Add tooltips to display governorate names and percent change on hover
    folium.GeoJson(
        geo_data.to_json(),
        style_function=lambda x: {'fillColor': '#ffffff', 'color': '#000000', 'fillOpacity': 0.1, 'weight': 0.1},
        highlight_function=lambda x: {'fillColor': '#000000', 'color': '#000000', 'fillOpacity': 0.50, 'weight': 0.1},
        tooltip=folium.GeoJsonTooltip(
            fields=['NAM_EN_REF', column_name],  # Fields to display
            aliases=['Governorate:', f'Percent Change in {map_title}:'],  # Custom labels for the tooltip
            localize=True,
            labels=True,
            sticky=False,  # Tooltip stays near the mouse
            toLocaleString=True  # Format numbers nicely
        )
    ).add_to(m)

    # Add layer control and save the map
    folium.LayerControl().add_to(m)
    m.save(output_path)
    print(f"Map saved to {output_path}")

    return m

EVI changes#

#Modis Terra and Aqua datasets for 2022
MOD13_2022 = ee.ImageCollection('MODIS/061/MOD13Q1').filterDate('2022-01-01', '2022-12-31')
MYD13_2022= ee.ImageCollection('MODIS/061/MYD13Q1').filterDate('2022-01-01', '2022-12-31')

#Modis Terra and Aqua datasets for first 8 months of 2023
MOD13_2023 = ee.ImageCollection('MODIS/061/MOD13Q1').filterDate('2023-01-01', '2023-08-31')
MYD13_2023= ee.ImageCollection('MODIS/061/MYD13Q1').filterDate('2023-01-01', '2023-08-31')

#Modis Terra and Aqua datasets for 2023 full year
MOD13_2023_full = ee.ImageCollection('MODIS/061/MOD13Q1').filterDate('2023-01-01', '2023-12-31')
MYD13_2023_full= ee.ImageCollection('MODIS/061/MYD13Q1').filterDate('2023-01-01', '2023-12-31')

#Modis Terra and Aqua datasets for first 8 months of 2024
MOD13_2024 = ee.ImageCollection('MODIS/061/MOD13Q1').filterDate('2024-01-01', '2024-08-31')
MYD13_2024= ee.ImageCollection('MODIS/061/MYD13Q1').filterDate('2024-01-01', '2024-08-31')
# Merge and calculate mean EVI for each year
evi_merged_2022 = MOD13_2022.select('EVI').merge(MYD13_2022.select('EVI')).mean()
evi_merged_2023 = MOD13_2023.select('EVI').merge(MYD13_2023.select('EVI')).mean()
evi_merged_2023_full = MOD13_2023_full.select('EVI').merge(MYD13_2023_full.select('EVI')).mean()
evi_merged_2024 = MOD13_2024.select('EVI').merge(MYD13_2024.select('EVI')).mean()

# Define the export parameters
evi_merged_2022_task = ee.batch.Export.image.toDrive(
    image=evi_merged_2022,
    description='EVI_2022_Syria_merged_mean',
    folder='GEE_exports',
    scale=250,  # MODIS scale (250 meters)
    region=syr_geometry,  # Define region covering Syria
    fileFormat='GeoTIFF'
)

evi_merged_2023_task = ee.batch.Export.image.toDrive(
    image=evi_merged_2023,
    description='EVI_2023_Syria_merged_mean',
    folder='GEE_exports',
    scale=250,  # MODIS scale (250 meters)
    region=syr_geometry,  # Define region covering Syria
    fileFormat='GeoTIFF'
)

evi_merged_2023_full_task = ee.batch.Export.image.toDrive(
    image=evi_merged_2023_full,
    description='EVI_2023_full_Syria_merged_mean',
    folder='GEE_exports',
    scale=250,  # MODIS scale (250 meters)
    region=syr_geometry,  # Define region covering Syria
    fileFormat='GeoTIFF'
)

evi_merged_2024_task = ee.batch.Export.image.toDrive(
    image=evi_merged_2024,
    description='EVI_2024_Syria_merged_mean',
    folder='GEE_exports',
    scale=250,  # MODIS scale (250 meters)
    region= syr_geometry,  # Define region covering Syria
    fileFormat='GeoTIFF'
)

# Start the export task
evi_merged_2022_task.start()
evi_merged_2023_task.start()
evi_merged_2023_full_task.start()
evi_merged_2024_task.start()
# Load the EVI GeoTIFF file (downloaded from GEE)
evi_2022_path = os.path.join(base_path,'data\\EVI\\EVI_2022_Syria_merged_mean.tif')
evi_2023_path = os.path.join(base_path,'data\\EVI\\EVI_2023_Syria_merged_mean.tif')
evi_2023_full_path = os.path.join(base_path,'data\\EVI\\EVI_2023_full_Syria_merged_mean.tif')
evi_2024_path = os.path.join(base_path,'data\\EVI\\EVI_2024_Syria_merged_mean.tif')
#read geotiff files
evi_2022_data = rasterio.open(evi_2022_path)
evi_2023_data = rasterio.open(evi_2023_path)
evi_2023_full_data = rasterio.open(evi_2023_full_path)
evi_2024_data = rasterio.open(evi_2024_path)

Calculating percentage of change in crop yields through EVI Proxy per Governorate#

#calculate percent change in evi for full year of 2022 and 2023
percent_change_evi_2022_23 = calculate_percent_change(governorates, evi_2023_path, evi_2024_path, nodata_value=None)
#print(percent_change_evi_2023_24)
governorates['Percent_Change_evi_2022_23'] = percent_change_evi_2022_23

#calculate percent change in evi for first 8 months of 2023 and 2024
percent_change_evi_2023_24 = calculate_percent_change(governorates, evi_2023_path, evi_2024_path, nodata_value=None)
#print(percent_change_evi_2023_24)
governorates['Percent_Change_evi_2023_24'] = percent_change_evi_2023_24

2022 vs 2023#

#create a folium map to show percent change in EVI for full year 2022 vs 2023
create_percent_change_map(
    geo_data=governorates,                  # GeoDataFrame with governorates and temperature percent change
    column_name='Percent_Change_evi_2022_23',      # Column with percent change in temperature
    map_title='EVI Percent Change', # Title for the map
    legend_name='Percent Change in EVI (2022 vs 2023)',  # Legend name
    color_palette='YlGn',                 # Color palette (Red-Yellow-Blue is often used for temperature maps)
    output_path='syria_EVI_2023vs2022_map.html'  # Output HTML file for the map
)
Map saved to syria_EVI_2023vs2022_map.html
Make this Notebook Trusted to load map: File -> Trust Notebook

First 8 months of 2023 vs 2024#

#create a folium map to show percent change in EVI for first 8 months of 2023 vs 2024
create_percent_change_map(
    geo_data=governorates,                  # GeoDataFrame with governorates and percent change
    column_name='Percent_Change_evi_2023_24',      # Column with percent change 
    map_title='EVI Percent Change', # Title for the map
    legend_name='Percent Change in EVI (2023 vs 2024)',  # Legend name
    color_palette='YlGn',                 # Color palette 
    output_path='syria_EVI_2023vs2024_map.html'  # Output HTML file for the map
)
Map saved to syria_EVI_2023vs2024_map.html
Make this Notebook Trusted to load map: File -> Trust Notebook

Temperature Analysis#

Filtering and Exporting era5 Data from GEE#

# Load ERA5 daily mean 2-meter air temperature (in Kelvin)
# Don't run this cell if already exported tiff files
era5_2022 = ee.ImageCollection("ECMWF/ERA5_LAND/DAILY_AGGR") \
    .filterDate('2022-01-01', '2022-12-31') \
    .select('temperature_2m')

era5_2023 = ee.ImageCollection("ECMWF/ERA5_LAND/DAILY_AGGR") \
    .filterDate('2023-01-01', '2023-08-31') \
    .select('temperature_2m')

era5_2023_full = ee.ImageCollection("ECMWF/ERA5_LAND/DAILY_AGGR") \
    .filterDate('2023-01-01', '2023-12-31') \
    .select('temperature_2m')

era5_2024 = ee.ImageCollection("ECMWF/ERA5_LAND/DAILY_AGGR") \
    .filterDate('2024-01-01', '2024-08-31') \
    .select('temperature_2m')


# Calculate the mean temperature for the first 8 months of 2023 and 2024
mean_temp_2022 = era5_2022.mean().subtract(273.15)
mean_temp_2023 = era5_2023.mean().subtract(273.15)
mean_temp_2023_full = era5_2023_full.mean().subtract(273.15)
mean_temp_2024 = era5_2024.mean().subtract(273.15)

# Export the mean temperature for 2022 to GeoTIFF
export_2022_task = ee.batch.Export.image.toDrive(
    image=mean_temp_2022,
    description='Mean_Temperature_2022_Syria_5k',
    folder='GEE_exports',
    fileNamePrefix='mean_temperature_2022_syria_5k',
    scale=5000,  # Adjust the resolution as needed
    region=syr_geometry,
    fileFormat='GeoTIFF'
)

# Export the mean temperature for 2024 to GeoTIFF
export_2023_task = ee.batch.Export.image.toDrive(
    image=mean_temp_2023,
    description='Mean_Temperature_2023_Syria_5k',
    folder='GEE_exports',
    fileNamePrefix='mean_temperature_2023_syria_5k',
    scale=5000,  # Adjust the resolution as needed
    region=syr_geometry,
    fileFormat='GeoTIFF'
)

# Export the mean temperature for 2024 to GeoTIFF
export_2023_full_task = ee.batch.Export.image.toDrive(
    image=mean_temp_2023,
    description='Mean_Temperature_2023_full_Syria_5k',
    folder='GEE_exports',
    fileNamePrefix='mean_temperature_2023_full_syria_5k',
    scale=5000,  # Adjust the resolution as needed
    region=syr_geometry,
    fileFormat='GeoTIFF'
)

# Export the mean temperature for 2024 to GeoTIFF
export_2024_task = ee.batch.Export.image.toDrive(
    image=mean_temp_2024,
    description='Mean_Temperature_2024_Syria_5k',
    folder='GEE_exports',
    fileNamePrefix='mean_temperature_2024_syria_5k',
    scale=5000,  # Adjust the resolution as needed
    region=syr_geometry,
    fileFormat='GeoTIFF'
)

# Start both export tasks
export_2022_task.start()
export_2023_task.start()
export_2023_full_task.start()
export_2024_task.start()

print("Export tasks started. Check Google Drive for the results.")
Export tasks started. Check Google Drive for the results.
#Defining paths for era5 GEOTIFF files
Temp_2022_path = os.path.join(base_path,'data\\Temperature\\mean_temperature_2022_syria_5k.tif')
Temp_2023_path = os.path.join(base_path,'data\\Temperature\\mean_temperature_2023_syria_5k.tif')
Temp_2023_full_path = os.path.join(base_path,'data\\Temperature\\mean_temperature_2023_full_syria_5k.tif')
Temp_2024_path = os.path.join(base_path,'data\\Temperature\\mean_temperature_2024_syria_5k.tif')
temp_2022_data = rasterio.open(Temp_2022_path)
temp_2023_data = rasterio.open(Temp_2023_path)
temp_2023_data = rasterio.open(Temp_2023_full_path)
temp_2024_data = rasterio.open(Temp_2024_path)

Calculating Percentage of Change in Temperature per Governorate#

#calculate percent change in temperature for full year 2022 vs 2023
percent_change_temp_2022_23 = calculate_percent_change(governorates, Temp_2022_path, Temp_2023_full_path, nodata_value=None)
#print(percent_change_temp_2023_24)
governorates['Percent_Change_temp_2022_23'] = percent_change_temp_2022_23

#calculate percent change in temperature for first 8 months 2023 vs 2024
percent_change_temp_2023_24 = calculate_percent_change(governorates, Temp_2023_path, Temp_2024_path, nodata_value=None)
#print(percent_change_temp_2023_24)
governorates['Percent_Change_temp_2023_24'] = percent_change_temp_2023_24

2022 vs 2023#

#create a folium map for change in temperature for fullyear 2022 vs 2023
create_percent_change_map(
    geo_data=governorates,                  # GeoDataFrame with governorates and temperature percent change
    column_name='Percent_Change_temp_2022_23',      # Column with percent change in temperature
    map_title='Temperature Percent Change', # Title for the map
    legend_name='Percent Change in Temperature (2022 vs 2023)',  # Legend name
    color_palette='RdYlBu',                 # Color palette 
    output_path='syria_Temp_2022vs2023_map.html'  # Output HTML file for the map
)
Map saved to syria_Temp_2022vs2023_map.html
Make this Notebook Trusted to load map: File -> Trust Notebook

First 8 months of 2023 vs 2024#

#create a folium map for change in temperature for first 8months of 2023 vs 2024
create_percent_change_map(
    geo_data=governorates,                  # GeoDataFrame with governorates and temperature percent change
    column_name='Percent_Change_temp_2023_24',      # Column with percent change in temperature
    map_title='Temperature Percent Change', # Title for the map
    legend_name='Percent Change in Temperature (2023 vs 2024)',  # Legend name
    color_palette='RdYlBu',                 # Color palette 
    output_path='syria_Temp_2023vs2024_map.html'  # Output HTML file for the map
)
Map saved to syria_Temp_2023vs2024_map.html
Make this Notebook Trusted to load map: File -> Trust Notebook

Accumulated Rainfall#

Filtering and Exporting CHIRPS data from GEE#

# Load CHIRPS rainfall data for the first 8 months of 2023 and 2024
# Don't run this cell if already exported tiff files
chirps_2022 = ee.ImageCollection('UCSB-CHG/CHIRPS/DAILY') \
    .filterDate('2022-01-01', '2022-12-31') \
    .select('precipitation')

chirps_2023 = ee.ImageCollection('UCSB-CHG/CHIRPS/DAILY') \
    .filterDate('2023-01-01', '2023-08-31') \
    .select('precipitation')

chirps_2023_full = ee.ImageCollection('UCSB-CHG/CHIRPS/DAILY') \
    .filterDate('2023-01-01', '2023-12-31') \
    .select('precipitation')

chirps_2024 = ee.ImageCollection('UCSB-CHG/CHIRPS/DAILY') \
    .filterDate('2024-01-01', '2024-08-31') \
    .select('precipitation')

# Calculate the accumulated rainfall for both years
accumulated_rainfall_2022 = chirps_2022.sum()
accumulated_rainfall_2023 = chirps_2023.sum()
accumulated_rainfall_2023_full = chirps_2023_full.sum()
accumulated_rainfall_2024 = chirps_2024.sum().select('precipitation')

chirps_2023 = ee.ImageCollection('UCSB-CHG/CHIRPS/DAILY') \
    .filterDate('2023-01-01', '2023-08-31') \
    .select('precipitation')

chirps_2023_full = ee.ImageCollection('UCSB-CHG/CHIRPS/DAILY') \
    .filterDate('2023-01-01', '2023-12-31') \
    .select('precipitation')

chirps_2024 = ee.ImageCollection('UCSB-CHG/CHIRPS/DAILY') \
    .filterDate('2024-01-01', '2024-08-31') \
    .select('precipitation')

# Calculate the accumulated rainfall for both years
accumulated_rainfall_2022 = chirps_2022.sum()
accumulated_rainfall_2023 = chirps_2023.sum()
accumulated_rainfall_2023_full = chirps_2023_full.sum()
accumulated_rainfall_2024 = chirps_2024.sum()
# Export the accumulated rainfall for 2023 to GeoTIFF
# Don't run this cell if already exported tiff files
export_2022_task = ee.batch.Export.image.toDrive(
    image=accumulated_rainfall_2023,
    description='Accumulated_Rainfall_2022_Syria',
    folder='GEE_exports',
    fileNamePrefix='accumulated_rainfall_2022_syria',
    scale=10000,  # Adjust the resolution as needed
    region=syr_geometry,
    fileFormat='GeoTIFF'
)

# Export the accumulated rainfall for 2023 to GeoTIFF
export_2023_task = ee.batch.Export.image.toDrive(
    image=accumulated_rainfall_2023,
    description='Accumulated_Rainfall_2023_Syria',
    folder='GEE_exports',
    fileNamePrefix='accumulated_rainfall_2023_syria',
    scale=10000,  # Adjust the resolution as needed
    region=syr_geometry,
    fileFormat='GeoTIFF'
)

# Export the accumulated rainfall for 2023 to GeoTIFF
export_2023_full_task = ee.batch.Export.image.toDrive(
    image=accumulated_rainfall_2023_full,
    description='Accumulated_Rainfall_2023_full_Syria',
    folder='GEE_exports',
    fileNamePrefix='accumulated_rainfall_2023_full_syria',
    scale=10000,  # Adjust the resolution as needed
    region=syr_geometry,
    fileFormat='GeoTIFF'
)
# Export the accumulated rainfall for 2024 to GeoTIFF
export_2024_task = ee.batch.Export.image.toDrive(
    image=accumulated_rainfall_2024,
    description='Accumulated_Rainfall_2024_Syria',
    folder='GEE_exports',
    fileNamePrefix='accumulated_rainfall_2024_syria',
    scale=10000,  # Adjust the resolution as needed
    region=syr_geometry,
    fileFormat='GeoTIFF'
)

# Start both export tasks
export_2022_task.start()
export_2023_task.start()
export_2023_full_task.start()
export_2024_task.start()

print("Export tasks started. Check Google Drive for the results.")
Export tasks started. Check Google Drive for the results.
#Defining paths for era5 GEOTIFF files
rainfall_2022_path = os.path.join(base_path,'data\\Rainfall\\accumulated_rainfall_2022_syria.tif')
rainfall_2023_path = os.path.join(base_path,'data\\Rainfall\\accumulated_rainfall_2023_syria.tif')
rainfall_2023_full_path = os.path.join(base_path,'data\\Rainfall\\accumulated_rainfall_2023_full_syria.tif')
rainfall_2024_path = os.path.join(base_path,'data\\Rainfall\\accumulated_rainfall_2024_syria.tif')
rain_2022_data = rasterio.open(rainfall_2022_path)
rain_2023_data = rasterio.open(rainfall_2023_path)
rain_2023_full_data = rasterio.open(rainfall_2023_full_path)
rain_2024_data = rasterio.open(rainfall_2024_path)

Calculating percentage of change in Accummulated Rainfall per Governorate#

#Calculate percent change in accummulated rainfall for full year 2022 vs 2023
percent_change_rain_2022_23 = calculate_percent_change(governorates, rainfall_2022_path, rainfall_2023_full_path, nodata_value=None)
#print(percent_change_temp_2023_24)
governorates['Percent_Change_rainfall_2022_23'] = percent_change_rain_2022_23


#Calculate percent change in accummulated rainfall for 8 months 2023 vs 2024
percent_change_rain_2023_24 = calculate_percent_change(governorates, rainfall_2023_path, rainfall_2024_path, nodata_value=None)
#print(percent_change_temp_2023_24)
governorates['Percent_Change_rainfall_2023_24'] = percent_change_rain_2023_24

2022 vs 2023#

#create a folium map for accummulated rainfall change for 2022 vs 2023
create_percent_change_map(
    geo_data=governorates,                  # GeoDataFrame with governorates and rainfall percent change
    column_name='Percent_Change_rainfall_2022_23',      # Column with percent change in rainfall
    map_title='Accumulated Rainfall Percent Change', # Title for the map
    legend_name='Percent Change in Accumulated Rainfall (2023 vs 2024)',  # Legend name
    color_palette='BuPu',                 # Color palette
    output_path='syria_Rainfall_2022vs2023_map.html'  # Output HTML file for the map
)
Map saved to syria_Rainfall_2022vs2023_map.html
Make this Notebook Trusted to load map: File -> Trust Notebook

First 8months of 2023 vs 2024#

#create a folium map for accummulated rainfall change for 8 months of 2023 vs 2024
create_percent_change_map(
    geo_data=governorates,                  # GeoDataFrame with governorates and temperature percent change
    column_name='Percent_Change_rainfall_2023_24',      # Column with percent change in temperature
    map_title='Accumulated Rainfall Percent Change', # Title for the map
    legend_name='Percent Change in Accumulated Rainfall (2023 vs 2024)',  # Legend name
    color_palette='BuPu',                 # Color palette (Red-Yellow-Blue is often used for temperature maps)
    output_path='syria_Rainfall_2023vs2024_map.html'  # Output HTML file for the map
)
Map saved to syria_Rainfall_2023vs2024_map.html
Make this Notebook Trusted to load map: File -> Trust Notebook

Upcoming Analysis#

  1. Agricultural Productivity Analysis : Aggregate Shares by Productivity ; Median Agricultural Productivity by Governorates (similar to the methodology used in previous reports)

  2. Conflict and Agricultural Productivity : Investigating whether areas with better productivity scores show higher conflict averages since the start of the conflict

  3. Deforestation Trends Across Syria : Updating and examining deforestation trends across Syria, with a focus on recent reports indicating potential desertification in the northeast and examining the trends in deforestation ratios across the country and by region

  4. Agricultural Degradation Indicator : Exploration of potential indicators for assessing agricultural degradation across Syria