Mapping Activity in West Bank#

Analysis Goals#

The goal of this analysis is to map the activity in the West Bank using GPS data as a proxy for peope’s mobility.

Dataset#

The dataset being used in this analysisis is the Mapbox movement data. The description below was adapated from the original source:

The Mapbox Movement data set is based on de-identified underlying mobile device activity that grows and changes every day. Any mobility data set is inherently skewed between highly populated regions (urban and metro areas) and sparsely populated regions (rural areas). So instead of providing “raw counts” of measurements, a custom normalization process is applied. This process measures and smooths out the impact of otherwise unpredictable changes in mobile device usage and calculates an activity index, which is more appropriate for comparison across time spans.

Dataset Period#

The dataset covers period from January 2022 to December 2023. Note that there are some gaps where there is no data for some months.

Spatial Characteristics#

The data is provided at GPS coordinates (which are de-identified, jittered).

Temporal Characteristics#

The dataset we use in the analysis is based on activity generated over a a 24 hour time span.

Key Variables#

The variable we are using is activity_index as described above. The easiest way to think about is that its a measure of how many people are moving/visit a region over a specific time (in this case a 24 hour period). Thus, higher values of this index should correspond to alot of people visiting an area with

Prepare Geography DataFrames#

Hide code cell source
# ================================================
# VIEW AND CHECK H3 INDEXES
# ================================================

m = gdf_wb_h3.explore(tiles="OpenStreetMap")
m
Make this Notebook Trusted to load map: File -> Trust Notebook

Get and Process Mapbox Movement Data#

Load and preprocess data#

#

Add geographic information to the Mapbox events#

  • Adm2 regions

  • H3 regions

# ================================================
# Add administrative regions to Mapbox events data
# ================================================
# keep only columns we need for admin geodataframe
gdf_adm2_wb = gdf_adm2_wb[['ADM1_EN', 'ADM2_EN', 'ADM2_PCODE', 'AREA_SQKM', 'geometry']]
gdf_mapbox_adm2 = add_geography_mapbox_events(df_mapbox, x_col="xlon", y_col="xlat", gdf_regions=gdf_adm2_wb)

# ================================================
# Add H3 indexes to Mapbox events data
# ================================================
gdf_mapbox_h3 = add_geography_mapbox_events(df_mapbox, x_col="xlon", y_col="xlat", gdf_regions=gdf_wb_h3)

Aggregate Activity by Region and Time#

  • Spatial aggregation units: Admin level 2 and H3 index

  • Temporal aggregation units: Month, week

Monthly aggregation at ADM2 level#