Flow maps & origin–destination data
Movement between places: migration, commuting and trip flows, origin–destination matrices, desire lines, curved and bundled flow maps, and the uncertainty in small flows.
A flow map draws movement between places: people moving house, commuting to work, riding a bike from one dock to another. The data behind it is an origin–destination table, and most of the work happens before any line is drawn. That means choosing which flows matter, dropping the zero-length ones that stay put, and knowing which small flows are noise.
The guides here use the Census Bureau’s county-to-county migration flows with their margins of error, LEHD LODES commuting for every block pair in Rhode Island, and bike-share trip records. They measure each choice: 40 of the 1,023 flows out of Los Angeles carry 71% of movers, and two thirds of US counties have a net migration that cannot be told apart from zero.
🧭 Start with the concepts
The ideas the how-to guides below assume you already have.
⚙️ Then do the task
Step-by-step walkthroughs with code you can copy and adapt.
- How to Read County-to-County Migration Flows in Python
- How to Make a Flow Map in Python
- How to Map Net Migration by County in Python
- How to Map Commuting Flows from LEHD LODES in Python
- How to Build and Read an Origin–Destination Matrix in Python
- How to Map Bike-Share Trips as Flows in Python
Show every how-to guide in this topic
- How to Build Desire Lines from Origin–Destination Data in Python
- How to Make an Interactive Arc Map of Flows with pydeck
- How to Aggregate Origin–Destination Flows to Larger Zones in Python
- How to Analyse Origin–Destination Flows by Hour of Day in Python
- How to Map a Workplace Catchment and Its Distance Decay in Python
- How to Test Whether a Migration Flow Is Really One-Way in Python
- How to Find the Busiest Taxi Routes Between NYC Zones
🔧 When it breaks
The errors this topic produces, with the cause explained rather than just the command.
Related topics
Subjects that keep coming up alongside this one, most overlap first.