IBM Intelligent Operations Center REST Client

I made a simple command line REST client while making the IBM Traffic Operations Center demo. Although the REST client was done for specific IOC demo, I think it can be used in any IOC demo that uses REST or it can be used to just poke around the IOC REST API.
Continue reading “IBM Intelligent Operations Center REST Client”

IBM Intelligent Operations Center and Police

In this scenario I use IOC to view official announcements by Finnish Police. In previous post about IOC I mentioned that any image can be used as a location map and in the screenshot below I use an image of Finland’s main police stations as a location map to show police announcements.

IOC_police_announcements_wk40

Continue reading “IBM Intelligent Operations Center and Police”

OLViz: visualizing text with a single line

The next version of One Word Visualization visualizes a given text with a single line. I call it One Line Visualization and let’s abbreviate it as “OLViz”.

Visualization of "OLViz"

Idea of OLViz is to use a single colored line in 3D space to represent text. The way its done is to calculate MD5 hash from text and then use that hash as seed for Processing‘s random generator. Line vector coordinates, color and rotations are randomized and since each seed is unique then all texts have unique one line visualization. Continue reading “OLViz: visualizing text with a single line”

Bug in Automation

@KemiraGroup discovered a little bug in my automation code for tweet statistics. I tested with Firefox and Safari and it worked for me… but then Peter Sjöholm (@sjoholm) informed that the bug manifested itself in IE8 & XP. I reproduced using IE6 and XP and then fixed the bug.

The reason why bug happened was because of one little comma… The excerpt below shows the bug in the list that is used to generate bar chart with Google Charts.

['Thehomedepot',0],
        ]);

The code below has no comma and it works.

['Thehomedepot',0]
        ]);

The bug fix in the code generation is below.

LAST=len(rankingDict)-1
i=0
for company,tweetCount in rankingDict:
  if i==LAST:
    htmlFile.write("['%s',%d]\n"%(company.capitalize(),tweetCount))
  else:
    htmlFile.write("['%s',%d],\n"%(company.capitalize(),tweetCount))
  i=i+1

Python, Google Charts and Twitter Statistics

I post weekly statistics of DJIA and OMXH25 companies’ tweeting activity where companies are ranked by the number of tweets during the previous week (Mon-Sun).  See this Top tweeters (DJIA) 23.4. – 29.4.2012 as an example.

But how do I do that? I do it automatically, using Python, Python Twitter API, MySQL, Google Charts and cron. Continue reading “Python, Google Charts and Twitter Statistics”