\documentclass[10pt]{article}

\usepackage{fullpage}
\usepackage{setspace}
\usepackage{parskip}
\usepackage{titlesec}
\usepackage[section]{placeins}
\usepackage{xcolor}
\usepackage{breakcites}
\usepackage{lineno}
\usepackage{hyphenat}





\PassOptionsToPackage{hyphens}{url}
\usepackage[colorlinks = true,
            linkcolor = blue,
            urlcolor  = blue,
            citecolor = blue,
            anchorcolor = blue]{hyperref}
\usepackage{etoolbox}
\makeatletter
\patchcmd\@combinedblfloats{\box\@outputbox}{\unvbox\@outputbox}{}{%
  \errmessage{\noexpand\@combinedblfloats could not be patched}%
}%
\makeatother


\usepackage[round]{natbib}
\let\cite\citep




\renewenvironment{abstract}
  {{\bfseries\noindent{\abstractname}\par\nobreak}\footnotesize}
  {\bigskip}

\titlespacing{\section}{0pt}{*3}{*1}
\titlespacing{\subsection}{0pt}{*2}{*0.5}
\titlespacing{\subsubsection}{0pt}{*1.5}{0pt}


\usepackage{authblk}


\usepackage{graphicx}
\usepackage[space]{grffile}
\usepackage{latexsym}
\usepackage{textcomp}
\usepackage{longtable}
\usepackage{tabulary}
\usepackage{booktabs,array,multirow}
\usepackage{amsfonts,amsmath,amssymb}
\providecommand\citet{\cite}
\providecommand\citep{\cite}
\providecommand\citealt{\cite}
% You can conditionalize code for latexml or normal latex using this.
\newif\iflatexml\latexmlfalse
\providecommand{\tightlist}{\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}%

\AtBeginDocument{\DeclareGraphicsExtensions{.pdf,.PDF,.eps,.EPS,.png,.PNG,.tif,.TIF,.jpg,.JPG,.jpeg,.JPEG}}

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}










\begin{document}

\title{311 Noise Complaints - Gowanus 2010 - 2017}



\author[1]{Sarah Schoengold}%
\affil[1]{NYU Center for Urban Science \& Progress}%


\vspace{-1em}



  
  \date{May 07, 2024}


\begingroup
\let\center\flushleft
\let\endcenter\endflushleft
\maketitle
\endgroup








\sloppy


\section*{Introduction}

{\label{686780}}

I lived in the Gowanus neighborhood of Brooklyn before the Whole Foods
and before the
\href{https://www.nytimes.com/2014/06/13/nyregion/kentile-floors-sign-stalwart-remnant-of-a-grittier-brooklyn-is-coming-down.html}{Kentile
Floors} sign came down. Today, on the eve of an environmental clean
up~from the EPA\cite{history}, the neighborhood is rapidly
gentrifying. The changes in the built environment are quite striking. In
addition to construction introducing new housing stock, the neighborhood
is investing in green space, making efforts to beautify the Superfund
site. With so much~change, arguably good and bad, I'm interested in how
the neighborhood has voiced their concerns over time.

\par\null

311 is the non-emergency call system that allows citizens to report
issues in their neighborhood. Since its origin, it's been a quick
snapshot of a region's pulse. Specifically, noise complaints have been
used as one proxy to help understand gentrification. It speaks to the
increase in people/parties, but also to those who use the call line to
report noise: those who are potentially less familiar with the baseline
sounds of the neighborhood.\cite{gentrification}

\par\null

By looking at noise complaints in 311 data from 2010 - 2017, I hope to
identify how --- if at all --- complaints in Gowanus deviate from
Brooklyn's overall distribution. What can this data-driven story tell us
how when the neighborhood changed, and what does the trend mean for the
future of my favorite Brooklyn neighborhood?~

\par\null

\section*{The data~}

{\label{230138}}

The 311 dataset is available on OpenDataNYC from 2010 to
present\cite{data}. I worked with data from Brooklyn only, and
filtered to the four distinct types of noise complaints include:

\begin{itemize}
\tightlist
\item
  Noise - general
\item
  Noise - Residential
\item
  Noise - Commercial
\item
  Noise - Street/Sidewalk
\end{itemize}

Filtering using these complaint types, I was left with 664,116 calls
over the years to work with.~

\par\null

\subsection*{Isolating Gowanus}

{\label{265279}}

Identifying calls that took place in Gowanus required some data munging.
The location designations available in the 311 dataset is not granular
enough to look at the neighborhood on its own. If we were to look at
Community Board 6, for example, we could work with Gowanus data, but it
would also contain information about Park Slope, which would contaminate
our analysis.

\par\null

First,~ I combined the lat and long provided in each call, and used the
shapely package to convert them to the appropriate geometry, and to a
geodataframe. This ensured that the lat/longs were meaningful, tied to a
real geographic projection.

\par\null

\texttt{brooklyn{[}\textquotesingle{}lonlat\textquotesingle{}{]}\ =\ zip(brooklyn{[}\textquotesingle{}Longitude\textquotesingle{}{]},\ brooklyn{[}\textquotesingle{}Latitude\textquotesingle{}{]})}

\texttt{brooklyn{[}\textquotesingle{}geometry\textquotesingle{}{]}\ =\ brooklyn{[}{[}\textquotesingle{}lonlat\textquotesingle{}{]}{]}.applymap(lambda\ x:shapely.geometry.Point(x))}

\texttt{geometry\ =\ brooklyn.geometry}

\texttt{crs\ =\ \{\textquotesingle{}init\textquotesingle{}:\ \textquotesingle{}epsg:4326\textquotesingle{}\}}

\texttt{brooklyn\ =\ GeoDataFrame(brooklyn,\ crs=crs,\ geometry=geometry)}

\par\null

Next, I created a polygon for Gowanus, latitude and longitude points
that I picked to identify my neighborhood of interest. From there, I
used a for loop with the~\texttt{contains()} function to ask if each of
the recorded calls' location fell within the area I'd identified as
Gowanus, which resulted in a boolean array. I added the array to the
dataframe as a column, and used it to create a new dataframe
where:~~\texttt{gowanus\ =\ brooklyn{[}brooklyn{[}\textquotesingle{}is\_gowanus\textquotesingle{}{]}\ ==\ True{]}}

\par\null

At the end of this spatial analysis exercise, my Gowanus dataframe had
7,262 rows.

\par\null

\subsection*{Cleaning and new features}

{\label{519154}}

The key columns from the larger 311 dataset include features like
location data, unique keys, and descriptors for each complaint type.
Outside of the geometry data I created in order to isolate calls in the
neighborhood, I created new datetime columns for year and month (for
easier groupings in the analysis).

\par\null

\section*{Exploratory analysis}

{\label{759984}}

I grouped data by year and complaint type in order to visualize the data
over time. The plots below show how Brooklyn and Gowanus complaints have
evolved.~

\par\null\selectlanguage{english}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=0.70\columnwidth]{figures/BK-complaints-stacked/BK-complaints-stacked}
\caption{{This stacked bar plot shows the steady increase of noise complaints in
all of Brooklyn via 311, from 2010 to 2017 to date. Notice that overall,
``Residential'' noise has the most complaints consistently.~
{\label{221399}}%
}}
\end{center}
\end{figure}\selectlanguage{english}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=0.70\columnwidth]{figures/Gowanus-complaints-stacked/Gowanus-complaints-stacked}
\caption{{This stacked bar plot shows the steady increase of noise complaints in
the Gowanus area specifically over the same period of time as Fig. 1.
Instead of Residential noise, the Gowanus area has the majority of calls
regarding Commercial noise, shown in gray. The amount of calls seems to
expand to be the majority of all noise calls in 2016 especially, a
pattern distinct from Brooklyn overall.~
{\label{951877}}%
}}
\end{center}
\end{figure}

These two plots show the same general trend of increasing calls overall
throughout the years, but do deviate from each other in terms of the
types of noise complaints coming in. This is worth investigating
further.~

\par\null

\section*{Testing for Stationarity: Unit Root
Tests}

{\label{342728}}

In order to understand if the trends are stationary or if they change
over time, I worked with time series data to identify unit roots.~

\par\null

\subsection*{Using rolling means to visually assess
stationarity}

{\label{572221}}

First, I created a timeseries column ``ts'' which extracted the month
and year for calls. Grouping by this new metric, I was able to create a
count of noise complaint call per month since 2010. Because there are
relatively few months worth of data (fewer than 100), it may be possible
to view these trends visually. The following plots show the data over
time, with a rolling mean window of 10.~

\par\null\par\null\selectlanguage{english}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=1.00\columnwidth]{figures/complaints-by-month-bk-gw/complaints-by-month-bk-gw}
\caption{{These plots show the volume of complaints over time, by moth, in Gowanus
and Brooklyn respectively from 2010 to Dec 2017. Notice that the general
trends of the rolling means follow roughly the same pattern, steadily
increasing as time goes on. The Brooklyn plot appears to have more
regular seasonality, while the Gowanus plot has a few interesting spikes
that may be interesting in spring/summer of 2014. In 2017, there's
another spike in the winter that doesn't seem to be reflected in the
overall Brooklyn plot.~
{\label{629924}}%
}}
\end{center}
\end{figure}

It wasn't entirely clear visually if the overall trends differed after
plotting the time series data. To dig further requires normalizing the
Gowanus call data, and using stationarity tests to determine if Gowanus
is stationary, or if it has a unit root.~

\par\null

\subsection*{AD Fuller Tests for
Stationarity~}

{\label{704436}}

First, I made the Gowanus data a ratio. Instead of using the total
number of noise complaints which increase over time, I looked at the
percentage of noise complaints from Gownaus, compared to the rest of
Brooklyn.

\par\null\selectlanguage{english}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=0.70\columnwidth]{figures/ratio-gowanus-complaints/ratio-gowanus-complaints-(1)}
\caption{{This plot shows the percentage of noise complaints in Gowanus, compared
to the rest of Brooklyn. You'll notice that the plot seems pretty steady
over time, with a few potential points of change in 2016 and 2017.~
{\label{589556}}%
}}
\end{center}
\end{figure}

Using this normalized data, we can really get to the core of our
question about neighborhood change (or, 311 noise complaint behavior). I
chose to use an AD Fuller test to assess stationarity. The AD Fuller
test's null hypothesis is that there's a unit root, meaning there is not
stationarity. If we can reject the null, it generally means the data is
stationary\cite{documentation}.

\par\null

~\texttt{sm.tsa.adfuller(station\_gw{[}\textquotesingle{}ratio\textquotesingle{}{]}){[}1{]})}

\par\null

The one-line test resulted in a p-value of 0.00132. We can reject the
null. Although there are visual changes, this data is stationary. When
looking at just the past few years, the p-value remained close to zero,
also denoting stationarity.

\par\null

\subsection*{Commercial Noise
Complaints}

{\label{530611}}

Seeing the results of the stationarity test was a bit surprising, but it
may not tell the full story. One larger deviation from our exploratory
analysis showed that there were large deviations in noise complaint
subdivisions. To look at these in particular, I duplicated the analysis,
looking at only Commercial noise complaints.~

\par\null\par\null\selectlanguage{english}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=0.70\columnwidth]{figures/ratio-gowanus-complaints-commercial/ratio-gowanus-complaints-commercial}
\caption{{This plot looks at the percentage of commercial noise complaints over
time in the Gowanus area. Unlike all noise complaints over time, this
plot show what appears to be major deviation in the past few years.
{\label{834580}}%
}}
\end{center}
\end{figure}

When looking at commercial noise in isolation, there appears to be a
distinct spike in 2016 and 2017. When conducting the AD Fuller test for
the past five years in particular, we get a~\textbf{p-value of 0.0541}.
Here, we cannot reject the null, meaning these data are not stationary.
~

\par\null

\section*{Limitations and conclusion}

{\label{668338}}

The results of our tests show that while these noise complaint data are
stationary overall, they are not stationary for certain complaint types
within Gowanus. The top Descriptor for ``Noise - Commercial'' is ``Loud
Music/Partying.'' This could mean that as the neighborhood gentrified,
there have been more loud parties that disturb residents.

\par\null

However, all it really means for sure is that more people are calling
about the loud parties. This brings up an interesting limitation of this
study, that gets at the core of our original question: there is known
bias in 311 reporting, including studies that investigate the ratio of
reports to actual violations\cite{pk6zdd}. Although it's hard to
draw concrete conclusions from the data due to its bias, we can still
use this data driven anecdote to support ``there goes the neighborhood''
claims.~

\par\null

Next steps on this project would be to investigate if there are any
points of change (areas that deviate over 3 sigma from the mean), and
two sample KS Tests to look at commercial noise in particular to see if
they come from the same distributions the larger Brooklyn.~

\selectlanguage{english}
\FloatBarrier
\bibliographystyle{plainnat}
\bibliography{bibliography/converted_to_latex.bib%
}

\end{document}

