Amazon QuickSight is a scalable, serverless, machine learning (ML) powered business intelligence (BI) solution that empowers all types of users to extract insights and gain value from your data. This fully managed service allows you to build, design, and publish interactive dashboards and pixel-perfect reports with ease. Additionally, you can create PDF schedules, threshold alerts, or securely share the data assets within your organization.
QuickSight offers a rich assortment of built-in, user-friendly visualizations, from simple key performance indicators (KPIs), complex histograms, and of course, maps. Geospatial maps are particularly important for BI because they visually represent geographical data, allowing companies to quickly identify patterns, trends, and relationships in their data that are tied to specific locations. This leads to more informed decision-making and strategic planning. Until now, QuickSight authors could create points maps or filled maps to plot data with latitude/longitude or standard attributes like country, city, and ZIP code. To support additional use cases, we’re launching layer maps—a new geospatial visual, allowing you create maps with custom shape layers.
Layer Maps
We are thrilled to launch the first iteration of layer maps with shape layer support. With this new native chart type, you can visualize data using custom geographic boundaries, such as congressional districts, sales territories, or user-defined regions. For example, sales managers can visualize sales performance by custom sales territories, and operations analysts can map package delivery volumes across different ZIP code formats (ZIP2, ZIP3). Authors can add a shape layer over a base map by uploading a GeoJSON file and join it with their data to visualize associated metrics and dimensions. You can also style the shape layer by adjusting color, border, and opacity, as well as add interactivity through tooltips and actions.
“At GFL Environmental, we leverage Amazon QuickSight’s geospatial capabilities, including Filled Maps, to gain critical insights into key performance metrics across our 350+ North American business units. By analyzing data at granular levels, such as zip codes, cities, and provinces, QuickSight empowers us to visualize performance trends and make data-driven decisions to enhance operational efficiency. These insights have been instrumental in identifying improvement opportunities and optimizing resource allocation. With the introduction of QuickSight’s new Layered Maps feature, we’re excited to elevate our capabilities even further. This powerful tool enables us to visualize customer site locations, overlay disposal sites, and analyze route metrics seamlessly. By leveraging these advanced features, we can optimize route planning, improve efficiency, and reduce costs, driving significant value across our operations. Amazon QuickSight is already delivering significant value to GFL, and with further geospatial enhancements, it will elevate our capabilities to the next level.”
— Aayush Patel, Lead Data Engineer, GFL Environmental
Example 1: New York City by borough
In the following example, we have a dashboard with NYC inspection data, by restaurant and borough. The dashboard is filtered by a specific borough, with maps and metrics focused on the selected area. The map is created with a GeoJSON file that defines the polygons for each borough of New York City. This type of map could be used to analyze customer demographics or assist in comparing economic trends by borough.
Example 2: Age distribution by ZIP3
This second example is based on the need to report on ZIP3, which represents the first three digits of the standard five-digit ZIP code. ZIP3 is used to illustrate a larger geographic area than ZIP codes, and can be used for broader marketing analysis or sales territory mapping. The following dashboard maps the average age by ZIP3. Darker colors have a higher average age.
Let’s explore the New York City borough example. In the following sections, we walk through the steps to create the layer map with metrics from your dataset.
Create a layer map
Complete the following steps to create a layer map:
- Open your QuickSight analysis and add a new visual.
- From the visual pane choose Layer Map.
- In the Properties pane, expand the Map Layers section.
- Choose Add Shape Layer.
- Upload your GeoJSON file containing polygon data to create the custom shape overlay on the map. Please note that currently, only polygon shapes are supported. Line and point geometries are not yet compatible with this feature.
Configure data mapping
Under the Data section, you match the key field from your shape file to the corresponding field in your dataset.
There are two options to style the layer map: fill color and border.
Fill color
For fill color, you can choose the following options:
- Apply the same fill color for all parts of your layers:
- Under Styling, choose a color to fill all the sections of the layer
- Apply a fill color based on a dimension:
- Under Data, add a dimension from your dataset for color
- Apply a fill color based on an aggregated measure
- Under Data, add a measure and an appropriate aggregation
- Now, under Styling, you have an option to choose gradient colors (2-color or 3-color)
- Adjust transparency:
- Under Styling, you can also set the transparency of the fill color.
Border
Under Styling, you can set the color, transparency, line width, and visibility of the border.
Change base layer
Optionally, you can change the base layer on which the shape map has to overlay by choosing an option in Map options in the Properties pane.
GeoJSON best practices
GeoJSON is a file format used for encoding various data structures using JSON. It’s commonly used for representing geographical features along with their non-spatial attributes. With the file loaded in QuickSight, you are able to draw the polygon as well as map your data to the shapes on the map.
Consider the following best practices for using GeoJSON:
- File size – The maximum file size supported is 100 MB, so plan accordingly. Reducing file size is recommended to improve performance while slightly reducing the level of detail of the polygon shape on the global map.
- Calculate and display metrics – You can use calculated fields to compute and represent metrics on a map like change over time or relationship between multiple metrics.
- Properties – Key-value pairs are defined in the GeoJSON properties object for each shape. You can use this to map a polygon shape to a value in your dataset. The following code shows an example:
Conclusion
In this post, we explained the QuickSight vision for layered maps, explored practical examples of single-layer maps using NYC boroughs and ZIP3 regions, and provided a step-by-step guide to help you create your own custom shape layers. With this new feature, you can now visualize data using specialized geographic boundaries that match your specific business needs, whether you’re analyzing sales territories, demographic patterns, or service delivery areas.
To learn more about layered maps, refer to documentation and visit the Amazon QuickSight Community to connect with peers and stay updated on the newest features and resources.
About the Author
Bhupinder Chadha is a senior product manager for Amazon QuickSight focused on visualization and front end experiences. He is passionate about BI, data visualization and low-code/no-code experiences. Prior to QuickSight he was the lead product manager for Inforiver, responsible for building a enterprise BI product from ground up. Bhupinder started his career in presales, followed by a small gig in consulting and then PM for xViz, an add on visualization product.
Ramon Lopez is a Principal Solutions Architect for Amazon QuickSight. With many years of experience building BI solutions and a background in accounting, he loves working with customers, creating solutions and making world class services. When not working he prefers to be outdoors in the ocean or up on a mountain. Vetri Natarajan is a Specialist Solutions Architect for Amazon QuickSight. Vetri has 16 years of experience implementing enterprise business intelligence (BI) solutions and greenfield data products. Vetri specializes in integration of BI solutions with business applications and enable data-driven decisions. Zaiba Jamadaris a Solutions Architect working with Enterprise customers in Central Canada. She joined AWS in 2020 and is passionate about helping customers through their digital transformation journey, as well as helping customers unlock meaningful insights using data and AI/ML. Zaiba enjoys public speaking and has presented at multiple AWS Summits and AWS re:Invent in the last 4 years. Outside of work, Zaiba enjoys traveling, music, and playing sports like badminton and tennis.This is a companion discussion topic for the original entry at https://aws.amazon.com/blogs/business-intelligence/create-custom-shape-maps-in-amazon-quicksight/