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#
Load and clean the factory dataset
Import the drug production site spreadsheet, fix inconsistent location names, and identify which sites have exact coordinates.Load spatial boundaries
Read Syria admin boundary shapefiles to provide geographic context for mapping and aggregation.Create spatial representations of sites
Convert point locations into H3 grid cells and generate hexagon geometries for each factory location.Construct the comparison group
Build the immediate neighboring H3 cells around each factory site to represent surrounding non-factory areas.Validate geography and cell sizes
Visualize factory and neighbor cells, inspect overlaps, and calculate the average area of the H3 grid cells.Access and prepare NTL data
Authenticate with Black Marble, assemble the combined factory-plus-neighbor geometry set, and load the monthly extracted NTL dataset.Classify and aggregate observations
Label each observation as eitherFactoryorNeighbor, then summarize NTL metrics by date and location.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+1to the denominator to avoid division-by-zero issues and reduce instability when baseline values are very small.Compare key periods visually
Compare factory versus neighbor changes for September–November 2023 and September–November 2025 using charts.Export site- and admin-level outputs
Create pivot tables for downstream analysis at both the factory-location level and the admin-1 level.Document limitations
Note the data quality concern affecting June–July 2025 observations and exclude those spikes from the main interpretation.
Factory Locations#
Factory Neighbors#
There are 4 drug production sites that share one neighboring cell
Rural Damascus, Falita – the one close to the main road and the one close to Al Murjan for Aluminium
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.
Rural Damascus Maddaya has two production locations that share a neighborig cell
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
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