7Environmental Stressors and Social Complaints in New York City
Author
Emma Valentina
8 Environmental Stressors and Social Complaints in New York City
Climate change increasingly affects urban environments through flooding, extreme weather, and infrastructure strain. Beyond physical impacts, environmental stressors may influence psychological well-being and social behavior, particularly in dense urban settings such as New York City. Environmental stress theory suggests that chronic exposure to environmental risk can heighten stress, frustration, and conflict within communities.
This project investigates whether environmental risk exposure, measured through flooding-related complaints, is associated with social indicators of anxiety, operationalized as noise complaints across New York City. By utilizing publicly available NYC Open Data, this project demonstrates how open civic data can be used to explore psychological and behavioral patterns at the community level in a reproducible way.
This analysis is framed as a proposal suitable for submission to NYC Open Data Week 2026 and emphasizes transparency, reproducibility, and civic relevance.
8.1 Research Question
How does exposure to environmental risk (measured by flooding complaints) relate to social indicators of anxiety (measured by noise complaints) across New York City boroughs?
8.2 Data Sources
This project uses four datasets from the NYC Open Data Portal:
311 Service Requests (Noise Complaints subset)
311 Service Requests (Flooding-related complaints subset)
E-Designations
Hazard Mitigation Plan - Mitigation Actions Database
Due to the size of the full 311 Service Requests dataset, noise complaint data were accessed via the NYC Open Data API. Smaller supporting datasets were downloaded and imported as Excel files. This mixed-format approach improves efficiency while maintaining transparency and reproducibility.
8.3 Reproducible Workflow
Show the code
library(tidyverse)
Warning: package 'tidyr' was built under R version 4.5.2
Warning: package 'readr' was built under R version 4.5.2
Warning: package 'purrr' was built under R version 4.5.2
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.5
✔ forcats 1.0.1 ✔ stringr 1.6.0
✔ ggplot2 4.0.0 ✔ tibble 3.3.0
✔ lubridate 1.9.4 ✔ tidyr 1.3.1
✔ purrr 1.2.0
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
Show the code
library(lubridate)library(readxl)
Warning: package 'readxl' was built under R version 4.5.2
Show the code
library(httr)library(jsonlite)
Attaching package: 'jsonlite'
The following object is masked from 'package:purrr':
flatten
Show the code
library(knitr)
8.4 Loading Downloaded Excel Datasets
Show the code
library(arrow)
Warning: package 'arrow' was built under R version 4.5.2
Attaching package: 'arrow'
The following object is masked from 'package:lubridate':
duration
The following object is masked from 'package:utils':
timestamp
8.5 Accessing NYC Open Data via API (311 Noise Complaints)
To avoid downloading the full 311 dataset, noise complaints were retrieved using the NYC Open Data API. Only relevant variables and records were requested.
noise_url <-URLencode(paste0("https://data.cityofnewyork.us/resource/erm2-nwe9.json?","$select=unique_key,created_date,complaint_type,borough,city,","x_coordinate_state_plane,y_coordinate_state_plane&","$where=complaint_type LIKE 'Noise%' ","AND created_date >= '2018-01-01T00:00:00'&","$limit=50000"))noise <-get_nyc_data(noise_url)
8.6 Data Cleaning and Preparation
Data were cleaned to ensure consistent borough labeling and proper date formatting. Complaint counts were aggregated at the borough-year level to allow comparisons across time and location.
ggplot(complaints, aes(x = flood_complaints, y = noise_complaints, color = Borough)) +geom_point(size =3, alpha =0.7) +geom_smooth(method ="lm", se =TRUE, color ="black") +scale_color_manual(values =c("MANHATTAN"="#2a9d8f","BROOKLYN"="#264653","BRONX"="#8ac926","QUEENS"="#56c596","STATEN ISLAND"="steelblue" )) +labs(title ="Relationship Between Flooding and Noise Complaints",x ="Flooding Complaints",y ="Noise Complaints" ) +theme_minimal()
`geom_smooth()` using formula = 'y ~ x'
Warning: Removed 58 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 58 rows containing missing values or values outside the scale range
(`geom_point()`).
Figure 8.2: Relationship between flooding complaints and noise complaints across borough-years.
8.11 Statistical Analysis
Show the code
model <-lm(noise_complaints ~ flood_complaints, data = complaints)summary(model)
Call:
lm(formula = noise_complaints ~ flood_complaints, data = complaints)
Residuals:
Min 1Q Median 3Q Max
-1624.4 -1500.7 -1387.5 -242.6 10265.6
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1468.0383 871.8717 1.684 0.104
flood_complaints 0.1217 1.1618 0.105 0.917
Residual standard error: 2819 on 27 degrees of freedom
(58 observations deleted due to missingness)
Multiple R-squared: 0.0004065, Adjusted R-squared: -0.03662
F-statistic: 0.01098 on 1 and 27 DF, p-value: 0.9173
8.12 Results
The regression analysis evaluates whether higher levels of flooding complaints are associated with increased noise complaints. A positive relationship would align with environmental stress theory, suggesting that climate-related disruptions may be linked to heightened social tension and anxiety-related behaviors.
8.13 Discussion
This project demonstrates how climate-related environmental stressors may influence social behavior in urban environments. Flooding represents a tangible, recurring disruption, while noise complaints may reflect increased frustration or conflict within communities. Together, these indicators provide insight into how climate risk may shape everyday social experiences in New York City.
By integrating psychological theory with open civic data, this analysis highlights the value of interdisciplinary approaches to understanding climate impacts.
8.14 Limitations and Future Directions
311 complaint data reflect reporting behavior rather than direct psychological measurement and may vary by access to city services or trust in government. Future work could incorporate demographic or spatial analyses, examine temporal patterns around extreme weather events, or integrate measures of pro-environmental behavior and peer influence.
8.15 Connection to Open Data
This project emphasizes transparency and reproducibility by combining downloaded open datasets with API-based data access. NYC Open Data enables researchers and communities to explore complex environmental and social issues using publicly accessible information, supporting informed decision-making and civic engagement.
8.16 Conclusion
Environmental stressors associated with climate change may have meaningful social and psychological consequences in urban settings. Using NYC Open Data, this project provides a reproducible framework for examining how environmental risk relates to social indicators of anxiety across New York City. These findings underscore the importance of incorporating psychological perspectives into climate resilience planning.