Temperature fluctuations - The Code

By Mariachiara Fortuna | June 4, 2020

The tempFGN github repository contains all the material related to the paper: How does temperature vary over time? Evidence on the stationary and fractal nature of temperature by John Dagsvik, Mariachiara Fortuna, Sigmund H. Moen

All the materials are stored in the form of an R package. You can download or clone the repository and install the package: then all the functions will be available for usage. The same repository contains the online resources published as paper supplementary materials. These resources are available as .pdf files as well as .Rmd files, to allow the results reproduction.

tempFGN functions

The functions developed for the Temperature Fluctuations paper are available installing the tempFGN package. As usual for the R packages, the functions are stored in the /R folder. They are divided into 5 groups:

  • Preprocessing: contains functions for manipulating the time series
  • Plots: contains functions for producting the temperature plots
  • Estimators: contains functions for the parameters estimation
  • Autocorrelation: contains functions for the estimating the autocorrelation and correcting its bias
  • Test: contains functions for the inferential tests


All the data are store into the /inst/data folder. A wide description of the data and their organization can be found here.

Online resources

All the online resources and supplementary materials published with the paper are stored into the /inst folder. Each of these files is available as .pdf file and as .Rmd file, for a full reproducibility of all the analysis.

The folder contains the following materials:

  • Paper results
  • Appendix B: Summary data information
  • Appendix C: Estimation and test results
  • Appendix D: Properties of the estimators
  • Appendix E: Summary infographics for each weather station
  • Appendix F: Selection process and cleaning procedure
  • Functions code, written as plain text. This file was required as supplementary material for the paper publication.



  1. Clone or download the tempFGN package

  2. Open the tempFGN.Rproj file from RStudio

  3. Build the tempFGN package (you can use the shortcut Ctrl+Shift+B)

  4. Open the .Rmd file what you want to reproduce

  5. Execute the code


For questions or inquiries write an email to