gemrtables: gemrtables: A package for generating the Global Education...

Description Usage Arguments Details Value import functions clean functions summarise functions import/clean functions Examples

Description

gemrtables is the primary function for this package, generating the statistical tables in a 'wide' data format in excel, or a 'long' format data frame.

gemrtables is the main function to generate the UNESCO Global Education Monitoring (GEM) Report Statistical tables, returning a dataframe or an xlsx workbook

Usage

1
2
gemrtables(region = "SDG.region", ref_year, export = TRUE, path, key,
  password, pc_flag_cut = 66, pc_comp_cut2 = 33, removeCache)

Arguments

region

regional grouping on which to compute aggregate values. Options are 'GEMR.region', 'UIS.region' or 'SDG.region'. Defaults to 'SDG.region'.

ref_year

A four digit numeric of the reference year. Default is two years prior to the current year.

export

If ‘TRUE' returns an xlsx workbook in ’wide' format, with seperate worksheets per table. If ‘FALSE' (the default) returns a data frame in ’long' format.

path

File path to write xlsx workbook (character). Overwrites existing file.

key

UIS api subcription key.

password

password to cedar database.

removeCache

Character vector of unprocessed dataframes. Options are c("uis_up", "cedar_up", "wb_up", "eurostat_up", "oecd_up")

Details

In addition, the gemrtables package provides three categories of functions: import, import/clean, clean and summarise.

Value

A data frame or an xlsx workbook.

import functions

The import functions read data from SDMX url queries or the GEM cedar SQL database.

clean functions

Clean functions sort data into a standard 'long' format with six columns:

  1. iso2c: ISO 3166-1 alpha-2 country code

  2. year: year of observation

  3. ind: standardised indicator name, matching with that in the inds() data frame (for indicators to be included in the stat tables)

  4. value: observation value

  5. val_status: observation status

  6. source of the observation (matching to the inds() data frame)

In addition several clean function compute new observations.

summarise functions

summarise functions compute new observations -aggregates and parity indices

import/clean functions

These functions largely serve as a wrapper for import and clean functions.

Examples

1
2
3
gemrtables(ref_year = 2016, export = TRUE, path = x, key = y, password = z)

df <- gemrtables(region = "UIS.region", ref_year = 2016, export = FALSE, key = y, password = z)

northeastloon/gemrtables documentation built on May 4, 2019, 3:09 a.m.