diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml deleted file mode 100644 index a7276e8..0000000 --- a/.github/workflows/pkgdown.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples -# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help -on: - push: - branches: [main, master] - pull_request: - branches: [main, master] - release: - types: [published] - workflow_dispatch: - -name: pkgdown - -jobs: - pkgdown: - runs-on: ubuntu-latest - # Only restrict concurrency for non-PR jobs - concurrency: - group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - permissions: - contents: write - steps: - - uses: actions/checkout@v4 - - - uses: r-lib/actions/setup-pandoc@v2 - - - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: any::pkgdown, local::. - needs: website - - - name: Build site - run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) - shell: Rscript {0} - - - name: Deploy to GitHub pages 🚀 - if: github.event_name != 'pull_request' - uses: JamesIves/github-pages-deploy-action@v4.5.0 - with: - clean: false - branch: gh-pages - folder: docs diff --git a/DESCRIPTION b/DESCRIPTION index fad106e..3e7b8be 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -18,9 +18,11 @@ Imports: forcats, ggplot2, glue, + here, knitr, magrittr, refugees, + rmarkdown, scales, showtext, stats, @@ -29,9 +31,9 @@ Imports: systemfonts, tidyr, tidyselect, + unhcrdown, unhcrthemes Suggests: - rmarkdown, testthat VignetteBuilder: knitr diff --git a/NAMESPACE b/NAMESPACE index ed63f66..2198d00 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -12,11 +12,18 @@ export(show_partnership) export(show_sectors) export(show_sectors_rbm) export(show_top_donors) +export(template_prez) import(dplyr) import(ggplot2) import(refugees) import(scales) import(tidyselect) import(unhcrthemes) +importFrom(dplyr,filter) +importFrom(dplyr,pull) +importFrom(dplyr,select) +importFrom(here,here) importFrom(magrittr,"%>%") +importFrom(rmarkdown,render) importFrom(stats,reorder) +importFrom(unhcrdown,pptx_slides) diff --git a/R/data.R b/R/data.R index d5db019..cf16081 100644 --- a/R/data.R +++ b/R/data.R @@ -82,21 +82,21 @@ ## iati_budget ########## #' @title dataBudget -#' @description Display budget by operation -#' @format A data frame +#' @description Display budget by operation +#' @format A data frame with 12 variables: #' \describe{ #' \item{\code{iati_identifier}}{character COLUMN_DESCRIPTION} -#' \item{\code{budget_type}}{double COLUMN_DESCRIPTION} -#' \item{\code{budget_status}}{double COLUMN_DESCRIPTION} +#' \item{\code{budget_type}}{double COLUMN_DESCRIPTION} +#' \item{\code{budget_status}}{double COLUMN_DESCRIPTION} #' \item{\code{budget_period_start}}{character COLUMN_DESCRIPTION} #' \item{\code{budget_period_end}}{character COLUMN_DESCRIPTION} #' \item{\code{budget_currency}}{character COLUMN_DESCRIPTION} #' \item{\code{budget_value_date}}{character COLUMN_DESCRIPTION} -#' \item{\code{budget_value}}{character COLUMN_DESCRIPTION} +#' \item{\code{budget_value}}{double COLUMN_DESCRIPTION} #' \item{\code{budget_type_name}}{character COLUMN_DESCRIPTION} -#' \item{\code{budget_type_description}}{character budget_type_description} -#' \item{\code{budget_status_name}}{character budget_status_name}} -#' \item{\code{budget_status_description}}{character budget_status_description} +#' \item{\code{budget_type_description}}{character COLUMN_DESCRIPTION} +#' \item{\code{budget_status_name}}{character COLUMN_DESCRIPTION} +#' \item{\code{budget_status_description}}{character COLUMN_DESCRIPTION} #'} #' @source \url{https://iatistandard.org/en/iati-standard/203/} #' @examples @@ -106,6 +106,9 @@ "dataBudget" + + + ## iati_result ########## diff --git a/R/show_indicators_time.R b/R/show_indicators_time.R index 1fe36a6..19b78c7 100644 --- a/R/show_indicators_time.R +++ b/R/show_indicators_time.R @@ -5,9 +5,9 @@ #' How much indicators evolve over time against thresholds? #' #' @param year A numeric value corresponding to the first year of focus until the most recent year within the dataset. +#' @param ctr_name A character vector corresponding to the name of the country. #' @param programme_lab A character vector corresponding to the name of the programme. #' @param iati_identifier_ops A character vector corresponding to the name of the operation. -#' @param ctr_name A character vector corresponding to the name of the country. #' @param result_type_name either "Impact" "Outcome" "Output" - default is "Outcome" #' @param type "deviation" showing difference between target and actual - or #' "progress" showing difference between baseline and actual @@ -27,27 +27,27 @@ #' result_type_name = "Outcome", #' type = "deviation" #' ) -#' show_indicators_time(year = 2022, +#' show_indicators_time(year = 2020, #' ctr_name = "Brazil", #' result_type_name = "Impact", #' type = "deviation" #' ) -#' show_indicators_time(year = 2019, +#' show_indicators_time(year = 2020, #' ctr_name = "Brazil", #' result_type_name = "Output", #' type = "deviation" #' ) -#' show_indicators_time(year = 2022, +#' show_indicators_time(year = 2020, #' ctr_name = "Brazil", #' result_type_name = "Outcome", #' type = "progress" #' ) -#' show_indicators_time(year = 2022, +#' show_indicators_time(year = 2020, #' ctr_name = "Brazil", #' result_type_name = "Impact", #' type = "progress" #' ) -#' show_indicators_time(year = 2019, +#' show_indicators_time(year = 2020, #' ctr_name = "Brazil", #' result_type_name = "Output", #' type = "progress" @@ -229,9 +229,9 @@ show_indicators_time <- function(year, title = stringr::str_wrap( paste0( result_type_name, " Indicators ", programme_lab, ctr_name,iati_identifier_ops ) , - 100), - subtitle = stringr::str_wrap( paste0( - "Progress comparison between \"Actual\" reported value and their \"baseline\" (in %)" ) , + 100), + subtitle = stringr::str_wrap( paste0( + "Deviation between reported \"Actual\" value and programmatic \"Target\" (in %)" ) , 110), caption = stringr::str_wrap( "Data Source: UNHCR IATI (International Aid Transparency Initiative)" , @@ -270,7 +270,7 @@ show_indicators_time <- function(year, shape = 17, size = 3) + ggplot2::stat_summary(fun.data=mean_sdl, #mult=1, - geom="pointrange", color="grey", size = 1) + + geom="pointrange", color="grey", size = .3) + geom_hline(yintercept= 0, color="red") + # ggplot2::scale_color_viridis_d(option = "inferno", na.value = "grey50") + ggplot2::scale_colour_brewer(palette = "Paired") + @@ -291,8 +291,8 @@ show_indicators_time <- function(year, paste0( result_type_name, " Indicators ", programme_lab, ctr_name,iati_identifier_ops ) , 100), - subtitle = stringr::str_wrap( paste0( - "Deviation between reported \"Actual\" value and programmatic \"Target\" (in %)" ) , + subtitle = stringr::str_wrap( paste0( + "Progress comparison between \"Actual\" reported value and their \"baseline\" (in %)" ) , 110), caption = stringr::str_wrap( "Data Source: UNHCR IATI (International Aid Transparency Initiative)" , diff --git a/R/show_sectors_rbm.R b/R/show_sectors_rbm.R index 14c3004..9cfd93c 100644 --- a/R/show_sectors_rbm.R +++ b/R/show_sectors_rbm.R @@ -130,7 +130,7 @@ show_sectors_rbm <- function(year, ggplot2::geom_bar(stat = "identity", fill = "#0072BC") + ggplot2::coord_flip()+ - ggplot2::facet_wrap( ggplot2::vars(year2)) + + ggplot2::facet_wrap( ggplot2::vars(year2), labeller = labeller(year2 = ggplot2::label_wrap_gen(5))) + ggplot2::scale_fill_viridis_d(option = "inferno", na.value = "grey50") + ggplot2::scale_y_continuous(expand = ggplot2::expansion(mult = c(0, .1)), labels = scales::label_number(scale_cut = scales::cut_short_scale())) + ggplot2::labs(title = "Share of Budget per Sectors (%)", diff --git a/R/template_prez.R b/R/template_prez.R new file mode 100644 index 0000000..834adb5 --- /dev/null +++ b/R/template_prez.R @@ -0,0 +1,62 @@ +# WARNING - Generated by {fusen} from dev/dev_unhcr_programme.Rmd: do not edit by hand + + +# usethis::use_rmarkdown_template( +# template_name = "iati_prez", +# template_dir = NULL, +# template_description = "UNHCR IATI", +# template_create_dir = TRUE +# ) + + +#' Generate a summary powerpoint +#' +#' @param year A numeric value corresponding to the first year of focus until the most recent year within the dataset. +#' @param ctr_name A character vector corresponding to the name of the country. +#' @param folder folder within your project where to put the generated report. +#' Folder will be created if it does not exist +#' +#' @importFrom unhcrdown pptx_slides +#' @importFrom dplyr filter select pull +#' @importFrom rmarkdown render +#' @importFrom here here +#' +#' @return nothing the file for the report is generated +#' +#' @export +#' +#' @examples +#' +#' ## generate for one country +#' # iati::template_prez(year = 2022, +#' # ctr_name = "Brazil", +#' # folder = "dev/Prez") +#' +#' # ## Generate for all operation specific region +#' # region <- "The Americas" +#' # +#' # countries <- iati::dataActivity |> +#' # dplyr::filter( unhcr_region == region) |> +#' # dplyr::select(ctr_name) |> +#' # dplyr::distinct() |> +#' # dplyr::pull() +#' # +#' # for ( ctr in countries) { +#' # cat(paste0(ctr, "\n")) +#' # iati::template_prez(year = 2022, +#' # ctr_name = ctr, +#' # folder = "dev/Prez") } +template_prez <- function(year = 2022, + ctr_name, + folder = "Prez") { + + ## Create the outfolder if it does not exist + output_dir <- paste0(getwd(),"/",folder) + if (!dir.exists(output_dir)) {dir.create(output_dir)} + + rmarkdown::render( + system.file("rmarkdown/templates/iati_prez/skeleton/skeleton.Rmd", package = "iati"), + output_file = here::here(folder, paste0('iati_prez-', ctr_name, '-', year, '.pptx') ), + params = list(ctr_name = ctr_name, + year = year) ) +} diff --git a/README.md b/README.md index bb95f48..9624e35 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ pak::pkg_install("unhcr-americas/iati") 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.... +Information from Global Focus is translated 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? diff --git a/_pkgdown.yml b/_pkgdown.yml index 5b6e169..1a4205f 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -20,6 +20,10 @@ reference: contents: - starts_with("mapping") - title: Reference - desc: UNHCR Geographci Referential + desc: UNHCR Geographic Referential contents: - - starts_with("reference") + - starts_with("reference") +- title: Template + desc: Powerpoint Report + contents: + - starts_with("template") diff --git a/data/dataBudget.RData b/data/dataBudget.RData index bd29a16..785d87f 100644 Binary files a/data/dataBudget.RData and b/data/dataBudget.RData differ diff --git a/dev/dev_unhcr_programme.Rmd b/dev/dev_unhcr_programme.Rmd index e93c92e..3baac87 100644 --- a/dev/dev_unhcr_programme.Rmd +++ b/dev/dev_unhcr_programme.Rmd @@ -1293,7 +1293,7 @@ show_sectors_rbm <- function(year, ggplot2::geom_bar(stat = "identity", fill = "#0072BC") + ggplot2::coord_flip()+ - ggplot2::facet_wrap( ggplot2::vars(year2)) + + ggplot2::facet_wrap( ggplot2::vars(year2), labeller = labeller(year2 = ggplot2::label_wrap_gen(5))) + ggplot2::scale_fill_viridis_d(option = "inferno", na.value = "grey50") + ggplot2::scale_y_continuous(expand = ggplot2::expansion(mult = c(0, .1)), labels = scales::label_number(scale_cut = scales::cut_short_scale())) + ggplot2::labs(title = "Share of Budget per Sectors (%)", @@ -1646,9 +1646,9 @@ test_that("show_indicators works", { #' How much indicators evolve over time against thresholds? #' #' @param year A numeric value corresponding to the first year of focus until the most recent year within the dataset. +#' @param ctr_name A character vector corresponding to the name of the country. #' @param programme_lab A character vector corresponding to the name of the programme. #' @param iati_identifier_ops A character vector corresponding to the name of the operation. -#' @param ctr_name A character vector corresponding to the name of the country. #' @param result_type_name either "Impact" "Outcome" "Output" - default is "Outcome" #' @param type "deviation" showing difference between target and actual - or #' "progress" showing difference between baseline and actual @@ -1839,9 +1839,9 @@ show_indicators_time <- function(year, title = stringr::str_wrap( paste0( result_type_name, " Indicators ", programme_lab, ctr_name,iati_identifier_ops ) , - 100), - subtitle = stringr::str_wrap( paste0( - "Progress comparison between \"Actual\" reported value and their \"baseline\" (in %)" ) , + 100), + subtitle = stringr::str_wrap( paste0( + "Deviation between reported \"Actual\" value and programmatic \"Target\" (in %)" ) , 110), caption = stringr::str_wrap( "Data Source: UNHCR IATI (International Aid Transparency Initiative)" , @@ -1880,7 +1880,7 @@ show_indicators_time <- function(year, shape = 17, size = 3) + ggplot2::stat_summary(fun.data=mean_sdl, #mult=1, - geom="pointrange", color="grey", size = 1) + + geom="pointrange", color="grey", size = .3) + geom_hline(yintercept= 0, color="red") + # ggplot2::scale_color_viridis_d(option = "inferno", na.value = "grey50") + ggplot2::scale_colour_brewer(palette = "Paired") + @@ -1901,8 +1901,8 @@ show_indicators_time <- function(year, paste0( result_type_name, " Indicators ", programme_lab, ctr_name,iati_identifier_ops ) , 100), - subtitle = stringr::str_wrap( paste0( - "Deviation between reported \"Actual\" value and programmatic \"Target\" (in %)" ) , + subtitle = stringr::str_wrap( paste0( + "Progress comparison between \"Actual\" reported value and their \"baseline\" (in %)" ) , 110), caption = stringr::str_wrap( "Data Source: UNHCR IATI (International Aid Transparency Initiative)" , @@ -1920,27 +1920,27 @@ show_indicators_time(year = 2020, result_type_name = "Outcome", type = "deviation" ) -show_indicators_time(year = 2022, +show_indicators_time(year = 2020, ctr_name = "Brazil", result_type_name = "Impact", type = "deviation" ) -show_indicators_time(year = 2019, +show_indicators_time(year = 2020, ctr_name = "Brazil", result_type_name = "Output", type = "deviation" ) -show_indicators_time(year = 2022, +show_indicators_time(year = 2020, ctr_name = "Brazil", result_type_name = "Outcome", type = "progress" ) -show_indicators_time(year = 2022, +show_indicators_time(year = 2020, ctr_name = "Brazil", result_type_name = "Impact", type = "progress" ) -show_indicators_time(year = 2019, +show_indicators_time(year = 2020, ctr_name = "Brazil", result_type_name = "Output", type = "progress" @@ -1954,7 +1954,81 @@ test_that("show_indicators_time works", { ``` +# Template + +## template_prez + +```{r function-template_prez} + +# usethis::use_rmarkdown_template( +# template_name = "iati_prez", +# template_dir = NULL, +# template_description = "UNHCR IATI", +# template_create_dir = TRUE +# ) + + +#' Generate a summary powerpoint +#' +#' @param year A numeric value corresponding to the first year of focus until the most recent year within the dataset. +#' @param ctr_name A character vector corresponding to the name of the country. +#' @param folder folder within your project where to put the generated report. +#' Folder will be created if it does not exist +#' +#' @importFrom unhcrdown pptx_slides +#' @importFrom dplyr filter select pull +#' @importFrom rmarkdown render +#' @importFrom here here +#' +#' @return nothing the file for the report is generated +#' +#' @export +#' +template_prez <- function(year = 2022, + ctr_name, + folder = "Prez") { + + ## Create the outfolder if it does not exist + output_dir <- paste0(getwd(),"/",folder) + if (!dir.exists(output_dir)) {dir.create(output_dir)} + + rmarkdown::render( + system.file("rmarkdown/templates/iati_prez/skeleton/skeleton.Rmd", package = "iati"), + output_file = here::here(folder, paste0('iati_prez-', ctr_name, '-', year, '.pptx') ), + params = list(ctr_name = ctr_name, + year = year) ) +} +``` + +```{r example-template_prez} + +## generate for one country +# iati::template_prez(year = 2022, +# ctr_name = "Brazil", +# folder = "dev/Prez") +# ## Generate for all operation specific region +# region <- "The Americas" +# +# countries <- iati::dataActivity |> +# dplyr::filter( unhcr_region == region) |> +# dplyr::select(ctr_name) |> +# dplyr::distinct() |> +# dplyr::pull() +# +# for ( ctr in countries) { +# cat(paste0(ctr, "\n")) +# iati::template_prez(year = 2022, +# ctr_name = ctr, +# folder = "dev/Prez") } +``` + +```{r tests-template_prez} +test_that("template_prez works", { + expect_true(inherits(template_prez, "function")) +}) +``` + ```{r development-inflate, eval=FALSE} diff --git a/docs/articles/unhcr-programme.html b/docs/articles/unhcr-programme.html index 851f61a..1a98977 100644 --- a/docs/articles/unhcr-programme.html +++ b/docs/articles/unhcr-programme.html @@ -559,41 +559,70 @@

show_indicators_time)

-show_indicators_time(year = 2022,  
+show_indicators_time(year =  2020, 
              ctr_name = "Brazil",
               result_type_name = "Impact",
              type = "deviation"
              )

-show_indicators_time(year = 2019,  
+show_indicators_time(year =  2020,  
              ctr_name = "Brazil",
               result_type_name = "Output",
              type = "deviation"
              )

-show_indicators_time(year = 2022,  
+show_indicators_time(year =  2020, 
              ctr_name = "Brazil",
               result_type_name = "Outcome",
              type = "progress"
              )

-show_indicators_time(year = 2022,  
+show_indicators_time(year =  2020, 
              ctr_name = "Brazil",
               result_type_name = "Impact",
              type = "progress"
              )

-show_indicators_time(year = 2019,  
+show_indicators_time(year =  2020, 
              ctr_name = "Brazil",
               result_type_name = "Output",
              type = "progress"
              )

+ +
+

Template +

+
+

template_prez +

+
+
+## generate for one country
+# iati::template_prez(year = 2022, 
+#                     ctr_name = "Brazil",
+#                     folder = "dev/Prez")
+
+# ## Generate for all operation specific region
+# region <- "The Americas"
+# 
+# countries <- iati::dataActivity |> 
+#        dplyr::filter( unhcr_region ==  region) |>
+#        dplyr::select(ctr_name) |>
+#        dplyr::distinct() |>
+#        dplyr::pull()
+# 
+# for ( ctr in countries) {
+#     cat(paste0(ctr, "\n"))
+#     iati::template_prez(year = 2022, 
+#                     ctr_name = ctr,
+#                     folder = "dev/Prez")  }
+
diff --git a/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-1.png b/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-1.png index 068cabc..fc1ea61 100644 Binary files a/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-1.png and b/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-1.png differ diff --git a/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-2.png b/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-2.png index fbbd3ac..b6bc8a1 100644 Binary files a/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-2.png and b/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-2.png differ diff --git a/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-3.png b/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-3.png index 7532771..4581de6 100644 Binary files a/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-3.png and b/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-3.png differ diff --git a/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-4.png b/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-4.png index e5d453b..19db88f 100644 Binary files a/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-4.png and b/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-4.png differ diff --git a/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-5.png b/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-5.png index fbb22a1..d27224f 100644 Binary files a/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-5.png and b/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-5.png differ diff --git a/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-6.png b/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-6.png index 920467b..69d70b7 100644 Binary files a/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-6.png and b/docs/articles/unhcr-programme_files/figure-html/example-show_indicators_time-6.png differ diff --git a/docs/articles/unhcr-programme_files/figure-html/example-show_sectors_rbm-1.png b/docs/articles/unhcr-programme_files/figure-html/example-show_sectors_rbm-1.png index 33e3e98..e180b9b 100644 Binary files a/docs/articles/unhcr-programme_files/figure-html/example-show_sectors_rbm-1.png and b/docs/articles/unhcr-programme_files/figure-html/example-show_sectors_rbm-1.png differ diff --git a/docs/index.html b/docs/index.html index 9cefce8..14bf9d7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -73,6 +73,8 @@
+ +

Objective

@@ -93,7 +95,7 @@

InstallContext

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. 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….

+

Information from Global Focus is translated 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. 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?

@@ -186,7 +188,12 @@

Developers

- +
+

Dev status

+
    +
  • R-CMD-check
  • +
+
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index bca183c..c6d24fe 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -3,5 +3,5 @@ pkgdown: 2.0.7 pkgdown_sha: ~ articles: unhcr-programme: unhcr-programme.html -last_built: 2024-02-23T00:23Z +last_built: 2024-02-23T19:39Z diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png index 1457a84..17a3580 100644 Binary files a/docs/reference/Rplot001.png and b/docs/reference/Rplot001.png differ diff --git a/docs/reference/Rplot006.png b/docs/reference/Rplot006.png index 454cd41..8b744bc 100644 Binary files a/docs/reference/Rplot006.png and b/docs/reference/Rplot006.png differ diff --git a/docs/reference/dataBudget.html b/docs/reference/dataBudget.html index e427217..47bcca9 100644 --- a/docs/reference/dataBudget.html +++ b/docs/reference/dataBudget.html @@ -62,10 +62,44 @@

Usage

Format

- +

A data frame with 12 variables:

iati_identifier
+

character COLUMN_DESCRIPTION

+
budget_type
+

double COLUMN_DESCRIPTION

-
+
budget_status
+

double COLUMN_DESCRIPTION

+ +
budget_period_start
+

character COLUMN_DESCRIPTION

+ +
budget_period_end
+

character COLUMN_DESCRIPTION

+ +
budget_currency
+

character COLUMN_DESCRIPTION

+ +
budget_value_date
+

character COLUMN_DESCRIPTION

+ +
budget_value
+

double COLUMN_DESCRIPTION

+ +
budget_type_name
+

character COLUMN_DESCRIPTION

+ +
budget_type_description
+

character COLUMN_DESCRIPTION

+ +
budget_status_name
+

character COLUMN_DESCRIPTION

+ +
budget_status_description
+

character COLUMN_DESCRIPTION

+ + +

Source

https://iatistandard.org/en/iati-standard/203/

@@ -78,18 +112,18 @@

Examples} #> #> -#> |iati_identifier | budget_type| budget_status|budget_period_start |budget_period_end |budget_currency |budget_value_date |budget_value |budget_type_name |budget_type_description |budget_status_name |budget_status_description | -#> |:---------------------------|-----------:|-------------:|:-------------------|:-----------------|:---------------|:-----------------|:------------|:----------------|:-----------------------|:------------------|:-------------------------| -#> |XM-DAC-41121-2016-AFR-AGO | NA| NA|2016-01-01 |2016-12-31 |USD |2017-06-15 |3721489.92 |NA |NA |NA |NA | -#> |XM-DAC-41121-2016-AFR-BDI | NA| NA|2016-01-01 |2016-12-31 |USD |2017-06-15 |34538841.62 |NA |NA |NA |NA | -#> |XM-DAC-41121-2016-AFR-BFA | NA| NA|2016-01-01 |2016-12-31 |USD |2017-06-15 |21679175.82 |NA |NA |NA |NA | -#> |XM-DAC-41121-2016-AFR-BWA | NA| NA|2016-01-01 |2016-12-31 |USD |2017-06-15 |3333214.59 |NA |NA |NA |NA | -#> |XM-DAC-41121-2016-AFR-CAF | NA| NA|2016-01-01 |2016-12-31 |USD |2017-06-15 |57558703.669 |NA |NA |NA |NA | -#> |XM-DAC-41121-2016-AFR-CIV | NA| NA|2016-01-01 |2016-12-31 |USD |2017-06-15 |30785019.55 |NA |NA |NA |NA | -#> |XM-DAC-41121-2016-AFR-CMR | NA| NA|2016-01-01 |2016-12-31 |USD |2017-06-15 |98624602.509 |NA |NA |NA |NA | -#> |XM-DAC-41121-2016-AFR-CODRO | NA| NA|2016-01-01 |2016-12-31 |USD |2017-06-15 |209710336.16 |NA |NA |NA |NA | -#> |XM-DAC-41121-2016-AFR-COG | NA| NA|2016-01-01 |2016-12-31 |USD |2017-06-15 |32000000.31 |NA |NA |NA |NA | -#> |XM-DAC-41121-2016-AFR-DJI | NA| NA|2016-01-01 |2016-12-31 |USD |2017-06-15 |31987830.36 |NA |NA |NA |NA | +#> |iati_identifier | budget_type| budget_status|budget_period_start |budget_period_end |budget_currency |budget_value_date | budget_value|budget_type_name |budget_type_description |budget_status_name |budget_status_description | +#> |:---------------------------|-----------:|-------------:|:-------------------|:-----------------|:---------------|:-----------------|------------:|:----------------|:-----------------------|:------------------|:-------------------------| +#> |XM-DAC-41121-2016-AFR-AGO | NA| NA|2016-01-01 |2016-12-31 |USD |2017-06-15 | 3721490|NA |NA |NA |NA | +#> |XM-DAC-41121-2016-AFR-BDI | NA| NA|2016-01-01 |2016-12-31 |USD |2017-06-15 | 34538842|NA |NA |NA |NA | +#> |XM-DAC-41121-2016-AFR-BFA | NA| NA|2016-01-01 |2016-12-31 |USD |2017-06-15 | 21679176|NA |NA |NA |NA | +#> |XM-DAC-41121-2016-AFR-BWA | NA| NA|2016-01-01 |2016-12-31 |USD |2017-06-15 | 3333215|NA |NA |NA |NA | +#> |XM-DAC-41121-2016-AFR-CAF | NA| NA|2016-01-01 |2016-12-31 |USD |2017-06-15 | 57558704|NA |NA |NA |NA | +#> |XM-DAC-41121-2016-AFR-CIV | NA| NA|2016-01-01 |2016-12-31 |USD |2017-06-15 | 30785020|NA |NA |NA |NA | +#> |XM-DAC-41121-2016-AFR-CMR | NA| NA|2016-01-01 |2016-12-31 |USD |2017-06-15 | 98624603|NA |NA |NA |NA | +#> |XM-DAC-41121-2016-AFR-CODRO | NA| NA|2016-01-01 |2016-12-31 |USD |2017-06-15 | 209710336|NA |NA |NA |NA | +#> |XM-DAC-41121-2016-AFR-COG | NA| NA|2016-01-01 |2016-12-31 |USD |2017-06-15 | 32000000|NA |NA |NA |NA | +#> |XM-DAC-41121-2016-AFR-DJI | NA| NA|2016-01-01 |2016-12-31 |USD |2017-06-15 | 31987830|NA |NA |NA |NA |