Plotting routes on interactive maps
Cloudera Data Visualization enables you to plot routes over an Interactive Map.
You can plot routes over a map by specifying distinct IDs on the Color shelf, a time series on the Tooltips shelf, and enabling routes as described in Enabling routes.
The following steps demonstrate how to plot routes on an interactive map. In the following example, truck movement data is used.
- Select the appropriate dataset, and create a new dashboard.
- In the dashboard, open the default visual and change the visual type to Interactive Map.
-
Enable the Routes, as described in Enabling
routes
- Click the Settings menu.
- Select Routes/Pins > Enable Routes.
- Optional: Disable heatmap and cluster. It is recommended that you leave the circles in place, so it shows the individual elements of the route. If you choose to hide the circles, the graph only shows the route connectors.
-
Populate the shelves from the available fields (Dimensions and
Measures) in the DATA menu.
-
Geo Shelf - Under Measures, select
latitude
andlongitude
, and add them to the Geo shelf.If your longitude and latitude measurements are not automatically recognized (appear with a (globe) icon on the Geo shelf), cast them to the appropriate Geo Type.- Click the field on the shelf to open the FIELD PROPERTIES menu.
- Select Change Type and choose Latitude or Longitude as appropriate.
-
Colors Shelf - Under Measures, select
truckid
, and place it on the Colors shelf.You may need to remove the aggregation from the field on the shelf. -
Tooltips Shelf - Under Dimensions,
find the
eventtime
field, and add it to the shelf.- Click the field on the shelf to open the FIELD PROPERTIES menu.
- Click Order and Top K.
- Choose the Ascending order.
-
Filters Shelf - [Optional] To restrict the number of routes,
you can choose the filter on the
routename
field. To restrict the number of trucks displayed, you may choose to restrict ontruckid
field, and so on. - Measure Shelf - [Optional] You can display a measure here.
-
Geo Shelf - Under Measures, select
- Optional: Change the color palette to ensure that the routes stand out sufficiently over the regular features of the map: click Colors and select an appropriate palette.
-
Click REFRESH VISUAL.
- Change the title of the visual, and SAVE it.