How I solved my NYC
Parking problem with Python
Let me know if this inspires you
to create anything.
@JessicaGarson
Code can be found at
github.com/twitterdev/parking
Slides can be found at
t.co/parking
What was happening in my
life?
I live in Brooklyn
I had a problem
So what are alternate side of the
street parking restrictions anyways?
Oh No!
I was moving my car too much
I built a solution using Twitter Data
and Twilio to send myself a text
whenever I don’t have to move my
car.
Overview of the solution
I needed to get the Tweets from
@NYCASP.
See if the words suspended and
tomorrow appeared in the same
Tweet.
Get a text message when the right
words appear.
Run this on a server so the process
repeats without minimal effort.
Process for creating this app
1 2 3
Get the Tweets we want
using the search Tweets
Python wrapper
Connect to Twilio Run this on a server using
cron jobs
I used premium
search
Premium 30-day search allows to
query-based access to the Tweet
archive with minute granularity.
What will I need to get
started?
You will need the libraries
twilio.rest, pandas, and
searchtweets
You will need to create a Twitter
app which allows you to connect to
API.
You can apply for access at
t.co/dev-apply-for-access
You will also need a yaml file for
your secrets.
Connecting to Twilio
Let’s build a helper script to
connect to Twilio
Connecting to Twitter
Tying it together
If the right
conditions are met
I’ll get this text:
Deployment
Currently this is deployed to a
Digital Ocean server using a cron
job.
The future of the Twitter
API
Twitter Developer Labs is a new
program that allows developers to
partner with us to create and shape
the future of our API.
Check out our roadmap at
t.co/dev-platform-roadmap
Sign up for Labs at
t.co/labs
Give us feedback at
t.co/developerfeedback
Conclusion
Jess, why didn’t you make this so
you get a text when you do have to
move your car?
If you want to see a blog post of this
talk you can check it out at
t.co/parking-post
Let me know if this inspires you
to create anything.
@JessicaGarson
Also you can let us know
@TwitterDev or on the
twittercommunity.com forums
We’re hiring too!
careers.twitter.com
Or come find me, Aurelia, or
Emily after
Thanks!

How I solved my NYC parking problem with Python