Visualize OD data with Flowmap.blue

Chloe Lubin
Nerd For Tech
Published in
5 min readJul 4, 2021
Flowmap.blue demo by creator Ilya Boyandin

What is Flowmap.blue?

Flowmap.blue is an open-source tool that helps visualize the movements between 2 geographic locations. It first launched in 2019 by creator Ilya Boyandin, a Data Visualization Engineer at Teralytics. If you’re interested in the technical details, feel free to check out Boyandin’s Medium article here.

More about Origin-Destination (OD) data

OD data, or “flow data,” serves the function of representing geographic movement. It comes either in “long” form or as a matrix. In the first case, each row will have the OD pair (origin and destination) and the number of trips between the origin and destination.

“Long” form data

The matrix is a pivot. Each row contains the origin, each column contains the destination — all aggregated number of trips will be mapped between the origin and the destination. This method becomes unwieldy if there are a lot of origins and destinations (notice the number of N/As in the chart below). If that’s the case, it’s better to stick with the “long” form.

OD matrix

Flowmap.blue has a matrix converter that allows you to convert a matrix into a long form and copy/paste the tabular output in a spreadsheet. To unpivot the matrix in Google Sheets, you can reference this article (that’s what I used). In Flowmap.blue, you’ll need to use long form data.

Flowmap.blue OD matrix converter

Why should I care about OD analysis?

OD analysis is helpful for a myriad of reasons: urban planning, transportation networks design, real estate investments, supply-chain logistics, human migration policies, etc. Mobility data is important to understand what inefficiencies exist in the modern geographic spaces to help develop a better response: dedicated bike lanes on commonly used routes, decrease in travel time for millions of people commuting to/from the same locations, distribute resources in areas welcoming a large share of the population, and many other use-cases. In short, OD analysis helps identify today’s geographic gaps for better resource allocation tomorrow.

In this article, I will be walking you through how to use Flowmap.blue from A to Z using San Francisco Bay Area’s BART ridership data for 2021. Let’s begin!

Using Flowmap.blue

Once you’ve chosen the data you want to work with and cleaned up the dataset, go to Flowmap.blue’s website and make a copy of the template to your Google Drive.

You’ll need to fill out the 3 tabs, “properties”, “locations”, and “flows”. Let me demonstrate how to populate the spreadsheet for each of the required sections.

Properties

The properties tab is the metadata of the visual you’re about to create with Flowmap.blue. First, you need to put in key pieces of information, such as the chart title, a description, the data source and your own info.

On the left is the raw data, on the right, the final result

Flowmap.blue is built using Mapbox and all visuals are hosted on Flowmap’s Mapbox account. If you embed your map on a website and expect high traffic, Flowmap.blue encourages users to use their own Mapbox access token.

Create own Mapbox access token for API requests (optional)

Next, we’ll format the map by selecting the colors, animation/cluster feature, and word choices for the toolbox.

I didn’t make too many changes here, except for the fact that you’ll notice that the flows.sheets “value” cell contains comma-separated values. Those will inform the month/year drop-down you see below. For each drop-down value, you’ll need to create a separate tab on the template.

month/year drop-down menu

Locations

Populate locations, including the GPS coordinates. If you only have the location names without the GPS coordinates, you can use Flowmap.blue’s geocoding tool. It’ll return the latitude and longitude coordinates for the location you specified. Spot check to make sure the geocoding tool is returning the right coordinates. Copy/paste the result on the “locations” tab of the spreadsheet.

Flowmap.blue’s geocoding tool

Next, go back to the spreadsheet and enter the data, in this order: id, name, latitude, and longitude.

Flows

Finally, the “flows” tab will show the number of trips taken between the origin and the destination. If you’re not interested in creating a filter, you can simply fill out the “flows” tab. However, if you want to create a drown-down, you’ll need to create a new tab for each value you want added to the drop-down (example below).

On each tab, enter the origin, destination, and the aggregated number of trips.

OD flows

When you’re ready to visualize the result, click on the “Share” button on the top right corner and select “Anyone with the link.”

Copy/paste the link in the dedicated box on Flowmap.blue. Click “Open” to view the final result in Flowmap.blue.

Conclusion

I hope this tutorial was helpful. Feel free to check out my own OD map on Flowmap.blue. You can zoom in or out, filter on the month by using the drop-down menu, or toggle the settings (bottom left corner). While Flowmap.blue is a convenient, low-code and user-friendly tool, there are other tools out there to visualize OD data: ArcGIS, Tableau, R’s stplanr library, Kepler.gl, etc. Happy exploring! 😊

This post was last edited on July 3, 2021. The opinions expressed here belong solely to myself, and do not reflect the views of my employer.

--

--