Skip to content

Commit

Permalink
update data till Nov 2023
Browse files Browse the repository at this point in the history
  • Loading branch information
Edouard-Legoupil committed Jan 26, 2024
1 parent 873f98f commit 487d289
Show file tree
Hide file tree
Showing 183 changed files with 79,438 additions and 529 deletions.
24 changes: 9 additions & 15 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,11 @@ Type: Package
Package: iati
Title: UNHCR IATI Data Crunching
Version: 0.1.1
Authors@R:
c(person(given = "Edouard",
family = "Legoupil",
role = c("aut", "cre"),
email = "legoupil@unhcr.org"),
person(given = "Matheus",
family = "Soldi Hardt",
role = c("aut"),
email = "matheus@unhcr.org"),
person(given = "Hisham",
family = "Galal",
role = "aut",
email = "galalh@unhcr.org"))
Authors@R: c(
person("Edouard", "Legoupil", , "legoupil@unhcr.org", role = c("aut", "cre")),
person("Matheus", "Soldi Hardt", , "matheus@unhcr.org", role = "aut"),
person("Hisham", "Galal", , "galalh@unhcr.org", role = "aut")
)
Maintainer: Edouard Legoupil <legoupil@unhcr.org>
Description: This is a data package with all frame organised and reshapped
for easy consumptions in R Please see https://reporting.unhcr.org/iati
Expand All @@ -30,11 +22,13 @@ Imports:
tidyverse
Suggests:
knitr,
rmarkdown
rmarkdown,
testthat
VignetteBuilder:
knitr
Remotes:
github::unhcr-americas/iati
Config/fusen/version: 0.5.2
Encoding: UTF-8
LazyData: TRUE
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3.9000
53 changes: 19 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,26 @@

## Objective

A data package with UNHCR contribution to the International Aid Transparency Initiative (IATI) that aims at:
A data package with UNHCR contribution to the [International Aid Transparency Initiative (IATI)](https://reporting.unhcr.org/iati-international-aid-transparency-initiative) that aims at:

* reshaping IATI extraction from a complex xml file structure to a more user-friendly tabular format with necessary look-up code tables
* offer easy to consume documentation on the data structure
* provide built-in ggplot2 visualization, aka a "__chart library__" around high level key questions on UNHCR programme. Those visualizations can be integrated in Operation Situation Analysis or Protection Monitoring Analysis.

## Context
## Install

UNHCR is committed to IATI: [https://reporting.unhcr.org/iati](https://reporting.unhcr.org/iati)
```
# install.packages("pak")
pak::pkg_install("unhcr-americas/iati")
```

## Context

Extracting information from IATI can assist governments to plan and manage their budgets; parliamentarians and citizens to better hold governments accountable; community-based organisations to influence how resources are used; and journalists, researchers and activists to investigate the use and impact of the resources.

Information from Global Focus is translated monthly into the IATI open data standard and published using UNHCR’s IATI identifier: XM-DAC-41121. An overview of the publication process is accessible through [IATI Dashboard](http://dashboard.iatistandard.org/publisher/unhcr.html). Every UNHCR operation world-wide is reported on for each year from 2016. This includes financial information (budget, contributions, disbursements and expenditure), office locations, and results at various levels of activity. Activities for 2019 and onwards are be published as soon as possible after they become available. This current package is updated a much as possible....

## What is IATI?
### What is IATI?

Launched in Accra in 2008, the International Aid Transparency Initiative ([IATI](https://iatistandard.org/en/about/)) is a multi-stakeholder initiative and international open data standard that aims to improve the transparency and openness of both development and humanitarian activities. In the 2016 Humanitarian grand Bargain, multiple organisations also [committed to](https://interagencystandingcommittee.org/greater-transparency) "_Publish timely, transparent, harmonised and open high-quality data on humanitarian funding within two years of the World Humanitarian Summit in Istanbul” noting that parties “consider IATI to provide a basis for the purpose of a common standard._"

Expand All @@ -40,46 +45,28 @@ The main concept are nicely summarised in the table below from [IFRC IATI Feasib

![Overview of traceability in IATI](man/figures/iatifig3.png)

## Key Visualisation in the library (work-in-progress)

### UNHCR Programme

### Key Visualisation on UNHCR Programme in the library (work-in-progress)

* What are the __most funded sectors__ per country (Expenditure evolution per impact /outcome area)?
* Who are the __main donors by country__ in terms of number of
projects and/or total budget?
* Who are the __main donors by country__ in terms of number of projects and/or total budget?
* Who are the __main implementing partners by country__ in terms of number of projects and/or total budget?
* What’s the breakdown of __Earmarking Type__ (Un-earmarked, Tightly
earmarked, etc.) from Donor Funds by Year?
* What’s the breakdown of __Earmarking Type__ (Un-earmarked, Tightly earmarked, etc.) from Donor Funds by Year?
* What’s the level of __partnership between organisations__ when implementing projects?
* How much __expenditures compare to the initial budget__ (weighted by # PoCs / GPP in the country)?
* How much __indicators__ evolve over time against thresholds?

### Out of Scope: Humanitarian Funding at large

This package only includes UNHCR Data, as such the following questions can not be adressed:

### Humanitarian Funding at large
* What is the __share of funds received by different UN Agencies__ (UNICEF, WFP, IOM, UNDP, UNOCHA)?
* How much donors __balance resources between different humanitarian crisis__?
* How much donors allocate budget between __humanitarian and development programmes__ devoted to displacement crisis by key donors/region
* How much of donors funding goes to __migratory vs refugee issues__?
* What’s the __share of ODA__ (Official Development Assistance) among
the total flow of foreign aid per country?
* What’s the share of ODA going to __benefit of refugees__? (this can
complement the measurement of [Global Refugee Compact Indicators
related to ODA](https://www.unhcr.org/5cf907854.pdf#page=13) )
* What’s the __share of ODA__ (Official Development Assistance) among the total flow of foreign aid per country?
* What’s the share of ODA going to __benefit of refugees__? (this can complement the measurement of [Global Refugee Compact Indicators related to ODA](https://www.unhcr.org/5cf907854.pdf#page=13))
* What is the share of ODA allocated to __national actors__?
* What’s the __share of Humanitarian assistance__ within the total
ODA?

## Country Factsheet

All the key visualizations are easily created for any single country through a dedicated template for country fact sheet generated a slide deck ready for data interpretation and inclusion in existing Situation analysis for program design or Protection Monitoring Analysis for advocacy.

## Install

```
# With {remotes} using GitHub API
# install.packages("remotes")
remotes::install_github("unhcr-americas/iati")
```
* What’s the __share of Humanitarian assistance__ within the total ODA?

## Contribute

Expand All @@ -90,5 +77,3 @@ This package is built with the help of [fusen package](https://thinkr-open.githu
```
fusen::inflate(flat_file = "dev/dev_unhcr_programme.Rmd", vignette_name = "UNHCR Programme")
```


7 changes: 3 additions & 4 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
url: ~
template:
package: unhcrtemplate
bootstrap: 5
params:
bootswatch: yeti

reference:
- title: Chart Library
Expand All @@ -20,4 +18,5 @@ reference:
- title: Reference
desc: UNHCR Geographci Referential
contents:
- starts_with("reference")
- starts_with("reference")

33 changes: 22 additions & 11 deletions data-raw/build.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ activity <- rbind(
readxl::read_excel( here::here("data-raw/unhcr_2019", "iati_activity.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2020", "iati_activity.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2021", "iati_activity.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2022", "iati_activity.xlsx"), sheet = "Sheet1"))
readxl::read_excel( here::here("data-raw/unhcr_2022", "iati_activity.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2023", "iati_activity.xlsx"), sheet = "Sheet1"))

#names(activity)
#str(activity)
Expand Down Expand Up @@ -79,7 +80,8 @@ budget <- rbind(
readxl::read_excel( here::here("data-raw/unhcr_2019", "iati_budget.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2020", "iati_budget.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2021", "iati_budget.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2022", "iati_budget.xlsx"), sheet = "Sheet1"))
readxl::read_excel( here::here("data-raw/unhcr_2022", "iati_budget.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2023", "iati_budget.xlsx"), sheet = "Sheet1"))

names(budget)
sinew::makeOxygen(budget, add_fields = "source")
Expand All @@ -94,7 +96,8 @@ default_aid_type <- rbind(
readxl::read_excel( here::here("data-raw/unhcr_2019", "iati_default_aid_type.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2020", "iati_default_aid_type.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2021", "iati_default_aid_type.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2022", "iati_default_aid_type.xlsx"), sheet = "Sheet1"))
readxl::read_excel( here::here("data-raw/unhcr_2022", "iati_default_aid_type.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2023", "iati_default_aid_type.xlsx"), sheet = "Sheet1"))

names(default_aid_type)
sinew::makeOxygen(default_aid_type, add_fields = "source")
Expand All @@ -109,7 +112,8 @@ document_link <- rbind(
readxl::read_excel( here::here("data-raw/unhcr_2019", "iati_document_link.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2020", "iati_document_link.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2021", "iati_document_link.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2022", "iati_document_link.xlsx"), sheet = "Sheet1"))
readxl::read_excel( here::here("data-raw/unhcr_2022", "iati_document_link.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2023", "iati_document_link.xlsx"), sheet = "Sheet1"))

names(document_link)
sinew::makeOxygen(document_link, add_fields = "source")
Expand All @@ -124,7 +128,8 @@ humanitarian_scope <- rbind(
readxl::read_excel( here::here("data-raw/unhcr_2019", "iati_humanitarian_scope.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2020", "iati_humanitarian_scope.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2021", "iati_humanitarian_scope.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2022", "iati_humanitarian_scope.xlsx"), sheet = "Sheet1"))
readxl::read_excel( here::here("data-raw/unhcr_2022", "iati_humanitarian_scope.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2023", "iati_humanitarian_scope.xlsx"), sheet = "Sheet1"))

names(humanitarian_scope)
sinew::makeOxygen(humanitarian_scope, add_fields = "source")
Expand All @@ -139,7 +144,8 @@ location <- rbind(
readxl::read_excel( here::here("data-raw/unhcr_2019", "iati_location.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2020", "iati_location.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2021", "iati_location.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2022", "iati_location.xlsx"), sheet = "Sheet1"))
readxl::read_excel( here::here("data-raw/unhcr_2022", "iati_location.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2023", "iati_location.xlsx"), sheet = "Sheet1"))

names(location)
sinew::makeOxygen(location, add_fields = "source")
Expand All @@ -154,7 +160,8 @@ participating_org <- rbind(
readxl::read_excel( here::here("data-raw/unhcr_2019", "iati_participating_org.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2020", "iati_participating_org.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2021", "iati_participating_org.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2022", "iati_participating_org.xlsx"), sheet = "Sheet1"))
readxl::read_excel( here::here("data-raw/unhcr_2022", "iati_participating_org.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2023", "iati_participating_org.xlsx"), sheet = "Sheet1"))

names(participating_org)
str(participating_org)
Expand All @@ -174,7 +181,8 @@ related_activity <- rbind(
readxl::read_excel( here::here("data-raw/unhcr_2019", "iati_related_activity.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2020", "iati_related_activity.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2021", "iati_related_activity.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2022", "iati_related_activity.xlsx"), sheet = "Sheet1"))
readxl::read_excel( here::here("data-raw/unhcr_2022", "iati_related_activity.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2023", "iati_related_activity.xlsx"), sheet = "Sheet1"))

names(related_activity)
sinew::makeOxygen(related_activity, add_fields = "source")
Expand All @@ -189,7 +197,8 @@ result <- rbind(
readxl::read_excel( here::here("data-raw/unhcr_2019", "iati_result.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2020", "iati_result.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2021", "iati_result.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2022", "iati_result.xlsx"), sheet = "Sheet1"))
readxl::read_excel( here::here("data-raw/unhcr_2022", "iati_result.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2023", "iati_result.xlsx"), sheet = "Sheet1"))

names(result)
sinew::makeOxygen(result, add_fields = "source")
Expand All @@ -204,7 +213,8 @@ sector <- rbind(
readxl::read_excel( here::here("data-raw/unhcr_2019", "iati_sector.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2020", "iati_sector.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2021", "iati_sector.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2022", "iati_sector.xlsx"), sheet = "Sheet1"))
readxl::read_excel( here::here("data-raw/unhcr_2022", "iati_sector.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2023", "iati_sector.xlsx"), sheet = "Sheet1"))

names(sector)
sinew::makeOxygen(sector, add_fields = "source")
Expand All @@ -219,7 +229,8 @@ transaction <- rbind(
readxl::read_excel( here::here("data-raw/unhcr_2019", "iati_transaction.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2020", "iati_transaction.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2021", "iati_transaction.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2022", "iati_transaction.xlsx"), sheet = "Sheet1"))
readxl::read_excel( here::here("data-raw/unhcr_2022", "iati_transaction.xlsx"), sheet = "Sheet1"),
readxl::read_excel( here::here("data-raw/unhcr_2023", "iati_transaction.xlsx"), sheet = "Sheet1"))

str(transaction)
## Cleaning a bit to match with code..
Expand Down
Binary file modified data-raw/unhcr_2022/iati_activity.xlsx
Binary file not shown.
Binary file modified data-raw/unhcr_2022/iati_budget.xlsx
Binary file not shown.
Binary file modified data-raw/unhcr_2022/iati_default_aid_type.xlsx
Binary file not shown.
Binary file modified data-raw/unhcr_2022/iati_document_link.xlsx
Binary file not shown.
Binary file modified data-raw/unhcr_2022/iati_humanitarian_scope.xlsx
Binary file not shown.
Binary file modified data-raw/unhcr_2022/iati_location.xlsx
Binary file not shown.
Binary file modified data-raw/unhcr_2022/iati_participating_org.xlsx
Binary file not shown.
Binary file modified data-raw/unhcr_2022/iati_related_activity.xlsx
Binary file not shown.
Binary file modified data-raw/unhcr_2022/iati_result.xlsx
Binary file not shown.
Binary file modified data-raw/unhcr_2022/iati_sector.xlsx
Binary file not shown.
Loading

0 comments on commit 487d289

Please sign in to comment.