Commit fb78dc1d authored by Paul Asmuth's avatar Paul Asmuth
Browse files

categorical topk wip

parent 92fdd26f
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ attribute types:
./bin/fnordquery -r localhost:1234 --query "


categorical_top_k (top keywords)
categorical_correlation (keyword correlation)
categorical_crosstab (chanels x filters)
categorical_uniqueness (zipfs law)
@@ -28,7 +27,6 @@ categorical_uniqueness (zipfs law)
cluster_cardinality (number of searches per session)
cluster_repetition (search term repetition per session)

numeric_timeseries (numer of searches)
numeric_distribution (price/age dist, w. variance/dispersion and stuff)
numeric_correlation (numeric dependency)

+17 −1
Original line number Diff line number Diff line
class FnordQuery::CategoricalTopKReport < FnordQuery::Report

  #def 
  def execute(runner, _backend)
    super
    backend = _backend[0].new(_backend[1])

    colors = ["#CD645A", "#2F635E", "#FACE4F", "#42436B"]
    
    #backend.on_finish do
      render_result
      runner.send(:shutdown, true)
    #end
  end

private

  def render_result
    render_haml(:categorical_topk_report, 'report.html')
  end

end
 No newline at end of file
+13 −6
Original line number Diff line number Diff line
@@ -117,13 +117,14 @@ color:#000;
.widget .inner{ margin:20px; }
/*.widget .headbar{ margin-bottom:30px; }*/

.toplist_inner{ min-height:300px; }
.toplist_inner.loading{ opacity:0.5; background:url('/loader.gif') no-repeat center center;  }
.ui_toplist{ min-height:300px; }
.ui_toplist.loading{ opacity:0.5; background:url('/loader.gif') no-repeat center center;  }

.toplist_item{ border-bottom:1px solid #dedede; height:42px; }
.toplist_item .title{ float:left; line-height:42px; margin-left:20px; font-size:13px; color:#333; }
.toplist_item .value{ float:right; line-height:42px; margin-right:20px; font-size:13px; font-weight:bold; color:#333; width:70px; color:#666; }
.toplist_item .percent{ float:right; line-height:42px; margin-right:20px; font-size:18px; font-weight:bold; color:#333; width:70px; }
.ui_toplist .toplist_item{ border-bottom:1px solid #dedede; height:42px; }
.ui_toplist .toplist_item:hover{ background:#fff; }
.ui_toplist .toplist_item .title{ float:left; line-height:42px; margin-left:20px; font-size:13px; color:#333; }
.ui_toplist .toplist_item .value{ float:right; line-height:42px; margin-right:20px; font-size:13px; font-weight:bold; color:#333; width:70px; color:#666; }
.ui_toplist .toplist_item .percent{ float:right; line-height:42px; margin-right:20px; font-size:18px; font-weight:bold; color:#333; width:70px; }

.headbar {

@@ -414,3 +415,9 @@ position: relative;
#sidebar ul li .picto{ margin-top:10px; margin-right:7px; }
#sidebar ul li:hover, #tabs ul li:hover:after{ color:#fff; }
#sidebar ul li:hover .picto{ opacity:1; }

.ui_sidebar_toplist{ 
  border-right: 1px solid #DDD;
  min-height: 1000px;
  background: #EEE;
}
 No newline at end of file
+30 −0
Original line number Diff line number Diff line
.report_view

  %h1= @opts["title"]
  %h3 CategoricalTopK Report

  %ul.ui_tabs.tabs
    %li.active{"data-tab" => "Overview"}
      %a{:href => "#"} Overview

  .headbar
    %h2 Top Search Queries

  .widget_toplist.ui_sidebar_toplist(style="width:600px;")
    .ui_toplist
      .toplist_item
        .title /matches
        .value 36
        .percent 73.5%
      .toplist_item
        .title /home
        .value 6.00
        .percent 12.2%
      .toplist_item
        .title /conversations
        .value 4.00
        .percent 8.2%
      .toplist_item
        .title /conversations/show
        .value 3.00
        .percent 6.1%
 No newline at end of file
+22 −22

File changed.

Contains only whitespace changes.