Last year I did a course on Skillshare which helped me reboot my web comic. This time I want to write about another course I did about data visualisation. It’s not a normal data visualisation course where precision is the most important. This course is focused on speed and real-time processing in a place where computers aren’t available or appropriate.
The task was to use information the students have about their daily commute. That was my first problem because my daily commute is about one minute long, I work from home. But because of certain health reasons I wasn’t able to work for a long time last year and part of the previous one. I have different data, books. I turned out to be a bookworm who reads more than 100 books in one year, 2015 – 156 books & 2014 – 126 books.
I love keeping the score so I use Goodreads to keep track of my books so the data was easily available. Goodreads allows users to export library in csv 1 format. I would prefer JSON but csv is better than extracting that data manually.
As the first step I had to choose language to process the data. PHP is out of the question because I can’t be sure how long it’ll process the data and the webservers tend to have timeouts and script might run out of time.
The code I wrote isn’t the prettiest but the output is what matters here. The loop reads the file one line at a time. There was a difficulty concerning commas inside quote marks. Luckily I wasn’t the first person who encountered this problem. This regex solves the problem: ,(?=([^"]*"[^"]*")*(?![^"]*")) .
After this I filtered out everything which I didn’t finish in year 2015. The rest I analyzed. I was interested in months and days of a month when I finished books, shelves and fiction/non-fiction ratio.
As usual I drew those graphs on my tablet. Normally I would use Sketchbook app but this time I was curious about Tayasui Sketches. I would describe it as more fine art app than Sketchbook. It was interesting to use it but I won’t use it regularly because it’s harder to export images.
It was an interesting course to take and it helped me do something I wanted to do but I wasn’t sure where to begin. I could have done it using Excel but that is no fun and I am not back in school/university doing work in labs. May be next year, or 2014, I will do it again using d3.js, 126 books is still good data set and I don’t plan to read more than 100 books this year.
- Comma Separated Values ↩