forked from Miyayx/Southampton-Crime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
path-graph.html
28 lines (23 loc) · 2.35 KB
/
path-graph.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE default ><html><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link type="text/css" rel="stylesheet" href="css/bootstrap.min.css"/><link type="text/css" rel="stylesheet" href="css/index.css"/></head><body></body><script type="text/javascript" src="js/d3.v3.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/bootstrap.min.js"></script><script type="text/javascript" src="js/path-graph.js"></script><script type="text/javascript" src="js/time-chart.js"></script><script type="text/javascript" src="js/showtweets.js"></script><div class="container"><div class="row"><!--.span5--><div id="graph" style="margin-top:20px;margin-buttom:10px" class="col-md-7"><div class="tabtable"><ul class="nav nav-pills"><li id="path-tab" style="text-align:center" class="active"><a href="#path-graph" data-toggle="tab">Path Graph</a></li><li id="time-tab" style="text-align:center"><a href="#time-chart" data-toggle="tab">Time Chart</a></li></ul><div class="tab-content"><div id="path-graph" class="tab-pane active"></div><div id="time-chart" class="tab-pane"></div></div></div></div><!--.span4--><div style="margin-top:20px" class="col-md-4 col-md-offset-1"><span>Information: <table style="margin-top:20px" class="table table-hover"><thead><tr><th> </th></tr></thead><tbody id="one-tweet"><tr><td>ObjectId</td><td></td></tr><tr><td>ScreenName</td><td></td></tr><tr><td>Gender</td><td></td></tr><tr><td>Time</td><td></td></tr><tr><td>Text</td><td></td></tr></tbody></table></span></div><script type="text/javascript">$(document).ready(function(){
$.urlParam = function(name){
var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);
if( results)
return results[1] || 0;
else
return null;
}
var tweetid = $.urlParam("tweetid");
if(!tweetid)
$("#graph").removeClass("col-md-8").addClass("col-md-12");
else{
$("#graph").removeClass("col-md-12").addClass("col-md-8");
}
pathGraph("#path-graph",tweetid);
$.getJSON("data/timeInterval_900.json",function(time_json){
alert(time_json)
$(".nav-pills li#time-tab a").click(function(e){
timeChart("#time-chart",time_json[tweetid]);
$(t).tab('show');
});
});
});</script></div></div></html>