Wednesday, July 22, 2009

Pandemic Perspective

The Swine Flu outbreak/pandemic/scare (pick depending on hysteria level) is all the rage at the moment. The current state of infections and deaths due to this strain of flu is available here. I thought that it would be enlightening to have a quick look at the data and see what is going on.

The Data
Let's have a look at the data for 6 countries:- Australia, Canada, Mexico, Spain, UK and US. The data data shows the situation as of the 17th of July, 2009.




We can clearly see that the US has a very large number of confirmed cases. This is perhaps not the best metric since the US has a large, well connected (roads, air-travel and rail) population. More rural countries with less inter-city connectivity (eg. Spain) would probably see the number of cases be smaller.

A normalised infection rate will give us a better handle on the real extent of the spread of the virus.


Of course, the infection rate will change over time. Smaller populations are likely to achieve their maximum infection rate sooner than larger ones. Perhaps this is a factor in explaining the differences between, say, Australia (21,855,000) and the UK (61,612,300).

As unpleasant as it is to suffer from flu symptoms, what we're really afraid of is dying. So let's have a look at the deaths per million population in these countries.

Unfortunately, what we see above still has some time dependant factor to it. As the number of cases increases then so to will the number of deaths. The above method doesn't help us to compare the situation across countries.

What we should be measuring is the number of infections that lead to death. Although this will still be somewhat dependant on the sample size it will at least give us a first order summary of what the infection-to-death cases look like as well as some comparison between the countries. We are assuming that each country has the same strain of the virus so that a given equivalent person in any of the countries will have the same mortality rate due to the virus. Extrinsic factors such as accessibility to health care level and general health of the population will also affect the results this is as good a high level overview as any other.

So should I panic!?

As ever, this isn't going to be much of a conclusion. Panic is a very personal reaction. In the US seasonal flu accounts for over 100 deaths per million of population. As you can see above (3rd diagram down), swine flu is currently at 0.84 deaths per million of population. I couldn't find any data on the infection-to-death rate for seasonal flu due to the fact that every web search serves up swine flu data. I'll just add it to the other causes of death that I'm not worried about.

Some more perspective:- Here in Spain, suicide accounts for 160 deaths-per-million population... and I'm not planning on catching that either!

Shameless plug:- All images diagrams were created using the DatalightProject's online statistics tool.

Tuesday, July 14, 2009

Sugar Daddy

My wife is in the process of building our first manzanoling. I was tempted to start with "My wife and I are in the process..." but my input to the creation process was over quite a while ago...

Before my wife was diagnosed with Gestational Diabetes I didn't even know that it existed (my bad!). Depending on the severity it can be more or less of a problem. The hospital provided us with small machine to measure my wife's blood sugar before and after meals. My wife*, being the iron willed obsessive that she is, took it upon herself to record the values and try different things to see if she could keep the sugar under control.

98 meals in and I decided to load up the data in the DataLightProject app. I had a pretty good qualitative handle on how things were going but I hadn't really been following the numbers that closely.

The diagram represents data before all meals (breakfast, lunch, dinner). We already knew that before eating her blood sugar values were generally within the normal range. The thing to keep an eye on is after eating.

The average value doesn't look too bad, but the Max value of 202 mg/100ml points to the fact that all is not as it should be.

Some quick application of filtering by food type and we get some idea of what foods are to blame. Some things were no surprise:- Orange juice (average 202 mg/100ml) and All-Bran (average 163 mg/100ml) were leaders in causing higher blood sugar. But toast (average 152 mg/100ml) for breakfast was a surprisingly bad thing too!

The most surprising effect on post meal blood sugar came when considering exercise. Now given that my wife is pregnant, the kind of exercise that she can do is pretty light. Even so this has a dramatic effect:

A 20 minute walk after breakfast makes a real difference. The blood sugar measurements after breakfast are consistently higher, so being able to get that under control was a real bonus. I'm not sure why exercise has a greater effect following dinner, but it's definitely real.

With any luck the diabetes will stop once the baby is born. This run-in with diabetes has really made us think about what it must be like to live with this condition throughout your whole life. Of course there are treatments but diabetes has a lot of day to day overhead. Most of us don't have to think about what food types we can eat or how long we can or can't wait between meals. Diabetes isn't as solved a problem as most of us like to think.

Shameless plug:-

Simplicity is what the DataLight Project is all about. We want to empower people with the ability to look at their real data and gain some real value. It took me a total of 12 mouse clicks in DataLight to prepare all of the diagrams for this post (yes, I counted). This gives the user the ability to think about the underlying data and it's meaning, rather than the number crunching. So why not give it a go!

*I'm referring to my wife as my "Dream Girl" - not as someone I met from a dying world; we don't talk about that.

Thursday, July 2, 2009

The Rich, the Internet and the Application

Whilst researching this post I made a frightening discovery:- I didn't know how to define a Rich Internet Application (RIA). Now I'm pretty used to feeling stupid and confused. Confusion is pretty much the default state for scientists, programmers and anyone who's job it is to do, or work with, new things. Politicians often seem to be confused too, although I suspect that "I thought I could claim for that" type of confusion is a little different to "Why doesn't this work?". Just a hunch...

Now I'm guessing that a bunch of you are thinking, "Fran, you idiot! It's obvious what an RIA is! You are selling one for pity's sake!" And you'd be correct. Sometimes you just know. But let's examine some other cases and have a think.

The Rich

Let's look into the Rich experience. A natural place to start is with Microsoft's flagship technology for creating applications: WPF. Believe it or not, this isn't taken from CSI: Miami, but is a showcase of what can be done with WPF (although you'll be bombarded by cool animations and music just like in CSI: Miami). Although these are all desktop applications, you'll notice that several of them source their content from the internet. That's fine, Outlook gets most of its content from the Internet but nobody would call it a RIA.

Twitter clients, which are obviously sourced from the Internet, present some great Rich experiences. TweetDeck is one of the more popular clients and runs using Adobe-Air. Adobe Air and Silverlight often get lumped together as providing the similar, competing features. Whereas Silverlight is considered 100% internet, Adobe Air appears to be taken seriously on the Desktop. I haven't heard reference to TweetDeck as an RIA at all. Another interesting Twitter client is Blu. Blu has impressive visuals and is built using WPF. Blu is installed via ClickOnce. Although Blu obviously isn't an RIA, the install mechanism makes for a painless experience which we have come to associate with Internet apps ie., no install.

Defining a Rich experience is easy. Defining a Rich Internet one is slightly blurred.

The Internet

The Internet bit of the discussion should be easy. Surely if it's in a browser then it's Internet. Maybe. YouTube is definitely and Internet application. But my phone has a YouTube client on it since it doesn't run Flash. Now everybody knows that YouTube is an Internet application and just because some people chose to run it in a client doesn't change that. So maybe the definition goes a little beyond where the client is installed.

Balsamiq mockups is an excellent UI mockup application. I think that everyone's gut reaction would be to call this a bonafide, as sure as Bing Is Not Google, 100%, Rich Internet Application. It's built using Adobe Air and can be deployed to a Web Server, run from the website and bought as a desktop app. So are we back to square one?

Silverlight 3 will offer developers the opportunity to run their applications outside of the browser. So does this make them desktop applications? I guess so. Rich Internet Application - Internet = Rich Application. Right?

The Application

I'm pretty sure we can all agree on what an application is. Word is an Application. Google Docs is an application. They are both completely different and yet have an incredibly large overlap. The delivery mechanism is completely different. The licensing couldn't be more disparate. But they both create documents. Easy. Google Docs is an RIA. You can save output to the desktop but it's definitely an RIA. No arguments.

Conclusions

So what have we learnt? I'm not exactly sure. I think that what we have seen is that there is a significant blurring between the differences between an Internet application and a desktop application. They can share delivery mechanisms (Internet installs from ClickOnce), technology (Adobe Air) or even frameworks (Silverlight is a subset of WPF).

The most important factor in deciding on an application is its usefulness to you. If it suits the customers requirements and budget then it will be used.

Lets stop worrying about where the application is running. In 2009 it's just an implementation detail.

So to conclude: I still don't know what RIA is. I told you I was an idiot.