Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
sefarad
dashboard-gsicrawler
Commits
164acad5
Commit
164acad5
authored
Jul 27, 2017
by
militarpancho
Browse files
Added more widgets and aggs
parent
2d6e26aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
dashboard-reddit.html
View file @
164acad5
...
...
@@ -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=
"
righ
t: 0; float: right"
>
<!--
<google-chart
data = {{data}}
field = "sentiment"
id='
bar
-chart
3
'
extra-id='
bar
-chart
3
'
type='
bar
'
</div>
<div
class=
"chart_container"
style=
"
lef
t: 0; float: right"
>
<google-chart
field=
"sentiment"
data=
"{{data}}"
id=
'
pie
-chart
5
'
extra-id=
'
pie
-chart
5
'
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
)
{
...
...
elasticsearch/update-mapping.sh
View file @
164acad5
#!/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": {
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment