1 in 1 at ITP Camp liveblog!

1 in 1 at ITP Camp liveblog!

8:27pm – check out my day’s work! http://everythingiseverything.com/mta/ – very proud!


I’m in my first week of ITP Camp, a NYU grad program that combines creativity with multiple disciplines – basically, making shit.

Today we are doing 1 in 1, one project in one day. I eventually want to make a sign for my room like the New York subway signs, which tells when the next train will come. Ideally there will be an interface to enter in an address and choose nearby stations. Today, I’m just going to do the software component of it in javascript.

The steps I will try to take today:

  1. Create a page with PHP that scrapes the XML and updates it
  2. Add javascript to make it update more frequently using AJAX
  3. Style the page so it looks pretty
  4. Add another interface that allows you to choose subway lines/stations

10:42am – after breakfast, I start the day on the MTA developer resources download page.

1:07pm – wow. It’s been a few hours and I’ve just been trying to get the thing into a MySql database. I spent so much time trying to make a PHP program that imported the data directly in, and finally decided that it would take much less time to just import it using PhpMyAdmin, and if I want to automate figure out how to do it later. The data is in MySql now and I’m beginning to code!

1:53pm – happy I set aside the table import for later. I moved around a bunch of fields, which would have been so difficult if I had wanted to make it automatable. I guess for the future I will just have to massage the data to get it in manually. I have the following steps (which make more sense when you read the google documentation for the transit feed format):
1. use stop from Stop ID field
2. determine which days on calendar apply, create array of those
3. search for all upcoming stops at particular station on particular days
4. display!

And I've got up to step 2! Here's the array.

3:16pm – I’ve got the queries set up, was ready to display, but when I did it was showing the wrong subway lines! Well I ran the sample query in PhpMyAdmin and realized I had put in the data into a number (integer) field, and not a text (varchar) one. Fixed that, reimported, let’s see if that will fix things.