Commit f54c2f1c authored by militarpancho's avatar militarpancho
Browse files

Added more changes. Added comment-chart...not in bower yet.

parent 164acad5
......@@ -26,7 +26,9 @@
"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"
"webcomponentsjs": "< 1.0.0",
"spider-chart": "spider-chart#*",
"tweet-chart": "tweet-chart#*"
},
"resolutions": {
"webcomponentsjs": "0.7.24",
......
comment-chart @ 6f1b8401
Subproject commit 6f1b84013b709ebabc3dcee19b46f48ee1b97d78
{"score": 1042, "downs": 0, "subreddit": "breathinginformation", "subreddit_id": "t5_2wt24", "timestamp": 1480295752.0, "author": "TheOtherJuggernaut", "likes": null, "parent_id": "t3_5f8rcv", "body": "Title game 10/10", "id": "t1_daico44", "ups": 1042}
{"score": 257, "downs": 0, "subreddit": "breathinginformation", "subreddit_id": "t5_2wt24", "timestamp": 1480300675.0, "author": "DonkeyKongSenior", "likes": null, "parent_id": "t1_daico44", "body": "Nailed it so hard. It's a decent post without the title. It's an A+ post with the title. ", "id": "t1_daig6ue", "ups": 257}
{"score": 86, "downs": 0, "subreddit": "breathinginformation", "subreddit_id": "t5_2wt24", "timestamp": 1480301926.0, "author": "player-piano", "likes": null, "parent_id": "t1_daig6ue", "body": "another thing is that it actually fits the subreddit. this meme is certified dank", "id": "t1_daih3d5", "ups": 86}
{"score": 51, "downs": 0, "subreddit": "breathinginformation", "subreddit_id": "t5_2wt24", "timestamp": 1480315780.0, "author": "Vinylzen", "likes": null, "parent_id": "t1_daih3d5", "body": "I feel like this sub already has to reach so hard for content that when shit like this happens it's so impressive and sick \ud83d\udd25\ud83d\udc4c", "id": "t1_daipqxx", "ups": 51}
{"score": -16, "downs": 0, "subreddit": "breathinginformation", "subreddit_id": "t5_2wt24", "timestamp": 1480330157.0, "author": "[deleted]", "likes": null, "parent_id": "t1_daig6ue", "body": "[deleted]", "id": "t1_daiuo8g", "ups": -16}
{"score": 7, "downs": 0, "subreddit": "breathinginformation", "subreddit_id": "t5_2wt24", "timestamp": 1480340086.0, "author": "mcawkward", "likes": null, "parent_id": "t1_daiuo8g", "body": "With the title its an S", "id": "t1_daiycu6", "ups": 7}
{"score": 21, "downs": 0, "subreddit": "breathinginformation", "subreddit_id": "t5_2wt24", "timestamp": 1480355127.0, "author": "muffley", "likes": null, "parent_id": "t1_daico44", "body": "This is /r/wheredidthesodago level title quality.", "id": "t1_daj8rax", "ups": 21}
{"score": 5, "downs": 0, "subreddit": "breathinginformation", "subreddit_id": "t5_2wt24", "timestamp": 1480358241.0, "author": "boot2skull", "likes": null, "parent_id": "t1_daico44", "body": "7/10 spicy with rice", "id": "t1_dajbdrc", "ups": 5}
{"score": -9, "downs": 0, "subreddit": "breathinginformation", "subreddit_id": "t5_2wt24", "timestamp": 1480330241.0, "author": "[deleted]", "likes": null, "parent_id": "t1_daico44", "body": "[removed]", "id": "t1_daiup68", "ups": -9}
{"score": 233, "downs": 0, "subreddit": "breathinginformation", "subreddit_id": "t5_2wt24", "timestamp": 1480296103.0, "author": "CreamNPeaches", "likes": null, "parent_id": "t3_5f8rcv", "body": "Quality post OP. Better than many I've seen recently.", "id": "t1_daicx85", "ups": 233}
{"id": "t1_daico44", "body": "Title game 10/10", "subreddit": "breathinginformation", "subreddit_id": "t5_2wt24", "sentiment": "negative", "author": "TheOtherJuggernaut", "parent_id": "t3_5f8rcv", "ups": 1042, "likes": null, "emotion": "sadness", "downs": 0, "score": 1042, "timestamp": 1480295752.0}
{"id": "t1_daig6ue", "body": "Nailed it so hard. It's a decent post without the title. It's an A+ post with the title. ", "subreddit": "breathinginformation", "subreddit_id": "t5_2wt24", "sentiment": "negative", "author": "DonkeyKongSenior", "parent_id": "t1_daico44", "ups": 257, "likes": null, "emotion": "sadness", "downs": 0, "score": 257, "timestamp": 1480300675.0}
{"id": "t1_daih3d5", "body": "another thing is that it actually fits the subreddit. this meme is certified dank", "subreddit": "breathinginformation", "subreddit_id": "t5_2wt24", "sentiment": "negative", "author": "player-piano", "parent_id": "t1_daig6ue", "ups": 86, "likes": null, "emotion": "sadness", "downs": 0, "score": 86, "timestamp": 1480301926.0}
{"id": "t1_daipqxx", "body": "I feel like this sub already has to reach so hard for content that when shit like this happens it's so impressive and sick \ud83d\udd25\ud83d\udc4c", "subreddit": "breathinginformation", "subreddit_id": "t5_2wt24", "sentiment": "negative", "author": "Vinylzen", "parent_id": "t1_daih3d5", "ups": 51, "likes": null, "emotion": "sadness", "downs": 0, "score": 51, "timestamp": 1480315780.0}
{"id": "t1_daiuo8g", "body": "[deleted]", "subreddit": "breathinginformation", "subreddit_id": "t5_2wt24", "sentiment": "negative", "author": "[deleted]", "parent_id": "t1_daig6ue", "ups": -16, "likes": null, "emotion": "sadness", "downs": 0, "score": -16, "timestamp": 1480330157.0}
{"id": "t1_daiycu6", "body": "With the title its an S", "subreddit": "breathinginformation", "subreddit_id": "t5_2wt24", "sentiment": "negative", "author": "mcawkward", "parent_id": "t1_daiuo8g", "ups": 7, "likes": null, "emotion": "sadness", "downs": 0, "score": 7, "timestamp": 1480340086.0}
{"id": "t1_daj8rax", "body": "This is /r/wheredidthesodago level title quality.", "subreddit": "breathinginformation", "subreddit_id": "t5_2wt24", "sentiment": "negative", "author": "muffley", "parent_id": "t1_daico44", "ups": 21, "likes": null, "emotion": "sadness", "downs": 0, "score": 21, "timestamp": 1480355127.0}
{"id": "t1_dajbdrc", "body": "7/10 spicy with rice", "subreddit": "breathinginformation", "subreddit_id": "t5_2wt24", "sentiment": "negative", "author": "boot2skull", "parent_id": "t1_daico44", "ups": 5, "likes": null, "emotion": "sadness", "downs": 0, "score": 5, "timestamp": 1480358241.0}
{"id": "t1_daiup68", "body": "[removed]", "subreddit": "breathinginformation", "subreddit_id": "t5_2wt24", "sentiment": "negative", "author": "[deleted]", "parent_id": "t1_daico44", "ups": -9, "likes": null, "emotion": "sadness", "downs": 0, "score": -9, "timestamp": 1480330241.0}
{"id": "t1_daicx85", "body": "Quality post OP. Better than many I've seen recently.", "subreddit": "breathinginformation", "subreddit_id": "t5_2wt24", "sentiment": "negative", "author": "CreamNPeaches", "parent_id": "t3_5f8rcv", "ups": 233, "likes": null, "emotion": "sadness", "downs": 0, "score": 233, "timestamp": 1480296103.0}
......@@ -5,6 +5,8 @@
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../reviews-table/reviews-table.html">
<link rel="import" href="../number-chart/number-chart.html">
<link rel="import" href="../comment-chart/comment-chart.html">
<dom-module id="dashboard-reddit">
......@@ -115,7 +117,7 @@
</div>
<div class="chart_container" style="left: 0; float: right">
<google-chart
field="sentiment"
field="emotion"
data="{{data}}"
id='pie-chart5'
extra-id='pie-chart5'
......@@ -126,22 +128,21 @@
cols='[{"label": "Sentiment", "type": "string"},{"label": "Count", "type": "number"}]'
</google-chart>
</div>
<div style="clear: both"></div>
</div>
<div style="width: 100%">
<div class="chart_container" style="left: 0; float: left">
<reviews-table
data = "{{myids}}"
filters="{{filters}}"
<div class="chart_container" style="left: 0; float: left; width: 100%">
<comment-chart
datos = {{data}}
filters="{{filters}}"
icon='social:people'>
</reviews-table>
</comment-chart>
</div>
<!--<div class="chart_container" style="left: 0; float: right">
<google-chart
index="reddit"
field="subredditName"
fields='["subreddit", "sentiment"]'
data = {{data}}
field="subreddit"
id='column-chart1'
extra-id='column-chart1'
type='column'
......@@ -150,10 +151,9 @@
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] ]'>
cols='[{"label": "Subreddits", "type": "string"},{"label": "Count", "type": "number"}]'>
</google-chart>
</div>-->
</div>-->
</div>
</div>
</iron-pages>
......@@ -171,7 +171,6 @@
ids:{
type: Array
/*value: ["481","482","32512","32420","91963","96677","160677","131425","322429","322612"]*/
},
data:{
......@@ -187,12 +186,6 @@
value: function() { return []; }
},
places: {
type: Array,
notify: true,
value: []
},
filters: {
type: Array,
notify: true,
......@@ -277,9 +270,18 @@
_count: "desc"
}
}
}
}
}
},
// ,
//emotion: {
// terms: {
// field: "emotion",
// order: {
// _count: "desc"
// }
// }
// }
}
}
}).then(function (resp) {
var myids = []
resp.hits.hits.forEach(function(entry){myids.push(entry._id)})
......
......@@ -9,8 +9,11 @@ curl -XPUT http://localhost:9200/reddit/_mapping/article?update_all_types -d '
"sentiment": {
"type": "text",
"fielddata": true
}
},
"emotion": {
"type": "text",
"fielddata": true
}
}
}'
......
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