Tag: opendata
The New York City Department of Sanitation (DSNY) - the largest department of its kind in the world - is responsible for the city’s garbage-collection operation. One component of this operation is the regular emptying of 23,000+ street-level trashcans - or as they call them: “litter baskets.”
DSNY offers up their geo-coded litter-basket inventory - refreshed monthly - through the NYC OpenData portal and in today’s post I’ll walk through how to create an interactive, 3D fly-over map of these litter-basket locations with the help of Mapbox’s Mapbox GL JS API in R.
Today’s post builds upon some of the work from a previous post to include historic and year-to-date Arrest and Summonses counts by NYPD precinct. The aim is to use visualization (plotly, primarily) to explore the impact of policy changes on racial equity over time.
Data
Historic and Year-to-Date information from NYC’s OpenData API for NYPD Arrests and Summonses related to Article 221 of the New York Penal Law (PL221) from 2009-07-01 through 2019-06-30 (10-years of data).
In this posts I’m going to demonstrate how to get NYC census data at the tract level to estimate census data at the NYPD-precinct level.
There are 77 NYPD precincts serving five boroughs of NYC and each precinct contains multiple census tracts. To get the census-level demographics on a per-precinct level, I’ll need a way to aggregate the tract data into precincts - let’s get started!
In today’s post I build upon the last post to demonstrate the use of the tmap package to make a choropleth map in R. I also include instructions on how to use the sf library to obtain the block-level census tract IDs included in the tidycensus ACS data for the State Plane coordinates within the NYC 311 data.
If you’re new to making maps, it’s important that you recognize the differences between geographic coordinate and projected coordinate systems.
In this post I’ll be investigating equity between different census tracts in NYC based on economic measures and the open-to-close service request (SR) duration for 311 heat/hot water complaints.
Census Tract Granularity
If you’ve checked out my previous posts, you know I’ve done a bunch of work with NYC’s OpenData at the ZIP-code level. Today I’m going to go a step further and obtain NYC data with latitude and longitude coordinates and merge it with census data by census tract from the 5-year American Community Survey
(ACS) from 2016.