How To: Create a Bar Chart Component that Filters a Map
This tutorial provides step-by-step instructions to create a bar chart component that filters map data in Honeycomb Data Explorer. Watch the video or follow the step-by-step instructions below.
Prerequisites
- Access to Honeycomb Data Explorer
- A basic map already created with data points
- Sample data (available in the fact_orders table in the superstore-delivered GitHub repository)
Step-by-Step Guide
Step 0: Prepare Your Base Map
For the demo, will start with a basic map showing delivery locations in Austin, TX. Our basic map includes:
- A point layer showing delivery locations
- Optional: A title component
- Optional: A legend component
- Optional: A heat map layer showing delivery density
Step 1: Identify a Categorical Field to Visualize
- Access your data in Snowflake
- Identify the categorical field you want to visualize (e.g., ship_mode)
Step 2: Add the Bar Chart Component
- Open the Components pane
- Click "Add New Component"
- Select "Horizontal Bar Chart" as the component type
- Choose which side to position the bar chart on (left or right)
Step 3: Configure the Bar Chart
- Data Source: The Snowflake table containing the data you want to show
- Example: select the same fact_orders data source as the point layer
- Dimension Field: A bar will be created for each unique value in this field
- Example:
ship_mode
- Measure Field: The numeric field that will control the size of each bar
- Example:
honeycomb_generated_id
- Aggregation Type - How to aggregate the measure field for each unique dimension (eg. count)
- Example:
count
- Add a descriptive title and subtitle
- Example:
Number of Deliveries by Ship Mode
Step 4: Interact with the Bar Chart
- Close the edit map pane
- Click on different bars to filter the map:
- Map points will update to show only selected category
- Heat map layer (if enabled) will also filter accordingly
- Click the same bar again to remove the filter
TIP
Active filters (selected bars on the bar chart) are not persisted when a map is saved