-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathData-Entry.html
658 lines (579 loc) · 26.7 KB
/
Data-Entry.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
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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<title>Data Entry on KoboToolBox</title>
<script src="libs/jquery-1.11.3/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="libs/bootstrap-3.3.5/css/flatly.min.css" rel="stylesheet" />
<script src="libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<script src="libs/navigation-1.1/tabsets.js"></script>
<meta name="robots" content="index, follow">
<title>IFHS: Integrated Framework for Household Survey</title>
<link rel="stylesheet" href="./include/ifhs2.css" />
<script type="text/javascript" src="./libs/zeroclipboard-2.2.0/ZeroClipboard.js"></script>
<link rel="stylesheet" href="./libs/colorbox-1.6.1/colorbox.css" />
<script type="text/javascript" src="./libs/colorbox-1.6.1/jquery.colorbox-min.js"></script>
<!--- favicon --->
<link rel="apple-touch-icon" sizes="57x57" href="./images/favicon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="./images/favicon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="./images/favicon/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="./images/favicon/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="./images/favicon/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="./images/favicon/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="./images/favicon/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="./images/favicon/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="./images/favicon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="./images/favicon/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="./images/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="./images/favicon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="./images/favicon/favicon-16x16.png">
<link rel="manifest" href="./images/favicon/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="./images/favicon/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<style type = "text/css">
.main-container {
max-width: 940px;
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
.tabbed-pane {
padding-top: 12px;
}
.html-widget {
margin-bottom: 20px;
}
button.code-folding-btn:focus {
outline: none;
}
summary {
display: list-item;
}
</style>
<!-- tabsets -->
<style type="text/css">
.tabset-dropdown > .nav-tabs {
display: inline-table;
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
.tabset-dropdown > .nav-tabs > li.active:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
content: "";
border: none;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}
.tabset-dropdown > .nav-tabs > li.active {
display: block;
}
.tabset-dropdown > .nav-tabs > li > a,
.tabset-dropdown > .nav-tabs > li > a:focus,
.tabset-dropdown > .nav-tabs > li > a:hover {
border: none;
display: inline-block;
border-radius: 4px;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
display: block;
float: none;
}
.tabset-dropdown > .nav-tabs > li {
display: none;
}
</style>
<!-- code folding -->
</head>
<body>
<div class="container-fluid main-container">
<nav>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">Integrated Framework for Household Survey</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="design" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Design <span class="caret"></span></a>
<ul class="dropdown-menu multi-column columns-3" role="menu" id="menu_design">
<div class="row">
<div class="col-sm-4">
<ul class="multi-column-dropdown">
<li class="dropdown-header">Planning</li>
<li><a href="Assessment-Project-Document.html">Assessment Project Document</a></li>
<li><a href="Memorandum-of-Understanding.html">Memorandum of Understanding</a></li>
<li><a href="Terms-of-Reference-for-Assessment-Focal-Point.html">Terms of Reference for Assessment Focal Point</a></li>
</ul>
</div>
<div class="col-sm-4">
<ul class="multi-column-dropdown">
<li class="dropdown-header">Methodology</li>
<li><a href="Sampling.html">Sampling</a></li>
<li><a href="Interview.html">Interview approach</a></li>
<li><a href="Pre-Assessment.html">Pre-Assessment</a></li>
</ul>
</div>
<div class="col-sm-4">
<ul class="multi-column-dropdown">
<li class="dropdown-header">Form</li>
<li ><a href="protection-Topics.html">Protection Topics</a></li>
<li ><a href="Module-questions.html">Questions Modules</a></li>
<li ><a href="Guidelines-for-Customisation.html">Guidelines for Customisation</a></li>
</ul>
</div>
</div>
</ul>
</li>
<li class="dropdown">
<a href="collect" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Collect <span class="caret"></span></a>
<ul class="dropdown-menu multi-column columns-3" role="menu" id="menu_collect">
<div class="row">
<div class="col-sm-4">
<ul class="multi-column-dropdown">
<li class="dropdown-header">Preparing for fieldwork</li>
<li><a href="Configure-forms.html">Configure forms</a></li>
<li><a href="Pre-test-Phase.html">Pre-test Phase</a></li>
<li><a href="Fieldwork-Training-Agenda.html">Fieldwork Training and Agenda</a></li>
</ul>
</div>
<div class="col-sm-4">
<ul class="multi-column-dropdown">
<li class="dropdown-header">Using KoboToolBox</li>
<li ><a href="Data-Protection-Impact-Assessment.html">Data Protection Impact Assessment</a></li>
<li ><a href="Server-Configuration.html">Server Configuration</a></li>
<li ><a href="Data-Entry.html">Data Entry</a></li>
</ul>
</div>
<div class="col-sm-4">
<ul class="multi-column-dropdown">
<li class="dropdown-header">Fieldwork manual</li>
<li ><a href="Instructions-for-Interviewers.html">Instructions for Interviewers</a></li>
<li ><a href="Instructions-for-Supervisors-Editors.html">Instructions for Supervisors and Editors</a></li>
<li ><a href="Instructions-for-Managers.html">Instructions for Managers</a></li>
</ul>
</div>
</div>
</ul>
</li>
<li class="dropdown">
<a href="analyse" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Analyse <span class="caret"></span></a>
<ul class="dropdown-menu multi-column columns-3" role="menu" id="menu_analyse">
<div class="row">
<div class="col-sm-4">
<ul class="multi-column-dropdown">
<li class="dropdown-header">Analytics Steps</li>
<li ><a href="Clean-Anonymize.html">Clean & Anonymize</a></li>
<li ><a href="Describe.html">Describe</a></li>
<li ><a href="Discover.html">Discover</a></li>
<li ><a href="Predict.html">Predict</a></li>
<li ><a href="Advise.html">Advise</a></li>
</ul>
</div>
<div class="col-sm-4">
<ul class="multi-column-dropdown">
<li class="dropdown-header">Analysis Process</li>
<li ><a href="Data-Crunching.html">Data Crunching</a></li>
<li ><a href="Analysis-Workshop.html">Analysis Workshop</a></li>
<li ><a href="Model-for-Final-Report.html">Model for Final Report</a></li>
</ul>
</div>
<div class="col-sm-4">
<ul class="multi-column-dropdown">
<li class="dropdown-header">Communication</li>
<li><a href="Slides-Infographics.html">Slides & Infographics</a></li>
<li><a href="Microdata.html">Sharing microdata for social scientist</a></li>
<li><a href="Open-Data.html">Open Data</a></li>
</ul>
</div>
</div>
</ul>
</li>
<li><a href="Integrated-framework-household-survey.pdf">PDF</a></li>
</ul>
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://tontonroger.org/">
<div class="form-group">
<input name="q" type="text" class="form-control input-sm" placeholder="Search">
</div>
<button type="submit" class="btn btn-default btn-sm" name="Search">
<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
</button>
</form>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</nav>
<div class="row">
<div class="col-sm-9" role="main">
<article>
<div class="fluid-row" id="header">
<h1 class="title toc-ignore">Data Entry on KoboToolBox</h1>
</div>
<div id="TOC">
<ul>
<li><a href="#managing-android-devices">Managing Android Devices</a><ul>
<li><a href="#minimal-requirements-for-the-devices">Minimal Requirements for the devices</a></li>
<li><a href="#steady-power-supply">Steady power supply</a></li>
<li><a href="#usb-battery-packs">USB Battery packs</a></li>
</ul></li>
<li><a href="#using-the-client-on-mobile-devices-kobocollect">Using the client on Mobile Devices: koboCollect</a><ul>
<li><a href="#server-url-set-up">Server URL set up</a></li>
<li><a href="#collect-data">Collect data</a></li>
<li><a href="#uploading-finalized-data">Uploading finalized data</a></li>
</ul></li>
<li><a href="#using-the-web-client-enketo">Using the web client: Enketo</a><ul>
<li><a href="#collecting-data-offline">Collecting data offline</a></li>
</ul></li>
<li><a href="#differences-between-the-two-options">Differences between the two options</a></li>
</ul>
</div>
<div class="important">
<p>This chapter is not written yet.</p>
</div>
<div id="managing-android-devices" class="section level2">
<h2>Managing Android Devices</h2>
<p>The software platform used for the data consolidation has specific clients developped on the Android Mobile Operating System. It’s also possible, although not first recommended to use any browser (including any browser on a smartphone) to record information.</p>
<p>A certain number of smartphones or tablets will be needed for each survey team to have one or two phones, as well as a few backups.</p>
<p>For ease of use, smartphones and tablets with a large touchscreen and slide-out keyboard are preferable. Equipement might be borrowed from UNHCR HQ, or country operations could have their own set of phones.</p>
<div id="minimal-requirements-for-the-devices" class="section level3">
<h3>Minimal Requirements for the devices</h3>
<ul>
<li>Android Version 2.3 (recent phones are generally platform 4 or higher)</li>
<li>Screen size of 4 inches is recommended</li>
<li>GPS Chipset</li>
<li>Wifi connection</li>
</ul>
<p>Required Applications:</p>
<ul>
<li>Latest recommended version of KoboCollect</li>
<li>GPS Test, if you need GPS coordinates for the survey</li>
</ul>
</div>
<div id="steady-power-supply" class="section level3">
<h3>Steady power supply</h3>
<p>Access to a good electrical supply is essential for the router and computer and for over-night charging capacities of the phones. Where electrical supply is unstable with unexpected power-cuts or planned power savings, alternative charging options must be considered before the survey.</p>
</div>
<div id="usb-battery-packs" class="section level3">
<h3>USB Battery packs</h3>
<p>Even though they cannot replace steady electrical power, battery packs are a useful secondary source of energy for the phones. We recommend having at least 2 for a survey where the phones are daily charged. This way, if a phone lack battery during the survey, the enumerator can charge it while continuing the survey.</p>
</div>
</div>
<div id="using-the-client-on-mobile-devices-kobocollect" class="section level2">
<h2>Using the client on Mobile Devices: koboCollect</h2>
<p>KoBoCollect is an Android app that can be installed on any standard Android phone or tablet. <a href="https://play.google.com/store/apps/details?id=org.koboc.collect.android">To download the app to your Android device, click here</a>.</p>
<div id="server-url-set-up" class="section level3">
<h3>Server URL set up</h3>
<p>After installing KoBoCollect, you need to configure it so that it can be used together with your KoBoToolbox account for data collection. To do so, follow the steps:</p>
<ul>
<li>In KoBoToolbox, click on Projects within the menu sidebar on the left. Note the URL that is inside your browser at the top of your screen (for example, <a href="http://kobo.unhcr.org/username/" class="uri">http://kobo.unhcr.org/username/</a>)</li>
</ul>
<div class="figure">
<img src="images/dash_url.png" alt="Offline" />
<p class="caption">Offline</p>
</div>
<ul>
<li>On your Android device, open KoBoCollect and open the General Settings (click on the settings button of your device to access the settings).</li>
</ul>
<div class="figure">
<img src="images/collect_settings_button_EX.png" alt="Offline" />
<p class="caption">Offline</p>
</div>
<ul>
<li>In General Settings, under URL, enter the exact URL from step (2). Make sure you include the correct ‘<a href="https://" class="uri">https://</a>’</li>
</ul>
<div class="figure">
<img src="images/collect_settings_url_EX.png" alt="Offline" />
<p class="caption">Offline</p>
</div>
<ul>
<li>Download forms from your account. Make sure you are connected to the Internet on your device. Also, you need to have deployed at least one project in KoBoToolbox. On the home menu of KoBoCollect, click Get Blank Form. A list of all your forms from your different projects will be shown. Click Toggle All (or select the ones you wish to download), then click Get Selected.</li>
</ul>
<div class="figure">
<img src="images/collect_home_getformsEX.png" alt="Offline" />
<p class="caption">Offline</p>
</div>
</div>
<div id="collect-data" class="section level3">
<h3>Collect data</h3>
<ul>
<li>Click on Fill blank form</li>
</ul>
<div class="figure">
<img src="images/collect_home_add_data_EX.png" alt="Offline" />
<p class="caption">Offline</p>
</div>
<ul>
<li><p>Select the form to which you would like to enter data</p></li>
<li><p>Go through all the questions (swiping your finger from right to left)</p></li>
<li><p>At the end click on Save Form and Exit (making sure the form is marked as ‘finalized’)</p></li>
</ul>
</div>
<div id="uploading-finalized-data" class="section level3">
<h3>Uploading finalized data</h3>
<ul>
<li>From the home screen, click on Send Finalized Form</li>
</ul>
<div class="figure">
<img src="images/collect_home_upload_data_EX.png" alt="Offline" />
<p class="caption">Offline</p>
</div>
<ul>
<li><p>A list of your most recently collected forms appears.</p></li>
<li><p>Click Toggle all (or select the ones you wish to send), then click Send Selected.</p></li>
</ul>
<p>It is possible to hide buttons and options within KoBoCollect. On the home screen click the Android menu button, then Choose Admin Settings and select the buttons you would like to hide from the different screens. If you set an admin password, interviewers won’t be able to access the Admin settings to ever get access to these buttons.</p>
<div class="figure">
<img src="images/collect_settings_Adminbutton_EX.png" alt="Offline" />
<p class="caption">Offline</p>
</div>
</div>
</div>
<div id="using-the-web-client-enketo" class="section level2">
<h2>Using the web client: Enketo</h2>
<p>Web Forms, also known as Enketo, are used by KoBoToolbox to preview forms and to enter data directly on a computer. Web forms also for collecting data on any mobile devices - even when offline at the time of data collection. It works on virtually any device, including iPhones, iPads, or any other smartphone, tablet, or computer. Some features are still being actively developed for Enketo, so some special questions may not be fully supported yet on every device. ### Start Collection</p>
<p>To start collecting data using web forms in your computer, simply click on the button ‘Enter data in browser’ in your project view. This is especially useful for testing purposes, but also when transcribing data from using paper forms.</p>
<div class="figure">
<img src="images/kbt_kc_enketo2_PC.png" alt="Offline" />
<p class="caption">Offline</p>
</div>
<p>To collect data using a mobile device, you need to copy the URL of your webform to your mobile device. You can simply send it by email or text message to any device. To obtain the URL of the webform, click either the ‘Enter data in browser’ or ‘How to collect data on mobile device’ buttons.</p>
<div class="figure">
<img src="images/kbt_kc_enketo1.png" alt="Offline" />
<p class="caption">Offline</p>
</div>
<div id="collecting-data-offline" class="section level3">
<h3>Collecting data offline</h3>
<p>Enketo is also able to collect data while offline. However, it is essential to visit the URL once before going offline, and then saving it on the device (for example with a bookmark on the mobile browser).</p>
<p>Once your form has been fully loaded and cached, an offline availability icon (empty “signal bars” and a check mark) in the top-left corner will appear and indicate that the form can be accessed offline unless <em>browser’s data are cleared</em>.</p>
<div class="figure">
<img src="images/enketooffline.png" alt="Offline" />
<p class="caption">Offline</p>
</div>
<p>Enketo will display the form within that URL even without any Internet connectivity, and data will be store and queued until the next internet connection.</p>
</div>
</div>
<div id="differences-between-the-two-options" class="section level2">
<h2>Differences between the two options</h2>
<p>A detailled <a href="http://support.kobotoolbox.org/customer/portal/articles/1653813">list of differences between the 2 options is here</a> but in the differences are minimal and mostly impact the ammount of hidden metdata that can be collected as well the configuration of the look’n’feel of the form for end users.</p>
</div>
</article>
</div>
<div class="col-sm-3" role="complementary">
<nav class="hidden-print hidden-xs" id="nav_sidebar">
</nav>
</div>
</div>
<script>
// manage active state of menu based on current page
$(document).ready(function () {
// active menu
href = window.location.pathname;
href = href.substr(href.lastIndexOf('/') + 1);
if (href=='') href = 'index.html';
$('a[href="' + href + '"]').parent().addClass('active');
$('a[href="' + href + '"]').parent().parents('li').addClass('active');
// élargir la page d'accueil
if (href=='index.html') $('.col-sm-9').attr('class','col-sm-12');
// rechercher
$("#rechercher").submit(function(event) {
$('input[name="q"]').val($('input[name="q"]').val() + ' site:unhcr.github.io/Integrated-framework-household-survey');
});
// sidebar
$("#nav_sidebar").append($("#TOC").html());
$("#nav_sidebar ul").addClass("nav nav-stacked");
$("#TOC").addClass("visible-xs-block");
$('body').scrollspy({
target: '#nav_sidebar',
offset: 40
});
// Identifier les <pre> fermant
$('pre').next("*:not(pre)").prev().addClass('last'); // Dernier <pre> de chaque groupe contigu de <pre>
$('pre').parent().each(function (){
$(this).children('pre').last().addClass('last');
}); // Si <pre> est le dernier enfant de son parent
// Ajout liens rdocumentation et tooltip
$("code[data-pkg]").each(function( index ) {
pkg = $(this).attr('data-pkg');
if ($(this).attr('data-rdoc') !== undefined) {
rdocumentation = $(this).attr('data-rdoc');
} else {
rdocumentation = $(this).text();
}
fonction = $(this).text();
$(this).wrap('<a href="http://www.rdocumentation.org/packages/'+pkg+'/functions/'+rdocumentation+'">');
$(this).attr('data-toggle','tooltip');
$(this).attr('data-placement','top');
$(this).attr('title','package : ' + pkg);
$('[data-toggle="tooltip"]').tooltip();
});
$("code.pkg").each(function( index ) {
$(this).wrap('<a href="http://www.rdocumentation.org/packages/'+$(this).text()+'">');
});
// Figures
$("figure").each(function( index ) {
if ($(this).children("figcaption").length > 0)
$(this).children("figcaption:first").prepend('<span class="figure-number">Figure '+(index+1)+'.</span> ');
else
$(this).append($("<figcaption>").append('<span class="figure-number">Figure '+(index+1)+'</span>'));
});
// Colorbox
jQuery('article div img').colorbox({
maxWidth: '90%',
maxHeight: '90%',
rel: 'figures',
current: "",
href: function(){
return $(this).attr('src');
},
title: function(){
return $(this).attr('alt');
}
});
jQuery('article div img').css('cursor', 'pointer');
jQuery('figure img').colorbox({
maxWidth: '90%',
maxHeight: '90%',
rel: 'figures',
current: "",
href: function(){
return $(this).attr('src');
},
title: function(){
return $(this).parent().children("figcaption").text();
}
});
jQuery('figure img').css('cursor', 'pointer');
// ZeroClipboard
$('pre.r').parent().each(function(){
$(this).children('pre.r').first().before('<div class="zero-clipboard hidden-print hidden-xs"><button class="btn-clipboard">Copy</button></div>');
}); // Il peut arriver que le pre ne soit pas précédé (cf. figures)
$('*:not(pre):not(.zero-clipboard) + pre.r').before('<div class="zero-clipboard hidden-print hidden-xs"><button class="btn-clipboard">Copy</button></div>');
$('pre.last').after(function() {
if ($(this).hasClass("r")) res = $(this).text(); else res = "";
$(this).prevUntil('*:not(pre)','pre.r').each(function() {
res = $(this).text() + '\n' + res;
});
return '<div class="clipboard">' + res + '</div>';
});
$('.zero-clipboard').each(function(index){
$(this).children('.btn-clipboard').attr('data-clipboard-target','clipboard_'+index);
$(this).nextAll("div.clipboard").first().attr('id','clipboard_'+index);
});
var client = new ZeroClipboard( $(".btn-clipboard") );
client.on( "ready", function( readyEvent ) {
// alert( "ZeroClipboard SWF is ready!" );
client.on( "aftercopy", function( event ) {
// `this` === `client`
// `event.target` === the element that was clicked
//event.target.style.display = "none";
$(event.target).parent().before('<div class="alert alert-success"><a href="#" class="close" data-dismiss="alert">×</a>The <strong>R</strong> code is now copied in your clipboard.</div>');
} );
} );
});
</script>
<!-- disqus -->
<div class="row">
<div id="disqus_thread" class="col-sm-9" role="complementary"></div>
</div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'Integrated-framework-household-survey'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Activate JavaScript to see <a href="http://disqus.com/?ref_noscript">Disqus Comments.</a></noscript>
<!--<a href="http://disqus.com" class="dsq-brlink">Comments are hosted by <span class="logo-disqus">Disqus</span>.</a>-->
<footer>
<div class="row">
<div class="col-lg-12">
<p>Powered by <a href="http://www.r-project.org/" rel="nofollow">R</a>, </a><a href="http://www.rstudio.com/" rel="nofollow">RStudio</a>, <a href="http://rmarkdown.rstudio.com/" rel="nofollow">R Markdown</a>, <a href="http://yihui.name/knitr/" rel="nofollow">knitr</a>, <a href="http://pandoc.org/" rel="nofollow">pandoc</a> and <a href="http://www.princexml.com/" rel="nofollow">Prince XML</a>. Hosted by <a href="https://github.com/" rel="nofollow">GitHub</a>.</p>
</div>
</div>
</footer>
</div>
<script>
// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
$('tr.header').parent('thead').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
bootstrapStylePandocTables();
});
</script>
<!-- tabsets -->
<script>
$(document).ready(function () {
window.buildTabsets("TOC");
});
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
});
});
</script>
<!-- code folding -->
</body>
</html>