One table of commuting flows between New York State's 62 counties, drawn seven different ways. Each picture makes some patterns obvious and hides others. Hover or tap anything to see the numbers.

1. Desire-line map. Each line joins two county centers, and wider lines mean bigger flows. Widths use a square-root scale so smaller flows stay visible. Flows in opposite directions curve to opposite sides, so they show up as separate lines. Drag the slider to add smaller flows: with a few dozen lines the picture is clear, and with hundreds it becomes a tangle. That clutter is the main reason the other methods below exist. Erie, Monroe and Onondaga counties contain Buffalo, Rochester and Syracuse.

It starts as a table

Origin–destination data usually arrives as one row per pair of places, with the size of the flow between them. This file has rows covering 62 counties. The codes are FIPS county codes: 36 is New York State, and the last three digits identify the county.

floworigindestinationorigin countydestination county

2. The matrix as a heatmap

Good for
Seeing every pair at once, and spotting where flows are one-sided.
Watch out
There's no geography: counties that touch on the map can sit far apart in the grid.

Rows are origins, columns are destinations.

The diagonal holds flows that start and end in the same county, of the total. Switch to the linear scale to see how those few cells, plus the flows into Manhattan, swamp everything else. The log scale, where each labeled step is ten times the one before, brings out the smaller flows. Counties are sorted west to east, so western New York sits top left and downstate sits bottom right.

3. One origin at a time

Good for
Answering “where do flows from here go?” on a real map.
Watch out
You only ever see one row, or one column, of the matrix.

    Tap a county on the map or pick one from the list. “Flows out” shows a row of the matrix and “Flows in” shows a column. For Manhattan, flows in are flows out.

    4. Chord diagram

    Good for
    Two-way exchange within a small group of places.
    Watch out
    It gets unreadable beyond about ten places, and it has no geography.

    New York City's five boroughs plus Nassau, Suffolk and Westchester. Ribbons show flows between different counties, with the arrow tip at the destination. Hover or tap a county to see what leaves it in orange and what arrives in green.

    5. Sankey diagram

    Good for
    Splitting each origin's total into where it ends up.
    Watch out
    It only works with a handful of origins and destinations.

    Flows starting in the five boroughs, left to right. Green bands stay in the same borough and grey bands cross a county line. Destinations outside these eight counties are grouped as “Rest of NY State.”

    6. Ranked list

    Good for
    Comparing the biggest pairs precisely.
    Watch out
    Everything below the cutoff disappears, and so does geography.

      The 15 largest flows between different counties. All but one involve New York City, Nassau, Suffolk or Westchester. The exception is Niagara to Erie, in the Buffalo area.

      7. Flow against distance

      Good for
      Showing distance decay, the pattern gravity models are built on.
      Watch out
      This uses straight-line distance between county centers, not travel time.

      Each dot is one pair of different counties, and the orange line is the median flow in each 25 km band that has at least 10 pairs. Pairs less than 50 km apart have a median flow of . Pairs 200 km or more apart have a median of .

      Going further

      Other methods not drawn here include OD maps, which arrange one small map per origin by geography, edge bundling, which merges similar flows into smooth bundles, and 3D flow maps viewed in virtual reality.

      1. Wood, J., Dykes, J. and Slingsby, A. (2010). Visualisation of origins, destinations and flows with OD maps. The Cartographic Journal, 47(2), 117–129. doi: 10.1179/000870410x12658023467367. Open access copy
      2. Holten, D. and van Wijk, J. J. (2009). Force-directed edge bundling for graph visualization. Computer Graphics Forum, 28(3), 983–990. doi: 10.1111/j.1467-8659.2009.01450.x
      3. Yang, Y., Dwyer, T., Goodwin, S. and Marriott, K. (2017). Many-to-many geographically-embedded flow visualisation: an evaluation. IEEE Transactions on Visualization and Computer Graphics, 23(1), 411–420. arXiv copy
      4. Jenny, B., Stephen, D. M., Muehlenhaus, I., et al. (2017). Force-directed layout of origin-destination flow maps. International Journal of Geographical Information Science, 31(8), 1521–1540. doi: 10.1080/13658816.2017.1307378. Repository record
      5. Yang, Y., Dwyer, T., Jenny, B., Marriott, K., Cordeil, M. and Chen, H. (2019). Origin-destination flow maps in immersive environments. IEEE Transactions on Visualization and Computer Graphics, 25(1), 693–703. arXiv copy

      About the data

      Flow data: NY_commuting_flows_2011.csv, an example dataset in the open-source scikit-mobility Python library, which describes it as observed commuting flows between New York counties. The library does not say which Census table or survey years the numbers come from, so treat the year in the file name as approximate.

      County boundaries: US Census Bureau cartographic boundary files, 2017 edition, via the us-atlas package. Distances are straight lines between county centroids computed from those boundaries.

      Kings, New York and Richmond counties are the boroughs of Brooklyn, Manhattan and Staten Island.