There is a time to struggle and a time to ask for help. D3 has gotten the best of me. I’m sure it is something simple, but I don’t have my bearings in the language enough to figure out what the problem is. I tried a good bit of debugging and have verified everything I can think of: The dates are in the correct format The line has a width and renders with different values The data is making it all the way through the functions There are no errors blocking the script The x-axis range matches the data I decided to turn to stackoverflow for help and posted a question asking about why my lines aren’t showing up. Hopefully some kind soul will take mercy on me and point me in the right direction. In the mean time I’m going to populate the rest of my data into the
Tonight I changed my approach, at the advice of Sean Conaty, and decided to turn the CSVs into JSON using a separate python script that I would then load into D3 to visualize. I am much better at manipulating data in python, so this approach should help eliminate some of the frustration I faced last week trying to get the CSVs to load properly. Separating the way the data is stored from the format it is accessed in will let us take advantage of the best aspects of each. This is how many internal APIs work. I would consider this more of a hacked API as the script runs locally and I will only run it when I update the CSV. Overall it seemed to work pretty well. I am now looping over the correct teams and have the data in a usable format. The on thing holding me up is that
Continuing what I’ve been working on lately – tonight I’m going to try and get all of the data loaded for my NFL chart and hopefully get the javascript to automatically loop through and chart each team’s record. Refactoring As I dove in tonight I realized that the way I was doing things wasn’t going to work. D3.csv() loops over every row in the csv that is loaded and performs the described operations on it. I was looping over the season data which meant that I was doing things hundreds of times rather than 32. I decided to refactor my code so that I now loop over the team data csv and then for each team go pull the season data as part of the process. The first roadblock I hit was that javascript data types are a bit strange. It took me a lot of trial & error to
Picking up where I last left off, today I’m going to try to make progress on my NFL history chart. Specifically, I would like to implement a javascript function that parses the data and splits it by team, graphing a new line for each. If time allows I would also like to pull in the data for each team and define the colors. Two charts that I’ve drawn inspiration from as I’ve been working on this are the New York Times housing prices graphic and the Feathersquare chart of Oxford Summer Eight” bump race results. The first is beautiful and second is fairly contextually similar. Hopefully this NFL graphic can hold a candle to them when it is all done. Team Colors One idea I had was to have the color of each team’s line be one of the team’s official colors. I was hoping to be able to pull this
The last few Tuesday nights I’ve been working on a visualization about the history of the NFL. This week, however, I don’t feel like fidgeting with javascript, so I’m going to do something different and work with my hands. Innovations Sessions are at their heart about solving problems. Tonight’s problem is that I don’t own a cribbage board. I could certainly buy one, but the pop-out, machine-painted boards don’t seem up to the caliber of my tastes. A cribbage board reflects a lot about a person and so to adequately represent myself, I need to make mine by hand. If you’re not familiar with cribbage, take a second to read up on it. Design Before I start anything I look for inspiration. I found a lot on etsy and was also impressed by this wood burned piece. Being a surfer I also checked for any surfboard flavored pieces and found these two.
I’m going to pick up where I left off two weeks ago working on my chart of NFL team win percentages over time. Last week I focused on getting the infrastructure setup, which was much easier than I thought, and walking through a basic tutorial to get a line graph working in D3. This week I’m going to do some customization. Wins, Losses & Ties To get the chart working last week I simply calculated the win percentage for the Falcons for a few seasons and plugged this in. Realistically that isn’t scalable, I’ll want to be able to input data in the form of a W-L-T season record and have it render. To calculate a win % I will count each win as 1 point, loss as 0 points and tie as .5 points. I’ll then divide the sum by the total number of games to get a %.
Tonight I’m going to start working on an idea I had for an interactive chart of NFL win percentages. The idea came to me when thinking about the Detroit Lions and how bad they are. I wondered if they had always been this bad or if it was only recently. (Hint: Always) So I thought it would be cool if I could look and see every team’s win percentage for each NFL season going back in time. This would be something easy to do in Excel or a static charting library, but I’m going to use it as an excuse to play with/learn an interactive data visualization library called D3.js. This is the javascript library that drives many of the webs coolest visualizations, like this New York times feature on NBA shot percentages. I’ll have to get it working first, but once I do I’ll be able to add interaction
Last week I wrote about turning my 2002 Nissan Frontier into an adventure mobile – if you haven’t read that post yet, you can go back & do that. This week I will finish working on the raised sleeping platform/storage area. I was able to finish everything over the holiday weekend and even got a chance to test it out. I decided I’d rather work on it during the daylight hours instead of my usual Tuesday night slot. My neighbors probably appreciated that on account of the power tools. I hinted at a design last week and thought I had a good one. Like always I ran into complications and had to adjust as I went. The first requirement was that it be versatile. I didn’t want to build a permanent frame and get stuck with one design. The life of an adventurer is not often predictable. Currently, I use
I’ve started a new project – I am turning my 2002 Nissan Frontier into a full fledged adventure mobile. This is one of those projects that has a clear starting point but won’t likely have an end. Perfect for more than a few innovation sessions. Though my truck isn’t yet an official adventure mobile, it’s life has hardly lacked adventure. I got it when I was 16. I’ve driven it across the country a few times so it’s been everywhere from San Diego to New Hampshire and to more national parks than most Boy Scouts. It has hauled dirt bikes, surfboards, camping gear, furniture and everything in between. It’s had a good life as far as trucks are concerned, but we’re just getting started. The goal of having an adventure mobile is simple – it should make it easy for our family & gear to get to places where we can
Stoked! I cracked the four minute mark this week. Most of my improvement has come from better oxygen conservation. I have been focusing on relaxing to minimize the oxygen I use per minute – thus letting me last longer on one breath. To do this I’ve been working on lowering my resting heart rate and slowing everything down. I think relaxing my brain is the hardest part, so I’ve been counting in my head really slow. I think that helps pace my body a bit as well. I haven’t been able to push any further on the discomfort scale – once my vision starts to go blurry I stop. I think that is probably safer for training, but I’d like to try blacking out a few times so I’m familiar with it in case I ever get to that point under water. Finally, this week I heard of a