Using SQL to create segments based on geo locations
Segmentation in Census Audience Hub is designed to run directly on your data warehouse, allowing for governance, performance, and live/complete data sets. SQL can be used as part of segmentation, unlocking its power if needed. Location targeting enables marketers to show ads or send offers based on a customer's location, which is particularly powerful when relevant to the target. Geospatial analysis tools are available in modern data warehouses, making it easy to create segments based on geographic location. The `ST_GEOGPOINT` function can be used to represent geographic points, while `ST_DWITHIN` can check if a point is within a certain distance of another. Geo polygons can also be used to define regions, such as states or zip codes. While not all data warehouses support these functions natively, alternatives like the Haversine Formula can be used in cases where they are not available.
Company
Census
Date published
Aug. 30, 2024
Author(s)
Sean Lynch
Word count
1034
Language
English
Hacker News points
None found.