📜 ⬆️ ⬇️

We consider the width of the screens of site visitors

Introduction


I recently discussed with a girl designer, under what screen sizes it’s worthwhile to draw websites. Our arguments were, to put it mildly, unfounded:
- My website on my home computer is too wide, I need to do it under a wide screen.
- It is necessary to do under small screens. A bunch of people are surfing the Internet from mobile devices. Almost no one has large monitors.
- Yes, a lot of people with such monitors! All my friends have big monitors.
- Yes, you have friends - designers and photographers. And the people do not have such monitors!

It is clear that more weighty arguments were needed - it is time to turn to statistics.


Count


')
There are a number of sites that provide access to collected data about their visitors. One of these sites is the former SpyLog, and now Openstat, the issuing and report on the resolution of screens . The data there, at first glance, is not very useful: the knowledge that the most popular resolution - 1366 × 768 - occurs in 19 percent of visitors, will not help me much. But we can get this data as a separate file that we can process. Available in 4 formats - PDF, XLS and two text: CSV and Tab separated, here called tsv, which we take.



Most of the file is view strings.
1366x768 4097016,19 18,43 % 263923118 1147661296
From this we are interested in the width (the first number in the left margin) and the number of views (the right margin). The penultimate field - the number of visits - if expressed in relative terms, differs slightly from the number of views. For each possible width, we calculate the sum of occurrences of this width, discarding the height data (for a web designer, it is not so important). The counting process can be combined with obtaining a file with the processed data:

 wget 'https://www.openstat.ru/rest/v0.3/ct:openstat:trends/display/columns/20120820-20120920?column=0%0Dvisitors_sum_average&column=0%0Dvisitors_sum_average_verticalpercent&column=0%0Dsessions_sum&column=0%0Dpageviews_sum&primary_column=0&view_id=1810&format=tsv' -O - \ | perl -nlaF'\t' -MList::Util=max \ -e '$F[0]=~s/x.*//||next;$sum{$F[0]}+=$F[4];END{for$k(0..max(keys%sum)){print"$k\t$sum{$k}"}}' 


We obtain such a list of pairs of width and total number of visitors:

  0	
 1 445931
 2	
 3	
 four	
 five	
 6	
 7	
 eight	
 9	
 10 29183
 eleven	
 ... 


It is clear that it makes no sense to take into account all possible values ​​of the width - it is necessary to evaluate the ranges of values. We calculate the sum of the number of visitors who have a certain width of the screen, with the number of visitors who have screens of smaller width. You can do this in any office suite (in my case, LibreOffice), in it you can immediately build a graph. The resulting table with the schedule is ge.tt/9iHIH8O (110 kilobytes).

Slightly embellish the graph - add labels of popular values:



Some conclusions



Source: https://habr.com/ru/post/151930/


All Articles