Data Visualisation Using Fitbit Data

As a farewell gift from my colleagues at Westpac, I was given a Fibit Flex! Lucky me! One of the cool things about Fitbit is the dashboard which has a wealth of information in it. But for me, its not enough. I don’t want 15 minute segments, I want it at a finer scale! Also, what if I don’t really care about steps taken, but rather I want to know distance travelled. [Read More]

Extremely Short Guide To Web Scraping Tables

Scraping information from the internet can be very handy. But often, information is located somewhere within the tags of a webpage. Scraping this information into a format which can be used by another source can be easily achieved using Beautiful Soup. An Example In this example we shall retrieve the Barclay’s premier table located here. To open this webpage we shall use urllib2. import urllib2 webpage = urllib2.urlopen('http://www.premierleague.com/en-gb/matchday/league-table.html') We can then “soup” up the webpage using Beautiful Soup. [Read More]

Constructors In R And Python

The ability to construct your own abstractions is an important part of object orientated programming language. In this post we will quickly run through the differences between building constructors in R and Python. Declaring constructions Python In python to declare a constructor we use: class Person: def __init__(self, name): self.name = name In python methods can be added dynamically. e.g. from types import MethodType class Person: def __init__(self, name): self. [Read More]

Tangle.Js And Fangle

gist here Heres just an update on what I’m working on right now. I’m quite interested in markdown as an alternative for quick prototyping for many applications which we would normally associate with Office suites. For example, in my previous post, I’ve talked about deck.js and how it could be easily combined with a simple script to produce presentations quickly. Now, I’m considering to what I believe can replace spreadsheets (though unlikely). [Read More]

Markdown Deck.Js

update: check out Puma.js which uses the same ideas but with no server-side compilation needed. I’ve been interested in various forms of markdown for a while (after all jekyll uses markdown heavily). Thats when I’ve discovered deck.js. A very short python script will allow you to generate presentations without having to worry about layout. The structure of the presentations is using markdown as normal and seperating each slide by ---. For example, the markdown presentation to generate this presentation is as below: [Read More]

Cron

I have found a useful cron-like script for windows using python. Although it is relatively old (last update being in 2011) it still works really well. I have applied some changes below to extend its functionality to allow you to put “dash” between numbers. e.g. 1-5 0-59 and so on, so that it is even more cron-like. Changes are as follows: def listing(expr): listing = [dash(x) for x in string. [Read More]

Openshift And Webpy

I’ve just finished my first web app on Openshift using the web.py format! This will be a list of random thoughts and ideas where I will record them. I like to think of this as my Moleskin notebook which people carry around. There are still various improvements which I can make: Adding a framework. Boostrap seems to be skeleton’s big brother, so it would be a good starting to point to apply it to this website Responsive web is not the main goal, though for learning purposes; why not! [Read More]

Open Source Data Analytics

Recently, I’ve been exploring outside other programming languages and ideas, in particular open source data analytics and d3. This space has really broaden my mind with what can be achieved outside the boundaries of SAS in data mining, especially with zero-installation modules and applications. Python has been my main weapon, making use of modules such as pyodbc pyper networkx has really allowed me to be able to extract (pyodbc), and perform analysis (pyper/R) and visualize data effectively (networkx). [Read More]