This repository contains an open-source geospatial analysis framework designed to process and handle large-scale municipal emergency dispatch tracking telemetry (2019–2026) from Ciudad Juárez, Chihuahua.
The core objective of this project is to provide data scientists, transit planners, and urban logistics researchers with reproducible pipelines to analyze public safety resource allocation, monitor dispatch latency metrics, and lay the foundation for high-resolution patrol optimization modeling.
To maintain strict adherence to data minimization principles, all structural personal identifiers have been permanently removed at the database stream level. The project utilizes an anonymized data model containing zero caller names, phone numbers, landmarks, or street address text strings.
juarez-c4-dispatch-analysis/
├── .gitignore # Excludes data exports, caches, environments, and local artifacts
├── README.md # Project overview, setup, methodology, and usage documentation
├── pipeline_anonymize.py # Baseline Polars streaming and column-whitelist pipeline
├── pipeline_anonymize_hardened.py # Hardened pipeline with quasi-identifier and spatial safeguards
├── requirements.txt # Python data, geospatial, visualization, and Hub dependencies
├── test_env.py # Validates loading SOURCE_HF_REPO from the local environment
└── verify_anonymization.py # Audits the output schema and samples values for leakage
Planned expansions for this analysis suite intend to isolate operational dispatch patterns across the high-density urban core of Ciudad Juárez using localized coordinate projections. Future mapping modules will utilize specific parameters to ensure processing efficiency.
The upcoming visualization engine is designed to filter and clip spatial data points within the following targeted Web Mercator viewport limits:
- Horizontal Limits (X):
-1.1858e+07to-1.1837e+07 - Vertical Limits (Y):
3.7020e+06to3.7190e+06
Future plotting pipelines will aim to aggregate approx. 7.8 million rows into a high-resolution hexbin deployment layer using a structural grid size of 450 steps. By implementing a reduced opacity alpha threshold of 0.4 and blending an underlying Esri World Topographic Basemap (Forced Zoom 14), future research iterations will allow contributors to visually correlate call volume densities against municipal thoroughfares, local district boundaries (SGR_DISTRITO), and specific agency patrol sectors (AEI_SECTOR).
-
Clone the repository:
git clone https://github.com cd juarez-c4-dispatch-analysis -
Configure dependencies: Ensure you have a Python environment configured, then execute the automated installation matrix:
pip install -r requirements.txt
The initial raw repository is cleaned via pipeline_anonymize.py using Polars Lazy Frames. This stream-level architecture passes only an approved whitelist of operational variables into the final .geoparquet file, completely discarding unapproved text objects before rows can hit system memory.
Before sharing data assets or developing downstream visualization blocks, the file structure can be audited locally using the verification module:
python verify_anonymization.pyThe validation layer executes a dual-layer sanity check:
- Structural Check: Scans table metadata headers to guarantee fields like
NOMBRE_DEL_RELATORorTELÉFONOdo not exist. - Content Check: Runs a high-entropy regular expression signature loop to verify that zero 10-digit numerical phone sequences or residual identity text blocks reside inside row values.
Because the dataset is hosted in an optimized cloud format, you can leverage Polars lazy execution to stream and parse data coordinates over remote HTTP boundaries without manual local downloads:
import polars as pl
# Reference your hosted anonymized asset path on Hugging Face
remote_url = "https://huggingface.co"
# Connect to cloud metadata stream
lazy_df = pl.scan_parquet(remote_url)
# Isolate high-impact spatial clusters during peak operational hours
optimized_slice = lazy_df.filter(
(pl.col("ALTO_IMPACTO") == 1) &
(pl.col("HoraDiaEntero").is_between(20, 23))
).collect()
print(f"Isolated {len(optimized_slice)} high-impact baseline call clusters.")This project is distributed under open data research parameters. The processed operational metadata attributes are intended solely for academic research, public infrastructure modeling, and urban resource scheduling optimizations.