Tuesday, November 8, 2011

Research: Facebook usage in Egypt (Statistics, Peaktimes and Analyses)

Do you know what is the peak usage time of Facebook in Egypt, did you ever wonder what is the best time to post on Facebook or to schedule your advertisement campaign ?

The research below answer these questions

The Research

I managed to conduct this research on a 2 weeks span using a script which accesses my personal Facebook account every 30 minutes and counts the number of online friends at that time, these numbers were saved and analyzed to deduce the conclusion below

Note: the same research has been made on Twitter, check the link below
http://karim-ouda.blogspot.com/2011/11/research-twitter-usage-pattern-in-egypt.html

Factors:
Total number of friends: 200
Number of online friends ranges from 3 to 23 depending on the time
Research time span: from 21/10/2011 - 03/11/2011
Online Friends: 75% are Egyptians living in Egypt


Conclusion

Working Days

- Working days (Sunday-Thursday) showed higher usage than Weekends
- Peak usage in working days has been occurring consistently in two time spans
== First:from 11 AM to 5 PM - Work hours :) -
== Second: from 11 PM to 12 AM ( Midnight before sleeping )

Weekends

- Weekends has different peak time patterns

== Friday has two peaks:
  1. From 1 PM to 3 PM
  2. From 8 PM to 10 PM
  3. In addition to the midnight peak
== Saturday has many unique peaks:
  1. from 10 AM to 12 PM
  2. from 1-2 PM
  3. from 5-6 PM
  4. from 8-9 PM

Overall

- Top peak time for all days is 13:30
- Top peak time span for all days is from 12:30 to 16:30
- The lowest dips are @ 5 AM and 7 Am

Charts

Overall Facebook usage by Egyptian users in a 2 weeks timespan (Hourly)



Technical Stuff

I am posting the code i created to conduct this research in-case you need to do the same on a different sample/purpose ( also check the license below )

Prerequisites

1- Linux Machine
2- Basic linux/shell scripting/programming knowledge
3- 24/7 internet connection
4- Facebook cookie file/string

Steps

1- Add the following Linux shell commands to a script file (file.sh)

### Get snapshot of facebook html page
rm -rf index.html; wget --header="Host: www.facebook.com" --header="User-Agent: Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0" --header="Accept: text/html" --header="Accept-Language: en-us,en;q=0.5" --header="Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" --header="Connection: keep-alive" --header="Cookie: YOUR ACCOUNT COOKIE" 'http://www.facebook.com/' --content-disposition


### parse Facebook html page, retrieve Chat online friends count, append count and time information in a CSV file
cat index.html | sed -e 's/\\u003c/)[0-9]*?(?=\<\\\/strong>\))" | echo `date "+%Y-%m-%d, %a, %H, %M"` , `cat -` >> facebook-data.csv

2- create a cron job to run this file every 30 min

crontab -e
0,30 * * * * /home/user/file.sh
CTRL-O
CTRL-X


Copyright/License


Creative Commons License
Facebook usage in Egypt statistics, research and code by Karim Ouda is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.


Relevant Research

http://mashable.com/2012/05/09/best-time-to-post-on-facebook


4 comments:

  1. great work man, really deserve appreciation. hope u can run it using facebook account with large number of friends like kolna khaled said so ur sample is more than one million :)

    Sameh Ahmed

    ReplyDelete
  2. nicely done!

    Ahmed Salem

    ReplyDelete
  3. Great piece of work!! it certainly got me interested on getting some Egypt-based user studies done

    ReplyDelete
  4. I built something similar to track the likes on a facebook page using cacti RRD and shell scripting...you can check the post here
    http://supporthandbook.wordpress.com/2011/09/27/cacti-to-track-fb-page-likes/

    ReplyDelete