How Hip are Brooklyn Neighborhoods?

IBM Data Science Capstone Project

Joseph Wheeler
6 min readFeb 2, 2021

Introduction

Brooklyn NY is notoriously (sometimes comically) hip — known for hot yoga studios, elusive speakeasies and overpriced coffee. But Brooklyn is a big place with a myriad of different neighborhoods. For this project, I explored how we can use data to identify which neighborhoods in Brooklyn offer the highest number of Hipster-amenities.

If you aren’t familiar, you can read more about Hipsters here.

The output from this project could be used by prospective renters looking for an archetypical Brooklyn experience, or real estate agents hoping to most effectively promote properties in these areas. Personally, as a hipster who has lived in Brooklyn for the past 7 years, I want to use data to see if I can validate some existing stereotypes and understand, empirically, which neighborhoods are the hippest in Brooklyn.

Data Sources

To undertake this investigation, I leveraged two data sources:

  • NYC Neighborhood Data.newyork_data.json’ provides a comprehensive list of neighborhoods in New York that includes their Boroughs and Latitude and Longitude.
  • The Foursquare API. I can pull information about adjacent venues from ‘api.foursquare.com’.

The following analysis was completed in Python on a Jupyter Notebook using the pandas, numpy, geopy, seaborn, and matplotlib libraries as well as folium for visualizing geospatial data. You can download the notebook here to view the original code.

The NYC Neighborhood Data from newyork_data.json’ contains data on all neighborhoods in New York. Since I will only be looking at Brooklyn, I started by dropping neighborhoods in all other boroughs.

Left: original data. Right: Brooklyn-only.

Before moving into exploratory analysis, I mapped the cleaned Brooklyn data using folium to ensure it was correct formatted.

Brooklyn Neighborhood data mapped with folium

Lastly, I connected my notebook to the Foursquare API to pull relevant data about venues in Brooklyn. Foursquare’s powerful API contains information like venue addresses, venue category, customer rating and reviews.

Sample of Foursquare data, cleaned to only include name, category and lat / long location.

Methodology

With data from Foursquare and our NYC database imported and cleaned up, I started exploratory analysis. This would include identifying the neighborhoods with the highest number of hipster amenities, ranking them, and comparing them to the average Brooklyn neighborhood to gauge significance. To do this, I started by creating a function that used the Foursquare API to identify how many venues were near each neighborhood in Brooklyn based on their recorded lat/long position.

Part of the ‘getNearbyVenues’ function

I ran that function on all neighborhoods in Brooklyn, then create a dataframe counting the number of venues in each neighborhood per Venue Category (e.g. Bank, Coffee Shop, Library, etc…). To understand which neighborhoods have the most venues overall, I add a ‘TOTAL VENUES’ column to this dataframe that aggregates across venue categories.

Dataframe containing number of venues in each Brooklyn neighborhood per category

To understand which neighborhoods are particularly hip, I needed to differentiate between standard venues (places a normie would go) and venues that appeal to hipsters. I created a new dataframe that only included hipster venues (e.g. Yoga Studios, Cafes, Indy Movie Theaters, and Speakeasies). While this list is not comprehensive, it represents some of the highest hipster priorities, and should give a fair assessment as to how hipster an area might be. Further research into hipster culture could and should be completed in order to make this list as representative as possible.

Python code to filter out non-hip amenities and rank neighborhoods by number of hipster venues
Ranked dataframe displaying neighborhoods and their total count of hipster venues

Ordering the neighborhoods by the value of their total number of hip venues, I created a list of 10 neighborhoods that offer the highest number of hipster amenities in Brooklyn. A simple stacked bar chart shows the breakdown of those hipster amenities across those 10 neighborhoods to provide a breakdown of how these neighborhoods compare.

Stacked bar chart created using pandas plot.barh function

While some neighborhoods have a high number of Hipster venues, this could be the result of simply having a larger number of total venues. A quick regression plot showed which neighborhoods have a disproportionate number of hipster venues compared to their total number of amenities.

Regression plot created using the seaborn library

As you can see, neighborhoods like Bay Ridge and even Downtown Brooklyn have the highest number of venues overall, but not the highest number of hip venues. Whereas neighborhoods like Greenpoint, Northside and Bed Stuy a proportionately a high number of hipster venues than other neighborhoods with a similar number of overall venues (Bed Stuy has nearly double the number of hipster venues than Vinegar Hill despite having a similar number of overall venues). This indicates that, Downtown Brooklyn’s hip-ness might be diluted with non-hip amenities when compared to a neighborhood like Greenpoint, which is dense with venues that would appeal to hipsters.

I combined the hip venue total and overall venue total back into the neighborhood dataframe in order to create a final map with folium that visualizes the total number of venues in each neighborhood and highlights the total number of hip venues through a color gradient. The size of each bubble represents the total number of venues while the shade of blue indicates how many hip venues are in that neighborhood. Darker blue means more hipster venues.

Bubble map created using folium.

Results

Immediately, the map makes it clear that the “hip” parts of Brooklyn are actually quite clustered immediately adjacent to Manhattan. The majority of Brooklyn neighborhoods do not actually offer a significant number of hipster amenities.

From the raw ranking, we can callout the following neighborhoods as possessing a high number of hipster venues:

1. North Side (Williamsburg), 18 hip spots out of 100 venues
2. Greenpoint, 17 hip spots out of 100 venues
3. Cobble Hill, 14 hip spots out of 98 venues
4. Carroll Gardens, 13 hip spots out of 100 venues
5. Fort Greene, 11 hip spots out of 67 venues
6. Boerum Hill, 11 hip spots out of 86 venues
7. Prospect Heights, 11 hip spots out of 78 venues
8. South Side (Williamsburg), 11 hip spots out of 100 venues
9. Brooklyn Heights, 10 hip spots out of 100 venues
10. Downtown Brooklyn, 9 hip spots out of 100 venues

Looking at our regression line, however, we might exclude Downtown Brooklyn, Brooklyn Heights and South Side Williamsburg from this list as their ratio of hip venues to total venues is not as favorable as the other neighborhoods on our top 10 list.

For those interested in moving to particularly hip parts of Brooklyn, our data would indicate that North Side Williamsburg or Greenpoint might be your best option, followed by Cobble Hill, Carroll Gardens, Fort Greene, Boerum Hill and even Prospect Heights. Worth mentioning, while Bed Stuy only offers 28 total venues (from this Foursquare data), 1 in 4 of those 28 is a hipster-approved amenity–so if you only need coffee and craft beers, Bed Stuy might be for you.

Conclusion

While this analysis is cousory and (obviously) a bit tongue-in-cheek, it could be interesting and genuinely valuable to overlay this type of data with average costs of apartments in the area to get an understanding of which hip areas are most affordable. When analyzed over time, this type of analysis could also reveal how hipster-influence impacts gentrification.

Again, if you are interested in checking out the full code, you can download it here. Thanks for your time and I hope you enjoyed this data project!

I ❤ Brooklyn

--

--

Joseph Wheeler
Joseph Wheeler

Written by Joseph Wheeler

Joe is a New York-based designer who works with journalists and nonprofits to tell stories that matter in new and engaging ways.

No responses yet