Category: User Interface

Cognitive Surplus visualised

In the 300-and-more RSS items in my aggregator this week, there are 2 great ones from Information is Beautiful, a blog gathering (and publishing its own) nice ways to visualise data.

The first one is based on a talk by Clay Shirky who, in turn, was referencing his book Cognitive Surplus. In Cognitive Surplus visualized, David McCandless just represented one of Shirky’s ideas: 200 billion hours are spent each year by US adults just watching TV whereas only 100 million hours were necessary to create Wikipedia (I guess the platform + the content) …

Cognitive Surplus visualised from Information Is Beautiful

It makes you think about either the waste television helps to produce either the potential of human brain(s) if relieved from the burden of television.

The second interesting post appeared in fact in information aesthetics, a blog where form follows data (referencing Information is Beautiful but I can’t find this post). In Top Secret America: Visualizing the National Security Buildup in the U.S., Andrew Vande Moere relates “an extensive investigative project of the Washington Post that describes the huge national security buildup in the United States after the September 11 attacks”. The project website contains all the ingredients for a well-documented investigation with the addition of interactive maps and flash-based interfaces allowing the user to build his/her own view on the project.

Top Secret America from the Washington Post

It’s nice to see investigative journalism combined with beautiful data visualisation and handling!

Software license and use of end-product

In one of his buzz, CΓ©dric Bonhomme drew my attention on the Highcharts javascript library. This library can produce beautiful charts of various types with some Ajax interaction. The only negative point imho is that it is dual-licensed and all cases deprive you from your freedom:

  • there is a first Creative Commons Attribution-NonCommercial 3.0 License: you can use the library for your non-profit website (see details on the licensing page) ;
  • there is a commercial license for any other website.

Now what if we only need the end-product, i.e. the resulting chart, in a commercial environment? What is covered by the license is just the re-use of the javascript library in a website, not the resulting chart. If a company choose to use Highcharts internally to render some beautiful charts and just publish (*) the resulting image, I guess they can just download the library and use it (* by “publishing”, I mean: publish a scientific paper in a peer-reviewed journal, not publishing on its website). On the other hand, no one ever questioned the fact commercial companies have licenses for all the proprietary software they use to produce anything else, from charts to statistical data, just because they publish results with these software as tools. So the “trick” here would be that, by changing the medium on which you display end-results (from website to paper, even if it’s in PDF on the journal website), you can use the free-to-download license, even in a commercial environment, for an article from a commercial company. I’m not sure this was the original intention of Highslide Software.

3DSecure not secure

You may have seen in various places that “3-D Secure” (aka “Verified by Visa” or “Mastercard Securecode”) is not as secure as it says. The original paper is here (PDF).

Unfortunately, having implemented the 3-D Secure system via a third-party somewhere in Europe, I have to agree with the authors. I will insist here on one aspect – the inline frame – but the authors are giving more aspects and some solutions worth considering in their paper.

The first issue is that most merchants or banks embed the 3-D Secure page in an inline frame: the 3-D Secure page appears as if it was served by the merchant website although it comes from another website. This is similar to the hypothetical case where that image in your newspaper comes from another newspaper. You wouldn’t notice the difference (unless/until the image is completely different from your newspaper content). And, back to our topic, if a fake 3-D Secure page is given inside the inline frame, it’s difficult to notice it, the most common way of noticing it (a different URL in the address bar) is indeed hidden by the inline frame. During the development and testing, I put in place an internal, fake but similar-looking payment page and we sometimes have to think twice before knowing if we were on the fake page or in the test environment. Webpages at a merchant or a bank website are of course supposed to be kept far from crackers and villains πŸ˜‰ But a man-in-the-middle attack (replacing on the fly the real payment page by a fake one allowing to collect card details) is rather easy to implement (considering actual villains know-how) and wouldn’t be noticed until they collected a certain number of card details …

To illustrate the above, please insert your card details below.

Card number:
Expiry date:
Secure code:
 

Fake 3D Secure

Apart from the fact this form was done in 30 seconds and doesn’t really look like a real a real payment form (and does nothing), how can you tell the difference? So, be careful when using 3D secure (with Firefox you can always right-click to see the security information about the form you are about to fill in). And always try to check the URL if it’s possible.

Evolution of H1N1

I needed some data to test the pChart charting library so I decided to use WHO data about swine flu (in its weekly updates). The only issue I had was that the WHO started to collect data by country and changed to gather data by regional offices from July 27th, 2009 onwards. So graphs below are only by regional offices.

Evolution of A/H1N1 cases - jepoirrier.net

Evolution of A/H1N1 deaths - jepoirrier.net

For your information:

  • AFRO: WHO Regional Office for Africa
  • AMRO: WHO Regional Office for the Americas
  • EMRO: WHO Regional Office for the Eastern Mediterranean
  • EURO: WHO Regional Office for Europe
  • SEARO: WHO Regional Office for South-East Asia
  • WPRO: WHO Regional Office for the Western Pacific

I didn’t really see such graph on the web but there is the excellent FluTracker by Dr. Niman and a lot of information about the swine flu on Wikipedia. If you want to start interpreting these curves, you might be interested in reading squareCircleZ’s post about the H1N1 and the Logistic Equation.

Redesigned Pubmed

I often wrote about Pubmed here. Briefly, it’s a search engine for publications in the biomedical domain. They recently redesigned their user interface and, although there are a lot of new things to save time that came with the new design, there is still a problem with their interface: the new search box takes too much space …

Redesigned Pubmed homepage
Redesigned Pubmed homepage (bigger image)

Redesigned Pubmed result page
Redesigned Pubmed result page: search box is hiding the logo, the display settings and the first result (bigger image)

To be fair, I must say these screenshots were taken with Firefox 3.5.3 on Fedora Linux but I didn’t see this problem with other operating systems nor other browser (not even Firefox on MS-Windows). Seems they tested their design with everything except Linux 😦 (A search with Pubmed redesigned doesn’t work with text-only browsers although the previous one perfectly worked)

Taking automated screenshots from a live video camera

Following my previous post, I attached a video camera to the composite input of my tv tuner. One good thing I didn’t noticed yesterday is that mplayer can be told to directly use pvr:// as a source instead of the generic tv:// (with many options). So you just have to enter mplayer pvr:// -tv device=/dev/video1:input=0 in order to watch tv.

Noticed the input=0 above? This tells the tuner to take the video signal from the tv (read the mplayer man page to see how to change the channel). Now, since I connected my video camera to the composite video in, I need to tell mplayer to use it with input=1. One last thing: taking a screenshot in mplayer is done by pressing the ‘s’ key (with option -vf screenshot. In summary, the image below was taken with mplayer pvr:// -tv device=/dev/video1:input=1:noaudio -vo x11 -vf screenshot
(camera facing the screen).

blurry capture of computer screen taken by camera connected to tv tuner

Now I want to take one screenshot every 5 seconds, even when I’m not there to press the ‘s’ key! For this purpose, we need to use a fifo file and mplayer in slave mode. Mplayer in slave mode will listen to commands we automatically send into the fifo file (by a different process, see below). This is how we do this:

mkfifo myfifofile.tmp
mplayer -slave -input file=myfifofile.tmp pvr:// -tv device=/dev/video1:input=1:noaudio -vo x11 -vf screenshot

And from another console, we can type echo "screenshot 0" >> myfifofile.tmp to take the screenshot. To automate all this, the following simple bash code is sufficient:

#!/bin/bash
# will send mplayer screenshot command every 5 seconds to fifo file
# stop this with Ctrl + C
LIMIT=0
while [ $LIMIT -lt 1 ]; do
echo "screenshot 0" >> myfifofile.tmp
sleep 5
done

In the end, stop the bash script with Ctrl + C and quit mplayer with echo "quit" >> myfifofile.tmp.

A first step toward TV on my Linux laptop

I recently got a Hauppauge WinTV-PVR-USB2 (a TV tuner, video recorder and FM receiver) because I read it was well supported on GNU/Linux. The following post explains how I installed it on a Fedora Core 9. If you want to install it with another Linux distribution, some information may vary but most of the following steps will be exactly the same.

First connect the USB device, the list of USB devices shows my system has recognised it:

[root@localhost ~]# lsusb
Bus 002 Device 003: ID 2040:2900 Hauppauge
...
[root@localhost ~]# dmesg
usbcore: registered new interface driver pvrusb2
pvrusb2: Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner : V4L in-tree version
pvrusb2: Debug mask is 31 (0x1f)
firmware: requesting v4l-pvrusb2-29xxx-01.fw
pvrusb2: ***WARNING*** Device fx2 controller firmware seems to be missing.
pvrusb2: Did you install the pvrusb2 firmware files in their proper location?
pvrusb2: request_firmware unable to locate fx2 controller file v4l-pvrusb2-29xxx-01.fw
pvrusb2: Failure uploading firmware1
pvrusb2: Device initialization was not successful.
pvrusb2: Giving up since device microcontroller firmware appears to be missing.

Although my tuner is fully recognised, the system needs a firmware in order to make it work. Where is the firmware? A quick search on a well-known search engine redirects us to Mike Isely’s website where he explains how to get the driver (Mike actually also wrote the driver for this TV tuner). Although I got the CD with drivers for Windows, I prefer to use the latest driver that can be found on the Hauppage support website. Mike also writes you can get the driver from the ivtv project.

So I uncompress the driver in the “win_driver” directory and launch Mike Isely’s fwextract.pl script:

[jepoirrier@localhost hauppauge]$ mkdir win_driver
[jepoirrier@localhost hauppauge]$ unzip hauppauge_cd_3.4d1.zip -d win_driver/
[jepoirrier@localhost hauppauge]$ ./fwextract.pl

The script extracted 4 drivers (2 decoders and 2 encoders) and dmesg already told me the two I need: v4l-pvrusb2-29xxx-01.fw and v4l-cx2341x-enc.fw (as encoder). To know where to put these files, check a little bit on the web (this depends on your GNU/Linux distribution). On the Fedora Core 9, it’s in /lib/firmware, so:

[root@localhost hauppauge]# cp v4l-cx2341x-enc.fw /lib/firmware
[root@localhost hauppauge]# cp v4l-pvrusb2-29xxx-01.fw /lib/firmware

Unplug your USB cable, re-plug it and a dmesg should give you a long list of what your system detected, the most interesting part being the last line where it request the firmware and doesn’t stop: firmware: requesting v4l-cx2341x-enc.fw πŸ™‚ Now check your video devices and you should have an additional /dev/videox:

[root@localhost hauppauge]# ls /dev/vid*
/dev/video /dev/video0 /dev/video1

In my case, /dev/video1 is the one I need …

Now, how to watch TV? TVTIME seems to be good but, unfortunately, my video card driver doesn’t support hardware YUY2 overlay (I have an ATI Radeon Mobility HD 2600 with the open source radeon driver). No problem: mplayer /dev/video1 shows a very beautiful snow. Now I need an antenna or a cable to connect to my tuner …

mplayer -vo x11 /dev/video1 -vf and then s

Watch your webcam with mplayer

A small post just to keep this command at hand:
mplayer -fps 30 -tv driver=v4l:width=640:height=480:device=/dev/video1 tv://
This allows you to watch what your webcam “sees” (provided it uses a video4linux webcam). Btw, Cheese is funny to use too!

I was also trying to find a decent Python library for video4linux but I only found outdated ones (libfg, 2003, and pyv4l, 2002). I guess I’ll have to use some C library for a small project I’ll tell you about later πŸ˜‰

E-conferences

Following my previous post about an e-conference, Daneel Ariantho provided me with interesting informations …

The conference about scientific patents was part of Second Nature, (scientific journal) Nature’s home in the virtual world of Second Life. Following their description, Second Nature is home to scientific exhibitions, ongoing projects and regular events. The conference in itself was given in November 2007 but, unfortunately, nor slides nor podcast are available. In real life, if you miss a conference, you still have a copy of the slides or, at least, the abstract πŸ˜‰ .

In the second part of my post, I was wondering if contacts were better in virtual worlds and if the quality standard of most “real world” scientific events was still there. But since this particular event was organized by a Closed Access journal on a semi-closed virtual world, I will wait for more events of this kind before forming an opinion on these events (current educational events in Second Life doesn’t seem to be too serious …).

E-conference about scientific patents

Conference about scientific patents

While looking for pictures related to patents, I found these interesting ones taken by Daneel Ariantho on Flickr. They depict a virtual conference about scientific patents. It could be interesting to get more information about 1) the content of this conference and 2) the kind of conferences organized in these virtual worlds. It could also be interesting to see the social aspects of these conferences (are your contact better/different in a virtual conference?) and the “quality control” (of speakers, of posters, of advertizers, …).