Pages

Tuesday, June 10, 2014

World Cup Map

As you cannot ignore the World Cup returns this year and its 2014 edition starts in a few days.
This year it is in Brazil, arguably the most passionate country about this sport, and factually the most titled.

Usually a festive event, Brazilians, with their uncanny talent for celebration, will surely try their best to make a pulsing, gigantic, once-in-a-generation carnival out of it.

On such special occasions, it is customary to deviate a bit from your day to day work and kind of participate in the event in your own way. We launched an online betting game - without real money, only prizes for those who end up with the most tokens.

It is corporate so here I can only show the World Cup map I contributed.
The full code is available in this github repo.

By the way this was my first experiment with Web Components. Very convenient !

Enjoy the World Cup !!

Tuesday, April 29, 2014

Texas Hold'em Hand Evaluator - The return

I knew I would do it.
Finally I rewrote my exploration of the game in Python (including jit numba accelerated parts) and Javascript. As powerful as Mathematica is, I wanted to put it on the open web.

The post is an IPython notebook in its html form including d3.js animations.
The full code and data (tables) are available in this github repo.



Sunday, December 29, 2013

VIX futures market

The VIX is the ticker for the Chicago Board Options Exchange Market Volatility Index, which measures the level of 1-month implied (i.e. anticipated by the market) volatility in the S&P 500. It is constructed from a wide range of S&P 500 listed call and put options.
The exact definition is in this paper pages 3-9.

Below is a historical graph of the VIX since December 2006.

Saturday, December 28, 2013

The Power of Visualisation


Let us first quote Wikepedia verbatim:
'The adage "A picture is worth a thousand words" refers to the notion that a complex idea can be conveyed with just a single still image. It also aptly characterizes one of the main goals of visualization, namely making it possible to absorb large amounts of data quickly.'
Now let us make some slight amendments:
  • append 'or dynamic interactive images' to the first sentence.
  • append 'or grasp complex notions almost instantly' to the last sentence.
You then have the updated definition of the power of visualization. There is nothing conceptually new here, of course.
Charles Minard made his famous flow chart of Napoleon's disastrous Russian campaign in 1869 (see below). In a sweeping look, you can see the number of men as the armies advance, the main cities on their path, the rivers they go through, and the dates and the deadly temperature on they way back, all at once.



It is proof of how the potential of visualisation was already understood as far back as in the 19th century. Incidentally, this map is a also a memorable representation of the abyss leadership's hubris can lead to.

Saturday, March 9, 2013

Photo Cube

In my exploration of the various javascript libraries, I ran into three.js. It enables the user to do 3D in the browser without going into the complex underlying math.

I found it well conceived. Its structure is relatively easy to grasp and the syntax is usually self explanatory. As a result, somebody with very little experience in javascript/programming, like me, can create reasonably good looking effects in a few hours. You just have to define a scene, a camera, some objects (cubes, spheres, etc), and a renderer (WebGL, Canvas, SVG - the best option, if available is WebGL, as computations are performed by the GPU). By default the camera faces the (xy) plane, the x axis x being horizontal pointing right and y vertical pointing up. The z axis is orthogonal to the screen pointing to the viewer. Axes and a 'test' small sphere are convenient to get orientated.

For some time, I had being looking to do a photo cube, so that the experience of going through the pictures is less boring.

With this in mind, I dived into three.js, googled around and found some very useful pages:


Below is the result.
The 'drag to spin the cube' works on an iPad too.




The code is available in this github repo.
You can easily tweak the point of view, distance of the camera, angle of view, amongst others.
And the pictures, of course ! I just put what I like as an example