__STYLES__
Tools used in this project
The Best Apartment in NYC

About this project

Background

I'm a big fan of Makeover Monday, a "social data project" that shares a chart or visual found in the wild along with the source data for it, encouraging you to make your own version. Most weeks when I participate I try to find something to improve on with the existing visual, typically related to data viz best practices. On week 5 in 2023 though, I had a better idea.

The dataset for the week was collected by Liam Quigley, who documented every pizza slice he ate in NYC in an 8-year period from 2014 to 2022. Two thoughts immediately formed in my head:

  1. This man is my hero
  2. I want to live in the closest spot to all these pizza carts

So instead of remaking his charts, I set out to find that ideal location. Enter ChatGPT.

Searching for Paradise

The dataset contained the latitude and longitude for each pizza cart, so it seemed to me like there had to be some sort of algorithm to find a specific location that was the closest in distance to all those "points". A quick Google search suggested using the geometric median, but I wanted to ask ChatGPT as well.

undefinedundefinedThis confirmed for me that the geometric median was exactly what I was looking for, so I used the Python code generated by ChatGPT and ran it using the pizza cart locations. The result of (40.7196, -73.9433) made sense, so I used Plotly Express in Python to plot it against the pizza carts:

undefinedThe result was awesome to see, but it felt like the pizza carts on the outskirts of the city made the spot feel too far from the action. Therefore, I decided to narrow down the list to just Manhattan - it's hard to think the best spot in town is anywhere else!

I used ChatGPT once more to get the lat/lon bounds for Manhattan, then used that to filter down my pizza cart locations using Excel. Once that was all set, I simply fed this new list into the same Python scripts to get the median and the map!

undefinedBreaking the Story

Once I found the ideal location, I felt that I had to "break the story" out to the world - it was a groundbreaking discovery after all! I decided to go with a newspaper theme for the visual, so I pasted the map in Excel, added a bold title, wrote the accompanying story for it, and shared some additional insights from the data, like the closest and furthest pizza carts from the "ideal apartment".

undefinedI'd be lying if I didn't say it's my proudest work. It was my project ever using Python (thanks Chris Bruehl!), and being able to combine that with ChatGPT and some Excel (not to mention the topic, which is my favorite food) just made it so memorable.

Now I just need to look for the place on Zillow and put in a bid!

Additional project images

ChatGPT prompt for finding the geometric median
Running the script in Jupyter Notebooks
Creating the map visual
Discussion and feedback(0 comments)
2000 characters remaining