Back
Guides›Event Impact Analysis›A Tuesday at Fiserv Forum
USA

A Tuesday at Fiserv Forum

This example shows how to run event impact analysis for the district around Fiserv Forum in Milwaukee. Tuesday 27 October 2026 is one date in the Deer District series around the Brewers' World Series. Tuesday 20 October is its baseline: a matching Tuesday with no event at the Forum. A baseline can also be a different kind of event; this pair is the quiet Tuesday.

Daily visits are visitation_usa_places.area_foot_traffic_day, the area model on these places. The district is the places, brands, and categories in a few blocks and a 400 meter radius. Brady Street is the control.

For this we use our US Places metrics, queried from Python. The helper below is all the setup the example needs:

import os
import requests
import numpy as np
import pandas as pd

API = "https://api.pine59.com/v3/datasets"
HEADERS = {"Authorization": f"Bearer {os.environ['PINE59_API_KEY']}"}

def run_query(dataset, body):
    rows, token = [], ""
    while True:
        r = requests.post(
            f"{API}/{dataset}:runQuery",
            json={**body, "pageToken": token},
            headers=HEADERS,
        )
        r.raise_for_status()
        payload = r.json()
        rows += [rec["fields"] for rec in payload.get("records", [])]
        token = payload.get("nextPageToken", "")
        if not token:
            return rows

def search_values(dataset, field, term):
    r = requests.post(
        f"{API}/{dataset}:searchFieldValues",
        json={"field": {"name": field}, "term": term},
        headers=HEADERS,
    )
    r.raise_for_status()
    return r.json().get("values", [])

EVENT = "2026-10-27"
BASELINE = "2026-10-20"
# One date, one baseline. For a series, give each date its own pair and take
# the median, or sum the event dates and the baseline dates as one.
# The October quarter is not published yet. The venue profile uses the last
# full basketball quarter.
PROFILE = "2026-01-01"

1. The arena on the two Tuesdays

Find the building, then pull its daily visits for the two dates. location_id is the Placekey. The arena, not a team office or a shop inside it, is zzy-222@5sc-cr4-w49.

for name in search_values("visitation_usa_places.places", "location_name", "Fiserv Forum"):
    print(name)

FORUM = "zzy-222@5sc-cr4-w49"
forum = run_query("visitation_usa_places.places", {
    "fields": [
        {"name": "location_id"},
        {"name": "location_name"},
        {"name": "street_address"},
        {"name": "latitude"},
        {"name": "longitude"},
    ],
    "filters": [{"fieldName": "location_id", "operator": "==", "value": FORUM}],
})[0]
forum_lat, forum_lon = float(forum["latitude"]), float(forum["longitude"])
print(forum["location_name"], forum["street_address"])

def daily(ids):
    ids = list(dict.fromkeys(ids))
    rows = []
    for i in range(0, len(ids), 150):
        rows += run_query("visitation_usa_places.area_foot_traffic_day", {
            "fields": [
                {"name": "location_id"},
                {"name": "observation_start_date"},
                {"name": "visits_sum"},
            ],
            "filters": [
                {"fieldName": "location_id", "operator": "in", "values": ids[i:i + 150]},
                {"fieldName": "observation_start_date", "operator": "in",
                 "values": [EVENT, BASELINE]},
            ],
            "pageSize": 10000,
        })
    df = pd.DataFrame(rows)
    if df.empty:
        return df
    df["visits"] = df["visits_sum"].astype(float)
    return df

arena = daily([FORUM]).pivot(
    index="location_id", columns="observation_start_date", values="visits"
)
print(arena)
print("arena index", float(arena[EVENT].iloc[0] / arena[BASELINE].iloc[0]))
20 Oct (baseline)27 Oct (event)Index
Fiserv Forum2,49411,2274.5

How to read it: the index is visits on 27 October divided by visits on 20 October. The arena was 4.5 times a Tuesday with no event in the building. This is the first of the three numbers. The district and the control come next, in the same units.

Why this Tuesday. The baseline here is a Tuesday with no event at the Forum. Friday 16 October was Zach Top, and Saturday 17 was Weird Al: those are a different type of event, so they are a different comparison, not this quiet pair. Monday 19 also had no Forum event. American Family Field is a separate place: its NLCS games were on 12 October, inside the visit-length week and not on this pair. Watch for other happenings in the district on either Tuesday.

2. Deer District and Brady Street

The district can be a few blocks, a radius, or a short list of streets, places, brands, or categories. Here it is bars, restaurants, hotels, and retail, as catalog values confirmed with :searchFieldValues. The category indexes use every matching place within 400 meters of the arena. The bar block and the control are two boxes of about the same size: the frontage immediately east of the arena, and a corridor on E Brady Street. Brady Street is far enough from the arena that this series should not be what moves it.

A place that is open or closed on only one of the two Tuesdays stays out. The two sides of the ratio are then the same places, changing relative to each other.

CATEGORIES = {
    "Drinking Places (Alcoholic Beverages)": "bars",
    "Full-Service Restaurants": "restaurants",
    "Limited-Service Restaurants": "restaurants",
    "Snack and Nonalcoholic Beverage Bars": "restaurants",
    "Hotels (except Casino Hotels) and Motels": "hotels",
}
RETAIL = [
    "Clothing Stores",
    "Shoe Stores",
    "Sporting Goods, Hobby, and Musical Instrument Stores",
    "Department Stores",
    "General Merchandise Stores, including Warehouse Clubs and Supercenters",
    "Grocery Stores",
    "Health and Personal Care Stores",
    "Beer, Wine, and Liquor Stores",
    "Electronics and Appliance Stores",
    "Used Merchandise Stores",
    "Office Supplies, Stationery, and Gift Stores",
]
# Bar block immediately east of the arena, and the Brady Street control.
DEER = {"lon": (-87.91530, -87.91420), "lat": (43.04440, 43.04565)}
BRADY = {"lon": (-87.89560, -87.89340), "lat": (43.05205, 43.05395)}

places = pd.DataFrame(run_query("visitation_usa_places.places", {
    "fields": [
        {"name": "location_id"},
        {"name": "location_name"},
        {"name": "brands"},
        {"name": "top_category"},
        {"name": "sub_category"},
        {"name": "latitude"},
        {"name": "longitude"},
        {"name": "street_address"},
    ],
    "filters": [
        {"fieldName": "sub_category", "operator": "in", "values": list(CATEGORIES)},
        {"fieldName": "top_category", "operator": "in", "values": RETAIL},
        {"fieldName": "city", "operator": "==", "value": "Milwaukee"},
    ],
    "filterLogic": "($0 OR $1) AND $2",
    "pageSize": 10000,
})).astype({"latitude": float, "longitude": float})
places = places[places.location_id != FORUM].copy()
places["group"] = places.sub_category.map(CATEGORIES)
places.loc[places.group.isna() & places.top_category.isin(RETAIL), "group"] = "retail"
places = places.dropna(subset=["group"])

def km_between(lat1, lon1, lat2, lon2):
    lat1, lon1, lat2, lon2 = map(np.radians, (lat1, lon1, lat2, lon2))
    a = (np.sin((lat2 - lat1) / 2) ** 2
         + np.cos(lat1) * np.cos(lat2) * np.sin((lon2 - lon1) / 2) ** 2)
    return 6371.0 * 2 * np.arcsin(np.sqrt(a))

def in_box(df, box):
    return df[df.longitude.between(*box["lon"]) & df.latitude.between(*box["lat"])]

places["km"] = km_between(forum_lat, forum_lon, places.latitude, places.longitude)
nearby = places[places.km <= 0.4]
deer = in_box(places, DEER)
brady = in_box(places, BRADY)
print("within 400 m")
print(nearby.group.value_counts())
print("Deer District block", deer.group.value_counts().to_dict())
print("Brady Street", brady.group.value_counts().to_dict())

day = daily(pd.concat([nearby, deer, brady]).location_id.unique())

def paired(part):
    """Drop places that are open or closed on only one of the two days."""
    if part.empty:
        return pd.DataFrame(columns=[EVENT, BASELINE])
    wide = (part.pivot(index="location_id", columns="observation_start_date", values="visits")
            .reindex(columns=[EVENT, BASELINE])
            .dropna())
    return wide[(wide[EVENT] > 0) & (wide[BASELINE] > 0)]

def category_index(members):
    rows = []
    sub = day[day.location_id.isin(members.location_id)] if not day.empty else day
    for group, ids in members.groupby("group").location_id:
        part = sub[sub.location_id.isin(set(ids))] if not sub.empty else sub
        wide = paired(part)
        if wide.empty:
            rows.append({"group": group, "places": 0, "index": np.nan, "median_place": np.nan})
            continue
        event = wide[EVENT].sum()
        base = wide[BASELINE].sum()
        rows.append({
            "group": group,
            "places": int(len(wide)),
            "index": event / base,
            "median_place": (wide[EVENT] / wide[BASELINE]).median(),
        })
    return pd.DataFrame(rows).set_index("group")

print("Deer District bars")
print(category_index(deer[deer.group == "bars"]).round(2))
print("Brady Street")
print(category_index(brady).round(2))
print("categories within 400 m")
print(category_index(nearby).round(2))

Deer District bars (the block east of the arena) and Brady Street (the control):

20 Oct27 OctIndex
Deer District bars1,43912,4638.7
Brady Street2,2253,4541.6

Categories within 400 m of the arena, outside the building:

CategoryPlaces20 Oct27 OctIndex
Bars386,93931,5244.5
Restaurants6310,16436,8843.6
Retail224,16921,6275.2
Hotels73,8709,6602.5

How to read it: put the arena (4.5) beside the Deer District bars (8.7) and beside Brady Street (1.6). The bar block moved by more than the arena, and by more than Brady Street, so the series showed up east of the building rather than as a busy Tuesday across this part of the city. Every 400 m category is also above Brady Street. Hotels moved the least of the four. The sum can be one large place. The median place says whether the block moved with it.

The total and the median count the same places: a place with visits on both Tuesdays. A store that is open or closed on only one of the two days stays out. Its visits would otherwise land on only one side of the ratio.

3. Who comes to the arena, across the quarter

Trade areas, visitor demographics, and visitor profiles are quarterly. The quarter that contains this Tuesday is not published yet, so the profile is January–March 2026, the last full basketball quarter. The home trade area counts a person from their home ZIP, and the shares below are that quarter's catchment.

trade = pd.DataFrame(run_query("visitation_usa_places.trade_area_zip", {
    "fields": [
        {"name": "trade_area_location_id"},
        {"name": "people_fraction"},
    ],
    "filters": [
        {"fieldName": "location_id", "operator": "==", "value": FORUM},
        {"fieldName": "trade_area_type", "operator": "==", "value": "HOME"},
        {"fieldName": "observation_start_date", "operator": "==", "value": PROFILE},
    ],
    "pageSize": 10000,
})).astype({"people_fraction": float})

zips = pd.read_csv(
    "https://www2.census.gov/geo/docs/maps-data/data/gazetteer/2020_Gazetteer/2020_Gaz_zcta_national.zip",
    sep="\t", dtype={"GEOID": str},
)
zips.columns = zips.columns.str.strip()
zips = zips.rename(columns={
    "GEOID": "trade_area_location_id", "INTPTLAT": "zip_lat", "INTPTLONG": "zip_lon",
})
rows = trade.merge(
    zips[["trade_area_location_id", "zip_lat", "zip_lon"]], on="trade_area_location_id",
)
rows["km"] = km_between(forum_lat, forum_lon, rows.zip_lat, rows.zip_lon)
rows["band"] = pd.cut(
    rows.km, [0, 8, 25, 80, np.inf],
    labels=["Under 8 km", "8–25 km", "25–80 km", "80 km and over"],
)
print((rows.groupby("band", observed=True).people_fraction.sum()
       / rows.people_fraction.sum()).round(2))
ordered = rows.sort_values("km")
median_km = ordered.loc[
    ordered.people_fraction.cumsum() >= ordered.people_fraction.sum() / 2, "km"
].iloc[0]
print(f"median home distance {median_km:.0f} km")

ZIP fractions are reported down to a floor, so they sum to less than one. The shares above are of the ZIPs that matched a Census ZCTA. The same caveat is in how far visitors travel.

Demographics and the visitor profile use the same quarter and the same location. census_visitor_demographics returns age, income, education, gender, and race shares. spatialai_visitor_profile returns a share per segment family.

demo = run_query("visitation_usa_places.census_visitor_demographics", {
    "fields": [
        {"name": "people_fraction_age_18_29"},
        {"name": "people_fraction_age_30_39"},
        {"name": "people_fraction_income_125k_and_above"},
    ],
    "filters": [
        {"fieldName": "location_id", "operator": "==", "value": FORUM},
        {"fieldName": "observation_start_date", "operator": "==", "value": PROFILE},
    ],
})
print(demo[0])

profile = pd.DataFrame(run_query("visitation_usa_places.spatialai_visitor_profile", {
    "fields": [{"name": "segment_family"}, {"name": "people_fraction"}],
    "filters": [
        {"fieldName": "location_id", "operator": "==", "value": FORUM},
        {"fieldName": "observation_start_date", "operator": "==", "value": PROFILE},
    ],
    "options": {"orderBy": {"fieldName": "people_fraction", "direction": "DESC"}},
    "pageSize": 5,
})).astype({"people_fraction": float})
print(profile)

January–March 2026, the last full basketball quarter:

Share
Age 18–2948%
Young professionals59%
Income $125k and above16%

How to read it: census mix and the leading lifestyle segment are the basketball quarter's visitor. They are the profile of the building. The Tuesday is sections 1, 2, and 5.

4. Rank brands inside each category

Visitor journey for October is the month that contains the Tuesday. Inflow is the stop before the visit and Outflow is the stop after it, the same split as the H-E-B store profile. Each brand's share is of the names kept in its category. The query is grouped to brands for one venue, so the result is a brand list. Empty related_brands means an unbranded place, and the filter hides those rows. A brand is kept when the Milwaukee places already put it in one of the four groups.

TOP = [
    "Drinking Places (Alcoholic Beverages)",
    "Restaurants and Other Eating Places",
    "Traveler Accommodation",
    *RETAIL,
]
brand_group = (places.dropna(subset=["brands"])
               .groupby("brands")["group"]
               .agg(lambda s: s.mode().iloc[0]))

journeys = pd.DataFrame(run_query("visitation_usa_places.visitor_journey", {
    "fields": [
        {"name": "flow_direction"},
        {"name": "related_brands"},
        {"name": "related_top_category"},
        {"name": "total_journey_fraction", "aggregation": "AVG"},
    ],
    "filters": [
        {"fieldName": "location_id", "operator": "==", "value": FORUM},
        {"fieldName": "related_top_category", "operator": "in", "values": TOP},
        {"fieldName": "related_brands", "operator": "not in", "values": [""]},
        {"fieldName": "observation_start_date", "operator": ">=", "value": "2026-10-01"},
        {"fieldName": "observation_start_date", "operator": "<", "value": "2026-11-01"},
    ],
    "groupBy": [
        {"fieldName": "flow_direction"},
        {"fieldName": "related_brands"},
        {"fieldName": "related_top_category"},
    ],
    "pageSize": 10000,
}))
journeys["fraction"] = journeys["total_journey_fraction_AVG"].astype(float)
journeys["group"] = journeys.related_brands.map(brand_group)
journeys = journeys.dropna(subset=["group"])

def category_shares(frame):
    out = []
    for (_, direction), part in frame.groupby(["group", "flow_direction"]):
        part = part.sort_values("fraction", ascending=False).head(4).copy()
        part["share"] = part.fraction / part.fraction.sum()
        out.append(part)
    return pd.concat(out)

ranked = category_shares(journeys)
print(ranked[["group", "flow_direction", "related_brands", "share"]]
      .sort_values(["group", "flow_direction", "share"], ascending=[True, True, False])
      .to_string(index=False))

How to read it: each direction sums to one across the names that direction shows. A name that leads both ways is a name to carry onto the Tuesday. A place that is not the category meant is dropped here, before it reaches the event-day table.

5. Those brands on the Tuesday

The names come from both directions, in one list per category. Each figure is that brand's visits on 27 October divided by its visits on 20 October, summed across its places within 400 meters that have visits on both days. A place open or closed on only one Tuesday stays out. The journey chose the brands. The Tuesday is one comparison.

chosen = ranked.related_brands.unique()
members = nearby[nearby.brands.isin(chosen)]
brand_day = daily(members.location_id)
brand_day = brand_day.merge(
    members[["location_id", "brands", "group"]], on="location_id",
)

rows = []
for (group, brand), part in brand_day.groupby(["group", "brands"]):
    wide = paired(part)
    event = wide[EVENT].sum() if not wide.empty else 0
    base = wide[BASELINE].sum() if not wide.empty else 0
    rows.append({
        "group": group,
        "brand": brand,
        "places": int(len(wide)),
        "event": event,
        "baseline": base,
        "index": event / base if base else np.nan,
    })
print(pd.DataFrame(rows).sort_values(["group", "index"], ascending=[True, False])
      .to_string(index=False))

How to read it: one row per brand, ordered by the index inside its category, read next to section 2. A brand index well above 1, in a category whose 400 meter index is above 1 and whose Brady Street index is near 1, is a brand that caught the series Tuesday.

Visit length stays out of this comparison. It is published by week, and the week of 11 October contains the NLCS at American Family Field, Zach Top, and Weird Al. That week is not an empty baseline.

Did you find what you were looking for?