#+TITLE: CO2 concentration in the atmosphere since 1958 #+AUTHOR: LOAN TRUONG #+DATE: 23 Mar #+LANGUAGE: en # #+PROPERTY: header-args :eval never-export #+HTML_HEAD: #+HTML_HEAD: #+HTML_HEAD: #+HTML_HEAD: #+HTML_HEAD: #+HTML_HEAD: import pandas as pd import plotly.offline as py import plotly.graph_objs as go import datetime as dt py.init_notebook_mode(connected=True) co2data = pd.read_csv("module3/exo3/monthly_in_situ_co2_mlo.csv") co2data.head(11) Finally, an example for graphical output: #+begin_src python :results output file :session :var matplot_lib_filename="./cosxsx.png" :exports results import matplotlib.pyplot as plt plt.figure(figsize=(10,5)) plt.plot(x,numpy.cos(x)/x) plt.tight_layout() plt.savefig(matplot_lib_filename) print(matplot_lib_filename) #+end_src #+RESULTS: [[file:./cosxsx.png]] Note the parameter ~:exports results~, which indicates that the code will not appear in the exported document. We recommend that in the context of this MOOC, you always leave this parameter setting as ~:exports both~, because we want your analyses to be perfectly transparent and reproducible. Watch out: the figure generated by the code block is /not/ stored in the org document. It's a plain file, here named ~cosxsx.png~. You have to commit it explicitly if you want your analysis to be legible and understandable on GitLab. Finally, don't forget that we provide in the resource section of this MOOC a configuration with a few keyboard shortcuts that allow you to quickly create code blocks in Python by typing ~