Archive for category Uncategorized

Fusion Tables: video in info window

Zie dit stukje als een vervolg op de blog van Laura Wismans aus die reihe ‘Handleiding Fusion Tables voor beginners’ die volgens mij gestart is door Jerry Vermanen.

Laura Wismans laat zien hoe je Fusion Tables zover kunt krijgen om een grafiek te laten zien in de popup window, of eigenlijk de ‘info window’ zoals Google het zelf noemt. Je kunt vrijwel elk stukje html-code in de info window plaatsen. In deze blog laat ik zien hoe je een YouTube-video kunt tonen via de info window.

Screenshot van het resultaat:

Read the rest of this entry »

No Comments

Geo-informatie van Den Haag open data

Onder de databronnen van Den Haag Open Data bevinden zich enkele geobestanden. Het is niet voor iedereen evident hoe je de inhoud hiervan kunt bekijken. Gelukkig hoef je geen geo-wizard te zijn om deze data te visualiseren. Je hoeft er geen programma voor te downloaden en je hoeft er ook geen code voor te kloppen. Je hoeft zelfs geen account aan te maken, tenzij je je data wilt bewaren.

Read the rest of this entry »

No Comments

NIOD teksten gevisualiseerd

Het NIOD heeft gisteren het omvangrijke werk van Dr. L de Jong ‘Het Koninkrijk der Nederlanden in de Tweede Wereldoorlog’ online gezet. Met behulp van Many Eyes heb ik een aantal visualisaties gemaakt aan de hand van het hoofdstuk ‘De strategische verrassing’ uit Deel 3. Dit hoofdstuk gaat over de dag dat Nederland werd binnengevallen door Duitse troepen.

Zie hieronder het resultaat. Dit is een aardig beginnetje. Als ik meer tijd heb zal ik binnenkort een aantal andere visualisaties maken.

No Comments

Dynamically changing the series of a Flex chart may fail

I think I found a bug, but I’m too lazy to file it right now.

I’m using a Flex LineChart that has to display a variable amount of LineSeries instances. Each LineSeries is assigned a datafunction to display its data. Now the strange thing is, that if you change the series of the LineChart, the removed LineSeries still evaluate their datafunction. This may not be a problem since it won’t display the removed LineSeries anyway, but I had a rather complex datafunction that ran into a run time error.

If you don’t want the removed LineSeries to evaluate their datafunction, just set the datafunction property to null.


for each (var lineSeries:LineSeries in chart.series) {
   lineSeries.dataFunction = null;
}

var newSeries:Array;
// Create new series here ....

chart.series = newSeries;

No Comments

Merging directories on Mac

To install the AIR sdk 2.7 on Flash Builder 4.5.1, you have to:

- copy all sdk 2.7 files to the existing sdk 2.6 directory (and, if applicable, overwrite sdk 2.6. files with corresponding  sdk 2.7 files)
- keep every sdk 2.6 files in place for which there is no corresponding sdk 2.7 file

On Windows this seems to be no problem: just copy the sdk 2.7 directory to the parent directory of the sdk 2.6 directory, and you are done. On Mac, however, the sdk 2.6 directory is replaced by the sdk 2.7 directory, leaving an incomplete sdk, since a number sdk 2.6 files have to remain in place. If you want your Mac to behave like a Windows (yes, it does happen!) you have to resort to the terminal and use the ditto command:

ditto <source directory> <destination directory>

No Comments

Results Mozilla Open Data Visualization competition

This morning I was pleasantly surprised that I got an Honorable Mention Award for my submission. I spent almost 3 days on my submission and was initially quite happy with the result. Then, when I saw the submissions of all other people, I wished I had put more effort into it. Nevertheless, I’m very happy to be rewarded with a book from Edward Tufte: Beautiful Evidence.

Thanks to Mozilla for organizing the competition and congratulations to James Fiedler who won the competition.

See the results here.

No Comments

Using interactive Flash elements in a Prezi presentation

I made a Prezi presentation about using interactive Flash elements in a Prezi presentation. You will encounter some issues because Prezi will also act on mouse clicks that are meant for interacting with the Flash element. I describe the solution or workaround that I came up with in the Prezi presentation. See it here.

You can download example flash files here (right click to save):

Below you find the code (placed on the timeline) of the wrapper that toggles by typing ‘q’. block_mc is a movieclip that is shown in Prezi mode. It is placed on top of all other layers to prevent that lower layers receive mouse events.


import flash.events.KeyboardEvent;
import flash.events.TimerEvent;
import flash.events.Event;

stop();

var preziMode:Boolean;

init();

function init():void {
 // Set up listeners for all events that you don't want to bubble up to Prezi.
 this.addEventListener(MouseEvent.ROLL_OVER, rollOverHandler)
 this.addEventListener(MouseEvent.ROLL_OUT, rollOutHandler)
 this.addEventListener(MouseEvent.CLICK, clickHandler);

 if (this.stage) {
 this.stage.addEventListener(KeyboardEvent.KEY_UP, keyboardHandler);
 } else {
 this.addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
 }

 block_mc.visible = false;
}

function addedToStageHandler(e:Event):void {
 this.removeEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
 this.stage.addEventListener(KeyboardEvent.KEY_UP, keyboardHandler);
}

function keyboardHandler(e:KeyboardEvent):void {

 // Test for 'q'
 trace ('Char code: ' + e.charCode);
 if (e.charCode == 113) {
 togglePreziEditMode();
 }
}

function togglePreziEditMode():void {
 block_mc.visible = !preziMode;
 preziMode = !preziMode;
}

function rollOverHandler(event:MouseEvent):void {
 if (preziMode)
 event.stopImmediatePropagation();
}

function rollOutHandler(event:MouseEvent):void {
 if (preziMode)
 event.stopImmediatePropagation();
}

function clickHandler(event:MouseEvent):void {

 if (preziMode) return;

 event.stopImmediatePropagation();
}

11 Comments

Mozilla Open Data Visualization competition

Introduction

You can read about the competition as an introduction.

Or go straight to the visualization.

I started looking at the answers that the Mozilla team was looking for, but at the same time I tried to find what kind of information I would be interested in myself. One of the questions that the Mozilla team wants to be answered is:

Do people who use more tabs use more bookmarks or fewer bookmarks?

Inspired by that question, I was wondering if a lot of people are like me: hording bookmarks but never use them. Or perhaps there are people that diligently structure their bookmarks and by doing so can have their surfing needs satisfied by only selecting bookmarks. And can we identify different bookmarking habits by each age group?

Preprocessing the data

Data per user session

To be able to get a grip on the data I decided to extract the following parameters for each user session. (I define a user session as the user actions between starting up the browser and browser close/crash.):

  • duration (in milliseconds)
  • inactive time (in milliseconds)
  • number of stored bookmarks at browser start up
  • number of bookmark folders at browser start up
  • maximum folder depth at browser start up
  • number of selected bookmarks
  • number of tabs at startup
  • number of windows at startup
  • the event type of the last event (usually ‘browser shutdown’, but this is different if the browser crashes (?))
  • is the browser restarted after a crash

Data per user

Then for each user, I aggregated all sessions to a single record describing for each user:

  • average session time
  • average number of selected bookmarks per hour
  • average number of stored bookmarks at browser start up
  • average number of folders at browser startup
  • average bookmark depth
  • average number of tabs at start up
  • the age group to which the user belongs

Data per number of bookmarks interval

Finally, based on the individual user statistics, I categorized all users into categories that are based on the average number of bookmarks . The categories are power of two intervals, i.e.:

  • 1 bookmark
  • 2 up to 4 bookmarks
  • 4 up to 8 bookmarks
  • 8 up to 16 bookmarks
  • 16 up to 32 bookmarks
  • and so on

Visualizations

People with more bookmarks use more bookmarks

Sounds pretty obvious, but if I look at myself: I do a lot of bookmarking, but (I think) I almost never use them.

Fig. 1

On the horizontal axis we see the number of stored bookmarks. On the vertical axis we see the number of selected bookmarks per hour. Clearly, the line is ascending. There is a big orange bubble in the category 4096 up to 8192 bookmarks. Using the tooltip, we can see that the bubble relates to 3 users. The application gives you the possibility to ignore small groups. By using one of the controls, we can hide all bubbles that correspond to 6 users or less. We then get a different picture. See Fig. 2.

People with more bookmarks have more tabs open at browser start up

The big orange bubble of Fig. 1 is filtered out and the remaining bubbles scale to fit between the minimum and maximum bubble radius. We see (by examining the bubble size) that people with more bookmarks have more tabs open at browser startup.

Fig. 2

We see the same pattern if we don’t use the bubble size to indicate the number of open tabs, but if we use the vertical axis, see Fig. 3. In Fig. 3 we choose that the bubble size corresponds to the number of users. So we can see that most users (in the selected age groups) have between 8 and 256 bookmarks.

Fig. 3

Younger people use bookmarks more often

Using the controls at the lower right, we can set the transparency of each series. If we select the series that correspond to users of age:

  1. 18 to 25 years old
  2. over 55 years old

We clearly see that the younger age group uses more bookmarks (green bubbles are positioned higher, albeit with the top purple bubble as an exception).

Fig. 4

People with more bookmarks surf longer

Differences are small, but you can see a trend of longer session times (time between starting up a browser and closing it down) of people with more bookmarks. See Fig. 5.

Fig. 5

Most users in age group 18-25, increasing bookmark usage with increasing number of stored bookmarks

A difficult (and incomplete) title. But that’s why we need visualizations: explain it with images! This is one of my favorite images of this series. You can clearly see the different age group trends:

  • Most users in age group 18-25
  • Number of users decrease with each step to the next (older) age group
  • bookmark selection increases as the number of stored bookmarks increase

Tools

During development/analysis, I used Adobe Flash Builder 4, Flex SDK 4.1, Adobe AIR and SQLite to do all parsing and visualization.

The final product is a web application and only uses Flex SDK 4.1 (with an xml-file as input). Right-click above the application to view/download the source code.

2 Comments

Using filters in Away3D

I’m working on my first project using Away3D and am stumbling on some basic issues. I was trying to use a blurfilter on objects with no result whatsoever. Until I found an example written by tartiflop that gave the answer: use the property ‘ownCanvas’.

Like:

 var topPlane:Plane = new Plane({ownCanvas:true});
 topPlane.filters.push(new BlurFilter(8, 8));

No Comments

Cannot change general setup of MySql Eventum

I installed the issue and bug tracking system Eventum. This is an open source system that is both made and used by the MySql team. During installation, I didn’t configure the smtp settings correctly and couldn’t find a way to reconfigure this. The installation guide mentions the path ‘Administration/General Setup’, but I couldn’t find the General Setup option. After googling around, I only found a spanish post about this issue:

http://gacimartin.com/2008/07/20/como-ver-las-opciones-de-superusuario-de-eventum-smtp-etc/

If you don’t read Spanish, this is a summary of the problem and the solution:

Apparently, it sometimes happens that your account is not registered as an ‘Admin’ account. You have find the id of your user account in the table ‘user’. Then find the corresponding row in the table ‘project_user” and set the field ‘pru_role’ to ’7′.

2 Comments