How To: Structure Data for Honeycomb
This guide provides an overview of the types of data Honeycomb supports and how to think about structuring your location data for Honeycomb. Watch the video or follow the step-by-step instructions below.
Supported Data Types
- Google Sheets*
- CSV*
- Parquet*
- GeoJSON
- KML/KMZ
*Table data format, requries certain structure
TIP
Honeycomb Maps offers a free geospatial file converter on our website. This tool converts specialized geospatial formats like Shapefiles (.shp) or FlatGeobuf (.fgb) to a spreadsheet format that is easy to use and compatible with Honeycomb.
Table Data Requirements
Table data formats (Google Drive, CSV, Parquet) are very common. However, they are not specifically geospatial file formats, so location data within them needs to be structured in a certain way so that Honeycomb can use it.
Point Data
- Basic Requirements:
- Two separate columns: latitude and longitude
- Must use WGS84 coordinate system
- Automatic detection by Honeycomb
- Limitations:
- Supports 5-10 million points (depends on end user computer)
H3 Indexes
- Format Options:
- String in hexadecimal format (
8a283082a677fff
) - Integer representation (
622203769624952831
)
- String in hexadecimal format (
- Benefits:
- Efficient for large datasets
- Better performance with massive data
- Limitations:
- Pre-aggregation required
- Less granular than point data
- Limited filtering capabilities
Step-by-Step Guide
Prerequisites
- Access to Snowflake
- Dataset containing location information
1. Preparing Point Data
- Ensure your data has separate latitude and longitude columns
- Convert coordinates if needed:
- Use Snowflake transformation functions like ST_TRANSFORM()
- Convert to WGS84 coordinate system (EPSG:4326)
- Verify data format:
- Correct coordinate ranges
- Proper decimal precision
2. Converting to H3 (For Very Large Datasets)
- Use Snowflake's H3 functions:
SELECT
H3_LATLNG_TO_CELL(latitude, longitude, 12) as h3_index,
SUM(sales) as total_sales
FROM fact_orders
GROUP BY h3_index
SELECT
H3_LATLNG_TO_CELL(latitude, longitude, 12) as h3_index,
SUM(sales) as total_sales
FROM fact_orders
GROUP BY h3_index
- Choose an appropriate H3 resolution level for the type of data you have
- Determine which metrics should be pre-aggregated
3. Loading Data in Honeycomb
- Point Data:
- Select table with lat/long columns
- Honeycomb automatically detects coordinates & creates a point layer
- H3 Data:
- Select table with H3 indexes
- Honeycomb automatically detects H3 columns & creates a Honeycomb layer.
Best Practices
Choosing Data Structure
- Use Point Data when:
- Dataset is under 10 million points
- Detailed filtering needed
- Individual point analysis required
- Use H3 when:
- Dataset is very large
- Aggregated view is sufficient
- Performance is priority
Tips
- Start with point data for smaller datasets
- Pre-aggregate to H3 for billions of records
Next Steps
After structuring your data, you can:
- Create visualization layers
- Add interactive components
- Implement filters
- Share maps with stakeholders
Additional Resources
For more detailed information, visit: