Learn R Programming

MaddisonData (version 1.0.2)

getMaddisonSources: Get Maddison sources

Description

The Maddison project collates historical economic statistics from many sources.

They have a citation policy: CONDITIONS UNDER WHICH ALL ORIGINAL PAPERS MUST BE CITED:

a) If the data is shown in any graphical form b) If subsets of the full dataset that include less than a dozen (12) countries are used for statistical analysis or any other purposes

When neither a) or b) apply, then the MDP as a whole can be cited.

getMaddisonSources returns a data.frame of relevant sources for a particular application.

Usage

getMaddisonSources(
  ISO = NULL,
  plot = TRUE,
  sources = MaddisonData::MaddisonSources,
  years = MaddisonData::MaddisonYears
)

Value

a tibble::tibble with 3 columns:

ISO

3-letter ISO code for country.

years

character vector of years or year ranges for which source applies.

source

character vector of sources.

in the format of MaddisonSources.

Arguments

ISO

either NULL to return all sources or a character vector of ISO codes for the countries included in the analysis or a data.frame with the first column being the ISO codes followed by yearBegin and optionally yearEnd.

plot

logical indicating whether the use does nor does not include plotting data. The Maddison project requires citing all relevant MaddisonSources if they are plotted, denoted here by plot = TRUE. If no data are plotted, then the Maddison project requires citing all sources only if less than a dozen are used, denoted here by plot = FALSE, in which case, the Maddison project requires a specific project-level citation. Default = TRUE.

sources

list of sources in the format of MaddisonSources; default is MaddisonSources.

years

data.frame in the format of MaddisonYears; default is MaddisonYears.

Examples

Run this code
getMaddisonSources() # all 
getMaddisonSources(plot=FALSE) # only MDP 
getMaddisonSources('GBR') # GBR 
getMaddisonSources(names(MaddisonSources)[1:12], FALSE) # only MDP 
getMaddisonSources(data.frame(ISO=c('GBR', 'USA'), 
             yearBegin=rep(1500, 2)) ) #GBR, USA since 1500 
getMaddisonSources('AUS') # AUS: no special sources for AUS. 

Run the code above in your browser using DataLab