3

This question is similar to

Where can I find the number of monthly pageviews for Stack Overflow?

but it's not a duplicate, because I don't want to look at the statistics of a single site: I want to compare stats for three sites (Cross Validated, Artificial Intelligence and Data Science). If I go here:

https://stackexchange.com/sites?view=list#traffic

all the sites are shown. I'd like to visualize only the three sites above in order to easily compare their stats:

  • questions
  • answers
  • % answered
  • visits/day
  • questions/day

I know (very little) about the Data Explorer, but I don't know anything about DB programming languages, thus if it could be possible to get my answer simply by using the https://stackexchange.com/sites page, that would be better.

  • 2
    SEDE doesn't have visits, let alone per day so if SEDE is used at best you'll get a partial answer. – rene Dec 30 '18 at 18:45
  • @rene one more reason to prefer an answer which doesn't use SEDE! :-) – DeltaIV Dec 30 '18 at 18:46
3

You can only achieve that on that page if you're willing to run some some JavaScript in the console of your browser on that specif page:

$('.lv-item').each(function() { 
    var sites=['stats','ai','datascience']; // which sites to select
    var t= $(this); 
    t.hide(); 
    t.css('position',''); // get rid of fixed
    t.css('top','');     // vertical postions
    if(function() {
        var result = false; 
        $(sites).each(function(){ 
            if (t.hasClass('site-' + this)) result = true; 
         }); 
         return result;
       }()){
       t.show(); 
       t.css('float','left'); // move it to the left, whatever it takes
    }});

The script basically hides the nodes that you're not interested in and fiddles a bit with the CSS so the remaining content appears at the top. Refresh your page to go back to the normal view.

The values that go into the sites array can be found by looking up the api_site_parameter for the site you're interested in of the /sites endpoint of the Stack API.

When run this will be the result today (I have shown the Developer Console at the bottom of the screen so you get an idea where you have to run this):

enter image description here

I leave it as an exercise for the reader to transform this in a userscript that can be run from a script manager like Tamper Monkey.

  • Perfect! Thanks a bunch, and Happy New Year! – DeltaIV Dec 30 '18 at 20:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .