import numpy as np
import matplotlib.pyplot as plt

#Example 12
def CO2():
    '''Data for Exercise 18.12: Atmospheric CO2 values derived from in situ air samples collected at Mauna Loa, Hawaii, USA.'''
    ''' CO2 expressed as a mole fraction in dry air, micromol/mol, abbreviated as ppm; x = year, y = yearly mean [ppm]'''
    
    x = np.array([[1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 
                   1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 
                   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008]]).T

    y = np.array([[315.97, 316.91, 317.64, 318.45, 318.99, 319.62, 320.04, 321.38, 322.16, 323.04, 324.62, 325.68, 326.32, 327.45, 329.68,	
                   330.18, 331.11, 332.04, 333.83, 335.40, 336.84, 338.75, 340.11, 341.45, 343.05, 344.65, 346.12, 347.42, 349.19, 351.57,	
                   353.12, 354.39, 355.61, 356.45, 357.10, 358.83, 360.82, 362.61, 363.73, 366.70, 368.38, 369.55, 371.14, 373.28, 375.80,	
                   377.52, 379.80, 381.90, 383.79, 385.60]]).T
    
    return x, y

