Weekly Patterns

Weekly Patterns corresponds to the SafeGraph Weekly Patterns dataset. It represents the place traffic and demographic aggregations that answer questions like "how often people visit", "how long they stay", "where they came from", "where else they go", and more. Available for ~4.4MM POI.

📘

Specifying a Date

Note that the weekly_patterns data set includes historical data. Each query must specify a date (as show in the below examples).

Calculated weeks run from 12:00AM Monday morning to 12:00AM the following Monday morning using the time zone of the POI where the patterns are being calculated.

If the date specified is not the beginning of a week (i.e. a Monday), the Places API will return data for the week encompassing the date entered, meaning the date_range_start will be the Monday prior to the given date and the date_range_end will be the end of that week.

Sample Query containing all fields:

query {
  lookup(placekey: "225-222@5vg-7gs-t9z") {
 		weekly_patterns (start_date: "2021-07-26", end_date: "2021-08-02") {
      location_name
      street_address
      street_address
      city
      region
      postal_code
      iso_country_code
      brands{
        brand_id
        brand_name
      }
      date_range_start
      date_range_end
      raw_visit_counts
      raw_visitor_counts
      visits_by_day {
        visits
      }
      visits_by_each_hour {
        visits
      }
      poi_cbg
      visitor_home_cbgs
      visitor_home_aggregation
      visitor_daytime_cbgs
      visitor_country_of_origin
      distance_from_home
      median_dwell
      bucketed_dwell_times
      related_same_day_brand
      related_same_week_brand
    }
  }
}
{
  "data": {
    "lookup": {
      "weekly_patterns": [
        {
          "location_name": "McDonald's",
          "street_address": "1100 Fillmore St",
          "city": "San Francisco",
          "region": "CA",
          "postal_code": "94115",
          "iso_country_code": "US",
          "brands": [
            {
              "brand_id": "SG_BRAND_5179b21fc1d50950b99b4eecaa48c614",
              "brand_name": "McDonald's"
            }
          ],
          "date_range_start": "2021-07-26T00:00:00-07:00",
          "date_range_end": "2021-08-02T00:00:00-07:00",
          "raw_visit_counts": 155,
          "raw_visitor_counts": 130,
          "visits_by_day": [
            {
              "visits": 9
            },
            {
              "visits": 20
            },
            {
              "visits": 21
            },
            {
              "visits": 24
            },
            {
              "visits": 22
            },
            {
              "visits": 24
            },
            {
              "visits": 35
            }
          ],
          "visits_by_each_hour": [
            {
              "visits": 2
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 1
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 1
            },
            {
              "visits": 1
            },
            {
              "visits": 0
            },
            {
              "visits": 2
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 1
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 1
            },
            {
              "visits": 0
            },
            {
              "visits": 1
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 1
            },
            {
              "visits": 0
            },
            {
              "visits": 2
            },
            {
              "visits": 0
            },
            {
              "visits": 1
            },
            {
              "visits": 5
            },
            {
              "visits": 4
            },
            {
              "visits": 1
            },
            {
              "visits": 0
            },
            {
              "visits": 1
            },
            {
              "visits": 2
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 1
            },
            {
              "visits": 1
            },
            {
              "visits": 0
            },
            {
              "visits": 1
            },
            {
              "visits": 1
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 2
            },
            {
              "visits": 2
            },
            {
              "visits": 0
            },
            {
              "visits": 1
            },
            {
              "visits": 3
            },
            {
              "visits": 0
            },
            {
              "visits": 4
            },
            {
              "visits": 1
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 3
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 2
            },
            {
              "visits": 1
            },
            {
              "visits": 0
            },
            {
              "visits": 1
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 3
            },
            {
              "visits": 0
            },
            {
              "visits": 2
            },
            {
              "visits": 2
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 3
            },
            {
              "visits": 1
            },
            {
              "visits": 1
            },
            {
              "visits": 2
            },
            {
              "visits": 1
            },
            {
              "visits": 3
            },
            {
              "visits": 0
            },
            {
              "visits": 2
            },
            {
              "visits": 1
            },
            {
              "visits": 2
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 1
            },
            {
              "visits": 2
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 3
            },
            {
              "visits": 3
            },
            {
              "visits": 2
            },
            {
              "visits": 2
            },
            {
              "visits": 0
            },
            {
              "visits": 2
            },
            {
              "visits": 3
            },
            {
              "visits": 0
            },
            {
              "visits": 1
            },
            {
              "visits": 3
            },
            {
              "visits": 0
            },
            {
              "visits": 3
            },
            {
              "visits": 1
            },
            {
              "visits": 1
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 1
            },
            {
              "visits": 2
            },
            {
              "visits": 0
            },
            {
              "visits": 1
            },
            {
              "visits": 2
            },
            {
              "visits": 1
            },
            {
              "visits": 2
            },
            {
              "visits": 1
            },
            {
              "visits": 1
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 2
            },
            {
              "visits": 0
            },
            {
              "visits": 1
            },
            {
              "visits": 3
            },
            {
              "visits": 2
            },
            {
              "visits": 2
            },
            {
              "visits": 4
            },
            {
              "visits": 1
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 1
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 3
            },
            {
              "visits": 0
            },
            {
              "visits": 4
            },
            {
              "visits": 0
            },
            {
              "visits": 0
            },
            {
              "visits": 3
            },
            {
              "visits": 0
            },
            {
              "visits": 3
            },
            {
              "visits": 1
            },
            {
              "visits": 2
            },
            {
              "visits": 0
            },
            {
              "visits": 2
            },
            {
              "visits": 2
            },
            {
              "visits": 3
            },
            {
              "visits": 2
            },
            {
              "visits": 2
            }
          ],
          "poi_cbg": "060750161003",
          "visitor_home_cbgs": {
            "060750158013": 8,
            "060133551082": 5,
            "060730124021": 4,
            "320310031011": 4,
            "060411031003": 4,
            "060133650021": 4,
            "060750122021": 4,
            "060014017002": 4,
            "060133551151": 4,
            "060376512211": 4,
            "060650427241": 4,
            "060750161003": 4,
            "060750353006": 4,
            "060750478021": 4,
            "320310035091": 4,
            "060750313011": 4,
            "060750159001": 4,
            "060750161004": 4,
            "060133551161": 4,
            "060750153002": 4,
            "060374022001": 4,
            "060750158011": 4,
            "060750205001": 4,
            "060816039006": 4,
            "060750477013": 4,
            "060375023021": 4
          },
          "visitor_home_aggregation": {
            "06037553802": 5,
            "15001020802": 5,
            "06075035202": 5,
            "06075047701": 4,
            "02020002811": 4,
            "06037502302": 4,
            "06075045200": 4,
            "06037651221": 4,
            "06075016100": 4,
            "06075012501": 4,
            "06075015900": 4,
            "06075017601": 4,
            "06061023500": 4,
            "13045911100": 4,
            "04013061039": 4,
            "06001401700": 4,
            "06073003209": 4,
            "06075035300": 4,
            "06075031301": 4,
            "06055201003": 4,
            "06075021800": 4,
            "18019050801": 4,
            "06013382000": 4,
            "06081606400": 4,
            "06013313103": 4,
            "06013355115": 4,
            "32031003101": 4,
            "06075017102": 4,
            "06075015801": 4,
            "06099000908": 4
          },
          "visitor_daytime_cbgs": {
            "060750161003": 7,
            "060750158013": 5,
            "060816132005": 4,
            "060650427241": 4,
            "060750171013": 4,
            "060374022001": 4,
            "060014017002": 4,
            "060670062014": 4,
            "060750313011": 4,
            "060750159001": 4,
            "060133551161": 4,
            "060750122021": 4,
            "060750177002": 4,
            "060750122012": 4,
            "060816011005": 4,
            "060750161004": 4,
            "130459105021": 4,
            "060133551082": 4,
            "060750176013": 4,
            "060750426012": 4,
            "060816046001": 4,
            "060990009083": 4,
            "060610235001": 4,
            "130459111005": 4,
            "060750158022": 4,
            "060750477013": 4
          },
          "visitor_country_of_origin": {
            "US": 122
          },
          "distance_from_home": 38217,
          "median_dwell": 8,
          "bucketed_dwell_times": {
            "<5": 3,
            "5-10": 113,
            "11-20": 13,
            "21-60": 17,
            "61-120": 4,
            "121-240": 3,
            ">240": 2
          },
          "related_same_day_brand": {
            "Chevron": 8,
            "ARCO": 7,
            "Jack in the Box": 5,
            "Costco Gasoline": 5,
            "Shell Oil": 5,
            "Target": 4,
            "Safeway": 4,
            "Starbucks": 4,
            "Safeway Pharmacy": 4,
            "Chevron Extra Mile": 3,
            "ampm": 3,
            "In-N-Out Burger": 3,
            "Subway": 3,
            "Popeyes Louisiana Kitchen": 3,
            "Burger King": 3,
            "7-Eleven": 2,
            "Costco": 2,
            "Jollibee": 2,
            "YMCA": 2,
            "IHOP": 1
          },
          "related_same_week_brand": {
            "ARCO": 26,
            "Chevron": 20,
            "Starbucks": 20,
            "Shell Oil": 18,
            "In-N-Out Burger": 17,
            "Target": 16,
            "7-Eleven": 16,
            "Safeway": 15,
            "Jack in the Box": 14,
            "Costco": 14,
            "Walmart": 13,
            "Taco Bell": 12,
            "Walgreens": 12,
            "Chevron Extra Mile": 12,
            "Safeway Pharmacy": 12,
            "Subway": 9,
            "Simon mall": 8,
            "Costco Gasoline": 8,
            "Popeyes Louisiana Kitchen": 8,
            "ampm": 8
          }
        }
      ]
    }
  },
  "extensions": {
    "row_count": 1,
    "version_date": [
      "safegraph_core: 1645948803__2022_02",
      "safegraph_geometry: 1645948803__2022_02",
      "safegraph_weekly_patterns2: 2022_01_11",
      "safegraph_monthly_patterns: 2022_01_11"
    ]
  }
}

Normalized columns

query lookup {
  lookup(placekey: "zzy-222@5vg-7gv-6kz") {
    placekey
    monthly_patterns(start_date: "2022-01-01" end_date: "2022-01-02") {
      normalized_visits_by_total_visits
      normalized_visits_by_state_scaling
      normalized_visits_by_total_visitors
      normalized_visits_by_region_naics_visits
      normalized_visits_by_region_naics_visitors
    }
  }
}
{
  "data": {
    "lookup": {
      "placekey": "zzy-222@5vg-7gv-6kz",
      "monthly_patterns": [
        {
          "normalized_visits_by_total_visits": 4.1111311709396307e-7,
          "normalized_visits_by_state_scaling": 965.6789116398678,
          "normalized_visits_by_total_visitors": 0.0000012352338195524557,
          "normalized_visits_by_region_naics_visits": 0.000003306859020843854,
          "normalized_visits_by_region_naics_visitors": 0.000004818174786035808
        }
      ]
    }
  },
  "extensions": {
    "row_count": 1,
    "version_date": [
      "safegraph_core: 1645948803__2022_02",
      "safegraph_geometry: 1645948803__2022_02",
      "safegraph_weekly_patterns2: 2022_01_11",
      "safegraph_monthly_patterns: 2022_01_11"
    ]
  }
}
FieldDescription
normalized_visits_by_total_visitsraw_visit_counts divided by the total_visits in the same state or province during the same time period. This measures changes in the relative popularity of POI over time.
normalized_visits_by_state_scalingraw_visit_counts scaled using the mobile device sampling rate for the state in which the POI is located.
normalized_visits_by_total_visitorsraw_visit_counts divided by the total_devices_seen in the same state or province during the same time period. This measures changes in the visits per device in SafeGraph's panel to the POI over time.
normalized_visits_by_region_naics_visitsraw_visit_counts divided by the sum(raw_visit_counts) to the naics_code in the same state or province during the same time period. This measures changes in the category-specific popularity of the POI over time.
normalized_visits_by_region_naics_visitorsraw_visit_counts divided by the sum(raw_visitor_counts) to the naics_code in the same state or province during the same time period. This measures changes in the visits per devices that visited the same category in SafeGraph's panel to the POI over time.