Learn R Programming

MaddisonData (version 1.0.2)

MaddisonSources: Maddison Project data

Description

The Maddison project collates historical economic statistics from many sources. MaddisonSources is a list of tibble::tibbles with ISO names giving the sources of GDP per capita for different years for the said country.

MaddisonYears is a data.frame giving yearBegin and yearEnd and the number of each source in MaddisonSpources for each ISO.

Usage

MaddisonSources

MaddisonYears

Arguments

Format

MaddisonSources

A named list of tibble::tibbles, one for each country, named with the ISO country codes. Each tibble has one row for each source for the indicated ISO and two columns:

years

character variable of year(s) for this source starting with year 1 CE.

source

character variable giving the source for the years described.

In addition, MaddisonSources has an attribute since2008, which says, "gdppc since 2008: Total Economy Database (TED) from the Conference Board for all countries included in TED and UN national accounts statistics for all others."

MaddisonYears

A data.frames with 4 columns:

ISO

3-letter country code.

yearBegin, yearEnd

Integer year begin and end for each source.

sourceNum

Integer of the source within MaddisonSources[[ISO]].

An object of class data.frame with 133 rows and 4 columns.

Examples

Run this code
MaddisonSources[['GBR']]
MaddisonSources[['GBR']][, 1, drop=TRUE] 
# = c('1', '1252–1700 (England)', '1700–1870') 
# for data from the year 1 
# and for England only between 1252 and 1700, etc. 

MaddisonSources[['IRN']][, 1, drop=TRUE] 
# = '1820, 1870, 1913, 1950'
# for those 4 years only. 

MaddisonSources[c('GBR', 'USA')]

MaddisonSources[['GBR']][, 1, drop=TRUE] 
# = c('1', '1252–1700 (England)', '1700–1870') 

MaddisonYears[MaddisonYears$ISO=='GBR', ] = 
data.frame(
ISO=rep('GBR', 3), 
yearBegin=c(1, 1252, 1700), 
yearEnd  =c(1, 1700, 1870), 
sourceNum=1:3
)

MaddisonSources[['EGY']][, 1, drop=TRUE] 
# = c('1', '700 – 1500', '1820, 1870, 1913, 1950')

MaddisonYears[MaddisonYears$ISO=='EGY', ] = 
data.frame(
ISO=rep('EGY', 6), 
yearBegin=c(1,  700, 1820, 1870, 1913, 1950), 
yearEnd  =c(1, 1500, 1820, 1870, 1913, 1950), 
sourceNum=c(1,    2, rep(3, 4))
)

Run the code above in your browser using DataLab