index.html
8.48 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<!DOCTYPE html>
<html>
<head>
<!-- style -->
<link rel="stylesheet" href="js/bootstrap-3.3.4-dist/css/bootstrap.css">
<!-- Js imports -->
<script type="text/javascript" src="js/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="../COMPONENTS/bower_components/webcomponentsjs/webcomponents.js"></script>
<script type="text/javascript" src="js/deepClient.js"></script>
<script src="js/bootstrap-3.3.4-dist/js/bootstrap.min.js"></script>
<script type="text/javascript">
//Bilancio preventivo regione Lazio
DATAURL = "http://dati.lazio.it/catalog/api/action/datastore_search?resource_id=722b6cbd-28d3-4151-ac50-9c4261298168&limit=1000";
FIELDS = Array("result,records,Capitolo","result,records,Previsione Competenza");
FIELDS1 = Array("result,records,Capitolo","result,records,Descr. capitolo","result,records,Previsione Competenza");
//Bilancio prato 2014
/*DATAURL = "http://ckan.routetopa.eu/api/action/datastore_search?resource_id=0cb600fc-19ad-4aaf-9794-1e6ea851840a&limit=1000";
FIELDS = Array("result,records,descrizione","result,records,movimento");
FIELDS1 = Array("result,records,titolo","result,records,categoria","result,records,descrizione","result,records,movimento");*/
//ROUTE-TO-PA CKAN DUBLIN
DATAURL1 = "http://ckan.routetopa.eu/api/action/datastore_search?resource_id=73e02092-85a1-434e-85fe-0c9a43aa9a52&limit=5000";
FIELDS2 = Array("result,records,Lat","result,records,Lng","result,records,Link");
//ROUTE-TO-PA CKAN TREEMAP
DATAURL2 = "http://ckan.routetopa.eu/api/action/datastore_search?resource_id=0cb600fc-19ad-4aaf-9794-1e6ea851840a&limit=10000";
FIELDS3 = Array("result,records,categoria","result,records,capitolo","result,records,movimento");
jQuery(document).ready(function($) {
var table_params ={
component : "datatable-datalet",
params :
{
'data-url' : DATAURL
},
fields : FIELDS1,
placeHolder : "table_component_place_holder"
};
var linechart_params ={
component : "linechart-datalet",
params :
{
'data-url' : DATAURL,
'title' : 'Linechart example',
'x-axis-label' : 'x-axis',
'y-axis-label' : 'y-axis'
},
fields : FIELDS,
placeHolder : "linechart_component_place_holder"
};
var barchart_params ={
component : "barchart-datalet",
params :
{
'data-url' : DATAURL
},
fields : FIELDS,
placeHolder : "barchart_component_place_holder"
};
var columnchart_params ={
component : "columnchart-datalet",
params :
{
'data-url' : DATAURL
},
fields : FIELDS,
placeHolder : "columnchart_component_place_holder"
};
var column3dchart_params ={
component : "column3Dchart-datalet",
params :
{
'data-url' : DATAURL1
},
fields : FIELDS2,
placeHolder : "column3dchart_component_place_holder"
};
var leafletjs_params ={
component : "leafletjs-datalet",
params :{
'data-url' : DATAURL1
},
fields : FIELDS2,
placeHolder : "leafletjs_component_place_holder"
};
var treemap_params = {
component : "treemap-datalet",
params :{
'data-url' : DATAURL2
},
fields : FIELDS3,
placeHolder : "treemap_component_place_holder"
};
var preview_params = {
component : "preview-datalet",
params :{
'data-url' : "http://spod.routetopa.eu/",
'url' : "http://spod.routetopa.eu/"
},
fields : [],
placeHolder : "preview_component_place_holder"
};
ComponentService.deep_url = 'http://192.168.214.128/DEEalerProvider/DEEP/';
ComponentService.getComponent(table_params);
ComponentService.getComponent(linechart_params);
ComponentService.getComponent(barchart_params);
ComponentService.getComponent(columnchart_params);
ComponentService.getComponent(column3dchart_params);
ComponentService.getComponent(leafletjs_params);
ComponentService.getComponent(treemap_params);
ComponentService.getComponent(preview_params);
});
</script>
</head>
<body>
<div class="jumbotron">
<div class="container">
<h2>Open Data Datalets</h2>
<p class="small text-info">In this page you can see several containers with opendata Datalets. To do this the page uses the DEEPCLIENT js library.
The only things you have to know is the data source url, the fields that component need to visualize the chart, the component you want to use and the place holder in witch the component will be
injected.
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"> Datatable Datalet</h3>
</div>
<div class="panel-body">
<div id="table_component_place_holder"></div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Linechart Datalet</h3>
</div>
<div class="panel-body">
<div id="linechart_component_place_holder"></div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Barchart Datalet</h3>
</div>
<div class="panel-body">
<div id="barchart_component_place_holder"></div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Columnchart Datalet</h3>
</div>
<div class="panel-body">
<div id="columnchart_component_place_holder"></div>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Column3Dchart Datalet</h3>
</div>
<div class="panel-body">
<div id="column3dchart_component_place_holder">
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Leafletjs Map Datalet</h3>
</div>
<div class="panel-body">
<div id="leafletjs_component_place_holder">
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Treemap Datalet</h3>
</div>
<div class="panel-body">
<div id="treemap_component_place_holder">
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Preview Datalet</h3>
</div>
<div class="panel-body">
<div id="preview_component_place_holder">
</div>
</div>
</div>
</div>
</div>
</body>
</html>