Smoking, Drinking and Peeing in NYC: Oct. 1 – Oct. 14, 2011

October 24, 2011

Smoking, Drinking and Peeing in NYC: Oct. 1 - 14, 2011

View big version

Our assignment for this week was simply to explore some data. Wow. Pretty open-ended but enough of a kick to just get my hands dirty. I was going to use some NBA stats I had available in CSV, but because I have other classes I thought it might be a good idea to relate the data exploration to one of the topics I’m already invested in. So I went digging on NYC’s data site and decided to have a go with the year+ worth of 3-1-1 call data.

I downloaded the data in CSV format, and it was ~1.53GB. @_@ Wow. That’s a lot of data. So much so that I really couldn’t even open the file, let alone work with it. So I slowly went in manually and sliced out the first two weeks of October and decided that would be enough. In only two weeks there were 63,299 incident reports across 148 unique categories (e.g. “Noise”, or “Graffiti”, or even “Illegal Animal Kept as Pet”).

Before I got to plotting I was trying to figure out whether or not there exists granular enough resolution in the R maps library to get an NYC map and when I discovered that it didn’t I went searching for a library that might. To my frustration I couldn’t find anything, but then I realized if I just plot enough incidents according to latitude and longitude, the structure of the city would appear. I also had to parse out only the relevant information, which in my opinion the most interesting parameters in here are the locations of the incidents and the type of incident. So I created a list of only the interesting bits so that it would be easier to work with (“Borough” wasn’t really necessary here, btw):

threeoneone <- read.csv("311-succinct-02.csv", header=TRUE, stringsAsFactors=FALSE)

borough <- threeoneone["Borough"]
type <- threeoneone["Complaint.Type"]
lon <- threeoneone["Longitude"]
lat <- threeoneone["Latitude"]

incidents <- cbind(type,borough,lat,lon)

From this I could plot all 63,299 incidents, which I did (in black). Then I wanted to get in and find out more about the different types of complaints, so I made this guy:

unique.types <- (unique(type[[1]]))

and just took a look at the craziness in there and started pulling the categories out into their own lists and plotting them over the top:

youth.incidents <- incidents[incidents[[1]]=="Disorderly Youth",]
bike.incidents <- incidents[incidents[[1]]=="Derelict Bicycle",]
noise.incidents <- incidents[incidents[[1]]=="Noise",]
urine.incidents <- incidents[incidents[[1]]=="Urinating in Public",]
smoking.incidents <- incidents[incidents[[1]]=="Smoking",]
drinking.incidents <- incidents[incidents[[1]]=="Drinking",]

I decided that I would check for a geographical correlation between drinking, smoking and peeing - although it doesn't look like there's anything binding them together. That's really as far as I've gotten, but I'm looking forward to playing around some more with such a rich set of data! (entire code is below)

threeoneone <- read.csv("311-succinct-02.csv", header=TRUE, stringsAsFactors=FALSE)

borough <- threeoneone["Borough"]
type <- threeoneone["Complaint.Type"]
lon <- threeoneone["Longitude"]
lat <- threeoneone["Latitude"]

unique.types <- (unique(type[[1]]))

incidents <- cbind(type,borough,lat,lon)
youth.incidents <- incidents[incidents[[1]]=="Disorderly Youth",]
bike.incidents <- incidents[incidents[[1]]=="Derelict Bicycle",]
noise.incidents <- incidents[incidents[[1]]=="Noise",]
urine.incidents <- incidents[incidents[[1]]=="Urinating in Public",]
smoking.incidents <- incidents[incidents[[1]]=="Smoking",]
drinking.incidents <- incidents[incidents[[1]]=="Drinking",]

plot_colors <- c("#FF000060","#d200ff60","#FFC60060","#FFFFFF10","#0000FF40")
legend_colors <- c("#000000","#FF0000","#d200ff","#FFC600","#FFFFFF","#0000FF")

par(bg = "gray40")
par(fg = "gray60")
par(col.lab = "gray60")
par(col.main = "gray60")

plot(incidents[[4]],incidents[[3]], pch=16, col="#00000002", bty="n", xlab="", xaxt = "n", yaxt = "n", ylab="", main="311 Calls NYC")

points(noise.incidents[[4]],noise.incidents[[3]], pch=16, col=plot_colors[4])
points(bike.incidents[[4]],bike.incidents[[3]], pch=16, col=plot_colors[1])
points(youth.incidents[[4]],youth.incidents[[3]], pch=16, col=plot_colors[2])
points(urine.incidents[[4]],urine.incidents[[3]], pch=16, col=plot_colors[3])
points(smoking.incidents[[4]],smoking.incidents[[3]], pch=16, col=plot_colors[5])

legend("topleft",  c("All 311 calls","Derelict Bicycle","Disorderly Youth","Urinating in Public","Noise", "Smoking"), cex=0.6, bty="n", pch=16, col=legend_colors);

#SMOKE DRINK PEE
smoke_drink_pee_colors <- c("#d200ff60","#00ff4860","#fcff0060")
smoke_drink_pee_legend <- c("#000000","#d200ff","#00ff48","#fcff00")

plot(incidents[[4]],incidents[[3]], pch=16, col="#00000002", bty="n", xlab="", xaxt = "n", yaxt = "n", ylab="", main="311 Calls NYC")
points(smoking.incidents[[4]],smoking.incidents[[3]], pch=16, col=smoke_drink_pee_colors[1])
points(drinking.incidents[[4]],drinking.incidents[[3]], pch=16, col=smoke_drink_pee_colors[2])
points(urine.incidents[[4]],urine.incidents[[3]], pch=16, col=smoke_drink_pee_colors[3])
legend("topleft",  c("All 311 calls","Smoking","Drinking","Urinating in Public"), cex=0.8, bty="n", pch=16, col=smoke_drink_pee_legend);
x

Hi there. I'm a design & code creative living, working and studying in sunny Brooklyn, NY. I'm currently exploring data representation within the context of the networked urban environment as well as the DIY health and biohacking movements.

Keywords: design, user experience, interaction, visual communication, Processing, data visualization, Android, HTML5, css, Javascript, WebgL, branding, rapid prototyping, Python

CV - download cv (pdf - 180kb)

Contact

Education

2010.09 — 2012.05 (expected)

Master of Professional Studies
Interactive Telecommunication Program (ITP) Tisch School of the Arts, New York University

2010.09 — 2004.05

BA Visual Communications with minor in Art History
The George Washington University
Graduated Cum Laude
National Society of Collegiate Scholars
Spring 2003 semester at Sydney University, AU

Work Experience

2011.06 — 2011.09

UX Design Intern, Microsoft Bing, Bellevue, WA

Worked with design, editorial, dev and program management teams to scope, design and develop prototypes for soon-to-be-released Bing.com feature. The internship culminated in two presentations of the feature prototypes to senior leadership at Microsoft as well as the Bing design team.

2007.02 — 2010.08

Graphic & Interaction Designer, Empax, Inc., New York, NY

Worked with design, editorial, dev and program management teams to scope, design and develop prototypes for soon-to-be-released Bing.com feature. The internship culminated in two presentations of the feature prototypes to senior leadership at Microsoft as well as the Bing design team.

2006.12 — present

Freelance Graphic & Interaction Design Consultant, New York, NY

Worked as a sole proprietor with various clients from retail, music, film, nonprofit, real estate and technology industries to create and improve existing brand and user experiences across many platforms and media.

2004.04 — 2006.01

Graphic Designer, The George Washington University Communication & Creative Services, Washington, DC

Worked with project management and external production vendors to deliver a range of print and interactive material related to university publications and communications initiatives. responsibilities included design and implementation of print collateral, posters, animation, environmental signage, web publication and press checks.

Selected Publications

2011.07

Freakonomics (Web),
“What Would it Be Like to Climb 26 Years of Federal Spending?”

2011.04

Flowingdata (Web),
“Physically climb over budget data with Kinect”, by Nathan Yau

2011.02

Logo Lounge 6 (Book),
by Catharine Fishel and Bill Gardner, Rockport Publishers - Gedenk Logo

2010.12

“A Bartender That Pours The Perfect Shot, Every Shot”, by Matt Buchanan

2009.11

Basic Logos (Book),
by Index Book - The 2007 Gotham Awards Logo

2008.10

Print Magazine,
“Dialogue: Martin Kace”, by Steven Heller - The Alliance for Climate Protection Website

Selected Exhibitions

2010.12

ITP Winter show 2010, NYC

2011.04

Data Viz Challenge Party, hosted by Eyebeam and Google, NYC

2011.05

ITP Spring Show 2011, NYC

Other Experience

2006.01 — 2006.12

English Teacher, NOVA Japan, Kure-shi, Hiroshima-ken, Japan
Taught and mentored students of all ages and abilities in small to medium-sized classes to improve proficiency in english linguistics and conversation.