Nightlights around drug production areas#

This notebook compares night-time lights (NTL) around known and suspected drug production locations in Syria, using factory cells as the treatment group and neighboring cells as a comparison group.

Notebook workflow#

  1. Load and clean the factory dataset
    Import the drug production site spreadsheet, fix inconsistent location names, and identify which sites have exact coordinates.

  2. Load spatial boundaries
    Read Syria admin boundary shapefiles to provide geographic context for mapping and aggregation.

  3. Create spatial representations of sites
    Convert point locations into H3 grid cells and generate hexagon geometries for each factory location.

  4. Construct the comparison group
    Build the immediate neighboring H3 cells around each factory site to represent surrounding non-factory areas.

  5. Validate geography and cell sizes
    Visualize factory and neighbor cells, inspect overlaps, and calculate the average area of the H3 grid cells.

  6. Access and prepare NTL data
    Authenticate with Black Marble, assemble the combined factory-plus-neighbor geometry set, and load the monthly extracted NTL dataset.

  7. Classify and aggregate observations
    Label each observation as either Factory or Neighbor, then summarize NTL metrics by date and location.

  8. Compute baseline changes
    Use September–November 2024 as the baseline period and calculate percentage changes in NTL relative to that baseline. When computing percentage change, we add +1 to the denominator to avoid division-by-zero issues and reduce instability when baseline values are very small.

  9. Compare key periods visually
    Compare factory versus neighbor changes for September–November 2023 and September–November 2025 using charts.

  10. Export site- and admin-level outputs
    Create pivot tables for downstream analysis at both the factory-location level and the admin-1 level.

  11. Document limitations
    Note the data quality concern affecting June–July 2025 observations and exclude those spikes from the main interpretation.

Factory Locations#

Make this Notebook Trusted to load map: File -> Trust Notebook

Factory Neighbors#

Make this Notebook Trusted to load map: File -> Trust Notebook

There are 4 drug production sites that share one neighboring cell

  1. Rural Damascus, Falita – the one close to the main road and the one close to Al Murjan for Aluminium

  2. Rural Damascus Sargyahaya has two locations where they become each others neighbors i.e., one drug production factory is in the control group of the other.

  3. Rural Damascus Maddaya has two production locations that share a neighborig cell

  4. Daraa, Nassib shares a neighboring cell

The average area of each grid is 0.82 sq.km

Difference between Percentage Change from Baseline betwen Factories and Neighbors#

Baseline: 2024 September to 2024 November

../../_images/9e6d9918c4532cd9a0e6ed116f3dbc6ca9dca5a3ea750b769e05f3e1d1869a35.png
pivot[pivot['mean_Factory']==0]
Zone Address date mean_Factory mean_Neighbor pc_change_baseline_Factory pc_change_baseline_Neighbor
0 Al Hassakah, Al Shadadi, Khwaibeirah Khwaibira, Close to the road of Khwaibira link... 2023-01-01 0.0 0.000000 0.000000 -2.829386
2 Al Hassakah, Al Shadadi, Khwaibeirah Khwaibira, Close to the road of Khwaibira link... 2023-03-01 0.0 0.000000 0.000000 -2.829386
3 Al Hassakah, Al Shadadi, Khwaibeirah Khwaibira, Close to the road of Khwaibira link... 2023-04-01 0.0 0.000000 0.000000 -2.829386
6 Al Hassakah, Al Shadadi, Khwaibeirah Khwaibira, Close to the road of Khwaibira link... 2023-07-01 0.0 0.169238 0.000000 13.615615
7 Al Hassakah, Al Shadadi, Khwaibeirah Khwaibira, Close to the road of Khwaibira link... 2023-08-01 0.0 0.000000 0.000000 -2.829386
... ... ... ... ... ... ... ...
1704 Rural Damascus, Rankous Rankous, the eastern neighborhood, Close to th... 2023-03-01 0.0 0.097493 -62.185374 -40.468168
1714 Rural Damascus, Rankous Rankous, the eastern neighborhood, Close to th... 2024-01-01 0.0 0.169379 -62.185374 -36.568787
1715 Rural Damascus, Rankous Rankous, the eastern neighborhood, Close to th... 2024-02-01 0.0 0.085152 -62.185374 -41.137562
1724 Rural Damascus, Rankous Rankous, the eastern neighborhood, Close to th... 2024-11-01 0.0 0.242236 -62.185374 -32.616804
1793 Rural Damascus, Sarghayah Sarghayah, behind Sarghaya high school. 2024-06-01 0.0 0.329635 -76.411637 -39.118610

263 rows × 7 columns