Skip to main content

Prepare data

The most straightforward way to prepare your data to is by creating two files: one with locations data and one with flows data.

Locations data

The locations data file should contain a list of locations along with their coordinates. Here is an example:

locations.csv
id,name,lat,lng
1,New York,40.7128,-74.0060
2,Los Angeles,34.0522,-118.2437
3,Chicago,41.8781,-87.6298
4,Houston,29.7604,-95.3698

Flows data

The flows data file should contain a list of flows between locations. Each flow should have an origin and a destination location and a count. The origin and destination locations should refer to the location IDs in the locations data file.

flows.csv
origin,dest,count
1,2,100
1,3,50
1,4,25
2,1,75
2,3,25
2,4,50

The flows data file can also contain additional columns. For example, time information.

Querying

If your data is not in this format, you can use the SQL querying functionality to transform it.