-
Notifications
You must be signed in to change notification settings - Fork 6
/
stats-2017-mini.php
75 lines (60 loc) · 12.1 KB
/
stats-2017-mini.php
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Wiki Loves Monuments statistics</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="stylesheet" type="text/css" href="wlm.css" />
<script language="javascript" type="text/javascript" src="modules/jquery.js"></script>
<script language="javascript" type="text/javascript" src="modules/jquery.flot.js"></script>
</head>
<body style="background-color: white;">
<div id="dates_graph" style="width: 300px;height: 150px;"></div>
<script type="text/javascript">
$(function () {
var dates_graph_data_2017 = [["1275868800000", 1], ["1443398400000", 1], ["1448409600000", 4], ["1469491200000", 2], ["1483142400000", 1], ["1488499200000", 2], ["1489190400000", 1], ["1496188800000", 1], ["1497398400000", 1], ["1500163200000", 3], ["1501113600000", 2], ["1501200000000", 9], ["1501286400000", 25], ["1501372800000", 10], ["1501459200000", 43], ["1501545600000", 51], ["1501632000000", 263], ["1501718400000", 24], ["1501804800000", 49], ["1501891200000", 179], ["1501977600000", 79], ["1502064000000", 39], ["1502150400000", 63], ["1502236800000", 27], ["1502323200000", 67], ["1502409600000", 14], ["1502496000000", 10], ["1502582400000", 110], ["1502668800000", 14], ["1502755200000", 19], ["1502841600000", 52], ["1502928000000", 171], ["1503014400000", 23], ["1503100800000", 25], ["1503187200000", 49], ["1503273600000", 24], ["1503360000000", 34], ["1503446400000", 53], ["1503532800000", 37], ["1503619200000", 30], ["1503705600000", 39], ["1503792000000", 53], ["1503878400000", 50], ["1503964800000", 63], ["1504051200000", 38], ["1504137600000", 320], ["1504224000000", 7997], ["1504310400000", 7311], ["1504396800000", 9812], ["1504483200000", 6567], ["1504569600000", 5309], ["1504656000000", 4490], ["1504742400000", 5072], ["1504828800000", 5333], ["1504915200000", 4374], ["1505001600000", 4704], ["1505088000000", 6496], ["1505174400000", 6707], ["1505260800000", 5188], ["1505347200000", 5003], ["1505433600000", 3321], ["1505520000000", 4301], ["1505606400000", 6150], ["1505692800000", 5646], ["1505779200000", 5107], ["1505865600000", 6426], ["1505952000000", 6173], ["1506038400000", 6701], ["1506124800000", 7583], ["1506211200000", 8528], ["1506297600000", 10456], ["1506384000000", 8301], ["1506470400000", 10505], ["1506556800000", 14117], ["1506643200000", 20442], ["1506729600000", 27511], ["1506816000000", 1619], ["1506902400000", 482], ["1506988800000", 384], ["1507075200000", 484], ["1507161600000", 802], ["1507248000000", 705], ["1507334400000", 1197], ["1507420800000", 151], ["1507507200000", 65], ["1507593600000", 92], ["1507680000000", 263], ["1507766400000", 174], ["1507852800000", 138], ["1507939200000", 276], ["1508025600000", 470], ["1508112000000", 239], ["1508198400000", 222], ["1508284800000", 266], ["1508371200000", 585], ["1508457600000", 750], ["1508544000000", 25], ["1508716800000", 28], ["1508803200000", 9], ["1508976000000", 2], ["1509062400000", 13], ["1509148800000", 1], ["1509580800000", 4], ["1509667200000", 8], ["1509753600000", 2], ["1509840000000", 4], ["1509926400000", 6], ["1510012800000", 2], ["1510099200000", 4], ["1510185600000", 2], ["1510272000000", 4], ["1510358400000", 3], ["1510704000000", 1], ["1510876800000", 16], ["1511049600000", 4], ["1511136000000", 4], ["1511222400000", 4], ["1511395200000", 4], ["1511481600000", 7], ["1511568000000", 1], ["1511740800000", 2], ["1512086400000", 5], ["1512259200000", 6], ["1512864000000", 3], ["1513209600000", 29], ["1513296000000", 7], ["1513382400000", 6], ["1513468800000", 14], ["1513814400000", 3], ["1513900800000", 2], ["1514592000000", 3], ["1514678400000", 1], ["1515542400000", 1], ["1516320000000", 1], ["1517097600000", 3], ["1517788800000", 1], ["1517961600000", 5], ["1518134400000", 3], ["1518220800000", 10], ["1518307200000", 4], ["1518566400000", 4], ["1518739200000", 9], ["1518825600000", 5], ["1518912000000", 15], ["1518998400000", 5], ["1519171200000", 2], ["1519257600000", 5], ["1519516800000", 4], ["1519689600000", 5], ["1519776000000", 2], ["1519862400000", 3], ["1519948800000", 1], ["1520035200000", 3], ["1520294400000", 3], ["1520640000000", 3], ["1520726400000", 1], ["1520812800000", 10], ["1520985600000", 2], ["1521158400000", 1], ["1521244800000", 1], ["1521331200000", 3], ["1522368000000", 1], ["1523577600000", 5], ["1523836800000", 5], ["1524096000000", 5], ["1525305600000", 2], ["1525392000000", 5], ["1525478400000", 1], ["1525564800000", 10], ["1525651200000", 3], ["1525737600000", 6], ["1525824000000", 5], ["1525910400000", 5], ["1525996800000", 5], ["1526601600000", 6], ["1526860800000", 1], ["1527120000000", 4], ["1528502400000", 2], ["1528588800000", 1], ["1528934400000", 2], ["1529020800000", 1], ["1529107200000", 1], ["1529280000000", 1], ["1529971200000", 1], ["1530144000000", 1], ["1533168000000", 3], ["1533600000000", 1], ["1533945600000", 1], ["1534464000000", 1], ["1534809600000", 1], ["1535155200000", 3], ["1535241600000", 8], ["1535328000000", 30], ["1535414400000", 4], ["1535500800000", 1]];
var dates_graph_data_2016 = [["1504137600000", 366], ["1504224000000", 5179], ["1504310400000", 8836], ["1504396800000", 8759], ["1504483200000", 8689], ["1504569600000", 5316], ["1504656000000", 5562], ["1504742400000", 5160], ["1504828800000", 6187], ["1504915200000", 6455], ["1505001600000", 6645], ["1505088000000", 5753], ["1505174400000", 5503], ["1505260800000", 4613], ["1505347200000", 4643], ["1505433600000", 6142], ["1505520000000", 6058], ["1505606400000", 5742], ["1505692800000", 8285], ["1505779200000", 6186], ["1505865600000", 7978], ["1505952000000", 6818], ["1506038400000", 6751], ["1506124800000", 7343], ["1506211200000", 7475], ["1506297600000", 9397], ["1506384000000", 11575], ["1506470400000", 12276], ["1506556800000", 13934], ["1506643200000", 23664], ["1506729600000", 32493], ["1506816000000", 2613]];
var dates_graph_data_2015 = [["1504137600000", 852], ["1504224000000", 6981], ["1504310400000", 6028], ["1504396800000", 6519], ["1504483200000", 7189], ["1504569600000", 5689], ["1504656000000", 6726], ["1504742400000", 4823], ["1504828800000", 3824], ["1504915200000", 4276], ["1505001600000", 3521], ["1505088000000", 4177], ["1505174400000", 5003], ["1505260800000", 6793], ["1505347200000", 4989], ["1505433600000", 5869], ["1505520000000", 4800], ["1505606400000", 4802], ["1505692800000", 4393], ["1505779200000", 5661], ["1505865600000", 7025], ["1505952000000", 8293], ["1506038400000", 7860], ["1506124800000", 6899], ["1506211200000", 7749], ["1506297600000", 6534], ["1506384000000", 7894], ["1506470400000", 10949], ["1506556800000", 14017], ["1506643200000", 15320], ["1506729600000", 22803], ["1506816000000", 825]];
var dates_graph_data_2014 = [["1504137600000", 837], ["1504224000000", 10066], ["1504310400000", 6531], ["1504396800000", 6595], ["1504483200000", 5285], ["1504569600000", 5430], ["1504656000000", 6534], ["1504742400000", 6925], ["1504828800000", 5187], ["1504915200000", 4659], ["1505001600000", 5070], ["1505088000000", 4157], ["1505174400000", 5416], ["1505260800000", 5198], ["1505347200000", 6586], ["1505433600000", 6604], ["1505520000000", 7280], ["1505606400000", 7816], ["1505692800000", 5855], ["1505779200000", 5128], ["1505865600000", 6786], ["1505952000000", 7939], ["1506038400000", 7570], ["1506124800000", 7779], ["1506211200000", 6979], ["1506297600000", 8705], ["1506384000000", 9844], ["1506470400000", 10181], ["1506556800000", 12936], ["1506643200000", 16419], ["1506729600000", 24490], ["1506816000000", 2690]];
var dates_graph_data_2013 = [["1504137600000", 409], ["1504224000000", 14345], ["1504310400000", 8265], ["1504396800000", 9208], ["1504483200000", 8663], ["1504569600000", 7886], ["1504656000000", 8220], ["1504742400000", 8453], ["1504828800000", 9373], ["1504915200000", 9606], ["1505001600000", 8279], ["1505088000000", 9629], ["1505174400000", 7791], ["1505260800000", 8388], ["1505347200000", 8160], ["1505433600000", 9568], ["1505520000000", 8790], ["1505606400000", 9468], ["1505692800000", 8790], ["1505779200000", 8381], ["1505865600000", 8992], ["1505952000000", 10009], ["1506038400000", 12367], ["1506124800000", 9869], ["1506211200000", 13156], ["1506297600000", 14209], ["1506384000000", 15964], ["1506470400000", 15085], ["1506556800000", 19514], ["1506643200000", 33069], ["1506729600000", 41951], ["1506816000000", 3711]];
var dates_graph_data_2012 = [["1504137600000", 525], ["1504224000000", 7641], ["1504310400000", 8638], ["1504396800000", 6954], ["1504483200000", 7276], ["1504569600000", 7946], ["1504656000000", 6513], ["1504742400000", 7268], ["1504828800000", 8386], ["1504915200000", 10372], ["1505001600000", 10613], ["1505088000000", 8214], ["1505174400000", 8694], ["1505260800000", 9046], ["1505347200000", 8725], ["1505433600000", 8627], ["1505520000000", 11119], ["1505606400000", 9520], ["1505692800000", 8408], ["1505779200000", 7387], ["1505865600000", 8284], ["1505952000000", 10391], ["1506038400000", 10656], ["1506124800000", 14308], ["1506211200000", 11642], ["1506297600000", 12848], ["1506384000000", 13158], ["1506470400000", 17252], ["1506556800000", 20409], ["1506643200000", 26966], ["1506729600000", 47387], ["1506816000000", 5554]];
var dates_graph_data_2011 = [["1504137600000", 222], ["1504224000000", 2373], ["1504310400000", 1560], ["1504396800000", 2211], ["1504483200000", 3473], ["1504569600000", 3333], ["1504656000000", 2968], ["1504742400000", 3050], ["1504828800000", 2850], ["1504915200000", 3146], ["1505001600000", 3546], ["1505088000000", 4306], ["1505174400000", 4069], ["1505260800000", 3755], ["1505347200000", 3378], ["1505433600000", 4762], ["1505520000000", 3596], ["1505606400000", 4648], ["1505692800000", 7038], ["1505779200000", 5095], ["1505865600000", 4185], ["1505952000000", 4669], ["1506038400000", 4390], ["1506124800000", 4807], ["1506211200000", 6123], ["1506297600000", 8159], ["1506384000000", 6691], ["1506470400000", 9158], ["1506556800000", 10408], ["1506643200000", 13188], ["1506729600000", 21971], ["1506816000000", 927]];
var dates_graph = $("#dates_graph");
var dates_graph_data = [{ data: dates_graph_data_2011, label: "2011"}, { data: dates_graph_data_2012, label: "2012"}, { data: dates_graph_data_2013, label: "2013"}, { data: dates_graph_data_2014, label: "2014"}, { data: dates_graph_data_2015, label: "2015"}, { data: dates_graph_data_2016, label: "2016"}, { data: dates_graph_data_2017, label: "2017"}];
var dates_graph_options = { xaxis: { mode: "time", min: (new Date("2017/08/31")).getTime(), max: (new Date("2017/10/01")).getTime() }, lines: { show: true }, points: { show: true }, legend: { noColumns: 7, position: "nw" }, grid: { hoverable: true }, clickable: true, hoverable: true };
$.plot(dates_graph, dates_graph_data, dates_graph_options);
});
//from http://people.iola.dk/olau/flot/examples/interacting.html
function showTooltip(x, y, contents) {
$('<div id="tooltip">' + contents + '</div>').css( {
position: 'absolute',
display: 'none',
top: y + 5,
left: x + 12,
border: '1px solid #fdd',
padding: '2px',
'background-color': '#fee',
opacity: 0.80
}).appendTo("body").fadeIn(200);
}
var previousPoint = null;
$("#dates_graph").bind("plothover", function (event, pos, item) {
$("#x").text(pos.x.toFixed(2));
$("#y").text(pos.y.toFixed(2));
if (item) {
if (previousPoint != item.datapoint) {
previousPoint = item.datapoint;
$("#tooltip").remove();
var x = item.datapoint[0].toFixed(2),
y = item.datapoint[1].toFixed(2);
showTooltip(item.pageX, item.pageY,
"y = "+Math.round(y));
}
} else {
$("#tooltip").remove();
previousPoint = null;
}
});
</script>
</body>
</html>