Using Interactive Maps

Published on October 26, 2016

Arcadia Data taps into the power of Google Maps and Mapbox to offer a fully interactive and intuitive mapping visualization experience. This article will cover a few examples of using the new map visual, but first we’ll review a data mapping example from an earlier release of Arcadia Data.

Choropleths are one of the most common styles used when visualizing geographic data. Coloring shapes on a map offers an easy way to show patterns or concentrations in a given region. Consider this Arcadia map which shows populations in California counties.

Los Angeles County’s dark green indicates it contains the largest population. Unfortunately the analysis stops there. The map does not allow the user to zoom in and determine which cities in that county contain the higher concentrations.

Let’s contrast that functionality with an interactive map example in Arcadia 3.2. The dataset contains information about San Francisco Police Department incidents from 2003 to 2014. You can plot each robbery that occurred in December 2014.

After applying the appropriate filters you select the Interactive Map visual tile.

Now you can drag the latitude and longitude columns to the Geo shelf. Arcadia automatically detects the intended purpose of these columns, indicated by the globe icon to the left of the column name.

In the event the data type is not automatically set, you can manually change the type. The Interactive Map visual supports Latitude, Longitude, and Zip Code.

Layers

A layer determines how the geographic data will be rendered on the map. Arcadia builds the content using either Google Maps or Mapbox, which can be selected on the Tile Layer tab. An administrator must first enter a Google Maps API key or a Mapbox Premium Token in the Arcadia Site Settings before users can create an interactive map visual. The examples here use Google Maps.

The Layer Options tab shows the four map options available. As the term suggests, a user may build a map visual using one or more layer options. Currently, the interactive map visual supports between zero and two measures. If no measure is supplied, a value of one is automatically assumed. If one measure is supplied, all of the layers (heatmap, cluster, circle marker, and marker layer) will utilize the first measure. If two measures are supplied, the heatmap, cluster, and marker layer will utilize the first measure. The circle marker will utilize both measures, which will be covered in detail below.

First we’ll choose a basic marker map.

From this initial rendering you see there is a concentration of robberies downtown, but any insight into how many robberies occurred in that area is lost in the clutter of overlapping markers. The cluster option offers a way to consolidate many of those points to better understand just how many robberies happened downtown.

Uncheck the ‘Add Marker Layer’ setting and enable ‘Add Cluster Layer’ instead. Set the Cluster Radius to 80. This setting controls at what distance individual points should be gathered into a single cluster.

The Cluster Color parameter allows you to find the perfect hue of red to use in the visual.

After you apply the setting changes Arcadia redraws a much cleaner, more intuitive map visual with data points aggregated into clusters.

From here you can zoom in and increase the number of clusters on the map. You can see single lat/long points that fall outside of the cluster appear as markers.

Circles

Circles are useful for datasets with a lower number of geographic points (for example, an analysis across major Mid-Atlantic cities or zip codes within one city) to display differences in magnitude. The circle option supports two measures: the first measure controls the color of the circle; the second measure controls the size of the circle. If only one measure is supplied then both color and circle size are related to the value of that measure.

In this example we explore widget orders for a company. Drag two measures, Record Count (aliased as ‘Number of Shipments’) and quantity (aliased as ‘Units Ordered’) into the Measures shelf. Then plot these metrics on the map with Zip Code values.

In the Layer Options tab you can check ‘Add Circle Marker Layer’ and reduce the range of circle sizes to show a more subtle contrast between smallest and largest quantity ordered. Checking the boxes for the Area Legend and Color Legend creates quick reference points for users to understand how the data points are categorized.

The resulting map shows how some customers prefer to order more widgets (circle size) in fewer shipments (circle color) whereas others prefer to more frequently order fewer widgets.

Heatmaps

If a dataset contains a high number of different latitudes and longitudes, heatmaps best illustrate patterns or concentrations of those data points. For this example we’ll configure an App that allows a user to view New York City taxi pickup locations by hour of the day.

We’ll start with an NYC Taxi dataset that contains pickup latitude, pickup longitude, and time of pickup. Drag the latitude and longitude columns onto the Geo shelf.

In the Layer Options tab we check ‘Add Heatmap Layer’. We’ll also enable the heatmap legend so users will understand how a color relates to the number of taxi pickups in a given area. You can control the magnification at which colors are intensified using the ‘Intensity Magnification’ parameter. This setting multiplies the value of the measure by the constant entered in this box. The Heatmap Radius setting controls the size of each point plotted on the map.

After adding this visual to an app and including a filter for hour of day, you can now visualize where the most taxi pickups occur for the morning commute.

Summary

Arcadia Data’s seamless integration with Google Maps and Mapbox makes it easy to take advantage of your favorite mapping technology. The four layer options give users the flexibility to choose which visualization best suits the story they want to tell. Interactive maps augment the already strong visualization options Arcadia Data offers, enabling users to quickly understand patterns in geographic distributions at scale and browse details down to individual locations. If you’d like to try this out for yourself, via our Arcadia Instantsampler.