12 Geospatial Mapping and Tagging

In this Session…​ Before you begin…​
  • Using the Map panel to display graph data on a world map.

  • Tagging nodes.

  • Selecting a Map Server.

To follow along, download the files: https://kineviz.com/s/GXR_QSG.zip

Slide Text

3

Game of Thrones takes place in a fictional world, but we can map the locations where it was filmed.
First, click the Clear toolbar icon to delete any data in the graph space.

4

Now drag and drop the Locations.kml file onto the project space. KeyholeMarkup Language (.kml) and Keyhole Markup Zip (.kmz) files are used by mapping applications such as Google Earth. Since they include latitude and longitude coordinates we can map the resulting nodes in GraphXR.

5

A node is created for each filming location. Open the Table panel to see the locations and their latitude / longitude properties.

6

The category name isn’t very descriptive, so let’s click to open an Enhanced Table and re-label the category as Location.

7

Now open the Map panel to display the world map (powered by Mapbox). The Location nodes are dropped onto the map and the map automatically zooms to display just the locations present in the data.

8

You can search for locations by name in the Search Location bar. Click a location name to center the map on it.

9

Click the Map Control toggle to set map boundaries. You can pan the map with left click drag and zoom with mouse scroll. While in Map Control mode, 3D navigation is disabled.

10

By default, map boundaries are auto-fitted to the data when you close and re-open the map panel. To have your map boundaries persist, click the map Settings button and de-select the Auto Fitting checkbox.

11

Now click to deactivate Map Control to return to 3D navigation. You still zoom using mouse scroll, but now left click drag rotates and tilts the map in three dimensions.

12

Now let’s group our locations by hotter or cooler climate. To do that, we’ll use the Tag function to create temporary groups of nodes regardless of their existing category. Select nodes toward the south and click the Tag icon.

13

In the Manager Tags dialog, enter a tag label (Warmer) and click Add Tag.

14

We’ve now created a tag called “_Warme_r” containing 37 nodes. A badge appears on each tagged node. If we want to remove the tag, we could click Clean Node Tags, but let’s create a few more tags instead.

15

In the graph, select mid-latitude nodes in the UK, click the Tag icon and add a `"Cooler`" tag. Go back to the graph and select nodes in Iceland and add a “Cold” tag.
Optionally, click Save Tags as Property to add a _graphxrtags property to all tagged nodes.

16

The tag label (e.g. Warmer, Cooler, or Cold) is entered as the _graphxrtags property value. If you give a node more than one tag, the tag labels are separated by colons.

17

So far nothing visibly changed in the graph. Let’s switch to Tag mode in the Legend. Now nodes for our three tags are given separate colors.

18

Click a tag label to select all nodes with that tag.
Click the dot next to the tag label to choose a different tag color.

19

We’ve used the default Mapbox map server so far. In the Map panel, click Settings to choose a different available Map Server such as Google or OpenStreetMaps.

20

The map changes immediately when you select a different map server.

21

When you click Hide Map, the nodes, which were pinned to the 3D map, are released and returned to a Force layout.

22

With the Map panel open, you can click Show Map again to drop the nodes back on the map.

Next, in Module 13. Querying, we’ll introduce GraphXR features for pulling in data from a connected Neo4j graph database.