Commit 164acad5 authored by militarpancho's avatar militarpancho
Browse files

Added more widgets and aggs

parent 2d6e26aa
......@@ -79,7 +79,7 @@
extra-id='pie-chart4'
type='pie'
filters="{{filters}}"
icon='maps:my-location'
icon='icons:list'
param='{{param}}'
options='{"title": "Comments Subreddits"}'
cols='[{"label": "subredditName", "type": "string"},{"label": "Count", "type": "number"}]'
......@@ -93,56 +93,67 @@
extra-id='pie-chart3'
type='pie'
filters="{{filters}}"
icon='room'
icon='icons:reorder'
options='{"title": "Articles Subreddits"}'
cols='[{"label": "Sentiment", "type": "string"},{"label": "Count", "type": "number"}]'
</google-chart>
</div>
</div>
<div style="width: 100%">
<div style="width: 100%">
<div class="chart_container" style="left: 0; float: left">
<google-chart
id='column-chart1'
extra-id='column-chart1'
type='column'
<google-chart
field="sentiment"
data="{{data}}"
id='pie-chart5'
extra-id='pie-chart5'
type='pie'
filters="{{filters}}"
icon='maps:rate-review'
data = {{data}}
field = num_comments
param='{{param}}'
optionsbi='{"legend": "none"}'
options='{"title": "Count of number of comments"}'
cols='[{"label": "Reviews", "type": "number"},{"label": "Count", "type": "number"}]'
rows='[ [0, 31],[1, 28],[2, 31],[3, 30],[4, 30],[5, 31],[6, 30] ]'>
icon='social:mood'
options='{"title": "Sentiments"}'
cols='[{"label": "Sentiment", "type": "string"},{"label": "Count", "type": "number"}]'
</google-chart>
</div>
<div class="chart_container" style="right: 0; float: right">
<!--<google-chart
data = {{data}}
field = "sentiment"
id='bar-chart3'
extra-id='bar-chart3'
type='bar'
</div>
<div class="chart_container" style="left: 0; float: right">
<google-chart
field="sentiment"
data="{{data}}"
id='pie-chart5'
extra-id='pie-chart5'
type='pie'
filters="{{filters}}"
icon='maps:local-play'
optionsbi='{"legend": "none"}'
options='{"title": "Count of different polarities"}'
cols='[{"label": "Polarity", "type": "number"},{"label": "Count", "type": "number"}]'
rows='[ ["Jan", 31],["Feb", 28],["Mar", 31],["Apr", 30],["May", 31],["Jun", 30] ]'>
icon='social:sentiment-very-dissatisfied'
options='{"title": "Emotions"}'
cols='[{"label": "Sentiment", "type": "string"},{"label": "Count", "type": "number"}]'
</google-chart>
</div>-->
<div style="clear: both"></div>
</div>
<div style="clear: both"></div>
</div>
<div style="width: 100%">
<div class="chart_container" style="left: 0; float: left">
<reviews-table
data = "{{data}}"
field = "title"
data = "{{myids}}"
filters="{{filters}}"
fields='["category", "location"]'
icon='social:people'>
</reviews-table>
</div>
<!--<div class="chart_container" style="left: 0; float: right">
<google-chart
index="reddit"
field="subredditName"
fields='["subreddit", "sentiment"]'
id='column-chart1'
extra-id='column-chart1'
type='column'
filters="{{filters}}"
icon='maps:local-play'
param='{{param}}'
optionsbi='{"legend": "none"}'
options='{"title": "Subreddits sentiment count"}'
cols='[{"label": "Subreddits", "type": "number"},{"label": "Count", "type": "number"}]'
rows='[ [0, 31],[1, 28],[2, 31],[3, 30],[4, 30],[5, 31],[6, 30] ]'>
</google-chart>
</div>-->
</div>
</div>
</iron-pages>
......@@ -258,7 +269,15 @@
_count: "desc"
}
}
}
},
sentiment: {
terms: {
field: "sentiment",
order: {
_count: "desc"
}
}
}
}
}
}).then(function (resp) {
......
#!/bin/sh
curl -XPUT http://localhost:9200/reddit/_mapping/article -d '
curl -XPUT http://localhost:9200/reddit/_mapping/article?update_all_types -d '
{
"properties": {
"subredditName": {
"type": "text",
"fielddata": true
}
},
"sentiment": {
"type": "text",
"fielddata": true
}
}
}'
curl -XPUT http://localhost:9200/reddit/_mapping/comment -d '
{
"properties": {
......
Supports Markdown
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