sponsored links
TEDxNewYork

Ben Wellington: How we found the worst place to park in New York City -- using big data

November 1, 2014

City agencies have access to a wealth of data and statistics reflecting every part of urban life. But as data analyst Ben Wellington suggests in this entertaining talk, sometimes they just don't know what to do with it. He shows how a combination of unexpected questions and smart data crunching can produce strangely useful insights, and shares tips on how to release large sets of data so that anyone can use them.

Ben Wellington - Data scientist
Ben Wellington blends his love of statistics, the city, and comedy in his entertaining analysis of the story of New York City, told through data. Full bio

sponsored links
Double-click the English subtitles below to play the video.
Six thousand miles of road,
00:12
600 miles of subway track,
00:15
400 miles of bike lanes
00:17
and a half a mile of tram track,
00:19
if you've ever been to Roosevelt Island.
00:21
These are the numbers that make up
the infrastructure of New York City.
00:22
These are the statistics
of our infrastructure.
00:26
They're the kind of numbers you can find
released in reports by city agencies.
00:28
For example, the Department
of Transportation will probably tell you
00:32
how many miles of road they maintain.
00:35
The MTA will boast how many miles
of subway track there are.
00:37
Most city agencies give us statistics.
00:40
This is from a report this year
00:42
from the Taxi and Limousine Commission,
00:43
where we learn that there's about
13,500 taxis here in New York City.
00:45
Pretty interesting, right?
00:48
But did you ever think about
where these numbers came from?
00:50
Because for these numbers to exist,
someone at the city agency
00:52
had to stop and say, hmm, here's a number
that somebody might want want to know.
00:55
Here's a number
that our citizens want to know.
00:59
So they go back to their raw data,
01:01
they count, they add, they calculate,
01:03
and then they put out reports,
01:05
and those reports
will have numbers like this.
01:07
The problem is, how do they know
all of our questions?
01:09
We have lots of questions.
01:11
In fact, in some ways there's literally
an infinite number of questions
01:13
that we can ask about our city.
01:16
The agencies can never keep up.
01:18
So the paradigm isn't exactly working,
and I think our policymakers realize that,
01:19
because in 2012, Mayor Bloomberg
signed into law what he called
01:23
the most ambitious and comprehensive
open data legislation in the country.
01:27
In a lot of ways, he's right.
01:31
In the last two years,
the city has released 1,000 datasets
01:32
on our open data portal,
01:35
and it's pretty awesome.
01:37
So you go and look at data like this,
01:39
and instead of just counting
the number of cabs,
01:41
we can start to ask different questions.
01:43
So I had a question.
01:45
When's rush hour in New York City?
01:46
It can be pretty bothersome.
When is rush hour exactly?
01:48
And I thought to myself,
these cabs aren't just numbers,
01:50
these are GPS recorders
driving around in our city streets
01:53
recording each and every ride they take.
01:56
There's data there,
and I looked at that data,
01:58
and I made a plot of the average speed of
taxis in New York City throughout the day.
02:00
You can see that from about midnight
to around 5:18 in the morning,
02:04
speed increases, and at that point,
things turn around,
02:07
and they get slower and slower and slower
until about 8:35 in the morning,
02:11
when they end up at around
11 and a half miles per hour.
02:15
The average taxi is going 11 and a half
miles per hour on our city streets,
02:18
and it turns out it stays that way
02:21
for the entire day.
02:23
(Laughter)
02:26
So I said to myself, I guess
there's no rush hour in New York City.
02:28
There's just a rush day.
02:31
Makes sense. And this is important
for a couple of reasons.
02:33
If you're a transportation planner,
this might be pretty interesting to know.
02:35
But if you want to get somewhere quickly,
02:39
you now know to set your alarm for
4:45 in the morning and you're all set.
02:41
New York, right?
02:44
But there's a story behind this data.
02:46
This data wasn't
just available, it turns out.
02:47
It actually came from something called
a Freedom of Information Law Request,
02:49
or a FOIL Request.
02:53
This is a form you can find on the
Taxi and Limousine Commission website.
02:54
In order to access this data,
you need to go get this form,
02:58
fill it out, and they will notify you,
03:00
and a guy named Chris Whong
did exactly that.
03:02
Chris went down, and they told him,
03:04
"Just bring a brand new hard drive
down to our office,
03:06
leave it here for five hours,
we'll copy the data and you take it back."
03:09
And that's where this data came from.
03:13
Now, Chris is the kind of guy
who wants to make the data public,
03:15
and so it ended up online for all to use,
and that's where this graph came from.
03:18
And the fact that it exists is amazing.
These GPS recorders -- really cool.
03:21
But the fact that we have citizens
walking around with hard drives
03:25
picking up data from city agencies
to make it public --
03:28
it was already kind of public,
you could get to it,
03:31
but it was "public," it wasn't public.
03:33
And we can do better than that as a city.
03:35
We don't need our citizens
walking around with hard drives.
03:37
Now, not every dataset
is behind a FOIL Request.
03:40
Here is a map I made with the most
dangerous intersections in New York City
03:42
based on cyclist accidents.
03:46
So the red areas are more dangerous.
03:48
And what it shows is first
the East side of Manhattan,
03:49
especially in the lower area of Manhattan,
has more cyclist accidents.
03:52
That might make sense
03:56
because there are more cyclists
coming off the bridges there.
03:57
But there's other hotspots worth studying.
04:00
There's Williamsburg.
There's Roosevelt Avenue in Queens.
04:02
And this is exactly the kind of data
we need for Vision Zero.
04:04
This is exactly what we're looking for.
04:07
But there's a story
behind this data as well.
04:09
This data didn't just appear.
04:11
How many of you guys know this logo?
04:13
Yeah, I see some shakes.
04:16
Have you ever tried to copy
and paste data out of a PDF
04:17
and make sense of it?
04:20
I see more shakes.
04:21
More of you tried copying and pasting
than knew the logo. I like that.
04:22
So what happened is, the data
that you just saw was actually on a PDF.
04:25
In fact, hundreds and hundreds
and hundreds of pages of PDF
04:29
put out by our very own NYPD,
04:32
and in order to access it,
you would either have to copy and paste
04:34
for hundreds and hundreds of hours,
04:37
or you could be John Krauss.
04:39
John Krauss was like,
04:40
I'm not going to copy and paste this data.
I'm going to write a program.
04:41
It's called the NYPD Crash Data Band-Aid,
04:45
and it goes to the NYPD's website
and it would download PDFs.
04:47
Every day it would search;
if it found a PDF, it would download it
04:50
and then it would run
some PDF-scraping program,
04:53
and out would come the text,
04:56
and it would go on the Internet,
and then people could make maps like that.
04:57
And the fact that the data's here,
the fact that we have access to it --
05:00
Every accident, by the way,
is a row in this table.
05:04
You can imagine how many PDFs that is.
05:06
The fact that we
have access to that is great,
05:08
but let's not release it in PDF form,
05:10
because then we're having our citizens
write PDF scrapers.
05:13
It's not the best use
of our citizens' time,
05:15
and we as a city can do better than that.
05:17
Now, the good news is that
the de Blasio administration
05:19
actually recently released this data
a few months ago,
05:22
and so now we can
actually have access to it,
05:25
but there's a lot of data
still entombed in PDF.
05:27
For example, our crime data
is still only available in PDF.
05:29
And not just our crime data,
our own city budget.
05:32
Our city budget is only readable
right now in PDF form.
05:36
And it's not just us
that can't analyze it --
05:40
our own legislators
who vote for the budget
05:42
also only get it in PDF.
05:45
So our legislators cannot analyze
the budget that they are voting for.
05:47
And I think as a city we can do
a little better than that as well.
05:51
Now, there's a lot of data
that's not hidden in PDFs.
05:54
This is an example of a map I made,
05:57
and this is the dirtiest waterways
in New York City.
05:59
Now, how do I measure dirty?
06:02
Well, it's kind of a little weird,
06:03
but I looked at the level
of fecal coliform,
06:05
which is a measurement of fecal matter
in each of our waterways.
06:07
The larger the circle,
the dirtier the water,
06:11
so the large circles are dirty water,
the small circles are cleaner.
06:14
What you see is inland waterways.
06:17
This is all data that was sampled
by the city over the last five years.
06:19
And inland waterways are,
in general, dirtier.
06:22
That makes sense, right?
06:25
And the bigger circles are dirty.
And I learned a few things from this.
06:26
Number one: Never swim in anything
that ends in "creek" or "canal."
06:30
But number two: I also found
the dirtiest waterway in New York City,
06:33
by this measure, one measure.
06:37
In Coney Island Creek, which is not
the Coney Island you swim in, luckily.
06:39
It's on the other side.
06:42
But Coney Island Creek, 94 percent
of samples taken over the last five years
06:44
have had fecal levels so high
06:48
that it would be against state law
to swim in the water.
06:50
And this is not the kind of fact
that you're going to see
06:53
boasted in a city report, right?
06:56
It's not going to be
the front page on nyc.gov.
06:57
You're not going to see it there,
06:59
but the fact that we can get
to that data is awesome.
07:01
But once again, it wasn't super easy,
07:03
because this data was not
on the open data portal.
07:05
If you were to go to the open data portal,
07:08
you'd see just a snippet of it,
a year or a few months.
07:10
It was actually on the Department
of Environmental Protection's website.
07:12
And each one of these links is an Excel
sheet, and each Excel sheet is different.
07:16
Every heading is different:
you copy, paste, reorganize.
07:19
When you do you can make maps
and that's great, but once again,
07:22
we can do better than that
as a city, we can normalize things.
07:25
And we're getting there, because
there's this website that Socrata makes
07:28
called the Open Data Portal NYC.
07:31
This is where 1,100 data sets
that don't suffer
07:33
from the things I just told you live,
07:35
and that number is growing,
and that's great.
07:37
You can download data in any format,
be it CSV or PDF or Excel document.
07:39
Whatever you want,
you can download the data that way.
07:42
The problem is, once you do,
07:45
you will find that each agency
codes their addresses differently.
07:46
So one is street name,
intersection street,
07:50
street, borough, address, building,
building address.
07:52
So once again, you're spending time,
even when we have this portal,
07:55
you're spending time
normalizing our address fields.
07:58
And that's not the best use
of our citizens' time.
08:00
We can do better than that as a city.
08:03
We can standardize our addresses,
08:05
and if we do,
we can get more maps like this.
08:06
This is a map of fire hydrants
in New York City,
08:09
but not just any fire hydrants.
08:11
These are the top 250 grossing fire
hydrants in terms of parking tickets.
08:12
(Laughter)
08:17
So I learned a few things from this map,
and I really like this map.
08:19
Number one, just don't park
on the Upper East Side.
08:22
Just don't. It doesn't matter where
you park, you will get a hydrant ticket.
08:25
Number two, I found the two highest
grossing hydrants in all of New York City,
08:28
and they're on the Lower East Side,
08:33
and they were bringing in over
55,000 dollars a year in parking tickets.
08:34
And that seemed a little strange
to me when I noticed it,
08:40
so I did a little digging and it turns out
what you had is a hydrant
08:42
and then something called
a curb extension,
08:46
which is like a seven-foot
space to walk on,
08:48
and then a parking spot.
08:50
And so these cars came along,
and the hydrant --
08:51
"It's all the way over there, I'm fine,"
08:53
and there was actually a parking spot
painted there beautifully for them.
08:55
They would park there, and the NYPD
disagreed with this designation
08:58
and would ticket them.
09:02
And it wasn't just me
who found a parking ticket.
09:03
This is the Google
Street View car driving by
09:05
finding the same parking ticket.
09:07
So I wrote about this on my blog,
on I Quant NY, and the DOT responded,
09:09
and they said,
09:13
"While the DOT has not received
any complaints about this location,
09:14
we will review the roadway markings
and make any appropriate alterations."
09:18
And I thought to myself,
typical government response,
09:22
all right, moved on with my life.
09:25
But then, a few weeks later,
something incredible happened.
09:27
They repainted the spot,
09:31
and for a second I thought I saw
the future of open data,
09:34
because think about what happened here.
09:36
For five years, this spot was being
ticketed, and it was confusing,
09:38
and then a citizen found something,
they told the city, and within a few weeks
09:43
the problem was fixed.
09:48
It's amazing. And a lot of people
see open data as being a watchdog.
09:49
It's not, it's about being a partner.
09:52
We can empower our citizens
to be better partners for government,
09:54
and it's not that hard.
09:57
All we need are a few changes.
09:59
If you're FOILing data,
10:00
if you're seeing your data
being FOILed over and over again,
10:01
let's release it to the public, that's
a sign that it should be made public.
10:04
And if you're a government agency
releasing a PDF,
10:08
let's pass legislation that requires you
to post it with the underlying data,
10:10
because that data
is coming from somewhere.
10:14
I don't know where, but it's
coming from somewhere,
10:16
and you can release it with the PDF.
10:19
And let's adopt and share
some open data standards.
10:20
Let's start with our addresses
here in New York City.
10:23
Let's just start
normalizing our addresses.
10:25
Because New York is a leader in open data.
10:27
Despite all this, we are absolutely
a leader in open data,
10:29
and if we start normalizing things,
and set an open data standard,
10:32
others will follow. The state will follow,
and maybe the federal government,
10:35
Other countries could follow,
10:39
and we're not that far off from a time
where you could write one program
10:40
and map information from 100 countries.
10:44
It's not science fiction.
We're actually quite close.
10:46
And by the way, who are we
empowering with this?
10:48
Because it's not just John Krauss
and it's not just Chris Whong.
10:50
There are hundreds of meetups
going on in New York City right now,
10:53
active meetups.
10:56
There are thousands of people
attending these meetups.
10:57
These people are going after work
and on weekends,
11:00
and they're attending these meetups
to look at open data
11:02
and make our city a better place.
11:05
Groups like BetaNYC, who just last week
released something called citygram.nyc
11:07
that allows you to subscribe
to 311 complaints
11:11
around your own home,
or around your office.
11:13
You put in your address,
you get local complaints.
11:15
And it's not just the tech community
that are after these things.
11:17
It's urban planners like
the students I teach at Pratt.
11:21
It's policy advocates, it's everyone,
11:23
it's citizens from a diverse
set of backgrounds.
11:25
And with some small, incremental changes,
11:28
we can unlock the passion
and the ability of our citizens
11:31
to harness open data
and make our city even better,
11:34
whether it's one dataset,
or one parking spot at a time.
11:37
Thank you.
11:41
(Applause)
11:43

sponsored links

Ben Wellington - Data scientist
Ben Wellington blends his love of statistics, the city, and comedy in his entertaining analysis of the story of New York City, told through data.

Why you should listen

Ben Wellington runs the I Quant NY blog, in which he crunches city-released data to find out what's really going on in the Big Apple. To date he has tackled topics such as measles outbreaks in New York City schools, analyzed how companies like Airbnb are really doing in NYC, and asked questions such as "does gentrification cause a reduction in laundromats?" (Answer: inconclusive.)

Ben is a visiting assistant professor in the City & Regional Planning program at the Pratt Institute in Brooklyn; his day job involves working as a quantitative analyst at the investment management firm, Two Sigma. A budding comedian and performer, he also teaches team building workshops through Cherub Improv, a non-profit that uses improv comedy for social good.

sponsored links

If you need translations, you can install "Google Translate" extension into your Chrome Browser.
Furthermore, you can change playback rate by installing "Video Speed Controller" extension.

Data provided by TED.

This website is owned and operated by Tokyo English Network.
The developer's blog is here.