Navigation Menu

Skip to content

Commit

Permalink
adding widget again
Browse files Browse the repository at this point in the history
  • Loading branch information
n1conroy committed Mar 22, 2018
1 parent 1685b20 commit b582910
Showing 1 changed file with 30 additions and 72 deletions.
102 changes: 30 additions & 72 deletions html/index.html
@@ -1,5 +1,3 @@


<!DOCTYPE html>
<html>
<head>
Expand All @@ -21,8 +19,8 @@

<link href="//d26b395fwzu5fz.cloudfront.net/keen-dataviz-1.1.3.css" rel="stylesheet" />
<script src="//d26b395fwzu5fz.cloudfront.net/keen-dataviz-1.1.3.js"></script>
<link rel="stylesheet" type="text/css" href="../assets/lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="../assets/css/keen-dashboards.css" />
<link rel="stylesheet" type="text/css" href="assets/lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="assets/css/keen-dashboards.css" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.min.css" rel="stylesheet" type="text/css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.min.js"></script>
Expand Down Expand Up @@ -64,14 +62,14 @@
</form>
</td><td width=40></td></tr>
</table>
<br>
<br><br>
</div>



<div id="content">

<br><br><br><br><br><br>
<br><br><br><br><br>
<font size=4 weight=bold>Posting Frequency
<div class="row">
<div class="col-sm-4">
Expand All @@ -87,7 +85,7 @@
</div>
</div>
</div>
<div class="col-sm-8">
<div class="col-sm-4">
<div class="chart-wrapper">
<div class="chart-number">[2]<b> Total number of posts each hour</b> </div>
<div class="chart-stage" id="hour_chart">
Expand All @@ -97,13 +95,22 @@
</div>
</div>
</div>

<div class="col-sm-4">
<div class="chart-wrapper">
<div class="chart-number">[3]<b> All tweets </b><br></div>
<div class="chart-stage">
PASTE_TWITTER_WIDGET_HERE
</div>
</div>
</div>

</div>

<font size=4 weight=bold>Content Descriptions
<div class="row">
<div class="col-sm-6 col-md-4">
<div class="chart-wrapper">
<div class="chart-number">[3]<b> Content types </b> (<span></span>) </div>
<div class="chart-number">[4]<b> Content types </b> (<span></span>) </div>
<div class="chart-stage" id="con_chart">
</div>
<div class="chart-notes">
Expand All @@ -115,7 +122,7 @@
</div>
<div class="col-sm-6 col-md-4">
<div class="chart-wrapper">
<div class="chart-number">[4]<b> Engagement type </b>(<span></span>)</div>
<div class="chart-number">[5]<b> Engagement type </b>(<span></span>)</div>
<div class="chart-stage" id="eng_chart">
</div>
<div class="chart-notes">
Expand All @@ -125,7 +132,7 @@
</div>
<div class="col-sm-6 col-md-4">
<div class="chart-wrapper">
<div class="chart-number">[5]<b> Sentiment type </b>(<span></span>)<br><font style="font-size:14px;"> <a target="_blank" href="sent_sub.html?source=COURSE_HASHTAG">See examples of tweets by sentiment type <img src="https://cdn.onlinewebfonts.com/svg/img_167295.png" height=14 width=14></a></font></div>
<div class="chart-number">[6]<b> Sentiment type </b>(<span></span>)<br><font style="font-size:14px;"> <a target="_blank" href="sent_sub.html?source=COURSE_HASHTAG">See examples of tweets by sentiment type <img src="https://cdn.onlinewebfonts.com/svg/img_167295.png" height=14 width=14></a></font></div>
<div class="chart-stage" id="spline_chart">
</div>
<div class="chart-notes">
Expand All @@ -140,7 +147,7 @@
<div class="row">
<div class="col-sm-6 col-md-4">
<div class="chart-wrapper">
<div class="chart-number">[6]<b> Subjectivity type</b> (<span></span>)<br> <font style="font-size:14px;"><a target="_blank" href="sent_sub.html?source=COURSE_HASHTAG">See examples of tweets by subjectivity type <img src="https://cdn.onlinewebfonts.com/svg/img_167295.png" height=14 width=14></a></font></div>
<div class="chart-number">[7]<b> Subjectivity type</b> (<span></span>)<br> <font style="font-size:14px;"><a target="_blank" href="sent_sub.html?source=COURSE_HASHTAG">See examples of tweets by subjectivity type <img src="https://cdn.onlinewebfonts.com/svg/img_167295.png" height=14 width=14></a></font></div>
<div class="chart-stage" id="sub_chart">
</div>
<div class="chart-notes">
Expand All @@ -150,7 +157,7 @@
</div>
<div class="col-sm-6 col-md-4">
<div class="chart-wrapper">
<div class="chart-number">[7]<b> Top 10 Hashtags </b>(<span></span>) </div>
<div class="chart-number">[8]<b> Top 10 Hashtags </b>(<span></span>) </div>
<div class="chart-stage"id="hashtag_chart" >

</div>
Expand All @@ -161,7 +168,7 @@
</div>
<div class="col-sm-6 col-md-4">
<div class="chart-wrapper">
<div class="chart-number">[8]<b> Top 10 named entities </b> (<span></span>)</div>
<div class="chart-number">[9]<b> Top 10 named entities </b> (<span></span>)</div>
<div class="chart-stage" id="ne_chart" >
</div>
<div class="chart-notes">
Expand All @@ -176,7 +183,7 @@
<div class="row">
<div class="col-sm-12 col-md-3">
<div class="chart-wrapper">
<div class="chart-number">[9]<b> Top 10 contributors </b>(<span></span>)<br><br></div>
<div class="chart-number">[10]<b> Top 10 contributors </b>(<span></span>)<br><br></div>
<div class="chart-stage" id="column_chart" >
</div>
<div class="chart-notes">
Expand All @@ -185,9 +192,13 @@
</div>
</div>





<div class="col-sm- col-md-3">
<div class="chart-wrapper">
<div class="chart-number">[10]<b> Top 10 most negative</b> (<span></span>)<br><font style="font-size:14px;"> <a target="_blank" href="sent_sub.html?source=COURSE_HASHTAG">See examples of tweets by sentiment type <img src="https://cdn.onlinewebfonts.com/svg/img_167295.png" height=14 width=14></a></font></div>
<div class="chart-number">[11]<b> Top 10 most negative</b> (<span></span>)<br><font style="font-size:14px;"> <a target="_blank" href="sent_sub.html?source=COURSE_HASHTAG">See examples of tweets by sentiment type <img src="https://cdn.onlinewebfonts.com/svg/img_167295.png" height=14 width=14></a></font></div>
<div class="chart-stage" id="subbar_chart" >
</div>
<div class="chart-notes" >
Expand All @@ -197,7 +208,7 @@
</div>
<div class="col-sm-12 col-md-3">
<div class="chart-wrapper">
<div class="chart-number">[11]<b> Top 10 most positive</b> (<span></span>)<br><font style="font-size:14px;"> <a target="_blank" href="sent_sub.html?source=COURSE_HASHTAG">See examples of tweets by sentiment type <img src="https://cdn.onlinewebfonts.com/svg/img_167295.png" height=14 width=14></a></font></div>
<div class="chart-number">[12]<b> Top 10 most positive</b> (<span></span>)<br><font style="font-size:14px;"> <a target="_blank" href="sent_sub.html?source=COURSE_HASHTAG">See examples of tweets by sentiment type <img src="https://cdn.onlinewebfonts.com/svg/img_167295.png" height=14 width=14></a></font></div>
<div class="chart-stage" id="sentbar_chart">
</div>
<div class="chart-notes">
Expand All @@ -207,7 +218,7 @@
</div>
<div class="col-sm-12 col-md-3">
<div class="chart-wrapper">
<div class="chart-number">[12]<b> Top 10 most mentioned</b> (<span></span>)<br><br></div>
<div class="chart-number">[13]<b> Top 10 most mentioned</b> (<span></span>)<br><br></div>
<div class="chart-stage" id="mentions_chart">
</div>
<div class="chart-notes">
Expand All @@ -216,20 +227,6 @@
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-md-12">
<div class="chart-wrapper">
<div class="chart-number">[13] <b>Full text of all Twitter posts today using the course hashtag</div>
<div class="chart-stage" id="text_ext" >
</div>
<div class="chart-notes">
</div>
</div>
</div>

</div>



</div>
</div>
Expand All @@ -244,7 +241,7 @@
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);

var myhashtag= "COURSE_HASHTAG";
var myhashtag='COURSE_HASHTAG'

function getUrlParameter(name) {
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
Expand Down Expand Up @@ -1058,47 +1055,8 @@
chart.draw(data, options);
}


Keen.ready(function() {
var textq = new Keen.Query("extraction", {
event_collection: myhashtag,
timeframe: 'this_1_days',
refresh_rate: 3600,
property_names: ["username","text","keen.timestamp"],
timezone:"US/Eastern"
});

var textchart = new Keen.Dataviz()
.el(document.getElementById('text_ext'))
.height(330)
.type('table')
.title('Full text of today\'s tweets')
.prepare();

client.run(textq, function(err, res) {
textchart
.data(res)
.parseRequest(this)
.call(function(){
this.dataset.sortRows("desc", function(row){
return row[2];
});
this.dataset.filterRows(function(row, index){
return index < 30;
});
})
.render();
});
});




</script>

</body>

</html>



0 comments on commit b582910

Please sign in to comment.