Horas and konnichiwa untuk semua


Indonesians online behavior
April 1, 2009, 11:53 am
Filed under: en/General

The other day I was given this link which tells about Yahoo Indonesia and a research company announcing their research on Indonesians’ online behavior:

Internet, Kita, dan Masa Depan

http://cetak.kompas.com/read/xml/2009/03/27/03024518/internet.kita..dan.masa.depan.

I am a bit skeptical about statistics like this, since research companies like AC Nielsen, IDC etc often lack the knowledge they need to analyze the market. They are already famous so they dig lots of money, though their research staffs lack the knowledge to analyze the market.

So I decided to find out by myself.

I took Facebook as my target, as Indonesians are said to be crazy of Facebook and my observation shows it is true. I wanted to find out how long is an Indonesian online on Facebook everyday. Just logging in into Facebook makes one’s status online. I thought I needed to check who among my friends on Facebook that get online and when. I decided to use Adium, since it has Facebook client and senses when a friend becomes online. I thought Macruby would be nice since it has Cocoa natively, but after trying for a while I thought it was too much to learn and I only got a few hours. I turned to AppleScript, which is also new to me, though I used to be programming on HyperCard, its predecessor. I finally coded the stat tool in a few hours using AppleScript, Adium and Growl. Growl is only used for visual feedback, because the script must be running throughout the whole data gathering session.

The next day I ran the script and gathered the data from 7:30AM to 17:30AM West Indonesia Time. I got quite consistent results, as follows:

1. Around 25% of my Facebook friends (more than about 99% of them are Indonesians) went online that day
2. Average total online time among friends who went online that day is about 60 minutes (i.e., 1 hour)
3. Standard deviation is high (around 60), indicating that total online time varies a lot among friends
4. Average total online time for the whole population (which includes those who did not go online that day) is about 15 minutes

My tool has room for improvement indeed (e.g., I am polling once every 60 seconds, so users who went online and offline in between pollings won’t be noticed), and the sample for this statistic is too small compared to the population (the sample is 259 friends, and the Indonesian population on Facebook is around 800,000 users, according to Facebook Ad). But at least this shows that there is a good probability that 200,000 Indonesians (i.e., 25% of 800,000) are online on Facebook every working day during working hours;)

Now I wanted to know what would be the result if I measure during the night (off-hours) and during weekends. This might give some insights on whether there are significant mobile users logging in into Facebook. In Japan, more users use mobile to access Mixi, a Japanese SNS, than PC. By the way, Mixi was made by an (former) Indonesian named Batara Kesuma ;)

No, sorry, this is not April’s Fool. I really did the above research :P

Here is the AppleScript code. Comments are welcome but be gentle, as this is my first AppleScript script and I coded it in a few hours. I originally wrote the data to file, but then changed the implementation to use Sqlite, so some garbage is still in the code.

-- Arnold P. Siboro, 2008/3/30
--
-- This app polls Adium to find Facebook friends online

(* set the_file to (((path to desktop) as string) & "test.txt") as file specification *)

set observationperiod to 240 -- period in minutes
set delprevdb to 1 -- delete previous database when set to 1

set loc to space & "~/desktop/FBTestDB.db" & space
set head to "sqlite3" & loc & quote
set tail to quote
set tblName to "facebook"

if delprevdb is 1 then
set newTbl to "drop table if exists " & tblName & "; create table " & tblName & "(id, dispname, totalminutes,network,firstonline,lastonline); "
do shell script head & newTbl & tail
--display dialog "Table created"
end if

tell application "GrowlHelperApp"
set the allNotificationsList to ¬
{"Facebook stat", "Another Test Notification"}

set the enabledNotificationsList to ¬
{"Facebook stat"}

register as application ¬
"adiumpoll" all notifications allNotificationsList ¬
default notifications enabledNotificationsList ¬
icon of application "Script Editor"
end tell

tell application "Adium"

set counter to 0
repeat observationperiod times

set d to (current date)
set polledtime to "" & year of d & "/" & (month of d as integer) & "/" & day of d & " " & hours of d & ":" & minutes of d & ":" & seconds of d

set counter to counter + 1
set notificationmsg to "Polling no." & counter & (ASCII character 10) & "Time: " & polledtime

tell application "GrowlHelperApp"
-- Send a Notification...
notify with name ¬
"Facebook stat" title ¬
"Polling round" description ¬
notificationmsg application name "adiumpoll"

end tell

set alluserlist to display name of every contact of second account
set userlist to display name of every contact of second account whose status type is not offline

set users to ""
set onlineusers to ""

repeat with user in alluserlist

repeat with onlineuser in userlist

if onlineuser contains user then
set userstatus to 1
set onlineusers to onlineusers & onlineuser & (ASCII character 10)

set query to "select totalminutes from " & tblName & " where dispname='" & onlineuser & "'; "
set totalminutes to do shell script head & query & tail

--display dialog "query: " & query & ", result: " & totalminutes

if totalminutes is not "" then
--display dialog "totalminutes is not empty, " & totalminutes
set totalminutes to totalminutes + 1
set query to "update " & tblName & " set totalminutes=" & totalminutes & ",lastonline='" & polledtime & "' where dispname='" & onlineuser & "'"
--display dialog "query : " & query
else
--display dialog "totalminutes is empty, " & totalminutes
set totalminutes to 0
set query to "insert into " & tblName & " values('','" & onlineuser & "', '" & totalminutes & "','','" & polledtime & "',''); "
--display dialog "query : " & query
end if

do shell script head & query & tail

--display dialog "User: " & onlineuser & ", Total min: " & totalminutes

exit repeat -- found a match with online user list, so exit repeat
else
set userstatus to 0
end if
end repeat

--set users to users & userstatus & ","
end repeat

tell application "GrowlHelperApp"
notify with name ¬
"Facebook stat" title ¬
"Friends online" description ¬
onlineusers application name "adiumpoll"

end tell

set users to (polledtime & "," & users & (ASCII character 10))

(*
try
open for access the_file with write permission
--set eof of the_file to 0
write (users) to the_file starting at eof
close access the_file
on error
try
close access the_file
end try
end try

  • )

tell application "GrowlHelperApp"
notify with name ¬
"Facebook stat" title ¬
"Delay" description ¬
"Delaying for 60 seconds" application name "adiumpoll"

end tell

delay 60 -- in seconds
end repeat
display dialog "Finished."

end tell


Leave a Comment so far
Leave a comment



Leave a comment
Line and paragraph breaks automatic, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>