Product Builder Resources š¤
Introduction
New to navigating the SafeGraph schema? Need to calculate deltas, find particular sets of POIs, or understand how to interpret relationships in our data? You're not alone, and this page is for you!
See below for common questions and workflows - along with example queries - to help kickstart your journey from "I have SafeGraph data" š¤·āāļø to "I am realizing valuable insights from SafeGraph data!" š”
- Query Example Notes:
- All code examples are in SQL. If a different language is preferred, paste the code sample into AI (OpenAI, Google Gemini, etc.) and prompt the AI to "Convert this code from SQL to [desired language]."
- The table names (following
FROM
statements) are generic and will need to reflect whatever table name you assign to our data in your environment. In the examples below, the generic table names store the following attributes:places
: Includes ALL places (base, rich, address, premium rows) and all geometry attributesbrand_info
: Includes all brand info attributes
- Queries involving more than 1 release will designate
places_old
andplaces_new
table names and/or[column name]_old
and[column_name]_new
column names.
Places
Detecting change across releases
- Prompt: "I need to know which places were removed, added, or saw a specific column value change compared to the previous release."
Change Type | Query |
---|---|
View all places added |
|
View all places removed |
|
View all places with a specific column value change | Places with an
Places that closed (
|
Isolating Premium Rows
For customers that subscribe to our "premium" rows like industrial, apartments, and point POIs (see docs to learn more).
- Prompt: "I license premium row POIs and want to find them."
Premium Row Type | Query |
---|---|
Point POIs |
EV charging stations only ex:
|
Apartments |
|
Industrial POIs: Warehousing and Storage, Mini Warehouses and Self-Storage Units, Couriers and Express Delivery Services, Data Centers, Refrigerated Warehousing and Storage, Industrial Equipment Wholesalers, |
|
How to find important/prominent POIs
We know that some places are more important than others and have specifically built our data to reflect customer requirements for a growing list of POI definitions across many countries. The following list of place definitions have had concerted efforts to ensure that we:
1.) Provide full coverage in the specified geography
2.) Enable customers to isolate only these POIs from a single query that guards against "noise" and/or other POIs with a "close-but-not-exact" definition match. NAICs are often not 1:1 matches for specific POI definitions, so some queries further narrow within a single naics_code
or stretch across more than one naics_code
using other features.
POI Scope | Geography | Query | Geometry |
---|---|---|---|
Sports Venues (except car and horse racing tracks). List of applicable | US, CA, Western Europe, AU | NBA Arenas ex:
| Captures the entire premise of the venue. Sub-venue POIs should reflect the venue in |
Car and Horse Racing Venues. | US, CA, Western Europe, AU | NASCAR Stadiums ex:
| Captures the entire premise of the venue. Sub-venue POIs should reflect the venue in |
Performance Art Venues. List of applicable | US, CA, Western Europe, AU | Music Arenas ex:
| Captures the entire premise of the venue. Sub-venue POIs should reflect the venue in |
International and Large Regional Airports | GLOBAL |
| Captures the entire premise of the airport. Sub-airport POIs should reflect the airport in |
Terminals and Concourses within International and Large Regional Airports. "International Terminal" and "Domestic Terminal" are possible | US |
| Captures the entire terminal/concourse premise. Sub-terminal/concourse POIs should reflect the terminal/concourse in |
Prisons and Jails. Includes small, municipal jails and detention centers as well as maximum security federal prisons. | US |
| Captures the entire prison/jail premise. In many cases, we do not have sub-prison/jail POIs, but where we do, they should reflect the prison/jail in |
Shopping Malls. Note that | US and CA |
| Captures the entire premise of the mall. Mall tenant POIs should reflect the mall in |
College/University Campuses for 4-year universities, junior colleges, trade schools, etc. These are depicted by the following | US and CA | Junior Colleges ex:
| Captures the entire premise of the college campus. Sub-campus POIs should reflect the main campus in |
Primary and Secondary Schools: Kindergarten through high school for public and private/charter/boarding schools. The following | US and CA |
| Geometry exists, but precise polygons are not available for all locations. We expect to close this gap by the July 2025 release. |
Places Of Worship for all recognized religious groups. | US and CA |
| Captures the entire premise of the place of worship. Sub-place of worship POIs should reflect the place of worship in |
US Military Bases. The following | GLOBAL | US Air Force ex:
| Captures the entire premise of the military base. Sub-military base POIs should reflect the military base in |
US Federal, State, and Local Courthouses. Federal courthouses have "Courthouses" | US | Federal Courthouses ex:
| Captures the entire premise of the courthouse. |
Hospital Campuses. Does not include sub-hospital campus POIs like "Trauma Center" or "Cardiology"). | SE, NO, DK, FI |
| Precise geometry not currently supported for most locations. |
Shopping Malls | SE, NO, DK, FI |
| Precise geometry not currently supported for most locations. |
College/University Campuses. Includes standard, 4-year universities and trade/technical colleges. | NO, DK, PL | 4-year Universities ex:
Trade/technical Colleges ex:
| Precise geometry not currently supported for most locations. |
College/University Campuses. Includes satellite campuses affiliated with a given university - designated by the word "campus" in | SE |
Satellite Campuses excluded ex:
| Precise geometry not currently supported for most locations. |
College/University Campuses | FI |
| Precise geometry not currently supported for most locations. |
Primary and Secondary Schools: Kindergarten through high school for public and private/charter/boarding schools. Kindergarten-only schools have "Elementary School" | PL |
| Precise geometry not currently supported for most locations. |
Nationally Protected Parks, Monuments, Preserves, etc. as defined by the National Park Service. The following | US | National Parks ex:
| Captures the entire premise of the national park/preserve/etc. Sub-park POIs should reflect the park in |
Isolating POIs by unique features
For customers who leverage rich attributes like category_tags
(docs) and/or amenity columns (docs) to isolate POI subsets meeting specific criteria. Commonly used by mapping and generative AI platforms to support user search, marketers to create location based audiences or plan OOH (out of home) campaigns, retailers to support real estate site selection, etc.
Prompt | Query |
---|---|
"I want to find sports bars in New York that have a TV, wifi, parking, happy hour, burgers, and accept reservations." |
|
"I want to identify cafes in California that offer bagels, delivery, have outdoor seating, and are family friendly with a casual vibe." |
|
"I want to find Department Stores in Texas that sell perfume." |
|
How to link brand relationships
See brands and brand_info docs to learn about how we qualify "brands" and what details we capture.
Prompt | Query |
---|---|
"I want to understand which brand locations in places are owned by a parent brand/company." |
|
"I want to understand which brand locations in places are owned by a parent brand/company that is also owned by a parent brand/company." |
|
Geometry
How to navigate parent<>child spatial relationships
Prompt | Query |
---|---|
"I want to see places and geometry columns for a POI's parent (and the parent's parent when applicable)." |
|
Updated about 15 hours ago