Commit 33b56798 authored by militarpancho's avatar militarpancho
Browse files

Added changes in dashboard. IMPORTANT: COMMENT-CHART CHANGES MISSING

parent 94cd8f0e
`Sefarad dashboard for twitter and reddit data.
`Sefarad dashboard for twitter and reddit data`
## Usage
......
......@@ -14,22 +14,22 @@
"dependencies": {
"material-search": "material-search#*",
"leaflet-maps": "leaflet-maps#*",
"paper-tabs": "paper-tabs#*",
"reviews-table": "reviews-table#*",
"paper-tabs": "paper-tabs#1.0.1",
"number-chart": "number-chart#^1.1.1",
"google-apis": "GoogleWebComponents/google-apis#^1.0.0",
"google-chart-elasticsearch": "google-chart-elasticsearch#^1.1.3",
"iron-icons": "PolymerElements/iron-icons#^1.0.0",
"paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
"polymer": "Polymer/polymer#^1.1.0",
"polymer": "Polymer/polymer#1.7.0",
"jquery": "jquery#^2.1.4",
"elasticsearchjs-import": "DigElements/elasticsearchjs-import#~1.0.0",
"elasticjs-import": "DigElements/elasticjs-import#~1.0.1",
"elastic-client": "DigElements/elastic-client#~1.0.1",
"webcomponentsjs": "< 1.0.0",
"spider-chart": "spider-chart#*",
"tweet-chart": "tweet-chart#*",
"comment-chart": "./elements/comment-chart"
"tweet-chart": "tweet-chart#*",
"comment-chart": "./elements/comment-chart",
"paper-material": "paper-material#*",
"yasgui-polymer": "yasgui-polymer#*"
},
"resolutions": {
"webcomponentsjs": "0.7.24",
......
......@@ -4,7 +4,10 @@
<link rel="import" href="../google-chart-elasticsearch/google-chart.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../number-chart/number-chart.html">
<link rel="import" href="../comment-chart/comment-chart.html">
<link rel="import" href="./elements/comment-chart/comment-chart.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../yasgui-polymer/yasgui.html">
......@@ -41,9 +44,9 @@
<div style="width: 23%; margin-right: 2%; float: left">
<number-chart
data="{{data}}"
object="article"
object="BlogPosting"
aggKey="type"
title="Articles"
title="BlogPosting"
icon="icons:receipt"
stylebg="bg-yellow">
</number-chart>
......@@ -51,8 +54,8 @@
<div style="width: 23%; margin-right: 2%; float: left">
<number-chart
data="{{data}}"
object="comment"
aggKey="type"
object="Comment"
aggKey="type"
title="Comments"
icon="maps:rate-review"
aggkey="location"
......@@ -65,28 +68,28 @@
<div class="chart_container" style="right: 0; float: right">
<google-chart
data="{{data}}"
field="subreddit"
field="articlesection"
id='pie-chart4'
extra-id='pie-chart4'
type='pie'
filters="{{filters}}"
icon='icons:list'
param='{{param}}'
options='{"title": "Comments Subreddits"}'
cols='[{"label": "subreddit", "type": "string"},{"label": "Count", "type": "number"}]'
options='{"title": "Article Sections"}'
cols='[{"label": "articlesection", "type": "string"},{"label": "Count", "type": "number"}]'
</google-chart>
</div>
<div class="chart_container" style="left: 0; float: left">
<google-chart
field="subreddit"
field="type"
data="{{data}}"
id='pie-chart3'
extra-id='pie-chart3'
type='pie'
filters="{{filters}}"
icon='icons:reorder'
options='{"title": "Articles Subreddits"}'
cols='[{"label": "Sentiment", "type": "string"},{"label": "Count", "type": "number"}]'
options='{"title": "Publication Type"}'
cols='[{"label": "type", "type": "string"},{"label": "Count", "type": "number"}]'
</google-chart>
</div>
</div>
......@@ -123,9 +126,12 @@
<div style="width: 100%">
<div class="chart_container" style="left: 0; float: left; width: 100%">
<comment-chart
datos = {{data}}
filters="{{filters}}"
icon='social:people'>
datos = {{data}}
filters="{{filters}}"
topic= "about"
text= "text"
score= "datePublished"
icon='social:people'>
</comment-chart>
</div>
<!--<div class="chart_container" style="left: 0; float: right">
......@@ -143,10 +149,17 @@
cols='[{"label": "Subreddits", "type": "string"},{"label": "Count", "type": "number"}]'>
</google-chart>
</div>-->
</div>
</div>
</div>
</div>
<div>
<yasgui-ui
endpoint="http://fuseki-tourpedia.cluster.gsi.dit.upm.es/tourpedia/query"
queries="{{queries}}">
</yasgui-ui>
</div>
</iron-pages>
</template>
<script>
var ready = false;
......@@ -189,19 +202,6 @@
ready: function(){
console.log("ready");
},
addPlace: function(event) {
this.set('places', this.places.concat(event.detail.response))
console.log(this.places)
},
getName: function(id) {
return "http://tour-pedia.org/api/getPlaceDetails?id=" + id
},
getPoints: function(f) {
return f.base;
},
_clientChanged: function() {
console.log("ClientChanged");
......@@ -218,7 +218,7 @@
if(ready){
this.client.search({
// undocumented params are appended to the query string
index: "reddit",
index: "gsicrawler",
body: {
size: 10,
query: {
......@@ -229,35 +229,43 @@
aggs: {
type: {
terms: {
field: "_type",
field: "@type.keyword",
order: {
_count: "desc"
}
}
},
subreddit: {
articlesection: {
terms: {
field: "subreddit.keyword",
field: "articleSection.keyword",
order: {
_count: "desc"
}
}
}
},
sentiment: {
terms: {
field: "sentiment.keyword",
order: {
_count: "desc"
}
}
},
emotion: {
terms: {
field: "emotion.keyword",
order: {
_count: "desc"
}
about: {
terms: {
field: "about.keyword",
order: {
_count: "desc"
}
}
},
sentiment: {
terms: {
field: "sentiments.marl:hasPolarity.keyword",
order: {
_count: "desc"
}
}
},
emotion: {
terms: {
field: "emotions.onyx:hasEmotion.onyx:hasEmotionCategory.keyword",
order: {
_count: "desc"
}
}
}
}
}
......
......@@ -20,7 +20,6 @@
/* Tablet+ */
@media (min-width: 601px) {
paper-tabs, paper-toolbar {
margin-top: -48px;
margin-bottom: 48px;
margin-left: -62px;
margin-right: -62px;
......
......@@ -3,7 +3,13 @@
<script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="imports.html"></link>
<link href='//cdn.jsdelivr.net/yasqe/2.6.2/yasqe.min.css' rel='stylesheet' type='text/css'/>
<link href='//cdn.jsdelivr.net/yasr/2.6.1/yasr.min.css' rel='stylesheet' type='text/css'/>
<script src='//cdn.jsdelivr.net/yasqe/2.6.2/yasqe.bundled.min.js'></script>
<script src='//cdn.jsdelivr.net/yasr/2.6.1/yasr.bundled.min.js'></script>
<style>
.info-box-icon.number-chart iron-icon.number-chart {
top: 26%;
}
......@@ -14,7 +20,7 @@
<template is="dom-bind">
<elastic-client
config='{"host": "localhost:9200"}'
config='{"host": ""}'
client="{{client}}"
cluster-status="{{myStatus}}">
</elastic-client>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment