CIAFactbook             package:fEcofin             R Documentation

_C_I_A _F_a_c_t_b_o_o_k

_D_e_s_c_r_i_p_t_i_o_n:

     A collection and description of functions to extract  financial
     and economic market statistics from the data available in the CIA
     World Factbook. 

     The functions are:

       'ciaCountries'    Returns a list of CIA country codes,
       'ciaIndicators'   Returns a list of CIA indicator codes,
       'ciaByCountry'    Returns all Indicators by country,
       'ciaByIndicator'  Returns for all countries indicator ranking.

_U_s_a_g_e:

     ciaCountries()
     ciaIndicators()

     ciaByCountry(code = "CH", from = FALSE, names = FALSE, details = FALSE)
     ciaByIndicator(code = 2001, from = FALSE, details = FALSE)

     ## S3 method for class 'ciaCountries':
     print(x, ...)
     ## S3 method for class 'ciaIndicators':
     print(x, ...)

_A_r_g_u_m_e_n_t_s:

    code: [ciaByCountry] - 
           a character string denoting the country code. 
           [ciaByIndicator] - 
           a character string or integer denoting the indicator code. 

 details: a logical flag. Should details be printed? By default 
          'FALSE'. 

    from: a logical flag. If set to 'TRUE' an additional column will be
          returned with the information when the data were recorded. 

   names: a logical flag. If set to 'TRUE"' then the full names of the
          countries will be returned in an additional column 

       x: x an object of class 'ciaCountries' or  'ciaIndicators' as
          returned by the functions  'ciaCountry' or 'ciaIndicator',
          respectively. 

     ...: arguments to be past to the 'print' method. 

_V_a_l_u_e:

     'ciaCountries' 
      returns a data frame with countries and contry codes. 

     'ciaIndicators' 
      returns a data frame with indicator codes. 

     'ciaByCountry' 
      returns a data frame with indicators by country. 

     'ciaByIndicator' 
      returns a data frame with ranked data for a given indicator.

_A_u_t_h_o_r(_s):

     Diethelm Wuertz for the Rmetrics R-port.

_R_e_f_e_r_e_n_c_e_s:

     CIA, 2004,  _CIA Factbbook 2004_,
     http://www.cia.gov/cia/publications/factbook.

_E_x_a_m_p_l_e_s:

     ## Pie Chart from CIA Oil Production Indicator (Code 2173): 
        # Search for Code:
        ciaIndicators()
        # Create Pie Chart:
        OilProduction = as.integer(as.vector(ciaByIndicator(2173)[2:11, 2]))
        names(OilProduction) = as.vector(ciaByIndicator(2173)[2:11,1])
        print(OilProduction) 
        pie(OilProduction, col = rainbow(10))
        title(main = "Oil Production 2004\n bbl/day")
        mtext("Source: CIA World Factbook", side = 1)

