-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathNorwegian Development Funds.Rmd
78 lines (58 loc) · 2.08 KB
/
Norwegian Development Funds.Rmd
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
#### Norweigian Development Funds
# Load the Libraries
```{r}
library(readr)
library(ggplot2)
library(tidyverse)
library(dplyr)
```
# Getting the Data
```{r}
ndf <- read_csv("./funds.csv")
head(ndf)
summary(ndf)
```
# Checking for NA Values
```{r}
any(is.na(ndf))
```
# Cleaning the Data
```{r}
names(ndf) <- make.names(names(ndf))
ndf[, grep("NA.", colnames(ndf))] <- NULL
```
# Exploratory Data Analysis
```{r}
ndf %>% group_by(Recipient.Region, Year) %>%
summarise(Disbursements=sum(Disbursements..1000...)/1000) %>% ungroup() %>%
ggplot(aes(x=Year, y=Disbursements)) +
geom_bar(stat = "identity",aes(fill=Recipient.Region)) +
facet_wrap(~Recipient.Region)
```
Middle East is slowly picking up, Asia is on decline. Interesting to see the same chart in terms of size of the contract. Are certain regions getting bigger "support packages" then others? Are there material differences in geographical vs non-geographical contracts? Lets look at the quantity of those contracts by country.
```{r}
ndf%>% group_by(Recipient.Region, Year) %>%
summarise(Mean_Disbursement=mean(Disbursements..1000...)/1000) %>%
ungroup() %>%
ggplot(aes(x=Year, y=Mean_Disbursement)) +
geom_bar(stat = "identity",aes(fill=Year)) + facet_wrap(~Recipient.Region)
```
# Non Geographical-Projects
```{r}
ndf%>% dplyr::filter(Recipient.Region=="Not geographically allocated") %>%
group_by(Main.Sector) %>%
summarise(Disbursements=sum(Disbursements..1000...)/1000) %>%
ungroup() %>%
ggplot(aes(x=Main.Sector, y=Disbursements)) +
geom_bar(stat = "identity",aes(fill=Disbursements)) + coord_flip()
```
It has been determined that administration costs are very high up for the disbursements.
```{r}
ndf %>%
dplyr::filter(grepl("910 - Administration", Main.Sector)) %>%
group_by(Budget.Post..Chapter) %>%
summarise(Disbursements=sum(Disbursements..1000...)/1000) %>%
ungroup() %>%
ggplot(aes(x=Budget.Post..Chapter, y=Disbursements)) +
geom_bar(stat = "identity",aes(fill=Disbursements)) + coord_flip()
```