ai_normalize: Normalize the data per year and indicator

View source: R/ai.R

ai_normalizeR Documentation

Normalize the data per year and indicator

Usage

ai_normalize(data)

Arguments

data

A dataframe generated by (ai())} } { A data frame with the data and the new column value_norm } { Normalization process: } { 1. Compute the mean (M) and the standar deviation (S) of the indicator value per year and indicator 2. Compute the indicator value normalize with the following formula ind.value_norm=(value-M)/S * Multiplier where the Multiplier is 1 if the indicator is positive and -1 if the indicator is negativa. A positive indicator means that higher values of the indicator are prefered (GDP per capita) and negative indicator (unemployment rate) means that lower values are prefered. The multiplier is computed based on keywords found in the indicator. The keywords can be found in (agregadorindicadores::keywords)

the metadata of the indicators should be in english

#Normalize all indicators of Numbers for Development for year 2014 ind<- ind_search(pattern = "Numbers for Development", c("api")) df<-ai(indicator = ind$src_id_ind, startdate=2014, enddate=2014) ai_normalize()


EL-BID/Agregador-de-indicadores documentation built on Sept. 15, 2024, 7:43 p.m.