This morning, I had the pleasure of interviewing with Randy Tomes, the Senior Director of Product Strategy and Operations, whose favorite place to get a Jucy Lucy is at Matt’s Bar (the original, of course).
Matt’s Bar in Minneapolis — home of the original Jucy Lucy.
During the interview, I asked him the question “If I was hired today and my start date was a month from now, what skills would you want me to practice to be as best prepared for day 1?” Randy’s answer was “behavioral economics” and since 11am this morning, I have been putting together a behavioral economics analysis using open civic data from NYC.
This short analysis explores whether public campaigns can increase civic engagement through behavioral mechanisms.
In April 2022, the New York City Department of Transportation (DOT) launched a two-week “ Pothole Blitz” — a citywide initiative to repair thousands of potholes in rapid succession.
This study uses NYC’s open 311 data to examine whether citizen pothole reporting behavior changed before, during, and after the Blitz. The data can be found at
Specifically, the analysis asks:
- Did public attention and engagement — measured by the volume of
311 pothole reports — rise during the campaign, and how quickly did that
effect fade afterward?
By analyzing both monthly and weekly patterns, this project illustrates how behavioral economic principles can explain fluctuations in civic participation.
Data were accessed directly through the NYC Open Data API for the 311
Service Requests dataset.
Only Department of Transportation (DOT) pothole-related complaints from
January to December 2022 were retrieved.
The dataset includes the complaint creation and closure dates, agency information, and borough.
endpoint <- "https://data.cityofnewyork.us/resource/erm2-nwe9.json"
# GET request with SoQL filtering
resp <- GET(
endpoint,
query = list(
"$select" = "unique_key,created_date,closed_date,agency,agency_name,descriptor,borough",
"$where" = paste0(
"agency='DOT' AND ",
"descriptor in ('Pothole','Pothole - Tunnel','Pothole - Highway') AND ",
"created_date between '2022-01-01T00:00:00' and '2022-12-31T23:59:59'"
),
"$limit" = 50000,
"$order" = "created_date"
)
)
# Check for errors and convert to data frame
stop_for_status(resp)
dot_potholes_2022 <- fromJSON(content(resp, as = "text", encoding = "UTF-8"), flatten = TRUE) %>%
as_tibble()
To focus on the period surrounding the Pothole Blitz, only records from March through May 2022 were analyzed.
dot_potholes_2022_clean <- dot_potholes_2022 %>%
mutate(
created_date = ymd_hms(created_date),
closed_date = ymd_hms(closed_date),
created_date_clean = floor_date(created_date, "month"),
month_name = month(created_date_clean, label = TRUE, abbr = FALSE),
days_to_close = round(as.numeric(difftime(closed_date, created_date, units = "days")),2)
) %>% filter(
(month_name %in% c("March", "April", "May"))
& (borough !="Unspecified") & (!is.na(borough))
)
To establish a baseline, the number of pothole complaints and average response times were summarized by month.
If the Blitz had a measurable effect, we would expect to see deviations in complaint volume or resolution time in April compared to adjacent months.
monthly_summary <- dot_potholes_2022_clean %>%
group_by(month_name) %>%
summarise(
total_reports = n(),
avg_days_to_close = round(mean(days_to_close, na.rm = TRUE),2),
median_days_to_close = median(days_to_close, na.rm = TRUE)
) %>%
arrange(match(month_name, month.name))
kable(monthly_summary, caption = "DOT Pothole Reports During March–May 2022") %>%
kable_styling(full_width = FALSE, position = "center")
| month_name | total_reports | avg_days_to_close | median_days_to_close |
|---|---|---|---|
| March | 6515 | 3.13 | 1.15 |
| April | 5973 | 4.79 | 2.79 |
| May | 5237 | 4.38 | 2.57 |
ggplot(monthly_summary, aes(x = month_name, y = total_reports, fill=month_name)) +
geom_col() +
labs(
title = "311 Pothole Complaints: March–May 2022",
subtitle = "NYC DOT activity during and after the April 2022 'Pothole Blitz'",
x = "Month", y = "Total Complaints"
) +
theme_minimal()
The monthly view shows that pothole reports steadily declined from March to May. While this broad trend is informative, the campaign itself lasted only two weekends in April — suggesting that a monthly average may obscure short-term behavioral effects. To capture these rapid changes in engagement, we next examine the data at a weekly level.
The following analysis aggregates the data by week to observe
finer-grained changes in citizen reporting.
Weeks were categorized as:
This 6-week window provides a balanced comparison of reporting behavior before, during, and after the intervention.
dot_potholes_weekly <- dot_potholes_2022_clean %>%
mutate(week = floor_date(created_date, "week")) %>%
group_by(week) %>%
summarise(total_reports = n())
dot_potholes_weekly$week<- as.Date(dot_potholes_weekly$week)
dot_potholes_weeks_focus <- dot_potholes_weekly %>%
filter(week >= as.Date("2022-04-03") & week <= as.Date("2022-05-08")) %>%
mutate(period = case_when(
week %in% as.Date(c("2022-04-03", "2022-04-10")) ~ "Pre",
week %in% as.Date(c("2022-04-17", "2022-04-24")) ~ "During",
week %in% as.Date(c("2022-05-01", "2022-05-08")) ~ "Post"
))
kable(favstats(total_reports ~ period, data=dot_potholes_weeks_focus))
| period | min | Q1 | median | Q3 | max | mean | sd | n | missing |
|---|---|---|---|---|---|---|---|---|---|
| During | 1168 | 1220.75 | 1273.5 | 1326.25 | 1379 | 1273.5 | 149.19953 | 2 | 0 |
| Post | 1143 | 1171.50 | 1200.0 | 1228.50 | 1257 | 1200.0 | 80.61017 | 2 | 0 |
| Pre | 1488 | 1514.25 | 1540.5 | 1566.75 | 1593 | 1540.5 | 74.24621 | 2 | 0 |
ggplot(dot_potholes_weeks_focus, aes(x = week, y = total_reports, color = period, group = 1)) +
geom_line(size = 1.2) +
geom_point(size = 3) +
geom_vline(xintercept = as.Date("2022-04-17"), linetype = "dashed", color = "red") +
geom_vline(xintercept = as.Date("2022-04-30"), linetype = "dashed", color = "red") +
scale_color_manual(values = c("Pre" = "#1B9E77", "During" = "#D95F02", "Post" = "#7570B3")) +
labs(
title = "311 Pothole Complaints Before, During, and After NYC’s April 2022 'Pothole Blitz'",
subtitle = "Spike during campaign weeks followed by decline — a classic salience and temporal decay effect",
x = "Week Starting",
y = "Total 311 Reports",
color = "Period"
) +
theme_minimal(base_family = "serif") +
theme(
plot.title = element_text(size = 18, face = "bold"),
plot.subtitle = element_text(size = 12),
axis.title = element_text(size = 12),
axis.text = element_text(size = 10),
legend.position = "bottom"
)
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
### Behavioral Interpretation
The chart reveals several key behavioral dynamics:
Anticipatory Engagement:
Reports were elevated in the two weeks leading up to the Blitz, possibly
due to early media coverage or public anticipation of road
repairs.
Crowding-Out Effect:
As DOT crews actively repaired potholes, reports briefly declined,
suggesting that citizens reduced reporting when they believed the
government was already addressing the issue.
Renewed Salience:
Reporting spiked again in the second Blitz week, aligning with public
announcements of additional repairs.
Temporal Decay:
Once the campaign concluded, complaints dropped sharply, indicating that
the engagement boost was short-lived — a classic case of
temporal decay of salience observed in behavioral
economics.
Together, these results show that while public campaigns can temporarily boost awareness and engagement, sustained behavior change may require repeated prompts or ongoing visibility.
This case study demonstrates how behavioral economics concepts can be
applied to real-world civic data.
The April 2022 “Pothole Blitz” shows that while awareness campaigns
drive short-term engagement, the effect fades quickly — highlighting the
importance of recurring visibility and reinforcement.
For product strategy and analytics teams, this type of rapid behavioral pulse-check can guide when and how to re-engage users most effectively.