Polygon Filter
The polygon filter is a special type of component which allows the user to draw an area on the map and filter data for this area.
Configuration
The Polygon Filter component can be configured to support one or more of the following methods for providing filter areas. These options are configured when setting up the component in the editor:
Polygon Input Methods
Drawing on the map: Allows users to draw custom polygons directly on the map by clicking to place points.
GeoJSON upload: Allows users to upload GeoJSON files containing polygon geometries.
Selection from predefined areas: Allows users to select from a list of predefined geographic areas loaded from a data source. This is particularly useful for filtering by administrative boundaries, sales territories, neighborhoods, or other standardized regions.
To enable selection from predefined areas, you need to configure:
- Polygon Data Source: The dataset that contains the polygon boundaries you want users to select from
- Polygon Geometry Field: The field in that dataset containing the polygon geometries
- Polygon Label Field: The field containing human-readable names for each polygon (e.g., "Downtown", "North Region", "California")
- Polygon Unique ID Field: The field containing a unique identifier for each polygon (needed for multi-selection)
For example, if you have a dataset of US states, you might set:
- Geometry Field:
geometry(containing the state boundaries) - Label Field:
state_name(containing "California", "Texas", etc.) - Unique ID Field:
state_code(containing "CA", "TX", etc.)
Using the Polygon Filter
Drawing a new area to filter
If drawing is enabled, click on 'Draw Area' to enter the drawing mode. Then click on the map to add points to the area, clicking on the first point again when you are finished drawing the polygon.
Once a polygon is drawn, you can:
- Click 'Edit Area' to modify the polygon's shape
- Click 'Remove Area' or 'Reset' to clear the filter
Uploading a GeoJSON file
If GeoJSON upload is enabled, click 'Upload GeoJSON' to select a GeoJSON file from your computer. The file should contain a Feature Collection with polygon geometries in the GeoJSON format.
Selecting from predefined areas
If selection from predefined areas is enabled, you can choose one or more predefined areas from a dropdown list.
To select areas:
- Click on 'Select Areas' to open the dropdown
- Use the search box to find specific areas by name
- Click on area names to select/deselect them (you can select multiple areas)
- Selected areas will be displayed as chips below the dropdown
Individual areas can be removed by hovering over their chip and clicking the X icon. Use the 'Reset' button to remove all selected areas at once.
TIP
When multiple areas are selected, the filter will include data from any of the selected areas.
Navigating to filter areas
When one or more areas are selected, a crosshair icon appears next to the selected areas. Click this icon to automatically zoom and pan the map to show all selected filter areas in view.
Downloading Data
When a polygon filter is active, you can download the filtered data to CSV files for further analysis outside of Honeycomb Maps.
How to Download Data
- Create a polygon filter: Draw, upload, or select a polygon area to filter your data
- Click "Download Data": A dialog will appear with download options
- Select data layers: Choose which map layers you want to download data from
- Optional: Include polygon boundary: Check the option to include the GeoJSON boundary of your filter area
- Optional: Include polygon filter columns: When enabled, adds information about which polygon each data point falls within
- Click "Download": Your data will be prepared and downloaded
Download Options
Select Multiple Layers
You can download data from multiple map layers simultaneously:
- Each available layer using the current data sources is listed
- Check the box next to each layer you want to include
- All point, H3, polygon, line, and arc layers are supported
Include GeoJSON Boundary
When enabled, the boundary of your polygon filter area is included in the download:
- Exported as a separate GeoJSON file
- Uses the standard GeoJSON format
- Can be imported into other GIS or mapping tools
- Useful for documenting the exact area of analysis
Include Polygon Filter Columns
When enabled, Honeycomb performs on-the-fly point-in-polygon analysis:
- Adds columns indicating which polygon (if any) each data point is located within
- Useful for downstream analysis like pivot tables
- Helps answer questions like "how many data points are in each region?"
- Available when your polygon filter is based on another data source with multiple polygons
Download Output
Single layer selected:
- Downloaded as a single CSV file
- Contains all data points from the selected layer within the filtered area
- Includes all data fields from the source
Multiple layers selected:
- Downloaded as a ZIP file containing multiple CSV files
- Each layer is saved as a separate CSV file within the ZIP
- If GeoJSON boundary is included, it's also in the ZIP file
- Convenient for analyzing multiple data types from the same geographic area
Data Format
Downloaded CSV files include:
- All original data fields from your data source
- Polygon filter columns (if enabled)
Use Cases
Here are some common scenarios for downloading filtered data:
Detailed Analysis:
- Export filtered data to perform statistical analysis in Excel, R, or Python
- Create custom visualizations or reports
- Combine with other datasets for comprehensive analysis
Sharing with Stakeholders:
- Provide stakeholders with the specific subset of data relevant to their area
- Share data for a specific geographic region with regional managers
- Export data for compliance or regulatory reporting
Point-in-Polygon Analysis:
- Download data with polygon filter columns to create pivot tables
- Analyze how many points fall within each polygon region
- Calculate statistics by geographic area (e.g., sales by territory)
Data Archiving:
- Save a snapshot of data for a specific area at a specific point in time
- Document the data used for a particular analysis or decision
- Create reproducible research datasets
Cross-Platform Integration:
- Export data to use in other GIS tools like QGIS or ArcGIS
- Import into business intelligence tools like Tableau or Power BI
- Feed data into custom applications or workflows