Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
For 2021 - online Python 3 training - see ((here)).

Our plans were to retire in summer 2020 and see the world, but Coronavirus has lead us into a lot of lockdown programming in Python 3 and PHP 7.
We can now offer tailored online training - small groups, real tutors - works really well for groups of 4 to 14 delegates. Anywhere in the world; course language English.

Please ask about private 'maintenance' training for Python 2, Tcl, Perl, PHP, Lua, etc.
Reading Google Analytics results, based on the relative populations of countries

We get a lot of traffic on our web site, but where does it come from? Our raw log files tell us a great deal, but there is just so much data there it's very hard to manage, so we're using Google Analytics as well. I'm delighted to read reports of xxx visitors from Sweden, yyy from Romania and zzz from Argentina. But these are countries with very different populations; I would be very interested to know how the figures stack up as a proportion of the population. In other words, take an average city with a million people and ask "if it's in xxxx country, how many of its people have we reached?"

By taking three files - table of top level domain names (may not be needed, but useful for tabulating the results), a table of country name to population mappings, and our own data from Analystics, I answered my question. It's a Python program - source code [here] - in which I read a table of populations (from WikiPedia) and a list of top level domains. You'll find the URLs of both of these extra files in the source if you want to try it on your Google Analytics. And I've then simply cut and pasted Google's visitors by country table into a file called "gad" to run the program on my personal data.

From a Python demonstration program viewpoint, there are excellent illustrations of Regular Expression use in Python, the use of a static method, and the changing of the natureal sort order on a list - the example is now available to me to illustrate these points during our Python Courses

From Google Analysics, the top ten countries in terms on NUMBERS of visitors are United States, India, United Kingdom, Germany, France, Canada, Philippines, Italy, Russia and Brazil. But looking at that based on the population of each country, we see a very different story:

  wizard:anaproj graham$ python visitors | head -10
  .   is: 81.4 12291 [Iceland]
  *   fi: 75.8 13185 [Finland]
  **  hk: 75.0 13327 [Hong Kong]
  *   si: 71.0 14090 [Slovenia]
  **  se: 68.9 14505 [Sweden]
  *** uk: 66.5 15037 [United Kingdom]
  **  ch: 56.8 17606 [Switzerland]
  .   mc: 55.7 17940 [Monaco]
  .   li: 55.3 18078 [Liechtenstein]
  **  il: 53.3 18747 [Israel]
  wizard:anaproj graham$

What is the story? In the UK, in the time period of my data we have reached one person in 15,000 - that's 66 people in an average city of 1 million. We've only achieved deeper penetration than this in some smaller countries (the first file is a rough indication of size to allow a quick visual selection of significant countries). Good news for us - we're a UK based company and I would be very concerned if the UK wasn't high up the list. It also gives me an idea of where else there could be an interest, and it's not a big surprise that includes smaller nations with an excellent comprehension of English in the technical / professional population. Filtering out the three countries with the largest number of visits from my list above, we get a very different story when we look at population penetration:
  *** uk:  66.5  15037 [United Kingdom]
  *** us:  27.3  36605 [United States]
  *** in:   3.9 256125 [India]

In other words, although we have more visitors from India, it's much more widely spread - not 66 people from a city of 1 million, but just 4 people.

All of this is valuable feedback - it turns out to confirm what I had suspected / surmised anyway, so it hasn't resulted in any "thunderbolt moments"; rather, it's re-assuring.

A further question arises, though, about the metrics of our visitors. We aim at the professional market - with a typical Monday to Friday, 9 to 5 work pattern but with a spread out to evening and weekend work. Can we see any evidence to suggest that we may, or may not, be reaching that metric? This Google Analyticd graph shows, hour by hour over a period of about 8 days, the number of visitors to key pages that we're tracking. Once again, the results are positive for us, with a distinct daily cycle peaking during the European working day, but with a much more stunted peak on Saturdays and Sundays. I did wonder if I would have liked to see the night troughs a little lower, but bearing in mind the worldwide nature of our visitors, and the huge populations of India and the USA (5.5 hours behind and up to 8 hours ahead of the UK), I can understand why our web site never sleeps.

(written 2012-03-24, updated 2012-03-31)

Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
G911 - Well House Consultants - Search Engine Optimisation
  [165] Implementing an effective site search engine - (2005-01-01)
  [427] The Melksham train - a button is pushed - (2005-08-28)
  [1015] Search engine placement - long term strategy and success - (2006-12-30)
  [1029] Our search engine placement is dropping. - (2007-01-11)
  [1344] Catching up on indexing our resources - (2007-09-10)
  [1793] Which country does a search engine think you are located in? - (2008-09-11)
  [1969] Search Engines. Getting the right pages seen. - (2009-01-01)
  [1971] Telling Google which country your business trades in - (2009-01-02)
  [1982] Cooking bodies and URLs - (2009-01-08)
  [1984] Site24x7 prowls uninvited - (2009-01-10)
  [2000] 2000th article - Remember the background and basics - (2009-01-18)
  [2019] Baby Caleb and Fortune City in your web logs? - (2009-01-31)
  [2045] Does robots.txt actually work? - (2009-02-16)
  [2065] Static mirroring through HTTrack, wget and others - (2009-03-03)
  [2106] Learning to Twitter / what is Twitter? - (2009-03-28)
  [2107] How to tweet automatically from a blog - (2009-03-28)
  [2137] Reaching the right people with your web site - (2009-04-23)
  [2324] What search terms FAIL to bring visitors to our site, when they should? - (2009-08-05)
  [2330] Update - Automatic feeds to Twitter - (2009-08-09)
  [2428] Diluting History - (2009-09-27)
  [2552] Web site traffic - real users, or just noise? - (2009-12-26)
  [2562] Tuning the web site for sailing on through this year - (2010-01-03)
  [2686] Freedom of Information - consideration for web site designers - (2010-03-20)
  [2748] Monitoring the success and traffic of your web site - (2010-05-01)
  [3746] Google Analytics and the new UK Cookie law - (2012-06-02)
  [4121] Has your Twitter feed stopped working? Switching to their new API - (2013-06-23)

A606 - Web Application Deployment - Apache httpd - log files and log tools
  [376] What brings people to my web site? - (2005-07-13)
  [1237] What proportion of our web traffic is robots? - (2007-06-19)
  [1503] Web page (http) error status 405 - (2008-01-12)
  [1598] Every link has two ends - fixing 404s at the recipient - (2008-04-02)
  [1656] Be careful of misreading server statistics - (2008-05-28)
  [1761] Logging Cookies with the Apache httpd web server - (2008-08-20)
  [1780] Server overloading - turns out to be feof in PHP - (2008-09-01)
  [1796] libwww-perl and Indy Library in your server logs? - (2008-09-13)
  [3015] Logging the performance of the Apache httpd web server - (2010-10-25)
  [3019] Apache httpd Server Status - monitoring your server - (2010-10-28)
  [3027] Server logs - drawing a graph of gathered data - (2010-11-03)
  [3087] Making the most of critical emails - reading behind the scene - (2010-12-16)
  [3443] Getting more log information from the Apache http web server - (2011-09-16)
  [3447] Needle in a haystack - finding the web server overload - (2011-09-18)
  [3491] Who is knocking at your web site door? Are you well set up to deal with allcomers? - (2011-10-21)
  [3554] Learning more about our web site - and learning how to learn about yours - (2011-12-17)
  [3974] TV show appearance - how does it effect your web site? - (2013-01-13)
  [3984] 20 minutes in to our 15 minutes of fame - (2013-01-20)
  [4307] Identifying and clearing denial of service attacks on your Apache server - (2014-09-27)
  [4404] Which (virtual) host was visited? Tuning Apache log files, and Python analysis - (2015-01-23)
  [4491] Web Server Admin - some of those things that happen, and solutions - (2015-05-10)

Back to
Stepping through a list (or an array) in reverse order
Previous and next
Horse's mouth home
Forward to
Future train services in Wiltshire - please write in to support a better service
Some other Articles
Off to walk the dogs
Object oriented or structured - a comparison in Python. Also writing clean regular expressions
Melksham Train Service - please support the TransWilts case for regular trains
Future train services in Wiltshire - please write in to support a better service
Reading Google Analytics results, based on the relative populations of countries
Stepping through a list (or an array) in reverse order
Kings Cross - new concourse - between Python in Cambridge and Objective C in London
A modern area of Cambridge - some thoughts provoked?
Makefile variables - defined internally, from the command line and from the environment
Will will smile?
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page

This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2022: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/3670_Rea ... tries.html • PAGE BUILT: Sun Oct 11 16:07:41 2020 • BUILD SYSTEM: JelliaJamb