AI generated this tutorial and its example. The calendar details and code were checked.

Search for Palafox Market in Pensacola and you’ll find more than one correct answer. On Wednesday, December 2, 2026, the holiday market runs from 4 to 8 p.m. Central at Martin Luther King Jr. Plaza. On Saturday, December 5, the regular market runs from 9 a.m. to 2 p.m. Central at that same plaza and at Plaza Ferdinand. One title can send a visitor to the right place on the wrong day. One title and one date can still send them to the wrong end of Palafox Street. Holiday schedule · Saturday schedule · Wayfind’s downtown holiday guide

Give each venue and session its own identity

For a calendar that displays each venue separately, assign stable IDs to the event series and each venue. Group listings by those two IDs and the scheduled local start. Keep the original source references together under each occurrence so you can trace where its details came from. If your product shows one market card with two venues, it can group those entries for display after the data has been checked.

Use the event name to find possible matches during import. Make the actual merge only after the series and venue have been resolved. Calendar entries sometimes omit the start or use an unfamiliar venue name. Keep those entries separate until the missing detail is confirmed. A false duplicate is easier to fix when the original evidence is still there.

Put both failure modes in the same test

This Python example uses three verified schedule entries and one invented duplicate import. The IDs are illustrative. All starts are local to Pensacola, so they share the same time zone. In a wider calendar, retain the venue’s time zone alongside each local start and check the intended offset before matching ambiguous times.

from collections import defaultdict from datetime import date, datetime records = [ ("palafox", "mlk-plaza", "2026-12-02 16:00", "winterfest", "holiday-dec2"), ("palafox", "mlk-plaza", "2026-12-02 16:00", "sample-import", "row-418"), ("palafox", "mlk-plaza", "2026-12-05 09:00", "visit-pensacola", "regular-dec5-north"), ("palafox", "plaza-ferdinand", "2026-12-05 09:00", "visit-pensacola", "regular-dec5-south"), ] occurrences = defaultdict(set) for series, venue, local_start, source, source_ref in records: key = series, venue, datetime.fromisoformat(local_start) occurrences[key].add((source, source_ref)) assert len(occurrences) == 3 wednesday = "palafox", "mlk-plaza", datetime(2026, 12, 2, 16) assert len(occurrences[wednesday]) == 2 saturday_venues = { venue for _, venue, start in occurrences if start.date() == date(2026, 12, 5) } assert saturday_venues == {"mlk-plaza", "plaza-ferdinand"} 

Leave room for corrections

A start time is useful for matching imports, but it can change. Give the saved occurrence its own durable ID. If the organizer moves a session and its feed keeps the same source ID, use that reference to update the existing occurrence. Keep any venue changes and old times in the history so you can explain what happened. Without a stable source reference, a changed time may need review before you decide whether it is a reschedule or another session.

Test the merge in both directions. A duplicate reference should add evidence to an existing occurrence. A new date or venue should still turn up when a visitor filters the calendar. The tests above capture both outcomes with a schedule someone can actually use.