forked from Miyayx/Southampton-Crime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
path-graph.jade
88 lines (80 loc) · 2.61 KB
/
path-graph.jade
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
doctype default
include mixins
html
head
block head
block meta
meta(charset="utf-8")
mixin viewport
mixin stylesheet("css/bootstrap.min.css")
block style
mixin stylesheet("css/index.css")
body
block content
block script
mixin javascript("js/d3.v3.min.js")
mixin javascript("js/jquery.min.js")
mixin javascript("js/bootstrap.min.js")
mixin javascript("js/path-graph.js")
mixin javascript("js/time-chart.js")
mixin javascript("js/showtweets.js")
.container
.row
//.span5
#graph.col-md-7(style="margin-top:20px;margin-buttom:10px")
.tabtable
ul.nav.nav-pills
li.active#path-tab(style="text-align:center")
a(href="#path-graph",data-toggle="tab") Path Graph
li#time-tab(style="text-align:center")
a(href="#time-chart",data-toggle="tab") Time Chart
.tab-content
.tab-pane.active#path-graph
.tab-pane#time-chart
//.span4
.col-md-4.col-md-offset-1(style="margin-top:20px")
span Information:
table.table.table-hover(style="margin-top:20px")
thead
tr
th
tbody#one-tweet
tr
td ObjectId
td
tr
td ScreenName
td
tr
td Gender
td
tr
td Time
td
tr
td Text
td
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');
});
});
});