The other day, a Twitter friend asked where New York City neighborhoods begin and end. I forget exactly which NYC agency I got the data from, so I reposted them as a GitHub Gist. Since the Gist does not show neighborhood names, I decided to make a Leaflet map.

Ordinarily, I would make maps with R, but embedding JavaScript objects in blog posts is no easy task. Instead, I used a Leaflet plugin for WordPress and the resulting map is good enough for these purposes. The best part is that the plugin can read directly from the geojson file hosted in the Gist.

In the map we can clearly see neighborhood boundaries and can click on an area to see the officially designated name. Though it does seem to lump multiple neighborhoods together—such as Hudson Yards, Chelsea, Flatiron and Union Square—probably because the boundaries are disputed.

This map can be helpful the next time you are trying to locate Dowisetrepla.

Related Posts

Jared Lander is the Chief Data Scientist of Lander Analytics a New York data science firm, Adjunct Professor at Columbia University, Organizer of the New York Open Statistical Programming meetup and the New York and Washington DC R Conferences and author of R for Everyone.

Leave a Reply