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 safegraph_weekly_patterns data set includes historical data. So 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.

query {
  lookup(placekey: "[email protected]") {
    safegraph_weekly_patterns (date: "2021-07-12") {
      placekey
      parent_placekey
      location_name
      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_by_each_hour
      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": {
      "safegraph_weekly_patterns": {
        "placekey": "[email protected]",
        "parent_placekey": null,
        "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": "mcdonalds restaurants"
          }
        ],
        "date_range_start": "2021-07-12T00:00:00-07:00",
        "date_range_end": "2021-07-19T00:00:00-07:00",
        "raw_visit_counts": 160,
        "raw_visitor_counts": 125,
        "visits_by_day": [
          13,
          18,
          27,
          25,
          30,
          20,
          27
        ],
        "visits_by_each_hour": [
          0,
          1,
          0,
          0,
          0,
          0,
          0,
          1,
          1,
          3,
          0,
          0,
          1,
          0,
          2,
          0,
          0,
          3,
          0,
          1,
          0,
          0,
          0,
          0,
          2,
          1,
          0,
          0,
          0,
          0,
          0,
          0,
          1,
          0,
          2,
          1,
          0,
          0,
          1,
          3,
          1,
          1,
          0,
          2,
          0,
          2,
          0,
          1,
          1,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          3,
          0,
          0,
          2,
          2,
          4,
          3,
          0,
          2,
          0,
          3,
          3,
          2,
          0,
          2,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          1,
          1,
          1,
          2,
          2,
          7,
          1,
          2,
          0,
          1,
          2,
          2,
          1,
          0,
          1,
          1,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          2,
          0,
          0,
          2,
          0,
          0,
          0,
          0,
          5,
          6,
          5,
          0,
          1,
          1,
          5,
          3,
          0,
          2,
          1,
          0,
          0,
          2,
          0,
          0,
          0,
          0,
          0,
          2,
          1,
          0,
          1,
          2,
          0,
          3,
          1,
          1,
          2,
          0,
          1,
          1,
          0,
          0,
          1,
          1,
          1,
          0,
          0,
          1,
          2,
          2,
          1,
          3,
          0,
          3,
          2,
          1,
          0,
          4,
          0,
          2,
          0,
          1,
          1,
          0,
          1
        ],
        "poi_cbg": "060750161003",
        "visitor_home_cbgs": {
          "060014276001": 9,
          "060750171023": 5,
          "482015417003": 4,
          "060750328023": 4,
          "120970408021": 4,
          "060750124012": 4,
          "060750101002": 4,
          "481576754002": 4,
          "060750159001": 4,
          "060952519033": 4,
          "060750161002": 4,
          "060750134003": 4,
          "060855080041": 4,
          "060133020082": 4,
          "060750451002": 4,
          "060670070101": 4,
          "060750313011": 4,
          "181095107021": 4,
          "060816014003": 4
        },
        "visitor_home_aggregation": {
          "06085512053": 5,
          "06075040200": 4,
          "06067006201": 4,
          "13067031207": 4,
          "06075016100": 4,
          "06001430500": 4,
          "12097040802": 4,
          "06075017102": 4,
          "06081601400": 4,
          "06075013400": 4,
          "06075015801": 4,
          "17163501604": 4,
          "06075022801": 4,
          "17163503301": 4,
          "06075016400": 4,
          "06013370000": 4,
          "06075012202": 4,
          "06075012800": 4,
          "06085504413": 4,
          "06075015300": 4,
          "06081601000": 4,
          "06075045100": 4,
          "06037550602": 4,
          "06075015802": 4,
          "06075016200": 4,
          "06013338302": 4,
          "06075023103": 4,
          "48157675400": 4,
          "06055201003": 4,
          "22061960900": 4,
          "18109510702": 4,
          "06081601100": 4,
          "06001427600": 4,
          "06075012700": 4,
          "06075047702": 4
        },
        "visitor_daytime_cbgs": {
          "060750477022": 6,
          "060750451003": 5,
          "060552010032": 4,
          "060750328023": 4,
          "060952519033": 4,
          "060750178021": 4,
          "220619609002": 4,
          "060670049032": 4,
          "060816032003": 4,
          "060790111021": 4,
          "060750161004": 4,
          "060750353006": 4,
          "060750153002": 4,
          "060750159001": 4,
          "060014511022": 4,
          "060816010001": 4,
          "481576754002": 4,
          "060816014003": 4,
          "060133700001": 4,
          "060855080041": 4,
          "060750161003": 4,
          "060133361011": 4,
          "320310022111": 4,
          "060816026003": 4,
          "060750228011": 4,
          "060750231031": 4,
          "060750158022": 4
        },
        "visitor_country_of_origin": {
          "US": 119
        },
        "distance_from_home": 17602,
        "median_dwell": 9,
        "bucketed_dwell_times": {
          "<5": 7,
          "5-10": 105,
          "11-20": 17,
          "21-60": 11,
          "61-120": 7,
          "121-240": 2,
          ">240": 11
        },
        "related_same_day_brand": {
          "ARCO": 6,
          "Safeway": 5,
          "Starbucks": 5,
          "Shell Oil": 5,
          "Chevron": 4,
          "Holiday Inn Express": 3,
          "Walgreens": 3,
          "Walmart": 3,
          "7-Eleven": 3,
          "Chevron Extra Mile": 3,
          "Chipotle Mexican Grill": 2,
          "Safeway Fuel Station": 2,
          "Kaiser Permanente": 2,
          "KFC": 2,
          "Costco": 2,
          "YMCA": 2,
          "Safeway Pharmacy": 2,
          "IHOP": 1,
          "Philz Coffee": 1,
          "BevMo": 1
        },
        "related_same_week_brand": {
          "Chevron": 24,
          "Starbucks": 22,
          "Shell Oil": 21,
          "ARCO": 17,
          "Safeway": 16,
          "In-N-Out Burger": 16,
          "Target": 14,
          "Walmart": 13,
          "Walgreens": 13,
          "7-Eleven": 12,
          "Ross Stores": 11,
          "Kaiser Permanente": 10,
          "Costco": 10,
          "Dollar Tree": 10,
          "Chipotle Mexican Grill": 9,
          "Jack in the Box": 9,
          "Taco Bell": 8,
          "Peet's Coffee and Tea": 8,
          "Valero Energy": 8,
          "Popeyes Louisiana Kitchen": 7
        }
      }
    }
  },
  "extensions": {
    "row_count": 2,
    "version_date": "1635494405__2021_10"
  }
}