Menu

1 / 2

Fentanyl Poverty: Building a Big Data Pipeline to Map America's Overdose Epidemic

DEV Community: elasticsearch·StiiWann·5 months ago
#1sWAR9yQ
#dev#states#deaths#poverty#fentanyl
Reading 0:00
15s threshold

The United States is in the grip of an opioid crisis. Between 2019 and 2023,

fentanyl-related overdose deaths skyrocketed — but the impact is not uniform

across the country. Are the hardest-hit states also the poorest? We built a

full Big Data pipeline to answer that question.

The Data

We combined two official U.S. government sources:

CDC VSRR (Vital Statistics Rapid Release) — state-level fentanyl overdose deaths per 12-month rolling period, from 2015 to 2023

U.S. Census Bureau ACS 5-Year — median household income, poverty rate, and unemployment rate for all 50 states + D.C.

The Architecture

CDC API ──┐

├── Apache Spark ── Elasticsearch ── Kibana Dashboard

Census ───┘ │

└── scikit-learn (ML)

Step 1 — Ingestion

Python scripts fetch both datasets via REST APIs and land them in a raw

datalake ( data/raw/ ), with UTC timestamps for traceability.

Step 2 — Spark Processing

Apache Spark formats and combines both sources:

Filters for fentanyl-specific death indicators

Joins CDC deaths with Census…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.