I’ve been wanting to gain some more proficiency in D3.js. I went through several tutorials at some point in 2016, but I really needed a project to work on. More recently, I’ve become interested in Citibike data, specifically, the patterns of available bikes at given locations. Why not graph it?

Citibike maintains a comprehensive dataset of all trip data, but does not seem to maintain a historical dataset for stations. So, I hacked together a python script1 to gather some historical data from the station near my apartment.

I’m a total D3 neophyte, so I found a sample multi-series line chart that I could use to start viewing the data I collected. I hacked another script1 to transform the data into something that would be easier to chart.

After a bit of modification to the sample chart, I got this:

A Bad Line Chart

It looks cool, but it’s really not what I was going for, and it’s pretty useless.

After some more work, I’m getting closer:

A Slightly Less Bad Chart

…but, it still needs a lot of work. Specifically, the x-axis labels are worthless. Also, I really don’t have enough data there to show what I want to show. I think I need at least 30 days as opposed to the 7 I currently have. It doesn’t help that the system was closed for a couple of those days due to winter weather.

I’ll check back in a couple weeks to see how it is shaping up.

1The scripts referenced in this post are available at github.com/jpreardon/citibike-station-status.

Back in 2007, there was some talk about personal unit tests. The idea was to apply unit testing, a tenant of Test Driven Development, to some of the mundane, yet important daily tasks of one’s life. Done properly, one could see what their pass rate was, and address problem areas.

Personal Unit Test SpreadsheetThis sounded like a great idea. I created a spreadsheet complete with conditional formatting to track small tasks like “exercise”, “healthy lunch” and “practice guitar”. While it was useful to see how I was doing, the overhead of tracking all of these little tasks was very high. If it could only be automated, like unit tests in TDD, it would be so much better.

Now, 7 years later, our devices are tracking all sorts of things about us. Perhaps most of these unit tests could be automated by querying the repositories of personal data that are being created. Data that can’t be obtained automatically, could come from something like Reporter. I’ve seen several gorgeous visualizations of this data–Aprilzero immediately comes to mind, but I don’t think they are all that actionable throughout the day. This is where unit tests could really shine, maybe.