Property values are a persistent obsession for New Yorkers, as are the arbitrary constraints to dwelling well (dwelling? yes). Between navigating the rental quagmire of online listings to toggling the various Trulia, StreetEasy, and Zillow helper services, you can tumble down a rabbit hole of the worst options imaginable (or at least, publishable). In the bizzare world of renting, we can help you through the looking glass.
This Map of the Week features the work of a familiar face to CartoDB, [Chris Henrick], who between juggling GIS projects and grad school also co-organizes Maptime NYC. His MFA thesis project “Am I Rent Stabilized?” combines code, maps, and critical thinking about urban planning and renters rights - all of which we love and welcome at CartoDB! He currently lives in Brooklyn, NY, where we locals join him in an obsession with rent rates and regulations. Read on to discover more of the mechanics behind his impressive web app!
Am I Rent Stabilized? is a web application that encourages New York City tenants to find out if their landlord may be illegally overcharging them for a rent stabilized apartment and if so, motivates them to take action. The development of the app was spearheaded by the lack of enforcement of rent regulation laws in NYC by the local and state government. It is an attempt at using open data as a prompt for civic action, rather than solely for visualization and analysis. The app asks the user to input their address and borough, then checks it against a database of properties that are likely to have rent stabilized apartments. From here the app recommends a course of action and informs the user of their nearest tenants rights group so they can get help. The app features a responsive UI that is mobile friendly and its content can be toggled to either Spanish or Chinese, for non-english speakers.
Am I Rent Stabilized? uses a database I created that lives on CartoDB, which enables the website to work as a fully funcitonal web-app using the CartoDB SQL API and CartoDB.js library. However, I did a lot of data processing on my local machine before importing the data into CartoDB.
Excel workbooks obtained from a Freedom of Information Law request by the NY Department of Housing and Community Renewal were normalized, stacked, and converted to a Comma Separated Value (CSV) file format using a Node JS script. This allowed the data to be geocoded at once and then imported into a PostgreSQL database where it could be analyzed with the NYC MapPLUTO GIS tax lot data.
A Python script was then used to obtain values for each property’s Borough - Block - Lot number (BBL), Building Identificaiton Number (BIN), and latitude - longitude coordinates from the NYC GeoClient API. A property’s street address and borough are passed to the GeoClient API, which then returns a plethora of useful information about the property such as the BBL, BIN, latitude and logitude values.
After processing and geocoding the DHCR data it was imported into a PostgreSQL database using CSVkit’s csvsql command as follows:
csvsql --db:///nyc_pluto --insert dhcr_rs_geocoded.csv --table dhcr_rs
From here PostgreSQL was then used to analyze the data. Here is a link to the entire SQL code, but the most important queries are the following:
These two queries tell us: A. what properties in the MapPLUTO tax lot data match the DHCR’s rent-stabilized building list, and B. what other properties are likely to have rent-stabilized apartments but aren’t on the DHCR list. From here I created a table that combines data from both queries as well as a flag that states whether or not the property is listed in the DHCR data.
In order to inform a user as to whether or not any local tenants rights organizations are operating within their neighborhood, custom polygon geospatial data was created to respresent each of the 94 organization’s service areas.
First, a list of [Community Based Housing Organizations] was scraped from an HTML table on the DHCR’s website using a Python script. Organizations that operate in the boroughs / counties that make up NYC were pulled out from the scraped data into a new table.
For these 94 organizations, polygon data was manually created representing each organization’s service area. Reference polygon geospatial data sources used to create the service areas include Pediatcities NYC Neighborhood boundaries, NYC Planning Neighborhood Tabulation Areas, U.S. Census Zipcode Tabulation Areas, and NYC Planning Community District boundaries. This data was copied and in some cases aggregated (dissolved) into a new dataset using MAPublisher, a GIS plug-in for Adobe Illustrator. In some cases boundaries had to be drawn by hand, such as for the Cooper Square Committee, which operates within a very specific area in the East Village of Manhattan. Once completed, the polygon data was joined to the DHCR Community Housing Based Organizations for NYC and then exported to a shapefile format.
The data was then imported into CartoDB for use with Am I Rent Stabilized. When a user’s address is geocoded, a point in polygon SQL query is made via PostGIS to the data in CartoDB.
If a user’s address is within a group’s cachment area, that group’s information is passed into a modal in the app that displays information such as the group’s website url, phone number, contact person, and/or address. As this data varies from group to group, a Handlebars.js helper function is used to check if the data exists before passing it to the Handlebars HTML template.
Thanks for reading, and happy renting!
Chew on this for a moment. Take out your smart device, unlock your screen, and scroll through your apps. How many food specific applications are installed?Data Processing
Please fill out the below form and we'll be in touch real soon.