-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
503 lines (414 loc) · 23.9 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<meta name="author" content="CivicDataLab" />
<title>Exploriong budget allocation for the Ministry of Environment, Forests and Climate Change (2020/2021)</title>
<script src="exploring-OBI_files/jquery-1.12.4/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="exploring-OBI_files/bootstrap-3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<script src="exploring-OBI_files/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="exploring-OBI_files/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="exploring-OBI_files/bootstrap-3.3.5/shim/respond.min.js"></script>
<script src="exploring-OBI_files/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="exploring-OBI_files/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="exploring-OBI_files/tocify-1.9.1/jquery.tocify.js"></script>
<script src="exploring-OBI_files/navigation-1.1/tabsets.js"></script>
<link href="exploring-OBI_files/highlightjs-9.12.0/default.css" rel="stylesheet" />
<script src="exploring-OBI_files/highlightjs-9.12.0/highlight.js"></script>
<script src="exploring-OBI_files/htmlwidgets-1.5.1/htmlwidgets.js"></script>
<link href="exploring-OBI_files/datatables-css-0.0.0/datatables-crosstalk.css" rel="stylesheet" />
<script src="exploring-OBI_files/datatables-binding-0.11/datatables.js"></script>
<link href="exploring-OBI_files/dt-core-1.10.19/css/jquery.dataTables.min.css" rel="stylesheet" />
<link href="exploring-OBI_files/dt-core-1.10.19/css/jquery.dataTables.extra.css" rel="stylesheet" />
<script src="exploring-OBI_files/dt-core-1.10.19/js/jquery.dataTables.min.js"></script>
<link href="exploring-OBI_files/crosstalk-1.0.0/css/crosstalk.css" rel="stylesheet" />
<script src="exploring-OBI_files/crosstalk-1.0.0/js/crosstalk.min.js"></script>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
hljs.initHighlightingOnLoad();
if (document.readyState && document.readyState === "complete") {
window.setTimeout(function() { hljs.initHighlighting(); }, 0);
}
}
</script>
<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;
background-color: transparent;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
display: block;
float: none;
}
.tabset-dropdown > .nav-tabs > li {
display: none;
}
</style>
<!-- code folding -->
<style type="text/css">
#TOC {
margin: 25px 0px 20px 0px;
}
@media (max-width: 768px) {
#TOC {
position: relative;
width: 100%;
}
}
@media print {
.toc-content {
/* see https://github.com/w3c/csswg-drafts/issues/4434 */
float: right;
}
}
.toc-content {
padding-left: 30px;
padding-right: 40px;
}
div.main-container {
max-width: 1200px;
}
div.tocify {
width: 20%;
max-width: 260px;
max-height: 85%;
}
@media (min-width: 768px) and (max-width: 991px) {
div.tocify {
width: 25%;
}
}
@media (max-width: 767px) {
div.tocify {
width: 100%;
max-width: none;
}
}
.tocify ul, .tocify li {
line-height: 20px;
}
.tocify-subheader .tocify-item {
font-size: 0.90em;
}
.tocify .list-group-item {
border-radius: 0px;
}
.tocify-subheader {
display: inline;
}
.tocify-subheader .tocify-item {
font-size: 0.95em;
}
</style>
</head>
<body>
<div class="container-fluid main-container">
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row-fluid">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
</div>
<div class="toc-content col-xs-12 col-sm-8 col-md-9">
<div class="fluid-row" id="header">
<h1 class="title toc-ignore">Exploriong budget allocation for the Ministry of Environment, Forests and Climate Change (2020/2021)</h1>
<h4 class="author">CivicDataLab</h4>
</div>
<p><br /> Last updated: 04 February, 2020 (See <a href="https://github.com/apoorv74/OBI-data-explorer/commits/master">changelog</a>).</p>
<p><img src="assets/image/cdl_primary-logo.png" /></p>
<hr />
<div id="why-another-notebook" class="section level3">
<h3>📓 Why another Notebook ?</h3>
<p>The objective of this notebook is to demonstrate the exploration of the <a href="openbudgetsindia.org/">OpenBudgetsIndia</a> (OBI) platform right from our ❤️ programming environment, in this case <code>R</code>.</p>
<p>For this use-case we will explore the budget allocation data for the <strong>Ministry of Environment, Forest and Climate Change</strong> 🎄 for the year <strong>2020/21</strong></p>
<p>We will use the <a href="https://github.com/ropensci/ckanr">ckanr</a> package developed by the amazing folks at <a href="https://ropensci.org/">ROpenSci</a>. This is used to read and update data from <a href="https://ckan.org/">CKAN</a> instanes. Since, OBI is yet another CkAN instance, this packages works perfectly to read and explore (and write as well) data from and to the <a href="openbudgetsindia.org/">Open Budgets India</a> platform.</p>
<p><br /></p>
<p><em>Note: Please check the <a href="https://github.com/ropensci/ckanr">ckanr Github repo</a> for documentation and more such examples</em></p>
<hr />
</div>
<div id="step-1---connecting-to-obi" class="section level3">
<h3>Step 1 - 💻 Connecting to OBI</h3>
<pre class="r"><code>org_url <- "https://openbudgetsindia.org/"
ckanr::ckanr_setup(url = org_url)
org_connect <- ckanr::src_ckan(url = org_url)</code></pre>
<pre><code>## url: https://openbudgetsindia.org/</code></pre>
<pre class="r"><code>### Check connection
ckanr::ckan_version()</code></pre>
<pre><code>## $version
## [1] "2.6.0a"
##
## $version_num
## [1] 26</code></pre>
</div>
<div id="step-2---exploring-an-organisation" class="section level3">
<h3>Step 2 - 🏨 Exploring an organisation</h3>
<p>In this exercise, we would like to see the budget allocation for the year 2020-21 within the Ministry of Environment, Forest and Climate Change. Ministries are considered as organisation in OBI, let’s see if we can access the description of this organisation</p>
<pre class="r"><code>ministry_details <- ckanr::organization_show(id = "ministry-of-environment-forests-and-climate-change",include_datasets = TRUE)
### Explore Organisation details
# listviewer::jsonedit(ministry_details)
ministry_details$description[[1]] %>% stringr::str_to_sentence() %>% cat()</code></pre>
<pre><code>## This section records total budget allocation for schemes and programmes under ministry of environment, forests and climate change . It includes secretariat-economic services,state forest service and rangers college,indira gandhi national forest academy,training of i.f.s. officers,indian institute of forestry management,indian council of forestry research and education,indian plywood industries research institute,survey and utilisation of forest resources,forest conservation, development and regeneration,wildlife institute of india,project tiger,project elephant,central zoo authority,control of wildlife crime,integrated development of wildlife habitats,national afforestation and eco-development board:</code></pre>
</div>
<div id="step-3---exploring-datasets-present-within-an-organisation" class="section level3">
<h3>Step 3 - 📂 Exploring datasets present within an organisation</h3>
<p>Moving further, let’s check the kind of datasets present within this org.</p>
<pre class="r"><code>all_datasets <- purrr::map(ministry_details$packages,'title') %>% unlist()
all_datasets</code></pre>
<pre><code>## [1] "Union Budget (2020-21) - Ministry of Environment, Forests and Climate Change"
## [2] "Union Budget (2019-20) - Ministry of Environment, Forests and Climate Change"
## [3] "Union Budget (2019-20)(I) - Ministry of Environment, Forests and Climate Change"
## [4] "Union Budget (2018-19) - Ministry of Environment, Forests and Climate Change"
## [5] "Union Budget (2017-18) - Ministry of Environment, Forests and Climate Change"
## [6] "Union Budget (2015-16) - Ministry of Environment, Forests and Climate Change"
## [7] "Union Budget (2016-17) - Ministry of Environment, Forests and Climate Change"
## [8] "Union Budget (2014-15) - Ministry of Environment, Forests and Climate Change"
## [9] "Union Budget (2013-14) - Ministry of Environment, Forests and Climate Change"
## [10] "Union Budget (2012-13) - Ministry of Environment, Forests and Climate Change"
## [11] "Union Budget (2011-12) - Ministry of Environment, Forests and Climate Change"</code></pre>
<p>This organsiation (or Ministry) has data from 2011/12 right till 2020/21. Since we’re interested in the budget allocation for 2020/21, let us now see how we can access the data within this dataset (or a <code>package</code>)</p>
</div>
<div id="step-4---viewing-a-package" class="section level3">
<h3>Step 4 - 📧 Viewing a package</h3>
<p>A package (or a dataset) contains several files within. For this analysis, we would like to get access to the tabular datasets or a <strong>CSV</strong> which has allocation details for several important budget heads.</p>
<pre class="r"><code># Get the package ID
data_2020_id <- ministry_details$packages[[1]]$id
pacakage_details <- package_show(data_2020_id)
# Explore package
# listviewer::jsonedit(pacakage_details)
# Get data formats
format_details <- purrr::map_df(pacakage_details$resources,`[`,c('format','id'))
print(format_details)</code></pre>
<pre><code>## # A tibble: 3 x 2
## format id
## <chr> <chr>
## 1 CSV 7e19e4a5-0ad0-4686-b482-ed5d554ee1b6
## 2 XLSX 7e9b1fc2-d3ef-4d93-be3d-d6b1cd246fa2
## 3 PDF 20f8b0b4-6b7b-44e4-8102-a793eb4ce055</code></pre>
<p>Note: All three formats can be accessed in a similar way. We shall fetch the <code>ID</code> of a particular file (or a <code>resource</code>) which will then be used for reading contents.</p>
</div>
<div id="step-5---reading-data-from-a-file" class="section level3">
<h3>Step 5 - ⏺ Reading data from a file</h3>
<p>Data can easily be exported as a data frame which is a suitable format for analysing this data.</p>
<p><code>ckanr implements a dplyr SQL interface to CKAN's datastore. You can access any resource in the datastore directly using only the CKAN resource ID. Note: this will only work for resources which were uploaded successfully to the datastore - they will show the green "Data API" button in CKAN.</code></p>
<pre class="r"><code># Get data from CSV
res_id <- format_details$id[format_details$format == 'CSV']
# budget_data <- dplyr::tbl(src = org_connect$con, from = res_id) %>% as_tibble(.)
# data.table::fwrite(budget_data,file = "data/ministry-of-environment-forests-and-climate-change-2020.csv")
budget_data <- readr::read_csv("data/ministry-of-environment-forests-and-climate-change-2020.csv")
# Get column names
names(budget_data)</code></pre>
<pre><code>## [1] "Index" "Budget 2019-2020 Revenue"
## [3] "Budget 2020-2021 Total" "Actual 2018-2019 Capital"
## [5] "Budget 2019-2020 Total" "Budget 2020-2021 Revenue"
## [7] "Actual 2018-2019 Total" "_full_text"
## [9] "Particulars" "Revised 2019-2020 Total"
## [11] "Actual 2018-2019 Revenue" "Budget 2020-2021 Capital"
## [13] "Revised 2019-2020 Revenue" "Budget 2019-2020 Capital"
## [15] "_id" "Type"
## [17] "Revised 2019-2020 Capital"</code></pre>
</div>
<div id="step-6---preparing-the-data-for-analysis" class="section level3">
<h3>Step 6 - 👨🍳 Preparing the data for analysis</h3>
<p>For this analysis, we would like to see the change in allocation from the financial year 2018/19 to 2020/21. To prepare this dataset:</p>
<ul>
<li>Remove missing values
<ul>
<li>Remove rows with missing value for ‘Particulars’ col</li>
<li>Convert the budget cols to numeric</li>
<li>Convert NA to 0 in budget cols</li>
<li>Remove rows where the sum of all budget cols is 0</li>
</ul></li>
<li>Remove whitespaces from the ‘Particulars’ col</li>
<li>Remove the Grand Total Columns</li>
<li>Add the <code>Budget difference</code> column which is calulated as the difference of <code>Budget 2020-2021 Total</code> and <code>Actual 2018-2019 Total</code></li>
<li>Remove <code>EAP Component</code> as it is repeating multiple times in the Particulars col (Why is this happening ?)</li>
</ul>
<pre class="r"><code>cols_required <- c('Particulars', 'Actual 2018-2019 Total', 'Revised 2019-2020 Total' ,'Budget 2020-2021 Total')
data_for_analysis <- budget_data[,cols_required]
# Clean it a bit ..
data_for_analysis <- data_for_analysis[!is.na(data_for_analysis$Particulars),]
numeric_fields <- c('Actual 2018-2019 Total','Revised 2019-2020 Total','Budget 2020-2021 Total')
data_for_analysis[,numeric_fields] <- sapply(data_for_analysis[,numeric_fields], as.numeric)
data_for_analysis[is.na(data_for_analysis)] <- 0
data_for_analysis <- data_for_analysis[(data_for_analysis$`Actual 2018-2019 Total` + data_for_analysis$`Revised 2019-2020 Total` + data_for_analysis$`Budget 2020-2021 Total`) > 0,]
data_for_analysis$Particulars <- stringr::str_trim(data_for_analysis$Particulars)
data_for_analysis <- data_for_analysis[!data_for_analysis$Particulars %in% c('Grand Total'),]
# Add new column for the difference in budget from 2018-19 to 2021-21
data_for_analysis$`Budget Difference` <- round(data_for_analysis$`Budget 2020-2021 Total` - data_for_analysis$`Actual 2018-2019 Total`,2)
# Removing EAP Component
data_for_analysis <- data_for_analysis[!data_for_analysis$Particulars %in% c('EAP Component'),]</code></pre>
</div>
<div id="step-7---exploring-the-processed-data" class="section level3">
<h3>Step 7 - 👩🔬 Exploring the processed data</h3>
<div id="htmlwidget-9cc6d4e880520b881f9f" style="width:100%;height:auto;" class="datatables html-widget"></div>
<script type="application/json" data-for="htmlwidget-9cc6d4e880520b881f9f">{"x":{"filter":"none","data":[["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"],["Secretariat","Regional Offices","National Afforestation and Eco-Development Board","National River Conservation Directorate","Forest Survey of India","Indira Gandhi National Forest Academy","State Forest Service and Rangers College","Wildlife Crime Control Bureau","National Institute of Animal Welfare","Botanical Survey of India","Zoological Survey of India","National Museum of Natural History","National Green Tribunal","Total- Attached/Subordinate Offices","Gross Budgetary Support","Gross Budgetary Support","Total-Establishment Expenditure of the Centre","Programme Component","Total- Forestry Training and Capacity Building","Eco-Task Force","Total-Environmental Knowledge and Capacity Building","Programme Component","Total- National Coastal Mission (NCM)","Pollution Abatement","Programme Component","Total- Hazardous Substances Management (HSM)","Climate Change Action Plan","National Adaptation Fund","National Mission on Himalayan Studies","Total-Environment Protection, Management and Sustainable Development","Environmental Education, Awareness and Training","Environment Information Systems (ENVIS)","Centres of Excellence","R and D for Conservation and Development","Total-Decision support System for Environmental Awareness, Policy, Planning and Outcome Evaluation","Control of Pollution","Total-Central Sector Schemes/Projects","Animal Welfare Board","Central Pollution Control Board","Central Zoo Authority","National Biodiversity Authority","National Tiger Conservation Authority","Total-Statutory and Regulatory Bodies","GB Pant Himalayan Institue of Environment and Development","Indian Council of Forestry Research and Education","Indian Institute of Forest Management","Indian Plywood Industries Research and Training Institute","Wildlife Institute of India","Total-Autonomous Bodies","Total-Other Central Sector Expenditure","Green India Mission-National Afforestation Programme","Green India Mission- National Afforestation Programme (EAP Component)","Forest Fire Prevention and Management","Total- National Mission for a Green India","Project Tiger","Project Elephant","Development of Wildlife Habitats","Development of Wildlife Habitats (EAP Component)","Total- Integrated Development of Wildlife Habitats","Biodiversity Conservation","Conservation of Aquatic Ecosystems","Conservation of Aquatic Ecosystems (EAP Component)","Total- Conservation of Natural Resources and Ecosystems","Programme Component","Total- National River Conservation Programme","Total-Environment, Forestry and Wildlife","Total-Centrally Sponsored Schemes","Forestry and Wild Life","Ecology and Environment","Secretariat-Economic Services","Capital Outlay on Forestry and Wild Life","Capital Outlay on Other Scientific and Environmental Research","Total-Economic Services","North Eastern Areas","Grants-in-aid to State Governments","Grants-in-aid to Union Territory Governments","Total-Others"],[131.8,34.31,8.5,7.79,33.15,53.26,20.26,10.73,3.99,75.17,71.28,29.5,36.21,384.15,27.85,0,537.88,8.18,28.52,112.85,141.37,9.55,129.55,19.72,12.96,12.96,33.17,109.78,50,225.63,69.45,23.84,14.06,1.56,108.91,4.95,610.41,9.78,114.42,12,19,9.87,165.07,27.5,220.99,34.99,10,33,326.48,459.17,175.82,1,46.58,223.4,323.44,29.75,164.59,10,527.78,13,63.6,0,76.6,143.5,150.33,978.11,978.11,662.25,803.25,131.8,15.1,30.57,1642.97,0,936.17,6.43,942.6],[137.25,35.28,7.74,0,34.65,58.19,21.75,11,0,85,79.64,22.5,36.4,392.15,27.8,50,547.82,10.8,10.8,75,85.8,16,96,10,4.25,4.25,15,40,47,116.25,72,28,11.5,4.5,116,445,859.05,0,100,8.5,20,9,137.5,25,230,32,10,30,327,464.5,179,11,47,237,282.57,31,175,5,493.57,9,45.4,1.6,56,0,0,786.57,786.57,666.88,1073.31,137.25,19.55,27,1923.99,165.5,567.95,0.5,733.95],[139,37,9,0,35.4,67.15,25,14,0,88,97,32.5,101,506.05,36,100,671.27,11.37,11.37,75,86.37,18,103,10,12,12,40,80,50,192,114.36,40,14,7.5,175.86,460,1017.23,0,100,12,23,10.5,145.5,28,230,37,11,34,340,485.5,246,15,50,311,300,35,148.41,48.59,532,13,68.4,1.6,83,0,0,926,926,599.19,1227.26,139,39.55,118,2123,180,795.5,1.5,977],[7.2,2.69,0.5,-7.79,2.25,13.89,4.74,3.27,-3.99,12.83,25.72,3,64.79,121.9,8.15,100,133.39,3.19,-17.15,-37.85,-55,8.45,-26.55,-9.72,-0.96,-0.96,6.83,-29.78,0,-33.63,44.91,16.16,-0.06,5.94,66.95,455.05,406.82,-9.78,-14.42,0,4,0.63,-19.57,0.5,9.01,2.01,1,1,13.52,26.33,70.18,14,3.42,87.6,-23.44,5.25,-16.18,38.59,4.22,0,4.8,1.6,6.4,-143.5,-150.33,-52.11,-52.11,-63.06,424.01,7.2,24.45,87.43,480.03,180,-140.67,-4.93,34.4]],"container":"<table class=\"display\">\n <thead>\n <tr>\n <th> <\/th>\n <th>Particulars<\/th>\n <th>Actual 2018-2019 Total<\/th>\n <th>Revised 2019-2020 Total<\/th>\n <th>Budget 2020-2021 Total<\/th>\n <th>Budget Difference<\/th>\n <\/tr>\n <\/thead>\n<\/table>","options":{"columnDefs":[{"className":"dt-right","targets":[2,3,4,5]},{"orderable":false,"targets":0}],"order":[],"autoWidth":false,"orderClasses":false}},"evals":[],"jsHooks":[]}</script>
</div>
<div id="step-8---further-exploration" class="section level3">
<h3>Step 8 - 🕵 Further exploration</h3>
<p>To check how the allocation has changed from 2018-19 to 2020-21:</p>
<p>Let’s check the departments in terms of increase in the budget allocation in this specific period</p>
<p><strong>Top 10 departments with an increase in allocation </strong> <img src="exploring-OBI_files/figure-html/Analysis%20-%20Compare%20the%20actuals%20from%202018-19-1.png" width="960" style="display: block; margin: auto;" /></p>
<p><strong>Bottom 10 departments in terms of change in allocation of budget</strong></p>
<pre class="r"><code>prepare_dumbell('bottom')</code></pre>
<p><img src="exploring-OBI_files/figure-html/unnamed-chunk-1-1.png" width="960" style="display: block; margin: auto;" /></p>
<blockquote>
<p>To be continued ⛺..</p>
</blockquote>
<hr />
<p><a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/80x15.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.</p>
</div>
</div>
</div>
</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 -->
<script>
$(document).ready(function () {
// move toc-ignore selectors from section div to header
$('div.section.toc-ignore')
.removeClass('toc-ignore')
.children('h1,h2,h3,h4,h5').addClass('toc-ignore');
// establish options
var options = {
selectors: "h1,h2,h3",
theme: "bootstrap3",
context: '.toc-content',
hashGenerator: function (text) {
return text.replace(/[.\\/?&!#<>]/g, '').replace(/\s/g, '_').toLowerCase();
},
ignoreSelector: ".toc-ignore",
scrollTo: 0
};
options.showAndHide = false;
options.smoothScroll = true;
// tocify
var toc = $("#TOC").tocify(options).data("toc-tocify");
});
</script>
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
document.getElementsByTagName("head")[0].appendChild(script);
})();
</script>
</body>
</html>