Analysis of NJ State Police fatal crash data (2008-present) and NJDOT crash data (2001-2023)
- Plots: neighbor-ryan.org/nj-crashes
- Hudson County map: neighbor-ryan.org/nj-crashes/hudson/map
Fatal crash data updates daily (via GitHub Action), plots below are current through either the most recent month or year.
(NJSP only includes victim-type data since 2020)
(Uniform Crime Reports 1990-2020, Disaster Center 1960-2019)
This project uses uv for Python dependency management:
# Install dependencies
uv sync
# Run scripts
uv run njsp refresh_data
uv run njdot compute db
# Or activate the virtual environment
source .venv/bin/activate
njsp refresh_dataThis repository tracks two distinct crash datasets with different update patterns:
- Source: NJ State Police fatal crash XMLs
- Coverage: Fatal crashes only, 2008-present
- Update Frequency: Daily (via GitHub Action)
- Size: Small (~1-2MB databases)
- Storage: XMLs committed to git, databases regenerated locally
- Regenerate:
njsp refresh_data # By default, current year and 2 preceding njsp update_data # Generate parquets from XMLs njsp update_pqts # Update SQLite databases
- Source: NJDOT crash data (zip files)
- Coverage: All crashes (fatal, injury, property damage), 2001-present
- Update Frequency: Annual
- Size: Large (2.4GB crashes.db, ~280MB parquets)
- Storage: DVC-tracked, stored in S3
- Pipeline: See njdot/README.md
- Pull databases:
dvc pull www/public/njdot/crashes.db.dvc # Or regenerate (slow, requires geo-processing): env -u PYTHONPATH njdot compute pqt -f env -u PYTHONPATH njdot compute db -f
NJDOT crash data parsing / analysis in njdot/.




