Package 'gnr'

Title: R Companion to the Global Nutrition Report
Description: The Global Nutrition Report's purpose is to produce a single, authoritative source on progress toward addressing critical gaps in the nutrition accountability framework, both at national and international levels. This is a companion package to the Global Nutrition Report primarily for accessing the data used in the report and to reproduce the data visualisation produced in the report. This package contains functions that allow users to interrogate the same data and produce customised charts and other visualisation products.
Authors: Ernest Guevarra [aut, cre, cph]
Maintainer: Ernest Guevarra <[email protected]>
License: GPL-3
Version: 0.0.0.9000
Built: 2025-02-06 23:22:43 UTC
Source: https://github.com/nutriverse/gnr

Help Index


Download GNR country profiles dataset

Description

Download GNR country profiles dataset

Usage

download_gnr_country_profiles(path = ".")

Arguments

path

Directory to download the specified report into. Default to current working directory

Value

A tibble providing details of file downloaded.

Examples

download_gnr_country_profiles(path = tempdir())

Download GNR data

Description

Download GNR data

Usage

download_gnr_data(.year = as.character(c(2018, 2020, 2021, 2022)), path = ".")

Arguments

.year

A character value of the report year to download. Default to "2018"

path

Directory to download the specified report into. Default to current working directory

Value

A tibble providing details of file downloaded.

Examples

download_gnr_data(path = tempdir())

Download Nutrition for Growth Assessments data

Description

Download Nutrition for Growth Assessments data

Usage

download_n4g_data(path = ".")

Arguments

path

Directory to download the specified report into. Default to current working directory

Value

A tibble providing details of file downloaded.

Examples

download_n4g_data(path = tempdir())

Download links for various GNR datasets

Description

Download links for various GNR datasets

Usage

gnr_data

Format

A tibble with 5 columns and 6 rows:

Variable Description
year Year dataset was created
code Dataset code
file_type Download file type
name Name of dataset
link Download link for dataset

Source

Global Nutrition Report

Examples

gnr_data

Description of variables that occurs in the Global Nutrition Report (GNR) dataset

Description

Description of variables that occurs in the Global Nutrition Report (GNR) dataset

Usage

indicator_description

Format

A data.frame with 709 rows and 3 columns:

section

Section of the report

variable

Data variable

description

Description of variable

Source

Global Nutrition Report

Examples

indicator_description

Global Nutrition Report ggplot theme

Description

Global Nutrition Report ggplot theme

Usage

theme_gnr(base_size = 11, base_family = "")

Arguments

base_size

Base font size

base_family

Base font family

Value

A ggplot theme

Examples

# Apply theme
theme_gnr()